From d780c57e68c80655669a3b01af46b9978f5698ef Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 11 Jan 2006 23:49:28 +0000 Subject: trunk/Master/texmf-dist/source/generic git-svn-id: svn://tug.org/texlive/trunk@115 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/source/generic/babel/athnum.dtx | 278 + Master/texmf-dist/source/generic/babel/babel.drv | 188 + Master/texmf-dist/source/generic/babel/babel.dtx | 5793 ++++++++++++++ Master/texmf-dist/source/generic/babel/babel.ins | 250 + Master/texmf-dist/source/generic/babel/bahasa.dtx | 243 + Master/texmf-dist/source/generic/babel/bahasa.ins | 148 + Master/texmf-dist/source/generic/babel/base.ins | 299 + Master/texmf-dist/source/generic/babel/basque.dtx | 390 + Master/texmf-dist/source/generic/babel/basque.ins | 148 + .../texmf-dist/source/generic/babel/bbcompat.dtx | 261 + .../texmf-dist/source/generic/babel/bbidxglo.dtx | 124 + Master/texmf-dist/source/generic/babel/bbplain.dtx | 717 ++ Master/texmf-dist/source/generic/babel/breton.dtx | 365 + Master/texmf-dist/source/generic/babel/breton.ins | 148 + .../texmf-dist/source/generic/babel/bulgarian.dtx | 1037 +++ .../texmf-dist/source/generic/babel/bulgarian.ins | 148 + Master/texmf-dist/source/generic/babel/catalan.dtx | 712 ++ Master/texmf-dist/source/generic/babel/catalan.ins | 148 + .../texmf-dist/source/generic/babel/croatian.dtx | 226 + .../texmf-dist/source/generic/babel/croatian.ins | 148 + Master/texmf-dist/source/generic/babel/czech.dtx | 276 + Master/texmf-dist/source/generic/babel/czech.ins | 148 + Master/texmf-dist/source/generic/babel/danish.dtx | 304 + Master/texmf-dist/source/generic/babel/danish.ins | 148 + Master/texmf-dist/source/generic/babel/dutch.dtx | 560 ++ Master/texmf-dist/source/generic/babel/dutch.ins | 148 + Master/texmf-dist/source/generic/babel/english.dtx | 451 ++ Master/texmf-dist/source/generic/babel/english.ins | 148 + .../texmf-dist/source/generic/babel/esperanto.dtx | 341 + .../texmf-dist/source/generic/babel/esperanto.ins | 148 + .../texmf-dist/source/generic/babel/estonian.dtx | 426 + .../texmf-dist/source/generic/babel/estonian.ins | 148 + Master/texmf-dist/source/generic/babel/finnish.dtx | 362 + Master/texmf-dist/source/generic/babel/finnish.ins | 148 + Master/texmf-dist/source/generic/babel/frenchb.dtx | 2477 ++++++ Master/texmf-dist/source/generic/babel/frenchb.ins | 155 + .../texmf-dist/source/generic/babel/galician.dtx | 476 ++ .../texmf-dist/source/generic/babel/galician.ins | 148 + Master/texmf-dist/source/generic/babel/german.ins | 149 + Master/texmf-dist/source/generic/babel/germanb.dtx | 543 ++ Master/texmf-dist/source/generic/babel/greek.dtx | 864 ++ Master/texmf-dist/source/generic/babel/greek.fdd | 349 + Master/texmf-dist/source/generic/babel/greek.ins | 158 + Master/texmf-dist/source/generic/babel/grmath.dtx | 168 + Master/texmf-dist/source/generic/babel/grsymb.dtx | 131 + Master/texmf-dist/source/generic/babel/heb209.dtx | 165 + Master/texmf-dist/source/generic/babel/hebinp.dtx | 550 ++ Master/texmf-dist/source/generic/babel/hebrew.dtx | 3329 ++++++++ Master/texmf-dist/source/generic/babel/hebrew.fdd | 1297 +++ Master/texmf-dist/source/generic/babel/hebrew.ins | 215 + .../texmf-dist/source/generic/babel/icelandic.dtx | 749 ++ .../texmf-dist/source/generic/babel/icelandic.ins | 148 + .../source/generic/babel/interlingua.dtx | 207 + .../source/generic/babel/interlingua.ins | 148 + Master/texmf-dist/source/generic/babel/irish.dtx | 218 + Master/texmf-dist/source/generic/babel/irish.ins | 148 + Master/texmf-dist/source/generic/babel/italian.dtx | 857 ++ Master/texmf-dist/source/generic/babel/italian.ins | 155 + Master/texmf-dist/source/generic/babel/latin.dtx | 623 ++ Master/texmf-dist/source/generic/babel/latin.ins | 150 + .../texmf-dist/source/generic/babel/lsorbian.dtx | 239 + Master/texmf-dist/source/generic/babel/magyar.dtx | 1411 ++++ Master/texmf-dist/source/generic/babel/magyar.ins | 148 + .../texmf-dist/source/generic/babel/ngermanb.dtx | 357 + Master/texmf-dist/source/generic/babel/norsk.dtx | 453 ++ Master/texmf-dist/source/generic/babel/norsk.ins | 148 + Master/texmf-dist/source/generic/babel/polish.dtx | 563 ++ Master/texmf-dist/source/generic/babel/polish.ins | 148 + .../texmf-dist/source/generic/babel/portuges.dtx | 473 ++ .../texmf-dist/source/generic/babel/portuges.ins | 148 + .../texmf-dist/source/generic/babel/romanian.dtx | 232 + .../texmf-dist/source/generic/babel/romanian.ins | 148 + .../texmf-dist/source/generic/babel/russianb.dtx | 1238 +++ .../texmf-dist/source/generic/babel/russianb.ins | 147 + Master/texmf-dist/source/generic/babel/samin.dtx | 232 + Master/texmf-dist/source/generic/babel/samin.ins | 148 + .../texmf-dist/source/generic/babel/scottish.dtx | 209 + .../texmf-dist/source/generic/babel/scottish.ins | 148 + Master/texmf-dist/source/generic/babel/serbian.dtx | 312 + Master/texmf-dist/source/generic/babel/serbian.ins | 148 + Master/texmf-dist/source/generic/babel/slovak.dtx | 417 + Master/texmf-dist/source/generic/babel/slovak.ins | 148 + Master/texmf-dist/source/generic/babel/slovene.dtx | 302 + Master/texmf-dist/source/generic/babel/slovene.ins | 148 + Master/texmf-dist/source/generic/babel/sorbian.ins | 149 + Master/texmf-dist/source/generic/babel/spanish.dtx | 2638 +++++++ Master/texmf-dist/source/generic/babel/spanish.ins | 151 + Master/texmf-dist/source/generic/babel/swedish.dtx | 442 ++ Master/texmf-dist/source/generic/babel/swedish.ins | 148 + Master/texmf-dist/source/generic/babel/turkish.dtx | 309 + Master/texmf-dist/source/generic/babel/turkish.ins | 148 + .../texmf-dist/source/generic/babel/ukraineb.dtx | 1158 +++ .../texmf-dist/source/generic/babel/ukraineb.ins | 147 + Master/texmf-dist/source/generic/babel/user.drv | 170 + .../texmf-dist/source/generic/babel/usorbian.dtx | 360 + Master/texmf-dist/source/generic/babel/welsh.dtx | 207 + Master/texmf-dist/source/generic/babel/welsh.ins | 148 + .../generic/borceux/compatibility/OldDiagram | 291 + .../generic/borceux/compatibility/OldMaxiDiagram | 209 + .../generic/borceux/compatibility/OldMicroDiagram | 90 + .../generic/borceux/compatibility/OldMiniDiagram | 107 + .../borceux/compatibility/OldMultipleArrows | 49 + .../source/generic/german/betatest/00readme.1st | 7 + .../source/generic/german/german.MISSING | 10 + Master/texmf-dist/source/generic/german/german.dtx | 2331 ++++++ Master/texmf-dist/source/generic/german/german.ins | 84 + .../texmf-dist/source/generic/kastrup/binhex.drv | 49 + .../texmf-dist/source/generic/kastrup/binhex.dtx | 518 ++ .../texmf-dist/source/generic/kastrup/binhex.ins | 32 + .../texmf-dist/source/generic/mfpic/grafbase.dtx | 5900 ++++++++++++++ Master/texmf-dist/source/generic/mfpic/mfpic.dtx | 5045 ++++++++++++ Master/texmf-dist/source/generic/mfpic/mfpic.ins | 90 + .../source/generic/midnight/00readme.txt | 18 + Master/texmf-dist/source/generic/midnight/Index | 23 + Master/texmf-dist/source/generic/psfig/pscompress | 12 + .../source/generic/psfig/unsupported/arbortext.pro | 100 + .../generic/psfig/unsupported/dospecial.frag | 43 + .../generic/psfig/unsupported/dospecial.patch | 37 + .../generic/psfig/unsupported/graphpaper.ps.gz | Bin 0 -> 448 bytes .../generic/psfig/unsupported/macdemo/README | 76 + .../generic/psfig/unsupported/macdemo/cleanfig | 3 + .../psfig/unsupported/macdemo/figs/box.ps.gz | Bin 0 -> 105 bytes .../psfig/unsupported/macdemo/figs/cm.ps.gz | Bin 0 -> 159 bytes .../psfig/unsupported/macdemo/figs/piechart.ps.gz | Bin 0 -> 2456 bytes .../psfig/unsupported/macdemo/figs/pretzel.ps.gz | Bin 0 -> 207 bytes .../psfig/unsupported/macdemo/figs/rosette.ps.gz | Bin 0 -> 1240 bytes .../psfig/unsupported/macdemo/figs/starlines.ps.gz | Bin 0 -> 261 bytes .../psfig/unsupported/macdemo/figs/trevor.ps.gz | Bin 0 -> 16054 bytes .../psfig/unsupported/macdemo/figs/zip.ps.gz | Bin 0 -> 204 bytes .../generic/psfig/unsupported/macdemo/lprep68.pro | 446 ++ .../psfig/unsupported/macdemo/lprep68.procs | 439 ++ .../generic/psfig/unsupported/macdemo/lprep70.pro | 451 ++ .../psfig/unsupported/macdemo/lprep70.procs | 450 ++ .../generic/psfig/unsupported/macdemo/macdemo.tex | 19 + .../unsupported/macdemo/macfigs/bullet.fig68.Z | Bin 0 -> 11016 bytes .../unsupported/macdemo/macfigs/bullet.fig68.bb | 2 + .../psfig/unsupported/macdemo/macfigs/dave.fig68.Z | Bin 0 -> 3596 bytes .../unsupported/macdemo/macfigs/dave.fig68.bb | 2 + .../unsupported/macdemo/macfigs/macdraw.fig68.Z | 4 + .../unsupported/macdemo/macfigs/macdraw.fig68.bb | 2 + .../psfig/unsupported/macdemo/stripfonts.awk | 5 + .../source/generic/psfig/unsupported/psfig-li.pro | 100 + .../source/generic/psfig/unsupported/psfig-li.tex | 391 + .../source/generic/pst-fr3d/pst-fr3d.dtx | 837 ++ .../source/generic/pst-fr3d/pst-fr3d.ins | 37 + Master/texmf-dist/source/generic/realcalc/readme | 39 + Master/texmf-dist/source/generic/ruhyphen/BUGS | 75 + Master/texmf-dist/source/generic/ruhyphen/Makefile | 10 + Master/texmf-dist/source/generic/ruhyphen/README | 368 + .../source/generic/ruhyphen/README.ruhyphal | 118 + .../source/generic/ruhyphen/hyphen.rules | 129 + Master/texmf-dist/source/generic/ruhyphen/mkcyryo | 22 + .../texmf-dist/source/generic/ruhyphen/reduce-patt | 8 + Master/texmf-dist/source/generic/ruhyphen/sorthyph | 9 + Master/texmf-dist/source/generic/ruhyphen/sortkoi8 | 16 + Master/texmf-dist/source/generic/ruhyphen/trans | 9 + .../texmf-dist/source/generic/shapepar/proshap.py | 350 + .../source/generic/tap/tabcv/sampdos/0sampdos.inf | 5 + .../source/generic/tap/tabcv/sampdos/post1.tex | 3 + .../source/generic/tap/tabcv/sampdos/post2.tex | 4 + .../source/generic/tap/tabcv/sampdos/prea1.tex | 5 + .../source/generic/tap/tabcv/sampdos/prea2.tex | 7 + .../source/generic/tap/tabcv/sampdos/prea3.tex | 6 + .../source/generic/tap/tabcv/sampdos/tapcv0.raw | 5 + .../source/generic/tap/tabcv/sampdos/tapcv1.raw | 9 + .../source/generic/tap/tabcv/sampdos/tapcv2.raw | 11 + .../source/generic/tap/tabcv/sampdos/tapcv3.raw | 15 + .../source/generic/tap/tabcv/sampdos/tapcv4.raw | 8 + .../source/generic/tap/tabcv/sampdos/tapcv5.raw | 15 + .../source/generic/tap/tabcv/sampdos/tapcv6.raw | 36 + .../source/generic/tap/tabcv/sampdos/tcv.bat | 16 + .../source/generic/tap/tabcv/sampdos/tcv_.bat | 4 + .../texmf-dist/source/generic/tap/tabcv/tapcv.awk | 239 + .../source/generic/textmerg/textmerg.drv | 18 + .../source/generic/textmerg/textmerg.dtx | 890 +++ .../source/generic/textmerg/textmerg.ins | 69 + .../texmf-dist/source/generic/wsuipa/README.wsuipa | 8 + .../texmf-dist/source/generic/wsuipa/changes.dec93 | 11 + .../texmf-dist/source/generic/wsuipa/changes.jun91 | 11 + .../texmf-dist/source/generic/wsuipa/changes.mar91 | 10 + .../texmf-dist/source/generic/wsuipa/changes.may92 | 28 + .../texmf-dist/source/generic/wsuipa/changes.nov90 | 17 + Master/texmf-dist/source/generic/xypic/CATALOG.doc | 54 + Master/texmf-dist/source/generic/xypic/COPYING | 339 + Master/texmf-dist/source/generic/xypic/ChangeLog | 788 ++ Master/texmf-dist/source/generic/xypic/INSTALL | 417 + .../texmf-dist/source/generic/xypic/INSTALL.OzTeX | 600 ++ .../source/generic/xypic/INSTALL.Textures | 393 + Master/texmf-dist/source/generic/xypic/MAKE | 259 + Master/texmf-dist/source/generic/xypic/MANIFEST | 111 + Master/texmf-dist/source/generic/xypic/Makefile | 1528 ++++ Master/texmf-dist/source/generic/xypic/README | 106 + Master/texmf-dist/source/generic/xypic/TRAILER | 91 + Master/texmf-dist/source/generic/xypic/VERSIONS | 103 + Master/texmf-dist/source/generic/xypic/doc2tex.com | 114 + Master/texmf-dist/source/generic/xypic/dvitogif89a | 207 + Master/texmf-dist/source/generic/xypic/import1.eps | 1550 ++++ Master/texmf-dist/source/generic/xypic/install-tds | 147 + Master/texmf-dist/source/generic/xypic/kris.eps | 587 ++ Master/texmf-dist/source/generic/xypic/latin1.sty | 242 + Master/texmf-dist/source/generic/xypic/movie.cls | 325 + .../source/generic/xypic/pnmrawtopcropwhite.c | 175 + Master/texmf-dist/source/generic/xypic/ross.eps | 397 + Master/texmf-dist/source/generic/xypic/xy.doc | 8324 ++++++++++++++++++++ Master/texmf-dist/source/generic/xypic/xy.sty | 103 + .../source/generic/xypic/xy16textures.doc | 294 + .../texmf-dist/source/generic/xypic/xy17oztex.doc | 301 + Master/texmf-dist/source/generic/xypic/xy2cell.doc | 1839 +++++ Master/texmf-dist/source/generic/xypic/xyall.doc | 93 + Master/texmf-dist/source/generic/xypic/xyarc.doc | 1436 ++++ Master/texmf-dist/source/generic/xypic/xyarrow.doc | 1881 +++++ .../texmf-dist/source/generic/xypic/xycmactex.doc | 71 + Master/texmf-dist/source/generic/xypic/xycmtip.doc | 93 + Master/texmf-dist/source/generic/xypic/xycolor.doc | 349 + .../texmf-dist/source/generic/xypic/xycrayon.doc | 82 + Master/texmf-dist/source/generic/xypic/xycurve.doc | 4920 ++++++++++++ Master/texmf-dist/source/generic/xypic/xydoc.back | 1 + Master/texmf-dist/source/generic/xypic/xydoc.bib | 764 ++ Master/texmf-dist/source/generic/xypic/xydoc.sty | 1270 +++ Master/texmf-dist/source/generic/xypic/xydocps.doc | 34 + Master/texmf-dist/source/generic/xypic/xydummy.doc | 97 + .../texmf-dist/source/generic/xypic/xydvidrv.doc | 98 + Master/texmf-dist/source/generic/xypic/xydvips.doc | 329 + .../texmf-dist/source/generic/xypic/xydvitops.doc | 346 + Master/texmf-dist/source/generic/xypic/xyemtex.doc | 243 + Master/texmf-dist/source/generic/xypic/xyframe.doc | 1213 +++ Master/texmf-dist/source/generic/xypic/xygraph.doc | 710 ++ Master/texmf-dist/source/generic/xypic/xyguide.man | 2285 ++++++ .../texmf-dist/source/generic/xypic/xyidioms.doc | 283 + .../texmf-dist/source/generic/xypic/xyimport.doc | 245 + Master/texmf-dist/source/generic/xypic/xyknot.doc | 2014 +++++ Master/texmf-dist/source/generic/xypic/xylatex.ini | 77 + Master/texmf-dist/source/generic/xypic/xyline.doc | 664 ++ .../texmf-dist/source/generic/xypic/xymacpat.xyp | 61 + .../texmf-dist/source/generic/xypic/xymatrix.doc | 1345 ++++ Master/texmf-dist/source/generic/xypic/xymovie.doc | 161 + .../texmf-dist/source/generic/xypic/xynecula.doc | 594 ++ Master/texmf-dist/source/generic/xypic/xyoztex.doc | 316 + Master/texmf-dist/source/generic/xypic/xypic.doc | 75 + Master/texmf-dist/source/generic/xypic/xypic.map | 66 + Master/texmf-dist/source/generic/xypic/xypic.sty | 29 + Master/texmf-dist/source/generic/xypic/xypoly.doc | 1262 +++ Master/texmf-dist/source/generic/xypic/xyps-c.doc | 187 + .../texmf-dist/source/generic/xypic/xyps-col.doc | 165 + Master/texmf-dist/source/generic/xypic/xyps-f.doc | 270 + Master/texmf-dist/source/generic/xypic/xyps-l.doc | 195 + .../texmf-dist/source/generic/xypic/xyps-pro.doc | 253 + Master/texmf-dist/source/generic/xypic/xyps-ps.doc | 750 ++ Master/texmf-dist/source/generic/xypic/xyps-r.doc | 226 + Master/texmf-dist/source/generic/xypic/xyps-s.doc | 144 + Master/texmf-dist/source/generic/xypic/xyps-t.doc | 168 + Master/texmf-dist/source/generic/xypic/xyps.doc | 1209 +++ .../texmf-dist/source/generic/xypic/xypsdict.doc | 375 + .../texmf-dist/source/generic/xypic/xypspatt.doc | 182 + Master/texmf-dist/source/generic/xypic/xyrecat.doc | 95 + Master/texmf-dist/source/generic/xypic/xyrefer.man | 509 ++ .../texmf-dist/source/generic/xypic/xyrotate.doc | 538 ++ Master/texmf-dist/source/generic/xypic/xysmart.doc | 569 ++ Master/texmf-dist/source/generic/xypic/xytex.ini | 60 + .../texmf-dist/source/generic/xypic/xytextures.doc | 291 + Master/texmf-dist/source/generic/xypic/xytile.doc | 472 ++ Master/texmf-dist/source/generic/xypic/xytips.doc | 239 + Master/texmf-dist/source/generic/xypic/xytp-f.doc | 306 + Master/texmf-dist/source/generic/xypic/xytpic.doc | 472 ++ Master/texmf-dist/source/generic/xypic/xyv2.doc | 868 ++ Master/texmf-dist/source/generic/xypic/xyweb.doc | 326 + Master/texmf-dist/source/generic/xypic/xyxdvi.doc | 335 + 267 files changed, 117361 insertions(+) create mode 100644 Master/texmf-dist/source/generic/babel/athnum.dtx create mode 100644 Master/texmf-dist/source/generic/babel/babel.drv create mode 100644 Master/texmf-dist/source/generic/babel/babel.dtx create mode 100644 Master/texmf-dist/source/generic/babel/babel.ins create mode 100644 Master/texmf-dist/source/generic/babel/bahasa.dtx create mode 100644 Master/texmf-dist/source/generic/babel/bahasa.ins create mode 100644 Master/texmf-dist/source/generic/babel/base.ins create mode 100644 Master/texmf-dist/source/generic/babel/basque.dtx create mode 100644 Master/texmf-dist/source/generic/babel/basque.ins create mode 100644 Master/texmf-dist/source/generic/babel/bbcompat.dtx create mode 100644 Master/texmf-dist/source/generic/babel/bbidxglo.dtx create mode 100644 Master/texmf-dist/source/generic/babel/bbplain.dtx create mode 100644 Master/texmf-dist/source/generic/babel/breton.dtx create mode 100644 Master/texmf-dist/source/generic/babel/breton.ins create mode 100644 Master/texmf-dist/source/generic/babel/bulgarian.dtx create mode 100644 Master/texmf-dist/source/generic/babel/bulgarian.ins create mode 100644 Master/texmf-dist/source/generic/babel/catalan.dtx create mode 100644 Master/texmf-dist/source/generic/babel/catalan.ins create mode 100644 Master/texmf-dist/source/generic/babel/croatian.dtx create mode 100644 Master/texmf-dist/source/generic/babel/croatian.ins create mode 100644 Master/texmf-dist/source/generic/babel/czech.dtx create mode 100644 Master/texmf-dist/source/generic/babel/czech.ins create mode 100644 Master/texmf-dist/source/generic/babel/danish.dtx create mode 100644 Master/texmf-dist/source/generic/babel/danish.ins create mode 100644 Master/texmf-dist/source/generic/babel/dutch.dtx create mode 100644 Master/texmf-dist/source/generic/babel/dutch.ins create mode 100644 Master/texmf-dist/source/generic/babel/english.dtx create mode 100644 Master/texmf-dist/source/generic/babel/english.ins create mode 100644 Master/texmf-dist/source/generic/babel/esperanto.dtx create mode 100644 Master/texmf-dist/source/generic/babel/esperanto.ins create mode 100644 Master/texmf-dist/source/generic/babel/estonian.dtx create mode 100644 Master/texmf-dist/source/generic/babel/estonian.ins create mode 100644 Master/texmf-dist/source/generic/babel/finnish.dtx create mode 100644 Master/texmf-dist/source/generic/babel/finnish.ins create mode 100644 Master/texmf-dist/source/generic/babel/frenchb.dtx create mode 100644 Master/texmf-dist/source/generic/babel/frenchb.ins create mode 100644 Master/texmf-dist/source/generic/babel/galician.dtx create mode 100644 Master/texmf-dist/source/generic/babel/galician.ins create mode 100644 Master/texmf-dist/source/generic/babel/german.ins create mode 100644 Master/texmf-dist/source/generic/babel/germanb.dtx create mode 100644 Master/texmf-dist/source/generic/babel/greek.dtx create mode 100644 Master/texmf-dist/source/generic/babel/greek.fdd create mode 100644 Master/texmf-dist/source/generic/babel/greek.ins create mode 100644 Master/texmf-dist/source/generic/babel/grmath.dtx create mode 100644 Master/texmf-dist/source/generic/babel/grsymb.dtx create mode 100644 Master/texmf-dist/source/generic/babel/heb209.dtx create mode 100644 Master/texmf-dist/source/generic/babel/hebinp.dtx create mode 100644 Master/texmf-dist/source/generic/babel/hebrew.dtx create mode 100644 Master/texmf-dist/source/generic/babel/hebrew.fdd create mode 100644 Master/texmf-dist/source/generic/babel/hebrew.ins create mode 100644 Master/texmf-dist/source/generic/babel/icelandic.dtx create mode 100644 Master/texmf-dist/source/generic/babel/icelandic.ins create mode 100644 Master/texmf-dist/source/generic/babel/interlingua.dtx create mode 100644 Master/texmf-dist/source/generic/babel/interlingua.ins create mode 100644 Master/texmf-dist/source/generic/babel/irish.dtx create mode 100644 Master/texmf-dist/source/generic/babel/irish.ins create mode 100644 Master/texmf-dist/source/generic/babel/italian.dtx create mode 100644 Master/texmf-dist/source/generic/babel/italian.ins create mode 100644 Master/texmf-dist/source/generic/babel/latin.dtx create mode 100644 Master/texmf-dist/source/generic/babel/latin.ins create mode 100644 Master/texmf-dist/source/generic/babel/lsorbian.dtx create mode 100644 Master/texmf-dist/source/generic/babel/magyar.dtx create mode 100644 Master/texmf-dist/source/generic/babel/magyar.ins create mode 100644 Master/texmf-dist/source/generic/babel/ngermanb.dtx create mode 100644 Master/texmf-dist/source/generic/babel/norsk.dtx create mode 100644 Master/texmf-dist/source/generic/babel/norsk.ins create mode 100644 Master/texmf-dist/source/generic/babel/polish.dtx create mode 100644 Master/texmf-dist/source/generic/babel/polish.ins create mode 100644 Master/texmf-dist/source/generic/babel/portuges.dtx create mode 100644 Master/texmf-dist/source/generic/babel/portuges.ins create mode 100644 Master/texmf-dist/source/generic/babel/romanian.dtx create mode 100644 Master/texmf-dist/source/generic/babel/romanian.ins create mode 100644 Master/texmf-dist/source/generic/babel/russianb.dtx create mode 100644 Master/texmf-dist/source/generic/babel/russianb.ins create mode 100644 Master/texmf-dist/source/generic/babel/samin.dtx create mode 100644 Master/texmf-dist/source/generic/babel/samin.ins create mode 100644 Master/texmf-dist/source/generic/babel/scottish.dtx create mode 100644 Master/texmf-dist/source/generic/babel/scottish.ins create mode 100644 Master/texmf-dist/source/generic/babel/serbian.dtx create mode 100644 Master/texmf-dist/source/generic/babel/serbian.ins create mode 100644 Master/texmf-dist/source/generic/babel/slovak.dtx create mode 100644 Master/texmf-dist/source/generic/babel/slovak.ins create mode 100644 Master/texmf-dist/source/generic/babel/slovene.dtx create mode 100644 Master/texmf-dist/source/generic/babel/slovene.ins create mode 100644 Master/texmf-dist/source/generic/babel/sorbian.ins create mode 100644 Master/texmf-dist/source/generic/babel/spanish.dtx create mode 100644 Master/texmf-dist/source/generic/babel/spanish.ins create mode 100644 Master/texmf-dist/source/generic/babel/swedish.dtx create mode 100644 Master/texmf-dist/source/generic/babel/swedish.ins create mode 100644 Master/texmf-dist/source/generic/babel/turkish.dtx create mode 100644 Master/texmf-dist/source/generic/babel/turkish.ins create mode 100644 Master/texmf-dist/source/generic/babel/ukraineb.dtx create mode 100644 Master/texmf-dist/source/generic/babel/ukraineb.ins create mode 100644 Master/texmf-dist/source/generic/babel/user.drv create mode 100644 Master/texmf-dist/source/generic/babel/usorbian.dtx create mode 100644 Master/texmf-dist/source/generic/babel/welsh.dtx create mode 100644 Master/texmf-dist/source/generic/babel/welsh.ins create mode 100644 Master/texmf-dist/source/generic/borceux/compatibility/OldDiagram create mode 100644 Master/texmf-dist/source/generic/borceux/compatibility/OldMaxiDiagram create mode 100644 Master/texmf-dist/source/generic/borceux/compatibility/OldMicroDiagram create mode 100644 Master/texmf-dist/source/generic/borceux/compatibility/OldMiniDiagram create mode 100644 Master/texmf-dist/source/generic/borceux/compatibility/OldMultipleArrows create mode 100644 Master/texmf-dist/source/generic/german/betatest/00readme.1st create mode 100644 Master/texmf-dist/source/generic/german/german.MISSING create mode 100644 Master/texmf-dist/source/generic/german/german.dtx create mode 100644 Master/texmf-dist/source/generic/german/german.ins create mode 100644 Master/texmf-dist/source/generic/kastrup/binhex.drv create mode 100644 Master/texmf-dist/source/generic/kastrup/binhex.dtx create mode 100644 Master/texmf-dist/source/generic/kastrup/binhex.ins create mode 100644 Master/texmf-dist/source/generic/mfpic/grafbase.dtx create mode 100644 Master/texmf-dist/source/generic/mfpic/mfpic.dtx create mode 100644 Master/texmf-dist/source/generic/mfpic/mfpic.ins create mode 100644 Master/texmf-dist/source/generic/midnight/00readme.txt create mode 100644 Master/texmf-dist/source/generic/midnight/Index create mode 100644 Master/texmf-dist/source/generic/psfig/pscompress create mode 100644 Master/texmf-dist/source/generic/psfig/unsupported/arbortext.pro create mode 100644 Master/texmf-dist/source/generic/psfig/unsupported/dospecial.frag create mode 100644 Master/texmf-dist/source/generic/psfig/unsupported/dospecial.patch create mode 100644 Master/texmf-dist/source/generic/psfig/unsupported/graphpaper.ps.gz create mode 100644 Master/texmf-dist/source/generic/psfig/unsupported/macdemo/README create mode 100644 Master/texmf-dist/source/generic/psfig/unsupported/macdemo/cleanfig create mode 100644 Master/texmf-dist/source/generic/psfig/unsupported/macdemo/figs/box.ps.gz create mode 100644 Master/texmf-dist/source/generic/psfig/unsupported/macdemo/figs/cm.ps.gz create mode 100644 Master/texmf-dist/source/generic/psfig/unsupported/macdemo/figs/piechart.ps.gz create mode 100644 Master/texmf-dist/source/generic/psfig/unsupported/macdemo/figs/pretzel.ps.gz create mode 100644 Master/texmf-dist/source/generic/psfig/unsupported/macdemo/figs/rosette.ps.gz create mode 100644 Master/texmf-dist/source/generic/psfig/unsupported/macdemo/figs/starlines.ps.gz create mode 100644 Master/texmf-dist/source/generic/psfig/unsupported/macdemo/figs/trevor.ps.gz create mode 100644 Master/texmf-dist/source/generic/psfig/unsupported/macdemo/figs/zip.ps.gz create mode 100644 Master/texmf-dist/source/generic/psfig/unsupported/macdemo/lprep68.pro create mode 100644 Master/texmf-dist/source/generic/psfig/unsupported/macdemo/lprep68.procs create mode 100644 Master/texmf-dist/source/generic/psfig/unsupported/macdemo/lprep70.pro create mode 100644 Master/texmf-dist/source/generic/psfig/unsupported/macdemo/lprep70.procs create mode 100644 Master/texmf-dist/source/generic/psfig/unsupported/macdemo/macdemo.tex create mode 100644 Master/texmf-dist/source/generic/psfig/unsupported/macdemo/macfigs/bullet.fig68.Z create mode 100644 Master/texmf-dist/source/generic/psfig/unsupported/macdemo/macfigs/bullet.fig68.bb create mode 100644 Master/texmf-dist/source/generic/psfig/unsupported/macdemo/macfigs/dave.fig68.Z create mode 100644 Master/texmf-dist/source/generic/psfig/unsupported/macdemo/macfigs/dave.fig68.bb create mode 100644 Master/texmf-dist/source/generic/psfig/unsupported/macdemo/macfigs/macdraw.fig68.Z create mode 100644 Master/texmf-dist/source/generic/psfig/unsupported/macdemo/macfigs/macdraw.fig68.bb create mode 100644 Master/texmf-dist/source/generic/psfig/unsupported/macdemo/stripfonts.awk create mode 100644 Master/texmf-dist/source/generic/psfig/unsupported/psfig-li.pro create mode 100644 Master/texmf-dist/source/generic/psfig/unsupported/psfig-li.tex create mode 100644 Master/texmf-dist/source/generic/pst-fr3d/pst-fr3d.dtx create mode 100644 Master/texmf-dist/source/generic/pst-fr3d/pst-fr3d.ins create mode 100644 Master/texmf-dist/source/generic/realcalc/readme create mode 100644 Master/texmf-dist/source/generic/ruhyphen/BUGS create mode 100644 Master/texmf-dist/source/generic/ruhyphen/Makefile create mode 100644 Master/texmf-dist/source/generic/ruhyphen/README create mode 100644 Master/texmf-dist/source/generic/ruhyphen/README.ruhyphal create mode 100644 Master/texmf-dist/source/generic/ruhyphen/hyphen.rules create mode 100755 Master/texmf-dist/source/generic/ruhyphen/mkcyryo create mode 100755 Master/texmf-dist/source/generic/ruhyphen/reduce-patt create mode 100755 Master/texmf-dist/source/generic/ruhyphen/sorthyph create mode 100755 Master/texmf-dist/source/generic/ruhyphen/sortkoi8 create mode 100755 Master/texmf-dist/source/generic/ruhyphen/trans create mode 100644 Master/texmf-dist/source/generic/shapepar/proshap.py create mode 100644 Master/texmf-dist/source/generic/tap/tabcv/sampdos/0sampdos.inf create mode 100644 Master/texmf-dist/source/generic/tap/tabcv/sampdos/post1.tex create mode 100644 Master/texmf-dist/source/generic/tap/tabcv/sampdos/post2.tex create mode 100644 Master/texmf-dist/source/generic/tap/tabcv/sampdos/prea1.tex create mode 100644 Master/texmf-dist/source/generic/tap/tabcv/sampdos/prea2.tex create mode 100644 Master/texmf-dist/source/generic/tap/tabcv/sampdos/prea3.tex create mode 100644 Master/texmf-dist/source/generic/tap/tabcv/sampdos/tapcv0.raw create mode 100644 Master/texmf-dist/source/generic/tap/tabcv/sampdos/tapcv1.raw create mode 100644 Master/texmf-dist/source/generic/tap/tabcv/sampdos/tapcv2.raw create mode 100644 Master/texmf-dist/source/generic/tap/tabcv/sampdos/tapcv3.raw create mode 100644 Master/texmf-dist/source/generic/tap/tabcv/sampdos/tapcv4.raw create mode 100644 Master/texmf-dist/source/generic/tap/tabcv/sampdos/tapcv5.raw create mode 100644 Master/texmf-dist/source/generic/tap/tabcv/sampdos/tapcv6.raw create mode 100644 Master/texmf-dist/source/generic/tap/tabcv/sampdos/tcv.bat create mode 100644 Master/texmf-dist/source/generic/tap/tabcv/sampdos/tcv_.bat create mode 100644 Master/texmf-dist/source/generic/tap/tabcv/tapcv.awk create mode 100644 Master/texmf-dist/source/generic/textmerg/textmerg.drv create mode 100644 Master/texmf-dist/source/generic/textmerg/textmerg.dtx create mode 100644 Master/texmf-dist/source/generic/textmerg/textmerg.ins create mode 100644 Master/texmf-dist/source/generic/wsuipa/README.wsuipa create mode 100644 Master/texmf-dist/source/generic/wsuipa/changes.dec93 create mode 100644 Master/texmf-dist/source/generic/wsuipa/changes.jun91 create mode 100644 Master/texmf-dist/source/generic/wsuipa/changes.mar91 create mode 100644 Master/texmf-dist/source/generic/wsuipa/changes.may92 create mode 100644 Master/texmf-dist/source/generic/wsuipa/changes.nov90 create mode 100644 Master/texmf-dist/source/generic/xypic/CATALOG.doc create mode 100644 Master/texmf-dist/source/generic/xypic/COPYING create mode 100644 Master/texmf-dist/source/generic/xypic/ChangeLog create mode 100644 Master/texmf-dist/source/generic/xypic/INSTALL create mode 100644 Master/texmf-dist/source/generic/xypic/INSTALL.OzTeX create mode 100644 Master/texmf-dist/source/generic/xypic/INSTALL.Textures create mode 100644 Master/texmf-dist/source/generic/xypic/MAKE create mode 100644 Master/texmf-dist/source/generic/xypic/MANIFEST create mode 100644 Master/texmf-dist/source/generic/xypic/Makefile create mode 100644 Master/texmf-dist/source/generic/xypic/README create mode 100644 Master/texmf-dist/source/generic/xypic/TRAILER create mode 100644 Master/texmf-dist/source/generic/xypic/VERSIONS create mode 100644 Master/texmf-dist/source/generic/xypic/doc2tex.com create mode 100644 Master/texmf-dist/source/generic/xypic/dvitogif89a create mode 100644 Master/texmf-dist/source/generic/xypic/import1.eps create mode 100644 Master/texmf-dist/source/generic/xypic/install-tds create mode 100644 Master/texmf-dist/source/generic/xypic/kris.eps create mode 100644 Master/texmf-dist/source/generic/xypic/latin1.sty create mode 100644 Master/texmf-dist/source/generic/xypic/movie.cls create mode 100644 Master/texmf-dist/source/generic/xypic/pnmrawtopcropwhite.c create mode 100644 Master/texmf-dist/source/generic/xypic/ross.eps create mode 100644 Master/texmf-dist/source/generic/xypic/xy.doc create mode 100644 Master/texmf-dist/source/generic/xypic/xy.sty create mode 100644 Master/texmf-dist/source/generic/xypic/xy16textures.doc create mode 100644 Master/texmf-dist/source/generic/xypic/xy17oztex.doc create mode 100644 Master/texmf-dist/source/generic/xypic/xy2cell.doc create mode 100644 Master/texmf-dist/source/generic/xypic/xyall.doc create mode 100644 Master/texmf-dist/source/generic/xypic/xyarc.doc create mode 100644 Master/texmf-dist/source/generic/xypic/xyarrow.doc create mode 100644 Master/texmf-dist/source/generic/xypic/xycmactex.doc create mode 100644 Master/texmf-dist/source/generic/xypic/xycmtip.doc create mode 100644 Master/texmf-dist/source/generic/xypic/xycolor.doc create mode 100644 Master/texmf-dist/source/generic/xypic/xycrayon.doc create mode 100644 Master/texmf-dist/source/generic/xypic/xycurve.doc create mode 100644 Master/texmf-dist/source/generic/xypic/xydoc.back create mode 100644 Master/texmf-dist/source/generic/xypic/xydoc.bib create mode 100644 Master/texmf-dist/source/generic/xypic/xydoc.sty create mode 100644 Master/texmf-dist/source/generic/xypic/xydocps.doc create mode 100644 Master/texmf-dist/source/generic/xypic/xydummy.doc create mode 100644 Master/texmf-dist/source/generic/xypic/xydvidrv.doc create mode 100644 Master/texmf-dist/source/generic/xypic/xydvips.doc create mode 100644 Master/texmf-dist/source/generic/xypic/xydvitops.doc create mode 100644 Master/texmf-dist/source/generic/xypic/xyemtex.doc create mode 100644 Master/texmf-dist/source/generic/xypic/xyframe.doc create mode 100644 Master/texmf-dist/source/generic/xypic/xygraph.doc create mode 100644 Master/texmf-dist/source/generic/xypic/xyguide.man create mode 100644 Master/texmf-dist/source/generic/xypic/xyidioms.doc create mode 100644 Master/texmf-dist/source/generic/xypic/xyimport.doc create mode 100644 Master/texmf-dist/source/generic/xypic/xyknot.doc create mode 100644 Master/texmf-dist/source/generic/xypic/xylatex.ini create mode 100644 Master/texmf-dist/source/generic/xypic/xyline.doc create mode 100644 Master/texmf-dist/source/generic/xypic/xymacpat.xyp create mode 100644 Master/texmf-dist/source/generic/xypic/xymatrix.doc create mode 100644 Master/texmf-dist/source/generic/xypic/xymovie.doc create mode 100644 Master/texmf-dist/source/generic/xypic/xynecula.doc create mode 100644 Master/texmf-dist/source/generic/xypic/xyoztex.doc create mode 100644 Master/texmf-dist/source/generic/xypic/xypic.doc create mode 100644 Master/texmf-dist/source/generic/xypic/xypic.map create mode 100644 Master/texmf-dist/source/generic/xypic/xypic.sty create mode 100644 Master/texmf-dist/source/generic/xypic/xypoly.doc create mode 100644 Master/texmf-dist/source/generic/xypic/xyps-c.doc create mode 100644 Master/texmf-dist/source/generic/xypic/xyps-col.doc create mode 100644 Master/texmf-dist/source/generic/xypic/xyps-f.doc create mode 100644 Master/texmf-dist/source/generic/xypic/xyps-l.doc create mode 100644 Master/texmf-dist/source/generic/xypic/xyps-pro.doc create mode 100644 Master/texmf-dist/source/generic/xypic/xyps-ps.doc create mode 100644 Master/texmf-dist/source/generic/xypic/xyps-r.doc create mode 100644 Master/texmf-dist/source/generic/xypic/xyps-s.doc create mode 100644 Master/texmf-dist/source/generic/xypic/xyps-t.doc create mode 100644 Master/texmf-dist/source/generic/xypic/xyps.doc create mode 100644 Master/texmf-dist/source/generic/xypic/xypsdict.doc create mode 100644 Master/texmf-dist/source/generic/xypic/xypspatt.doc create mode 100644 Master/texmf-dist/source/generic/xypic/xyrecat.doc create mode 100644 Master/texmf-dist/source/generic/xypic/xyrefer.man create mode 100644 Master/texmf-dist/source/generic/xypic/xyrotate.doc create mode 100644 Master/texmf-dist/source/generic/xypic/xysmart.doc create mode 100644 Master/texmf-dist/source/generic/xypic/xytex.ini create mode 100644 Master/texmf-dist/source/generic/xypic/xytextures.doc create mode 100644 Master/texmf-dist/source/generic/xypic/xytile.doc create mode 100644 Master/texmf-dist/source/generic/xypic/xytips.doc create mode 100644 Master/texmf-dist/source/generic/xypic/xytp-f.doc create mode 100644 Master/texmf-dist/source/generic/xypic/xytpic.doc create mode 100644 Master/texmf-dist/source/generic/xypic/xyv2.doc create mode 100644 Master/texmf-dist/source/generic/xypic/xyweb.doc create mode 100644 Master/texmf-dist/source/generic/xypic/xyxdvi.doc (limited to 'Master/texmf-dist') diff --git a/Master/texmf-dist/source/generic/babel/athnum.dtx b/Master/texmf-dist/source/generic/babel/athnum.dtx new file mode 100644 index 00000000000..7a088cb5d65 --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/athnum.dtx @@ -0,0 +1,278 @@ +% \iffalse meta-comment +% +% Copyright 1989-2005 Johannes L. Braams and any individual authors +% listed elsewhere in this file. All rights reserved. +% +% This file is part of the Babel system. +% -------------------------------------- +% +% It 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 +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2003/12/01 or later. +% +% This work has the LPPL maintenance status "maintained". +% +% The Current Maintainer of this work is Johannes Braams. +% +% The list of all files belonging to the Babel system is +% given in the file `manifest.bbl. See also `legal.bbl' 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 +%% \CheckSum{125} +%% \CharacterTable +%\iffalse +% +%% This is file `athnum.dtx' +%% (c) 1997-2005 Apostolos Syropoulos. +%% All rights reserved. +% +% Please report errors or suggestions for improvement to +% +% Apostolos Syropoulos +% 366, 28th October Str. +% GR-671 00 Xanthi, GREECE +% apostolo at platon.ee.duth.gr or apostolo at obelix.ee.duth.gr +% +%\fi +% +% \iffalse +% \begin{macrocode} +%<*driver> +\documentclass{ltxdoc} +\def\PiIt#1{{% + \newdimen\boxW \newdimen\boxH + \settowidth{\boxW}{#1}% + \settoheight{\boxH}{#1}% + \addtolength{\boxW}{0.8pt} + \vbox{% + \hrule width\boxW\hbox{% + \vrule height\boxH\mbox{#1}% + \vrule height\boxH}}\kern.5pt}} +\GetFileInfo{athnum.drv} +\begin{document} + \DocInput{athnum.dtx} +\end{document} +% +% \end{macrocode} +% \fi +% +%\title{Athenian Numerals II\footnote{The documentation of this +% package is essentially the same as that of the package `grnumalt'. +% The `II' serves as a means to distinguish the two documents.}} +% \author{Apostolos Syropoulos\\366, 28th October Str.\\ +% GR-671 00 Xanthi, HELLAS\\ Email:\texttt{apostolo@platon.ee.duth.gr}} +% \date{2003/08/24} +%\maketitle +% +%\MakeShortVerb{\|} +% +%\section{Introduction} +% +% This \LaTeX\ package implements the macro +% \DescribeMacro{\athnum} +% |\athnum|. The macro transforms an Arabic numeral, i.e., the kind +% of numerals we all use (e.g., 1, 5, 789 etc), to the corresponding +% {\itshape Athenian} numeral. Athenian numerals were in use only in +% ancient Athens. The package can be used only in conjunction with the +% |greek| option of the |babel| package. +% +%\section{The Numbering System} +% +% The athenian numbering system, like the roman one, employs +% letters to denote important numbers. Multiple occurrence of a letter denote +% a multiple of the ``important'' number, e.g., the letter I denotes 1, so +% III denotes 3. Here are the basic digits used in the Athenian numbering +% system: +% \begin{itemize} +% \item I denotes the number one (1) +% \item $\Pi$ denotes the number five (5) +% \item $\Delta$ denotes the number ten (10) +% \item H denotes the number one hundred (100) +% \item X denotes the number one thousand (1000) +% \item M denotes the number ten thousands (10000) +%\end{itemize} +% Moreover, the letters $\Delta$, H, X, and M under the letter $\Pi$, +% denote five times their original value, e.g., the symbol +% \PiIt{X}, denotes the number 5000, and the symbol +% \PiIt{$\Delta$}, denotes the number 50. It must be noted that +% the numbering system does not provide negative numerals or a symbol for +% zero. +% +% The Athenian numbering system is described, among others, in an article in +% Encyclopedia $\Delta o\mu\acute{\eta}$, Vol. 2, page 280, 7th edition, +% Athens, October 2, 1975. +% +% \section{The Code} +% Before we do anything further, we have to identify the package. +% \StopEventually +% +% \begin{macrocode} +%<*package> +\NeedsTeXFormat{LaTeX2e}[1996/01/01] +\ProvidesPackage{athnum}[2003/08/24\space v1.1] +\typeout{Package: `athnum' v1.1\space <2003/08/24> (A. Syropoulos)} +% \end{macrocode} +% Next we check to see if the |babel| package is loaded with at least +% the |greek| option. In case it isn't, we opt to produce an error message. +% \begin{macrocode} +\@ifpackagewith{babel}{greek}{}{% + \@ifpackagewith{babel}{polutonikogreek}{}{% + \PackageError{athnum}{% + `greek' option of the `babel'\MessageBreak + package hasn't been loaded}{% + The commands provided by this package\MessageBreak + are specially designed for greek language\MessageBreak + typesetting with the `babel' package. Load\MessageBreak + it with at least the `greek' option.}\relax + }} +% \end{macrocode} +% +% As it is mentioned in the introduction, the Athenian numerals employ +% some special digits. These digits are included in the |cb| fonts of +% Claudio Beccari, and so we must provide access commands. +% \begin{macrocode} +\DeclareTextCommand{\PiDelta}{LGR}{\char"02\relax} +\DeclareTextCommand{\PiEta}{LGR}{\char"03\relax} +\DeclareTextCommand{\PiChi}{LGR}{\char"04\relax} +\DeclareTextCommand{\PiMu}{LGR}{\char"05\relax} +% \end{macrocode} +%\begin{macro}{\@@athnum} +% Now, we turn our attention to the definition of the macro +% |\@@athnum|. This macro uses one integer variable (or counter in +% \TeX's jargon.) +% \begin{macrocode} +\newcount\@ath@num +% \end{macrocode} +% The macro |\@@athnum| is also defined as a robust command. +% \begin{macrocode} +\DeclareRobustCommand*{\@@athnum}[1]{% +% \end{macrocode} +% After assigning to variable |\@ath@num| the value of the macro's argument, +%we make sure that the argument is in the expected range, i.e., it is greater +% than zero, and less or equal to $249999$. In case it isn't, we simply +% produce a |\space|, warn the user about it and quit. Although, the +% |\athnum| macro is capable to produce an Athenian numeral for even greater +% intergers, the following argument by Claudio Beccari convised me to place +% this above upper limit: +% \begin{quote} +% According to psychological perception studies (that ancient Athenians +% and Romans perfectly knew without needing to study Freud and Jung) +% living beings (which includes at least all vertebrates, not only +% humans) can perceive up to four randomly set objects of the same kind +% without the need of counting, the latter activity being a specific +% acquired ability of human kind; the biquinary numbering notation +% used by the Athenians and the Romans exploits this natural +% characteristic of human beings. +% \end{quote} +% \begin{macrocode} + \@ath@num#1\relax + \ifnum\@ath@num<\@ne% + \space% + \PackageWarning{athnum}{% + Illegal value (\the\@ath@num) for athenian numeral}% + \else\ifnum\@ath@num>249999% + \space% + \PackageWarning{athnum}{% + Illegal value (\the\@ath@num) for athenian numeral}% + \else +% \end{macrocode} +% Having done all the necessary checks, we are now ready to do the actual +% computation. If the number is greater than $49999$, then it certainly +% has at least one \PiIt{M} ``digit''. We find all such digits by continuously +% subtracting $50000$ from |\@ath@num|, until |\@ath@num| becomes less than +% $50000$. +% \begin{macrocode} + \@whilenum\@ath@num>49999\do{% + \PiMu\advance\@ath@num-50000}% +% \end{macrocode} +% We now check for tens of thousands. +% \begin{macrocode} + \@whilenum\@ath@num>9999\do{% + M\advance\@ath@num-\@M}% +% \end{macrocode} +% Since a number can have only one \PiIt{X} ``digit'' (equivalent to 5000), it +% is easy to check it out and produce the corresponding numeral in case it does +% have one. +% \begin{macrocode} + \ifnum\@ath@num>4999% + \PiChi\advance\@ath@num-5000% + \fi\relax +% \end{macrocode} +% Next, we check for thousands, the same way we checked for tens of thousands. +% \begin{macrocode} + \@whilenum\@ath@num>999\do{% + Q\advance\@ath@num-\@m}% +% \end{macrocode} +% Like the five thousands, a numeral can have at most one \PiIt{H} ``digit'' +% (equivalent to 500). +% \begin{macrocode} + \ifnum\@ath@num>499% + \PiEta\advance\@ath@num-500% + \fi\relax +% \end{macrocode} +% It is time to check hundreds, which follow the same pattern as thousands +% \begin{macrocode} + \@whilenum\@ath@num>99\do{% + H\advance\@ath@num-100}% +% \end{macrocode} +% A numeral can have only one \PiIt{$\Delta$} ``digit'' (equivalent to 50). +% \begin{macrocode} + \ifnum\@ath@num>49% + \PiDelta\advance\@ath@num-50% + \fi\relax +% \end{macrocode} +% Let's check now decades. +% \begin{macrocode} + \@whilenum\@ath@num>9\do{% + D\advance\@ath@num by-10}% +% \end{macrocode} +% We check for five and, finally, for the digits 1, 2, 3, and 4. +% \begin{macrocode} + \@whilenum\@ath@num>4\do{% + P\advance\@ath@num-5}% + \ifcase\@ath@num\or I\or II\or III\or IIII\fi% + \fi\fi} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@athnum} +% The command |\@athnum| has one argument, which +% is a counter. It calls the command |\@@athnum| to process the value of +% the counter. +% \begin{macrocode} +\def\@athnum#1{% + \expandafter\@@athnum\expandafter{\the#1}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\athnum} +% The command |\athnum| is a wrapper that declares +% a new counter in a local scope, assigns to it the argument of the command +% and calls the macro |\@athnum|. This way the command can process correctly +% either a number or a counter. +% \begin{macrocode} +\def\athnum#1{% + \@ath@num#1\relax + \@athnum{\@ath@num}} +% +% \end{macrocode} +%\end{macro} +% +% \section*{Acknowledgment} +% I would like to thank Claudio Beccari for reading the documentation +% and for his very helpful suggestions. In addition, Antonis Tsolomitis +% spotted a bug in the first version, which is corrected in the present +% version. +% \section*{Dedication} +% I would like to dedicate this piece of work to my son +% \begin{center}Demetrios-Georgios.\end{center} +% \Finale +% +\endinput diff --git a/Master/texmf-dist/source/generic/babel/babel.drv b/Master/texmf-dist/source/generic/babel/babel.drv new file mode 100644 index 00000000000..ce7f645b0a3 --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/babel.drv @@ -0,0 +1,188 @@ +%% +%% This is file `babel.drv', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% babel.dtx (with options: `driver') +%% +%% This file was generated from file(s) of the Babel system. +%% --------------------------------------------------------- +%% +%% Copyright (C) 2004 Johannes Braams. All rights reserved. +%% +%% To produce the documentation in the way you like you are allowed +%% to change this driver file. +%% +%% +%% File 'babel.dtx' +%%\ProvidesFile{babel.dtx}[2005/05/21 v3.8g The Babel package] +%% Babel package for LaTeX2e. +%% Copyright (C) 1989 -- 2005 by Johannes Braams, +%% TeXniek +%% all rights reserved. +%% Please report errors to: J.L. Braams +%% babel at braams.cistron.nl +\ifx\ProvidesFile\@undefined + \def\ProvidesFile#1[#2 #3 #4]{% + \wlog{File: #1 #4 #3 <#2>}% + \let\ProvidesFile\@undefined + } +\fi +\ProvidesFile{babel.drv} + [2005/05/21 v3.8g % +] +\documentclass{ltxdoc} +\usepackage{url,t1enc,supertabular} +\usepackage[icelandic,english]{babel} +\DoNotIndex{\!,\',\,,\.,\-,\:,\;,\?,\/,\^,\`,\@M} +\DoNotIndex{\@,\@ne,\@m,\@afterheading,\@date,\@endpart} +\DoNotIndex{\@hangfrom,\@idxitem,\@makeschapterhead,\@mkboth} +\DoNotIndex{\@oddfoot,\@oddhead,\@restonecolfalse,\@restonecoltrue} +\DoNotIndex{\@starttoc,\@unused} +\DoNotIndex{\accent,\active} +\DoNotIndex{\addcontentsline,\advance,\Alph,\arabic} +\DoNotIndex{\baselineskip,\begin,\begingroup,\bf,\box,\c@secnumdepth} +\DoNotIndex{\catcode,\centering,\char,\chardef,\clubpenalty} +\DoNotIndex{\columnsep,\columnseprule,\crcr,\csname} +\DoNotIndex{\day,\def,\dimen,\discretionary,\divide,\dp,\do} +\DoNotIndex{\edef,\else,\@empty,\end,\endgroup,\endcsname,\endinput} +\DoNotIndex{\errhelp,\errmessage,\expandafter,\fi,\filedate} +\DoNotIndex{\fileversion,\fmtname,\fnum@figure,\fnum@table,\fontdimen} +\DoNotIndex{\gdef,\global} +\DoNotIndex{\hbox,\hidewidth,\hfil,\hskip,\hspace,\ht,\Huge,\huge} +\DoNotIndex{\ialign,\if@twocolumn,\ifcase,\ifcat,\ifhmode,\ifmmode} +\DoNotIndex{\ifnum,\ifx,\immediate,\ignorespaces,\input,\item} +\DoNotIndex{\kern} +\DoNotIndex{\labelsep,\Large,\large,\labelwidth,\lccode,\leftmargin} +\DoNotIndex{\lineskip,\leavevmode,\let,\list,\ll,\long,\lower} +\DoNotIndex{\m@ne,\mathchar,\mathaccent,\markboth,\month,\multiply} +\DoNotIndex{\newblock,\newbox,\newcount,\newdimen,\newif,\newwrite} +\DoNotIndex{\nobreak,\noexpand,\noindent,\null,\number} +\DoNotIndex{\onecolumn,\or} +\DoNotIndex{\p@,par, \parbox,\parindent,\parskip,\penalty} +\DoNotIndex{\protect,\ps@headings} +\DoNotIndex{\quotation} +\DoNotIndex{\raggedright,\raise,\refstepcounter,\relax,\rm,\setbox} +\DoNotIndex{\section,\setcounter,\settowidth,\scriptscriptstyle} +\DoNotIndex{\sfcode,\sl,\sloppy,\small,\space,\spacefactor,\strut} +\DoNotIndex{\string} +\DoNotIndex{\textwidth,\the,\thechapter,\thefigure,\thepage,\thepart} +\DoNotIndex{\thetable,\thispagestyle,\titlepage,\tracingmacros} +\DoNotIndex{\tw@,\twocolumn,\typeout,\uppercase,\usecounter} +\DoNotIndex{\vbox,\vfil,\vskip,\vspace,\vss} +\DoNotIndex{\widowpenalty,\write,\xdef,\year,\z@,\z@skip} +\makeatletter +\gdef\dlqq{{\setbox\tw@=\hbox{,}\setbox\z@=\hbox{''}% + \dimen\z@=\ht\z@ \advance\dimen\z@-\ht\tw@ + \setbox\z@=\hbox{\lower\dimen\z@\box\z@}\ht\z@=\ht\tw@ + \dp\z@=\dp\tw@ \box\z@\kern-.04em}} +\@addtoreset{CodelineNo}{section} +\renewcommand\theCodelineNo{% + \reset@font\scriptsize\thesection.\arabic{CodelineNo}} +\renewcommand\codeline@wrindex[1]{\if@filesw + \immediate\write\@indexfile + {\string\indexentry{#1}% + {\number\c@section.\number\c@CodelineNo}}\fi} +\renewenvironment{theglossary}{% + \glossary@prologue% + \GlossaryParms \let\item\@idxitem \ignorespaces}% + {} +\makeatother +\font\manual=logo10 % font used for the METAFONT logo, etc. +\newcommand*\MF{{\manual META}\-{\manual FONT}} +\newcommand*\TeXhax{\TeX hax} +\newcommand*\babel{\textsf{babel}} +\newcommand*\Babel{\textsf{Babel}} +\newcommand*\m[1]{\mbox{$\langle$\it#1\/$\rangle$}} +\newcommand*\langvar{\m{lang}} +\newcommand*\note[1]{} +\newcommand*\bsl{\protect\bslash} +\newcommand*\Lopt[1]{\textsf{#1}} +\newcommand*\Lenv[1]{\textsf{#1}} +\newcommand*\file[1]{\texttt{#1}} +\newcommand*\cls[1]{\texttt{#1}} +\newcommand*\pkg[1]{\texttt{#1}} +\newcommand*\langdeffile[1]{% + \clearpage + \DocInput{#1}} +\DisableCrossrefs +\RecordChanges +\CodelineIndex +\setcounter{StandardModuleDepth}{1} +\begin{document} +\DocInput{babel.dtx} +^^A% \changes{babel~3.6i}{1997/02/22}{Added kannada} +\langdeffile{esperanto.dtx} +\langdeffile{interlingua.dtx} +\langdeffile{dutch.dtx} +\langdeffile{english.dtx} +\langdeffile{germanb.dtx} +\langdeffile{ngermanb.dtx} +\langdeffile{breton.dtx} +\langdeffile{welsh.dtx} +\langdeffile{irish.dtx} +\langdeffile{scottish.dtx} +\langdeffile{greek.dtx} +\langdeffile{frenchb.dtx} +\langdeffile{italian.dtx} +\langdeffile{latin.dtx} +\langdeffile{portuges.dtx} +\langdeffile{spanish.dtx} +\langdeffile{catalan.dtx} +\langdeffile{galician.dtx} +\langdeffile{basque.dtx} +\langdeffile{romanian.dtx} +\langdeffile{danish.dtx} +\langdeffile{icelandic.dtx} +\langdeffile{norsk.dtx} +\langdeffile{swedish.dtx} +\langdeffile{samin.dtx} +\langdeffile{finnish.dtx} +\langdeffile{magyar.dtx} +\langdeffile{estonian.dtx} +\langdeffile{croatian.dtx} +\langdeffile{czech.dtx} +\langdeffile{polish.dtx} +\langdeffile{serbian.dtx} +\langdeffile{slovak.dtx} +\langdeffile{slovene.dtx} +\langdeffile{russianb.dtx} +\langdeffile{bulgarian.dtx} +\langdeffile{ukraineb.dtx} +\langdeffile{lsorbian.dtx} +\langdeffile{usorbian.dtx} +\langdeffile{turkish.dtx} +\langdeffile{hebrew.dtx} +\DocInput{hebinp.dtx} +\DocInput{hebrew.fdd} +\DocInput{heb209.dtx} +\langdeffile{bahasa.dtx} +\clearpage +\DocInput{bbplain.dtx} +\clearpage +\def\filename{index} +\PrintIndex +\clearpage +\def\filename{changes} +\PrintChanges +\end{document} +%% +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +\endinput +%% +%% End of file `babel.drv'. diff --git a/Master/texmf-dist/source/generic/babel/babel.dtx b/Master/texmf-dist/source/generic/babel/babel.dtx new file mode 100644 index 00000000000..aa0a577b1a8 --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/babel.dtx @@ -0,0 +1,5793 @@ +% \iffalse meta-comment +% +% Copyright 1989-2005 Johannes L. Braams and any individual authors +% listed elsewhere in this file. All rights reserved. +% +% This file is part of the Babel system. +% -------------------------------------- +% +% It 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 +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2003/12/01 or later. +% +% This work has the LPPL maintenance status "maintained". +% +% The Current Maintainer of this work is Johannes Braams. +% +% The list of all files belonging to the Babel system is +% given in the file `manifest.bbl. See also `legal.bbl' 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 +% \CheckSum{3805} +%% +% \def\filename{babel.dtx} +% \let\thisfilename\filename +% +%\iffalse +% \changes{babel~3.5g}{1996/10/10}{We need at least \LaTeX\ from +% December 1994} +% \changes{babel~3.6k}{1999/03/18}{We need at least \LaTeX\ from +% June 1998} +% \begin{macrocode} +%<+package>\NeedsTeXFormat{LaTeX2e}[1998/06/01] +% \end{macrocode} +% +%% File 'babel.dtx' +%\fi +%%\ProvidesFile{babel.dtx}[2005/05/21 v3.8g The Babel package] +%\iffalse +% +% Babel DOCUMENT-STYLE option for LaTeX version 2.09 or plain TeX; +%% Babel package for LaTeX2e. +% +%% Copyright (C) 1989 -- 2005 by Johannes Braams, +%% TeXniek +%% all rights reserved. +% +%% Please report errors to: J.L. Braams +%% babel at braams.cistron.nl +%<*filedriver> +\documentclass{ltxdoc} +\usepackage{supertabular} +\font\manual=logo10 % font used for the METAFONT logo, etc. +\newcommand*\MF{{\manual META}\-{\manual FONT}} +\newcommand*\TeXhax{\TeX hax} +\newcommand*\babel{\textsf{babel}} +\newcommand*\Babel{\textsf{Babel}} +\newcommand*\m[1]{\mbox{$\langle$\it#1\/$\rangle$}} +\newcommand*\langvar{\m{lang}} +\newcommand*\note[1]{} +\newcommand*\bsl{\protect\bslash} +\newcommand*\Lopt[1]{\textsf{#1}} +\newcommand*\Lenv[1]{\textsf{#1}} +\newcommand*\file[1]{\texttt{#1}} +\newcommand*\cls[1]{\texttt{#1}} +\newcommand*\pkg[1]{\texttt{#1}} +\begin{document} + \DocInput{babel.dtx} +\end{document} +% +% \changes{babel~3.7a}{1997/04/16}{Make multiple loading of +% \file{babel.def} impossible} +% \begin{macrocode} +%<*core> +\ifx\bbl@afterfi\@undefined +\else + \bbl@afterfi\endinput +\fi +% +% \end{macrocode} +%<*dtx> +\ProvidesFile{babel.dtx} +% +%\fi +% +% \GetFileInfo{babel.dtx} +% +% \changes{babel~2.0a}{1990/04/02}{Added text about \file{german.sty}} +% \changes{babel~2.0b}{1990/04/18}{Changed order of code to prevent +% plain \TeX from seeing all of it} +% \changes{babel~2.1}{1990/04/24}{Modified user interface, +% \cs{langTeX} no longer necessary} +% \changes{babel~2.1a}{1990/05/01}{Incorporated Nico's comments} +% \changes{babel~2.1b}{1990/05/01}{rename \cs{language} to +% \cs{current@language}} +% \changes{babel~2.1c}{1990/05/22}{abstract for report fixed, missing +% \texttt{\}}, found by Nicolas Brouard} +% \changes{babel~2.1d}{1990/07/04}{Missing right brace in definition of +% abstract environment, found by Werenfried Spit} +% \changes{babel~2.1e}{1990/07/16}{Incorporated more comments from +% Nico} +% \changes{babel~2.2}{1990/07/17}{Renamed \cs{newlanguage} to +% \cs{addlanguage}} +% \changes{babel~2.2a}{1990/08/27}{Modified the documentation +% somewhat} +% \changes{babel~3.0}{1991/04/23}{Moved part of the code to hyphen.doc +% in preparation for \TeX~3.0} +% \changes{babel~3.0a}{1991/05/21}{Updated comments in various places} +% \changes{babel~3.0b}{1991/05/25}{Removed some problems in change log} +% \changes{babel~3.0c}{1991/07/15}{Renamed \file{babel.sty} and +% \file{latexhax.sty} to \file{.com}} +% \changes{babel~3.1}{1991/10/31}{Added the support for active +% characters and for extending a macro} +% \changes{babel~3.1}{1991/11/05}{Removed the need for +% \file{latexhax}} +% \changes{babel~3.2}{1991/11/10}{Some Changes by br} +% \changes{babel~3.2a}{1992/02/15}{Fixups of the code and +% documentation} +% \changes{babel~3.3}{1993/07/06}{Included driver file, and prepared +% for distribution} +% \changes{babel~3.4}{1994/01/30}{Updated for \LaTeXe} +% \changes{babel~3.4}{1994/02/28}{Added language definition file for +% bahasa} +% \changes{babel~3.4b}{1994/05/18}{Added a small driver to be able to +% process just this file} +% \changes{babel~3.5a}{1995/02/03}{Provided common code to handle the +% active double quote} +% \changes{babel~3.5c}{1995/06/14}{corrected a few typos (PR1652)} +% \changes{babel~3.5d}{1995/07/02}{Merged glyphs.dtx into this file} +% \changes{babel~3.5f}{1995/07/13}{repaired a typo} +% \changes{babel~3.5f}{1996/01/09}{replaced \cs{tmp}, \cs{bbl@tmp} and +% \cs{bbl@temp} with \cs{bbl@tempa}} +% \changes{babel~3.5g}{1996/07/09}{replaced \cs{undefined} with +% \cs{@undefined} to be consistent with \LaTeX} +% \changes{babel~3.7d}{1999/05/05}{Fixed a few typos in \cs{changes} +% entries which made typesetting the code impossible} +% \changes{babel~3.7h}{2001/03/01}{Added a number of missing comment +% characters which caused spurious white space} +% \changes{babel~3.8e}{2005/03/24}{Many enhancements to the text by +% Andrew Young} +% +% \title {Babel, a multilingual package for use with \LaTeX's standard +% document classes\thanks{During the development ideas from Nico +% Poppelier, Piet van Oostrum and many others have been used. +% Bernd Raichle has provided many helpful suggestions.}} +% +% \author{Johannes Braams\\ +% Kersengaarde 33\\ +% 2723 BP Zoetermeer\\ +% The Netherlands\\ +% \texttt{babel@braams.cistron.nl}} +% +% \date{Printed \today} +% +% \maketitle +% +% \begin{abstract} +% The standard distribution of \LaTeX\ contains a number of +% document classes that are meant to be used, but also serve as +% examples for other users to create their own document classes. +% These document classes have become very popular among \LaTeX\ +% users. But it should be kept in mind that they were designed for +% American tastes and typography. At one time they contained a +% number of hard-wired texts. This report describes \babel{}, a +% package that makes use of the new capabilities of \TeX\ version 3 +% to provide an environment in which documents can be typeset in +% a non-American language, or in more than one language. +% \end{abstract} +% +% \begin{multicols}{2} +% \tableofcontents +% \end{multicols} +% +% \section{The user interface}\label{U-I} +% +% The user interface of this package is quite simple. It consists +% of a set of commands that switch from one language to another, and +% a set of commands that deal with shorthands. It is also possible +% to find out what the current language is. +% +% \DescribeMacro{\selectlanguage} +% When a user wants to switch from one language to another he can +% do so using the macro |\selectlanguage|. This macro takes the +% language, defined previously by a language definition file, as +% its argument. It calls several macros that should be defined in +% the language definition files to activate the special definitions +% for the language chosen. +% +% \DescribeEnv{otherlanguage} +% The environment \Lenv{otherlanguage} does basically the same as +% |\selectlanguage|, except the language change is local to the +% environment. This environment is required for intermixing +% left-to-right typesetting with right-to-left typesetting. +% The language to switch to is specified as an +% argument to |\begin{otherlanguage}|. +% +% \DescribeMacro{\foreignlanguage} +% The command |\foreignlanguage| takes two arguments; the second +% argument is a phrase to be typeset according to the rules of the +% language named in its first argument. This command only switches +% the extra definitions and the hyphenation rules for the language, +% \emph{not} the names and dates. +% +% \DescribeEnv{otherlanguage*} +% In the environment \Lenv{otherlanguage*} only the typesetting +% is done according to the rules of the other language, but the +% text-strings such as `figure', `table', etc. are left as they +% were set outside this environment. +% +% \DescribeEnv{hyphenrules} +% The environment \Lenv{hyphenrules} can be used to select +% \emph{only} the hyphenation rules to be used. This can for +% instance be used to select `nohyphenation', provided that in +% \file{language.dat} the `language' nohyphenation is defined by +% loading \file{serohyph.tex}. +% +% \DescribeMacro{\languagename} +% The control sequence |\languagename| contains the name of the +% current language. +% +% \DescribeMacro{\iflanguage} +% If more than one language is used, it might be necessary to know +% which language is active at a specific time. This can be checked +% by a call to |\iflanguage|. This macro takes three arguments. +% The first argument is the name of a language; the second and +% third arguments are the actions to take if the result of the test +% is \texttt{true} or \texttt{false} respectively. +% +% \DescribeMacro{\useshorthands} +% The command |\useshorthands| initiates the definition of +% user-defined shorthand sequences. It has one argument, the +% character that starts these personal shorthands. +% +% \DescribeMacro{\defineshorthand} +% The command |\defineshorthand| takes two arguments: the first +% is a one- or two-character shorthand sequence, and the second is +% the code the shorthand should expand to. +% +% \DescribeMacro{\aliasshorthand} +% The command |\aliasshorthand| can be used to let another +% character perform the same functions as the default shorthand +% character. If one prefers for example to use the character |/| +% over |"| in typing polish texts, this can be achieved by entering +% |\aliasshorthand{"}{/}|. \emph{Please note} that the substitute +% shorthand character must have been declared in the preamble of +% your document, using a command such as |\useshorthands{/}| in this +% example. +% +% \DescribeMacro{\languageshorthands} +% The command |\languageshorthands| can be used to switch the +% shorthands on the language level. It takes one argument, the +% name of a language. Note that for this to work the language +% should have been specified as an option when loading the \babel\ +% package. +% +% \DescribeMacro{\shorthandon} +% \DescribeMacro{\shorthandoff} +% It is sometimes necessary to switch a shorthand +% character off temporarily, because it must be used in an +% entirely different way. For this purpose, the user commands +% |\shorthandoff| and |\shorthandon| are provided. They each take a +% list of characters as their arguments. The command |\shorthandoff| +% sets the |\catcode| for each of the characters in its argument to +% other (12); the command |\shorthandon| sets the |\catcode| to +% active (13). Both commands only work on `known' +% shorthand characters. If a character is not known to be a +% shorthand character its category code will be left unchanged. +% +% \DescribeMacro{\languageattribute} +% This is a user-level command, to be used in the preamble of a +% document (after |\usepackage[...]{babel}|), that declares which +% attributes are to be used for a given language. It takes two +% arguments: the first is the name of the language; the second, +% a (list of) attribute(s) to used. +% The command checks whether the language is known in this document +% and whether the attribute(s) are known for this language. +% +% \subsection{Languages supported by \Babel} +% +% In the following table all the languages supported by \Babel\ are +% listed, together with the names of the options with which you can +% load \babel\ for each language. +% +% \begin{center} +% \tablehead{Language & Option(s)\\\hline} +% \tabletail{\hline} +% \begin{supertabular}{l p{8cm}} +% Afrikaans & afrikaans\\ +% Bahasa & bahasa\\ +% Basque & basque\\ +% Breton & breton\\ +% Bulgarian & bulgarian\\ +% Catalan & catalan\\ +% Croatian & croatian\\ +% Czech & czech\\ +% Danish & danish\\ +% Dutch & dutch\\ +% English & english, USenglish, american, UKenglish, +% british, canadian, australian, newzealand\\ +% Esperanto & esperanto\\ +% Estonian & estonian\\ +% Finnish & finnish\\ +% French & french, francais, canadien, acadian\\ +% Galician & galician\\ +% German & austrian, german, germanb, ngerman, naustrian\\ +% Greek & greek, polutonikogreek \\ +% Hebrew & hebrew \\ +% Hungarian & magyar, hungarian\\ +% Icelandic & icelandic \\ +% Interlingua & interlingua \\ +% Irish Gaelic & irish\\ +% Italian & italian\\ +%^^A Kannada & kannada \\ +% Latin & latin \\ +% Lower Sorbian & lowersorbian\\ +%^^A Devnagari & nagari \\ +% North Sami & samin \\ +% Norwegian & norsk, nynorsk\\ +% Polish & polish\\ +% Portuguese & portuges, portuguese, brazilian, brazil\\ +% Romanian & romanian\\ +% Russian & russian\\ +%^^A Sanskrit & sanskrit\\ +% Scottish Gaelic & scottish\\ +% Spanish & spanish\\ +% Slovakian & slovak\\ +% Slovenian & slovene\\ +% Swedish & swedish\\ +% Serbian & serbian\\ +%^^A Tamil & tamil \\ +% Turkish & turkish\\ +% Ukrainian & ukrainian\\ +% Upper Sorbian & uppersorbian\\ +% Welsh & welsh\\ +% \end{supertabular} +% \end{center} +% +% For some languages \babel\ supports the options +% \Lopt{activeacute} and \Lopt{activegrave}; for typestting Russian +% texts, \babel\ knows about the options \Lopt{LWN} and \Lopt{LCY} +% to specify the fontencoding of the cyrillic font used. Currently +% only \Lopt{LWN} is supported. +% +% \subsection{Workarounds} +% +% If you use the document class \cls{book} \emph{and} you use +% |\ref| inside the argument of |\chapter|, +% \LaTeX\ will keep complaining about an undefined +% label. The reason is that the argument of |\ref| is passed through +% |\uppercase| at some time during processing. To prevent such +% problems, you could revert to using uppercase labels, or you can +% use |\lowercase{\ref{foo}}| inside the argument of |\chapter|. +% +% \section{Changes for \LaTeXe} +% +% With the advent of \LaTeXe\ the interface to \babel\ in the +% preamble of the document has changed. With \LaTeX2.09 one used to +% call up the \babel\ system with a line such as: +% +%\begin{verbatim} +%\documentstyle[dutch,english]{article} +%\end{verbatim} +% +% which would tell \LaTeX\ that the document would be written in +% two languages, Dutch and English, and that English would be the +% first language in use. +% +% The \LaTeXe\ way of providing the same information is: +% +%\begin{verbatim} +%\documentclass{article} +%\usepackage[dutch,english]{babel} +%\end{verbatim} +% +% or, making \Lopt{dutch} and \Lopt{english} global options in +% order to let other packages detect and use them: +% +%\begin{verbatim} +%\documentclass[dutch,english]{article} +%\usepackage{babel} +%\usepackage{varioref} +%\end{verbatim} +% +% In this last example, the package \texttt{varioref} will also see +% the options and will be able to use them. +% +% \section{Changes in \Babel\ version 3.7} +% +% In \Babel\ version 3.7 a number of bugs that were found in +% version~3.6 are fixed. Also a number of changes and additions +% have occurred: +% \begin{itemize} +% \item Shorthands are expandable again. The disadvantage is that +% one has to type |'{}a| when the acute accent is used as a +% shorthand character. The advantage is that a number of other +% problems (such as the breaking of ligatures, etc.) have +% vanished. +% \item Two new commands, |\shorthandon| and |\shorthandoff| have +% been introduced to enable to temporarily switch off one or more +% shorthands. +%^^A \item Support for typesetting Sanskrit in transliteration is now +%^^A available, thanks to Jun Takashima. +%^^A \item Support for typesetting Kannada, Devnagari and Tamil is now +%^^A available thanks to Jun Takashima. +% \item Support for typesetting Greek has been enhanced. Code from +% the \pkg{kdgreek} package (suggested by the author) was added +% and |\greeknumeral| has been added. +% \item Support for typesetting Basque is now available thanks to +% Juan Aguirregabiria. +% \item Support for typesetting Serbian with Latin script is now +% available thanks to Dejan Muhamedagi\'{c} and Jankovic +% Slobodan. +% \item Support for typesetting Hebrew (and potential support for +% typesetting other right-to-left written languages) is now +% available thanks to Rama Porrat and Boris Lavva. +% \item Support for typesetting Bulgarian is now available thanks to +% Georgi Boshnakov. +% \item Support for typesetting Latin is now available, thanks to +% Claudio Beccari and Krzysztof Konrad \.Zelechowski. +% \item Support for typesetting North Sami is now available, thanks +% to Regnor Jernsletten. +% \item The options \Lopt{canadian}, \Lopt{canadien} and +% \Lopt{acadien} have been added for Canadian English and French +% use. +% \item A language attribute has been added to the |\mark...| +% commands in order to make sure that a Greek header line comes +% out right on the last page before a language switch. +% \item Hyphenation pattern files are now read \emph{inside a +% group}; therefore any changes a pattern file needs to make to +% lowercase codes, uppercase codes, and category codes are kept +% local to that group. If they are needed for the language, these +% changes will need to be repeated and stored in |\extras...| +% \item The concept of language attributes is introduced. It is +% intended to give the user some control over the +% features a language-definition file provides. Its +% first use is for the Greek language, where the user can choose +% the $\pi o\lambda\upsilon\tau o\nu\kappa\acute{o}$ +% (``Polutoniko'' or multi-accented) Greek way of typesetting +% texts. These attributes will possibly find wider use in future +% releases. +% \item The environment \Lenv{hyphenrules} is introduced. +% \item The syntax of the file \file{language.dat} has been +% extended to allow (optionally) specifying the font +% encoding to be used while processing the patterns file. +% \item The command |\providehyphenmins| should now be used in +% language definition files in order to be able to keep any +% settings provided by the pattern file. +% \end{itemize} +% +% \section{Changes in \Babel\ version 3.6} +% +% In \Babel\ version 3.6 a number of bugs that were found in +% version~3.5 are fixed. Also a number of changes and additions +% have occurred: +% \begin{itemize} +% \item A new environment \Lenv{otherlanguage*} is introduced. it +% only switches the `specials', but leaves the `captions' +% untouched. +% \item The shorthands are no longer fully expandable. Some +% problems could only be solved by peeking at the token following +% an active character. The advantage is that |'{}a| works as +% expected for languages that have the |'| active. +% \item Support for typesetting french texts is much enhanced; the +% file \file{francais.ldf} is now replaced by \file{frenchb.ldf} +% which is maintained by Daniel Flipo. +% \item Support for typesetting the russian language is again +% available. The language definition file was originally +% developed by Olga Lapko from CyrTUG. The fonts needed to +% typeset the russian language are now part of the \babel\ +% distribution. The support is not yet up to the level which is +% needed according to Olga, but this is a start. +% \item Support for typesetting greek texts is now also +% available. What is offered in this release is a first attempt; +% it will be enhanced later on by Yannis Haralambous. +% \item in \babel\ 3.6j some hooks have been added for the +% development of support for Hebrew typesetting. +% \item Support for typesetting texts in Afrikaans (a variant of +% Dutch, spoken in South Africa) has been added to +% \file{dutch.ldf}. +% \item Support for typesetting Welsh texts is now available. +% \item A new command |\aliasshorthand| is introduced. It seems +% that in Poland various conventions are used to type the +% necessary Polish letters. It is now possible to use the +% character~|/| as a shorthand character instead of the +% character~|"|, by issuing the command |\aliasshorthand{"}{/}|. +% \item The shorthand mechanism now deals correctly with characters +% that are already active. +% \item Shorthand characters are made active at |\begin{document}|, +% not earlier. This is to prevent problems with other packages. +% \item A \emph{preambleonly} command |\substitutefontfamily| has +% been added to create \file{.fd} files on the fly when the font +% families of the Latin text differ from the families used for +% the Cyrillic or Greek parts of the text. +% \item Three new commands |\LdfInit|, |\ldf@quit| and +% |\ldf@finish| are introduced that perform a number of standard +% tasks. +% \item In babel 3.6k the language Ukrainian has been added and the +% support for Russian typesetting has been adapted to the package +% 'cyrillic' to be released with the December 1998 release of +% \LaTeXe. +% \end{itemize} +% +% \section{Changes in \Babel\ version 3.5} +% +% In \Babel\ version 3.5 a lot of changes have been made when +% compared with the previous release. Here is a list of the most +% important ones: +% \begin{itemize} +% \item the selection of the language is delayed until +% |\begin{document}|, which means you must +% add appropriate |\selectlanguage| commands if you include +% |\hyphenation| lists in the preamble of your document. +% \item \babel\ now has a \Lenv{language} environment and a new +% command |\foreignlanguage|; +% \item the way active characters are dealt with is completely +% changed. They are called `shorthands'; one can have three +% levels of shorthands: on the user level, the language level, and +% on `system level'. A consequence of the new way of handling +% active characters is that they are now written to auxiliary +% files `verbatim'; +% \item A language change now also writes information in the +% \file{.aux} file, as the change might also affect typesetting +% the table of contents. The consequence is that an .aux file +% generated by a LaTeX format with babel preloaded gives errors +% when read with a LaTeX format without babel; but I think this +% probably doesn't occur; +% \item \babel\ is now compatible with the \pkg{inputenc} and +% \pkg{fontenc} packages; +% \item the language definition files now have a new extension, +% \file{ldf}; +% \item the syntax of the file \file{language.dat} is extended to +% be compatible with the \pkg{french} package by Bernard Gaulle; +% \item each language definition file looks for a configuration +% file which has the same name, but the extension \file{.cfg}. It +% can contain any valid \LaTeX\ code. +% \end{itemize} +% +% \section{The interface between the core of \babel{} and the language +% definition files} +% +% In the core of the \babel{} system, several macros are defined +% for use in language definition files. Their purpose +% is to make a new language known. +% +% \DescribeMacro{\addlanguage} +% The macro |\addlanguage| is a non-outer version of the macro +% |\newlanguage|, defined in \file{plain.tex} version~3.x. For +% older versions of \file{plain.tex} and \file{lplain.tex} a +% substitute definition is used. +% +% \DescribeMacro{\adddialect} +% The macro |\adddialect| can be used when two +% languages can (or must) use the same hyphenation +% patterns. This can also be useful for +% languages for which no patterns are preloaded in the format. In +% such cases the default behaviour of the \babel{} system is to +% define this language as a `dialect' of the language for which the +% patterns were loaded as |\language0|. +% +% The language definition files must conform to a number of +% conventions, because these files have to fill +% in the gaps left by the common code in \file{babel.def}, i.\,e., +% the definitions of the macros that produce texts. Also the +% language-switching possibility which has been built into the +% \babel{} system has its implications. +% +% The following assumptions are made: +% \begin{itemize} +% \item Some of the language-specific definitions might be used by +% plain \TeX\ users, so the files have to be coded so that they +% can be read by both \LaTeX\ and plain \TeX. The current +% format can be checked by looking at the value of the macro +% |\fmtname|. +% +% \item The common part of the \babel{} system redefines a number +% of macros and environments (defined previously in the document +% style) to put in the names of macros that replace the previously +% hard-wired texts. These macros have to be defined in the +% language definition files. +% +% \item The language definition files define five macros, used to +% activate and deactivate the language-specific definitions. These +% macros are |\|\langvar|hyphenmins|, |\captions|\langvar, +% |\date|\langvar, |\extras|\langvar\ and |\noextras|\langvar; where +% \langvar\ is either the name of the language definition file or +% the name of the \LaTeX\ option that is to be used. These +% macros and their functions are discussed below. +% +% \item When a language definition file is loaded, it can define +% |\l@|\langvar\ to be a dialect of |\language0| when +% |\l@|\langvar\ is undefined. +% +% \item The language definition files can be read in the preamble of +% the document, but also in the middle of document processing. This +% means that they have to function independently of the current +% |\catcode| of the \texttt{@}~sign. +% \end{itemize} +% +% \DescribeMacro{\providehyphenmins} +% The macro |\providehyphenmins| should be used in the language +% definition files to set the |\lefthyphenmin| and +% |\righthyphenmin|. This macro will check whether these parameters +% were provided by the hyphenation file before it takes any action. +% +% \DescribeMacro{\langhyphenmins} +% The macro |\|\langvar|hyphenmins| is used to store the values of +% the |\lefthyphenmin| and |\righthyphenmin|. +% +% \DescribeMacro{\captionslang} +% The macro |\captions|\langvar\ defines the macros that +% hold the texts to replace the original hard-wired texts. +% +% \DescribeMacro{\datelang} +% The macro |\date|\langvar\ defines |\today| and +% +% \DescribeMacro{\extraslang} +% The macro |\extras|\langvar\ contains all the extra definitions +% needed for a specific language. +% +% \DescribeMacro{\noextraslang} +% Because we want to let the user switch +% between languages, but we do not know what state \TeX\ might be in +% after the execution of |\extras|\langvar, a macro that brings +% \TeX\ into a predefined state is needed. It will be no surprise +% that the name of this macro is |\noextras|\langvar. +% +% \DescribeMacro{\bbl@declare@ttribute} +% This is a command to be used in the language definition files for +% declaring a language attribute. It takes three arguments: the +% name of the language, the attribute to be defined, and the code +% to be executed when the attribute is to be used. +% +% \DescribeMacro{\main@language} +% To postpone the activation of the definitions needed for a +% language until the beginning of a document, all language +% definition files should use |\main@language| instead of +% |\selectlanguage|. This will just store the name of the language, +% and the proper language will be activated at the start of the +% document. +% +% \DescribeMacro{\ProvidesLanguage} +% The macro |\ProvidesLanguage| should be used to identify the +% language definition files. Its syntax is similar to the syntax +% of the \LaTeX\ command |\ProvidesPackage|. +% +% \DescribeMacro{\LdfInit} +% The macro |\LdfInit| performs a couple of standard checks that +% must be made at the beginning of a language definition file, +% such as checking the category code of the @-sign, preventing +% the \file{.ldf} file from being processed twice, etc. +% +% \DescribeMacro{\ldf@quit} +% The macro |\ldf@quit| does work needed +% if a \file{.ldf} file was processed +% earlier. This includes resetting the category code +% of the @-sign, preparing the language to be activated at +% |\begin{document}| time, and ending the input stream. +% +% \DescribeMacro{\ldf@finish} +% The macro |\ldf@finish| does work needed +% at the end of each \file{.ldf} file. This +% includes resetting the category code of the @-sign, +% loading a local configuration file, and preparing the language +% to be activated at |\begin{document}| time. +% +% \DescribeMacro{\loadlocalcfg} +% After processing a language definition file, +% \LaTeX\ can be instructed to load a local configuration +% file. This file can, for instance, be used to add strings to +% |\captions|\langvar\ to support local document +% classes. The user will be informed that this +% configuration file has been loaded. This macro is called by +% |\ldf@finish|. +% +% \DescribeMacro{\substitutefontfamily} +% This command takes three arguments, a font encoding and two font +% family names. It creates a font description file for the first +% font in the given encoding. This \file{.fd} file will instruct +% \LaTeX\ to use a font from the second family when a font from the +% first family in the given encoding seems to be needed. +% +% \subsection{Support for active characters} +% +% In quite a number of language definition files, active characters +% are introduced. To facilitate this, some support macros are +% provided. +% +% \DescribeMacro{\initiate@active@char} +% The internal macro |\initiate@active@char| is used in language +% definition files to instruct \LaTeX\ to give a character the +% category code `active'. When a character has been made active it +% will remain that way until the end of the document. Its +% definition may vary. +% +% \DescribeMacro{\bbl@activate} +% \DescribeMacro{\bbl@deactivate} +% The command |\bbl@activate| is used to change the way an active +% character expands. |\bbl@activate| `switches on' the active +% behaviour of the character. |\bbl@deactivate| lets the active +% character expand to its former (mostly) non-active self. +% +% \DescribeMacro{\declare@shorthand} +% The macro |\declare@shorthand| is used to define the various +% shorthands. It takes three arguments: the name for the collection +% of shorthands this definition belongs to; the character +% (sequence) that makes up the shorthand, i.e.\ |~| or |"a|; and the +% code to be executed when the shorthand is encountered. +% +% \DescribeMacro{\bbl@add@special} +% \DescribeMacro{\bbl@remove@special} +% The \TeX book states: ``Plain \TeX\ includes a macro called +% |\dospecials| that is +% essentially a set macro, representing the set of all characters +% that have a special category code.'' \cite[p.~380]{DEK} It is +% used to set text `verbatim'. To make this work if more +% characters get a special category code, you have to add this +% character to the macro |\dospecial|. \LaTeX\ adds another macro +% called |\@sanitize| representing the same character set, but +% without the curly braces. The macros +% |\bbl@add@special|\meta{char} and +% |\bbl@remove@special|\meta{char} add and remove the character +% \meta{char} to these two sets. +% +% \subsection{Support for saving macro definitions} +% +% Language definition files may want to \emph{re}define macros that +% already exist. Therefor a mechanism for saving (and restoring) +% the original definition of those macros is provided. We provide +% two macros for this\footnote{This mechanism was introduced by +% Bernd Raichle.}. +% +% \DescribeMacro{\babel@save} To save the current meaning of any +% control sequence, the macro |\babel@save| is provided. It takes +% one argument, \meta{csname}, the control sequence for which the +% meaning has to be saved. +% +% \DescribeMacro{\babel@savevariable} A second macro is provided to +% save the current value of a variable. In this context, anything +% that is allowed after the |\the| primitive is considered to be a +% variable. The macro takes one argument, the \meta{variable}. +% +% The effect of the preceding macros is to append a piece of code +% to the current definition of |\originalTeX|. When +% |\originalTeX| is expanded, this code restores the previous +% definition of the control sequence or the previous value of the +% variable. +% +% \subsection{Support for extending macros} +% +% \DescribeMacro{\addto} +% The macro |\addto{|\meta{control sequence}|}{|\meta{\TeX\ +% code}|}| can be used to extend the definition of a macro. The +% macro need not be defined. This macro can, for instance, be used +% in adding instructions to a macro like |\extrasenglish|. +% +% \subsection{Macros common to a number of languages} +% +% \DescribeMacro{\allowhyphens} +% In a couple of European languages compound words are used. This +% means that when \TeX\ has to hyphenate such a compound word, it +% only does so at the `\texttt{-}' that is used in such words. To +% allow hyphenation in the rest of such a compound word, the macro +% |\allowhyphens| can be used. +% +% \DescribeMacro{\set@low@box} +% For some languages, quotes need to be lowered to the baseline. For +% this purpose the macro |\set@low@box| is available. It takes one +% argument and puts that argument in an |\hbox|, at the +% baseline. The result is available in |\box0| for further +% processing. +% +% \DescribeMacro{\save@sf@q} +% Sometimes it is necessary to preserve the |\spacefactor|. For +% this purpose the macro |\save@sf@q| is available. It takes one +% argument, saves the current spacefactor, executes the argument, +% and restores the spacefactor. +% +% \DescribeMacro{\bbl@frenchspacing} +% \DescribeMacro{\bbl@nonfrenchspacing} +% The commands |\bbl@frenchspacing| and |\bbl@nonfrenchspacing| can +% be used to properly switch French spacing on and off. +% +% \section{Compatibility with \file{german.sty}}\label{l-h} +% +% The file \file{german.sty} has been +% one of the sources of inspiration for the \babel{} +% system. Because of this I wanted to include \file{german.sty} in +% the \babel{} system. To be able to do that I had to allow for +% one incompatibility: in the definition of the macro +% |\selectlanguage| in \file{german.sty} the argument is used as the +% {$\langle \it number \rangle$} for an |\ifcase|. So in this case +% a call to |\selectlanguage| might look like +% |\selectlanguage{\german}|. +% +% In the definition of the macro |\selectlanguage| in +% \file{babel.def} the argument is used as a part of other +% macronames, so a call to |\selectlanguage| now looks like +% |\selectlanguage{german}|. Notice the absence of the escape +% character. As of version~3.1a of \babel{} both syntaxes are +% allowed. +% +% All other features of the original \file{german.sty} have been +% copied into a new file, called \file{germanb.sty}\footnote{The +% `b' is added to the name to distinguish the file from Partls' +% file.}. +% +% Although the \babel{} system was developed to be used with +% \LaTeX, some of the features implemented in the language +% definition files might be needed by plain \TeX\ users. Care has +% been taken that all files in the system can be processed by plain +% \TeX. +% +% \section{Compatibility with \file{ngerman.sty}} +% +% When used with the options \Lopt{ngerman} or \Lopt{naustrian}, +% \babel{} will provide all features of the package \pkg{ngerman}. +% There is however one exception: The commands for special +% hyphenation of double consonants (|"ff| etc.) and ck (|"ck|), +% which are no longer required with the new German orthography, are +% undefined. With the \pkg{ngerman} package, however, these +% commands will generate appropriate warning messages only. +% +% \section{Compatibility with the \pkg{french} package} +% +% It has been reported to me that the package \pkg{french} by +% Bernard Gaulle (\texttt{gaulle@idris.fr}) works +% together with \babel. On the other hand, it seems \emph{not} to +% work well together with a lot of other packages. Therefore I have +% decided to no longer load \file{french.ldf} by default. Instead, +% when you want to use the package by Bernard Gaulle, you will have +% to request it specifically, by passing either \Lopt{frenchle} or +% \Lopt{frenchpro} as an option to \babel. +% +%\StopEventually{% +% \clearpage +% \let\filename\thisfilename +% \section{Conclusion} +% +% A system of document options has been presented that enable the +% user of \LaTeX\ to adapt the standard document classes of \LaTeX\ +% to the language he or she prefers to use. These options offer the +% possibility of switching between languages in one document. The +% basic interface consists of using one option, which is the same +% for \emph{all} standard document classes. +% +% In some cases the language definition files provide macros that +% can be useful to plain \TeX\ users as well as to \LaTeX\ users. +% The \babel{} system has been implemented so that it +% can be used by both groups of users. +% +% \section{Acknowledgements} +% +% I would like to thank all who volunteered as $\beta$-testers for +% their time. I would like to mention Julio Sanchez who supplied +% the option file for the Spanish language and Maurizio Codogno who +% supplied the option file for the Italian language. Michel Goossens +% supplied contributions for most of the other languages. Nico +% Poppelier helped polish the text of the documentation and +% supplied parts of the macros for the Dutch language. Paul +% Wackers and Werenfried Spit helped find and repair bugs. +% +% During the further development of the babel system I received +% much help from Bernd Raichle, for which I am grateful. +% +% \begin{thebibliography}{9} +% \bibitem{DEK} Donald E. Knuth, +% \emph{The \TeX book}, Addison-Wesley, 1986. +% \bibitem{LLbook} Leslie Lamport, +% \emph{\LaTeX, A document preparation System}, Addison-Wesley, +% 1986. +% \bibitem{treebus} K.F. Treebus. +% \emph{Tekstwijzer, een gids voor het grafisch verwerken van +% tekst.} +% SDU Uitgeverij ('s-Gravenhage, 1988). A Dutch book on layout +% design and typography. +% \bibitem{HP} Hubert Partl, +% \emph{German \TeX}, \emph{TUGboat} 9 (1988) \#1, p.~70--72. +% \bibitem{LLth} Leslie Lamport, +% in: \TeXhax\ Digest, Volume 89, \#13, 17 February 1989. +% \bibitem{BEP} Johannes Braams, Victor Eijkhout and Nico Poppelier, +% \emph{The development of national \LaTeX\ styles}, +% \emph{TUGboat} 10 (1989) \#3, p.~401--406. +% \bibitem{ilatex} Joachim Schrod, +% \emph{International \LaTeX\ is ready to use}, +% \emph{TUGboat} 11 (1990) \#1, p.~87--90. +% \end{thebibliography} +% } +% +% \section{Identification} +% +% The file \file{babel.sty}\footnote{The file described in this +% section is called \texttt{\filename}, has version +% number~\fileversion\ and was last revised on~\filedate.} is meant +% for \LaTeXe, therefor we make sure that the format file used is +% the right one. +% +% \begin{macro}{\ProvidesLanguage} +% \changes{babel~3.7a}{1997/03/18}{Added macro to prevent problems +% with unexpected \cs{ProvidesFile} in plain formats because of +% \babel.} +% The identification code for each file is something that was +% introduced in \LaTeXe. When the command |\ProvidesFile| does not +% exist, a dummy definition is provided temporarily. For use in the +% language definition file the command |\ProvidesLanguage| is +% defined by \babel. +% \changes{babel~3.4e}{1994/06/24}{Redid the identification code, +% provided dummy definition of \cs{ProvidesFile} for plain \TeX} +% \changes{babel~3.5f}{1995/07/26}{Store version in \cs{fileversion}} +% \changes{babel~3.5f}{1995/12/18}{Need to temporarily change the +% definition of \cs{ProvidesFile} for December 1995 release} +% \changes{babel~3.5g}{1996/07/09}{Save a few csnames; use +% \cs{bbl@tempa} instead of \cs{\@ProvidesFile} and store message +% in \cs{toks8}} +% \begin{macrocode} +%<*!package> +\ifx\ProvidesFile\@undefined + \def\ProvidesFile#1[#2 #3 #4]{% + \wlog{File: #1 #4 #3 <#2>}% +%<*kernel&patterns> + \toks8{Babel <#3> and hyphenation patterns for }% +% + \let\ProvidesFile\@undefined + } +% \end{macrocode} +% As an alternative for |\ProvidesFile| we define +% |\ProvidesLanguage| here to be used in the language definition +% files. +% \begin{macrocode} +%<*kernel> + \def\ProvidesLanguage#1[#2 #3 #4]{% + \wlog{Language: #1 #4 #3 <#2>}% + } +\else +% \end{macrocode} +% In this case we save the original definition of |\ProvidesFile| in +% |\bbl@tempa| and restore it after we have stored the version of +% the file in |\toks8|. +% \changes{babel~3.7a}{1997/11/04}{Removed superfluous braces} +% \begin{macrocode} +%<*kernel&patterns> + \let\bbl@tempa\ProvidesFile + \def\ProvidesFile#1[#2 #3 #4]{% + \toks8{Babel <#3> and hyphenation patterns for }% + \bbl@tempa#1[#2 #3 #4]% + \let\ProvidesFile\bbl@tempa} +% +% \end{macrocode} +% When |\ProvidesFile| is defined we give |\ProvidesLanguage| a +% similar definition. +% \begin{macrocode} + \def\ProvidesLanguage#1{% + \begingroup + \catcode`\ 10 % + \@makeother\/% + \@ifnextchar[%] + {\@provideslanguage{#1}}{\@provideslanguage{#1}[]}} + \def\@provideslanguage#1[#2]{% + \wlog{Language: #1 #2}% + \expandafter\xdef\csname ver@#1.ldf\endcsname{#2}% + \endgroup} +% +\fi +% +% \end{macrocode} +% \end{macro} +% +% Identify each file that is produced from this source file. +% \changes{babel~3.4c}{1995/04/28}{lhyphen.cfg has become +% lthyphen.cfg} +% \changes{babel~3.5b}{1995/01/25}{lthyphen.cfg has become hyphen.cfg} +% \begin{macrocode} +%<+package>\ProvidesPackage{babel} +%<+core>\ProvidesFile{babel.def} +%<+kernel&patterns>\ProvidesFile{hyphen.cfg} +%<+kernel&!patterns>\ProvidesFile{switch.def} +%<+driver&!user>\ProvidesFile{babel.drv} +%<+driver&user>\ProvidesFile{user.drv} + [2005/05/21 v3.8g % +%<+package> The Babel package] +%<+core> Babel common definitions] +%<+kernel> Babel language switching mechanism] +%<+driver>] +% \end{macrocode} +% +% \section{The Package File} +% +% In order to make use of the features of \LaTeXe, the \babel\ +% system contains a package file, \file{babel.sty}. This file +% is loaded by the |\usepackage| command and defines all the +% language options known in the \babel\ system. It also takes care +% of a number of compatibility issues with other packages. +% +% \subsection{Language options} +% +% \changes{babel~3.6c}{1997/01/05}{When \cs{LdfInit} is undefined we +% need to load \file{babel.def} from \file{babel.sty}} +% \changes{babel~3.6l}{1999/04/03}{Don't load \file{babel.def} now, +% but rather define \cs{LdfInit} temporarily in order to load +% \file{babel.def} at the right time, preventing problems with the +% temporary definition of \cs{bbl@redefine}} +% \changes{babel~3.6r}{1999/04/12}{We \textbf{do} need to load +% \file{babel.def} right now as \cs{ProvidesLanguage} needs to be +% defined before the \file{.ldf} files are read and the reason for +% for 3.6l has been removed} +% \begin{macrocode} +%<*package> +\ifx\LdfInit\@undefined\input babel.def\relax\fi +% \end{macrocode} +% +% For all the languages supported we need to declare an option. +% \changes{babel~3.5a}{1995/03/14}{Changed extension of language +% definition files to \texttt{ldf}} +% \changes{babel~3.5d}{1995/07/02}{Load language definition files +% \emph{after} the check for the hyphenation patterns} +% \changes{babel~3.5g}{1996/10/04}{Added option \Lopt{afrikaans}} +% \changes{babel~3.7g}{2001/02/09}{Added option \Lopt{acadian}} +% \changes{babel~3.8c}{2004/06/12}{Added option \Lopt{australian}} +% \begin{macrocode} +\DeclareOption{acadian}{\input{frenchb.ldf}} +\DeclareOption{afrikaans}{\input{dutch.ldf}} +\DeclareOption{american}{\input{english.ldf}} +\DeclareOption{australian}{\input{english.ldf}} +% \end{macrocode} +% Austrian is really a dialect of German. +% \changes{babel~3.6i}{1997/02/20}{Added the \Lopt{Basque} option} +% \begin{macrocode} +\DeclareOption{austrian}{\input{germanb.ldf}} +\DeclareOption{bahasa}{\input{bahasa.ldf}} +\DeclareOption{basque}{\input{basque.ldf}} +\DeclareOption{brazil}{\input{portuges.ldf}} +% \end{macrocode} +% \changes{babel~3.5b}{1995/05/25}{Added \Lopt{brazilian} as +% alternative for \Lopt{brazil}} +% \begin{macrocode} +\DeclareOption{brazilian}{\input{portuges.ldf}} +\DeclareOption{breton}{\input{breton.ldf}} +% \end{macrocode} +% \changes{babel~3.5d}{1995/07/02}{Added \Lopt{british} as an +% alternative for \Lopt{english} with a preference for british +% hyphenation} +% \changes{babel~3.7f}{2000/09/21}{Added the \Lopt{bulgarian} option} +% \changes{babel~3.7g}{2001/02/07}{Added option \Lopt{canadian}} +% \changes{babel~3.7g}{2001/02/09}{Added option \Lopt{canadien}} +% \begin{macrocode} +\DeclareOption{british}{\input{english.ldf}} +\DeclareOption{bulgarian}{\input{bulgarian.ldf}} +\DeclareOption{canadian}{\input{english.ldf}} +\DeclareOption{canadien}{\input{frenchb.ldf}} +\DeclareOption{catalan}{\input{catalan.ldf}} +\DeclareOption{croatian}{\input{croatian.ldf}} +\DeclareOption{czech}{\input{czech.ldf}} +\DeclareOption{danish}{\input{danish.ldf}} +\DeclareOption{dutch}{\input{dutch.ldf}} +% \end{macrocode} +% \changes{babel~3.5b}{1995/06/06}{Added the \Lopt{estonian} option} +% \begin{macrocode} +\DeclareOption{english}{\input{english.ldf}} +\DeclareOption{esperanto}{\input{esperanto.ldf}} +\DeclareOption{estonian}{\input{estonian.ldf}} +\DeclareOption{finnish}{\input{finnish.ldf}} +% \end{macrocode} +% The \babel\ support or French used to be stored in +% \file{francais.ldf}; therefor the \LaTeX2.09 option used to be +% \Lopt{francais}. The hyphenation patterns may be loaded as either +% `french' or as `francais'. +% \changes{babel~3.5f}{1996/01/10}{Now use the file \file{frenchb.ldf} +% from Daniel Flipo for french support} +% \changes{babel~3.6e}{1997/01/08}{Added option \Lopt{frenchb} an +% alias for \Lopt{francais}} +% \begin{macrocode} +\DeclareOption{francais}{\input{frenchb.ldf}} +\DeclareOption{frenchb}{\input{frenchb.ldf}} +% \end{macrocode} +% With \LaTeXe\ we can now also use the option \Lopt{french} and +% still call the file \file{frenchb.ldf}. +% \changes{babel~3.5d}{1995/07/02}{Load \file{french.ldf} when it is +% found instead of \file{frenchb.ldf}} +% \changes{babel~3.7j}{2003/06/07}{\emph{only} load +% \file{frenchb.ldf}} +% \begin{macrocode} +\DeclareOption{french}{\input{frenchb.ldf}}% +\DeclareOption{galician}{\input{galician.ldf}} +\DeclareOption{german}{\input{germanb.ldf}} +\DeclareOption{germanb}{\input{germanb.ldf}} +% \end{macrocode} +% \changes{babel~3.5f}{1996/05/31}{Added the \Lopt{greek} option} +% \changes{babel~3.7a}{1997/11/13}{Added the \Lopt{polutonikogreek} +% option} +% \changes{babel~3.7c}{1999/04/22}{set the correct language attribute +% for polutoniko greek} +% \begin{macrocode} +\DeclareOption{greek}{\input{greek.ldf}} +\DeclareOption{polutonikogreek}{% + \input{greek.ldf}% + \languageattribute{greek}{polutoniko}} +% \end{macrocode} +% \changes{babel~3.7a}{1998/03/27}{Added the \Lopt{hebrew} option} +% \begin{macrocode} +\DeclareOption{hebrew}{% + \input{rlbabel.def}% + \input{hebrew.ldf}} +% \end{macrocode} +% \Lopt{hungarian} is just a synonym for \Lopt{magyar} +%^^A \changes{babel~3.6i}{1997/02/21}{Added the \Lopt{kannada} option} +% \changes{babel~3.7a}{1997/05/21}{Added the \Lopt{icelandic} option} +%^^A \changes{babel~3.7a}{1998/03/30}{{Added the \Lopt{nagari} option} +% \changes{babel~3.7b}{1998/06/25}{Added the \Lopt{latin} option} +% \changes{babel~3.7m}{2003/11/13}{Added the \Lopt{interlingua} +% option} +% \begin{macrocode} +\DeclareOption{hungarian}{\input{magyar.ldf}} +\DeclareOption{icelandic}{\input{icelandic.ldf}} +\DeclareOption{interlingua}{\input{interlingua.ldf}} +\DeclareOption{irish}{\input{irish.ldf}} +\DeclareOption{italian}{\input{italian.ldf}} +\DeclareOption{latin}{\input{latin.ldf}} +\DeclareOption{lowersorbian}{\input{lsorbian.ldf}} +%^^A\DeclareOption{kannada}{\input{kannada.ldf}} +\DeclareOption{magyar}{\input{magyar.ldf}} +%^^A\DeclareOption{nagari}{\input{nagari.ldf}} +% \end{macrocode} +% `New' German orthography, including Austrian variant: +% \changes{babel~3.6p}{1999/04/10}{Added the \Lopt{ngerman} and +% \Lopt{naustrian} options} +% \changes{babel~3.7f}{2000/09/26}{Added the \Lopt{samin} option} +% \changes{babel~3.8c}{2004/06/12}{Added the \Lopt{newzealand} option} +% \begin{macrocode} +\DeclareOption{naustrian}{\input{ngermanb.ldf}} +\DeclareOption{newzealand}{\input{english.ldf}} +\DeclareOption{ngerman}{\input{ngermanb.ldf}} +\DeclareOption{norsk}{\input{norsk.ldf}} +\DeclareOption{samin}{\input{samin.ldf}} +% \end{macrocode} +% For Norwegian two spelling variants are provided. +% \begin{macrocode} +\DeclareOption{nynorsk}{\input{norsk.ldf}} +\DeclareOption{polish}{\input{polish.ldf}} +\DeclareOption{portuges}{\input{portuges.ldf}} +\DeclareOption{portuguese}{\input{portuges.ldf}} +\DeclareOption{romanian}{\input{romanian.ldf}} +\DeclareOption{russian}{\input{russianb.ldf}} +% \end{macrocode} +%^^A \changes{babel~3.7a}{1997/02/07}{Added the \Lopt{sanskrit} option} +% \changes{babel~3.6i}{1997/02/21}{Added the \Lopt{ukrainian} option} +%^^A \changes{babel~3.7a}{1998/03/30}{Added the \Lopt{tamil} option} +% \begin{macrocode} +%^^A\DeclareOption{sanskrit}{\input{sanskrit.ldf}} +\DeclareOption{scottish}{\input{scottish.ldf}} +\DeclareOption{serbian}{\input{serbian.ldf}} +\DeclareOption{slovak}{\input{slovak.ldf}} +\DeclareOption{slovene}{\input{slovene.ldf}} +\DeclareOption{spanish}{\input{spanish.ldf}} +\DeclareOption{swedish}{\input{swedish.ldf}} +%^^A\DeclareOption{tamil}{\input{tamil.ldf}} +\DeclareOption{turkish}{\input{turkish.ldf}} +\DeclareOption{ukrainian}{\input{ukraineb.ldf}} +\DeclareOption{uppersorbian}{\input{usorbian.ldf}} +\DeclareOption{welsh}{\input{welsh.ldf}} +% \end{macrocode} +% \changes{babel~3.6e}{1997/01/08}{Added options \Lopt{UKenglish} and +% \Lopt{USenglish}} +% \begin{macrocode} +\DeclareOption{UKenglish}{\input{english.ldf}} +\DeclareOption{USenglish}{\input{english.ldf}} +% \end{macrocode} +% +% For all those languages for which the option name is the same as +% the name of the language specific file we specify a default +% option, which tries to load the file specified. If this doesn't +% succeed an error is signalled. +% \changes{babel~3.6i}{1997/03/12}{Added default option} +% \begin{macrocode} +\DeclareOption*{% + \InputIfFileExists{\CurrentOption.ldf}{}{% + \PackageError{babel}{% + Language definition file \CurrentOption.ldf not found}{% + Maybe you misspelled the language option?}}% + } +% \end{macrocode} +% Another way to extend the list of `known' options for \babel\ is +% to create the file \file{bblopts.cfg} in which one can add +% option declarations. +% \changes{babel~3.6i}{1997/03/15}{Added the possibility to have a +% \file{bblopts.cfg} file with option declarations.} +% \begin{macrocode} +\InputIfFileExists{bblopts.cfg}{% + \typeout{*************************************^^J% + * Local config file bblopts.cfg used^^J% + *}% + }{} +% \end{macrocode} +% +% Apart from all the language options we also have a few options +% that influence the behaviour of language definition files. +% +% The following options don't do anything themselves, they are just +% defined in order to make it possible for language definition +% files to check if one of them was specified by the user. +% \changes{babel~3.5d}{1995/07/04}{Added options to influence +% behaviour of active acute and grave accents} +% \begin{macrocode} +\DeclareOption{activeacute}{} +\DeclareOption{activegrave}{} +% \end{macrocode} +% The next option tells \babel\ to leave shorthand characters +% active at the end of processing the package. This is \emph{not} +% the default as it can cause problems with other packages, but for +% those who want to use the shorthand characters in the preamble of +% their documents this can help. +% \changes{babel~3.6f}{1997/01/14}{Added option +% \Lopt{KeepShorthandsActive}} +% \changes{babel~3.7a}{1997/03/21}{No longer define the control +% sequence \cs{KeepShorthandsActive}} +% \begin{macrocode} +\DeclareOption{KeepShorthandsActive}{} +% \end{macrocode} +% +% The options have to be processed in the order in which the user +% specified them: +% \begin{macrocode} +\ProcessOptions* +% \end{macrocode} +% \changes{babel~3.7c}{1999/03/13}{Added an error message for when no +% language option was specified} +% In order to catch the case where the user forgot to specify a +% language we check whether |\bbl@main@language|, has become +% defined. If not, no language has been loaded and an error +% message is displayed. +% \changes{babel~3.7c}{1999/04/09}{No longer us a redefinition of an +% internal macro, just check \cs{bbl@main@language} and load +% \file{babel.def}} +% \begin{macrocode} +\ifx\bbl@main@language\@undefined + \PackageError{babel}{% + You haven't specified a language option}{% + You need to specify a language, either as a global + option\MessageBreak + or as an optional argument to the \string\usepackage\space + command; \MessageBreak + You shouldn't try to proceed from here, type x to quit.} +% \end{macrocode} +% To prevent undefined command errors when the user insists on +% continuing we load \file{babel.def} here. He should expect more +% errors though. +% \begin{macrocode} + \input{babel.def} +\fi +% \end{macrocode} +% +% \begin{macro}{\substitutefontfamily} +% The command |\substitutefontfamily| creates an \file{.fd} file on +% the fly. The first argument is an encoding mnemonic, the second +% and third arguments are font family names. +% \changes{babel~3.7j}{2003/06/15}{create file with lowercase name} +% \begin{macrocode} +\def\substitutefontfamily#1#2#3{% + \lowercase{\immediate\openout15=#1#2.fd\relax}% + \immediate\write15{% + \string\ProvidesFile{#1#2.fd}% + [\the\year/\two@digits{\the\month}/\two@digits{\the\day} + \space generated font description file]^^J + \string\DeclareFontFamily{#1}{#2}{}^^J + \string\DeclareFontShape{#1}{#2}{m}{n}{<->ssub * #3/m/n}{}^^J + \string\DeclareFontShape{#1}{#2}{m}{it}{<->ssub * #3/m/it}{}^^J + \string\DeclareFontShape{#1}{#2}{m}{sl}{<->ssub * #3/m/sl}{}^^J + \string\DeclareFontShape{#1}{#2}{m}{sc}{<->ssub * #3/m/sc}{}^^J + \string\DeclareFontShape{#1}{#2}{b}{n}{<->ssub * #3/bx/n}{}^^J + \string\DeclareFontShape{#1}{#2}{b}{it}{<->ssub * #3/bx/it}{}^^J + \string\DeclareFontShape{#1}{#2}{b}{sl}{<->ssub * #3/bx/sl}{}^^J + \string\DeclareFontShape{#1}{#2}{b}{sc}{<->ssub * #3/bx/sc}{}^^J + }% + \closeout15 + } +% \end{macrocode} +% This command should only be used in the preamble of a document. +% \begin{macrocode} +\@onlypreamble\substitutefontfamily +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +% +% \end{macrocode} +% +% \section{The Kernel of Babel} +% +% The kernel of the \babel\ system is stored in either +% \file{hyphen.cfg} or \file{switch.def} and \file{babel.def}. The +% file \file{hyphen.cfg} is a file that can be loaded into the +% format, which is necessary when you want to be able to switch +% hyphenation patterns. The file \file{babel.def} contains some +% \TeX\ code that can be read in at run time. When \file{babel.def} +% is loaded it checks if \file{hyphen.cfg} is in the format; if +% not the file \file{switch.def} is loaded. +% +% Because plain \TeX\ users might want to use some of the features +% of the \babel{} system too, care has to be taken that plain \TeX\ +% can process the files. For this reason the current format will +% have to be checked in a number of places. Some of the code below +% is common to plain \TeX\ and \LaTeX, some of it is for the +% \LaTeX\ case only. +% +% When the command |\AtBeginDocument| doesn't exist we assume that +% we are dealing with a plain-based format. In that case the file +% \file{plain.def} is needed. +% +% \begin{macrocode} +%<*kernel|core> +\ifx\AtBeginDocument\@undefined +% \end{macrocode} +% But we need to use the second part of \file{plain.def} (when we +% load it from \file{switch.def}) which we can do by defining +% |\adddialect|. +% \changes{babel~3.7c}{1999/04/20}{define \cs{adddialect} before +% loading \file{plain.def} here} +% \begin{macrocode} +% \def\adddialect{} + \input plain.def\relax +\fi +% +% \end{macrocode} +% +% Check the presence of the command |\iflanguage|, if it is +% undefined read the file \file{switch.def}. +% \changes{babel~3.0d}{1991/10/29}{Removed use of \cs{@ifundefined}} +% \begin{macrocode} +%<*core> +\ifx\iflanguage\@undefined + \input switch.def\relax +\fi +% +% \end{macrocode} +% \changes{babel~3.6a}{1996/11/02}{Removed \cs{babel@core@loaded}, no +% longer needed with the advent of \cs{LdfInit}} +% +% \subsection{Encoding issues (part 1)} +% +% The first thing we need to do is to determine, at +% |\begin{document}|, which latin fontencoding to use. +% +% \begin{macro}{\latinencoding} +% \changes{babel~3.6i}{1997/03/15}{Macro added, moved from +% \file{.ldf} files} +% When text is being typeset in an encoding other than `latin' +% (\texttt{OT1} or \texttt{T1}), it would be nice to still have +% Roman numerals come out in the Latin encoding. +% So we first assume that the current encoding at the end +% of processing the package is the Latin encoding. +% \begin{macrocode} +%<*core> +\AtEndOfPackage{\edef\latinencoding{\cf@encoding}} +% \end{macrocode} +% But this might be overruled with a later loading of the package +% \pkg{fontenc}. Therefor we check at the execution of +% |\begin{document}| whether it was loaded with the \Lopt{T1} +% option. The normal way to do this (using |\@ifpackageloaded|) is +% disabled for this package. Now we have to revert to parsing the +% internal macro |\@filelist| which contains all the filenames +% loaded. +% \changes{babel~3.6k}{1999/03/15}{Use T1 encoding when it is a known +% encoding} +% \changes{babel~3.6m}{1999/04/06}{Can't use \cs{@ifpackageloaded} +% need to parse \cs{@filelist}} +% \changes{babel~3.6n}{1999/04/07}{moved checking for fontenc right to +% the top of \file{babel.sty}} +% \changes{babel~3.6n}{1999/04/07}{Added a check for `manual' selection +% of \texttt{T1} encoding, without loading \pkg{fontenc}} +% \changes{babel~3.6q}{1999/04/12}{Better solution then parsing +% \cs{@filelist}, use \cs{@ifl@aded}} +% \changes{babel~3.6u}{1999/04/20}{Moved this code to +% \file{babel.def}} +% \begin{macrocode} +\AtBeginDocument{% + \gdef\latinencoding{OT1}% + \ifx\cf@encoding\bbl@t@one + \xdef\latinencoding{\bbl@t@one}% + \else + \@ifl@aded{def}{t1enc}{\xdef\latinencoding{\bbl@t@one}}{}% + \fi + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\latintext} +% \changes{babel~3.6i}{1997/03/15}{Macro added, moved from +% \file{.ldf} files} +% Then we can define the command |\latintext| which is a +% declarative switch to a latin font-encoding. +% \begin{macrocode} +\DeclareRobustCommand{\latintext}{% + \fontencoding{\latinencoding}\selectfont + \def\encodingdefault{\latinencoding}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\textlatin} +% \changes{babel~3.6i}{1997/03/15}{Macro added, moved from +% \file{.ldf} files} +% \changes{babel~3.7j}{2003/03/19}{added \cs{leavevmode} to prevent a +% paragraph starting \emph{inside} the group} +% \changes{babel~3.7k}{2003/10/12}{Use \cs{DeclareTextFontComand}} +% This command takes an argument which is then typeset using the +% requested font encoding. In order to avoid many encoding switches +% it operates in a local scope. +% \begin{macrocode} +\ifx\@undefined\DeclareTextFontCommand + \DeclareRobustCommand{\textlatin}[1]{\leavevmode{\latintext #1}} +\else + \DeclareTextFontCommand{\textlatin}{\latintext} +\fi +% +% \end{macrocode} +% \end{macro} +% +% We also need to redefine a number of commands to ensure that the +% right font encoding is used, but this can't be done before +% \file{babel.def} is loaded. +% \changes{babel~3.6o}{1999/04/07}{Moved the rest of the font encoding +% related definitions to their original place} +% +% \subsection{Multiple languages} +% +% With \TeX\ version~3.0 it has become possible to load hyphenation +% patterns for more than one language. This means that some extra +% administration has to be taken care of. The user has to know for +% which languages patterns have been loaded, and what values of +% |\language| have been used. +% +% Some discussion has been going on in the \TeX\ world about how to +% use |\language|. Some have suggested to set a fixed standard, +% i.\,e., patterns for each language should \emph{always} be loaded +% in the same location. It has also been suggested to use the +% \textsc{iso} list for this purpose. Others have pointed out that +% the \textsc{iso} list contains more than 256~languages, which +% have \emph{not} been numbered consecutively. +% +% I think the best way to use |\language|, is to use it +% dynamically. This code implements an algorithm to do so. It uses +% an external file in which the person who maintains a \TeX\ +% environment has to record for which languages he has hyphenation +% patterns \emph{and} in which files these are stored\footnote{This +% is because different operating systems sometimes use \emph{very} +% different file-naming conventions.}. When hyphenation exceptions +% are stored in a separate file this can be indicated by naming +% that file \emph{after} the file with the hyphenation patterns. +% +% This ``configuration file'' can contain empty lines and comments, +% as well as lines which start with an equals (\texttt{=}) +% sign. Such a line will instruct \LaTeX\ that the hyphenation +% patterns just processed have to be known under an alternative +% name. Here is an example: +% \begin{verbatim} +% % File : language.dat +% % Purpose : tell iniTeX what files with patterns to load. +% english english.hyphenations +% =british +% +% dutch hyphen.dutch exceptions.dutch % Nederlands +% german hyphen.ger +% \end{verbatim} +% +% As the file \file{switch.def} needs to be read only once, we +% check whether it was read before. If it was, the command +% |\iflanguage| is already defined, so we can stop processing. +% \begin{macrocode} +%<*kernel> +%<*!patterns> +\expandafter\ifx\csname iflanguage\endcsname\relax \else +\expandafter\endinput +\fi +% +% \end{macrocode} +% +% \begin{macro}{\language} +% Plain \TeX\ version~3.0 provides the primitive |\language| that +% is used to store the current language. When used with a pre-3.0 +% version this function has to be implemented by allocating a +% counter. +% \begin{macrocode} +\ifx\language\@undefined + \csname newcount\endcsname\language +\fi +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\last@language} +% Another counter is used to store the last language defined. For +% pre-3.0 formats an extra counter has to be allocated, +% \begin{macrocode} +\ifx\newlanguage\@undefined + \csname newcount\endcsname\last@language +% \end{macrocode} +% plain \TeX\ version 3.0 uses |\count 19| for this purpose. +% \begin{macrocode} +\else + \countdef\last@language=19 +\fi +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\addlanguage} +% +% To add languages to \TeX's memory plain \TeX\ version~3.0 +% supplies |\newlanguage|, in a pre-3.0 environment a similar macro +% has to be provided. For both cases a new macro is defined here, +% because the original |\newlanguage| was defined to be |\outer|. +% +% For a format based on plain version~2.x, the definition of +% |\newlanguage| can not be copied because |\count 19| is used for +% other purposes in these formats. Therefor |\addlanguage| is +% defined using a definition based on the macros used to define +% |\newlanguage| in plain \TeX\ version~3.0. +% \changes{babel~3.2}{1991/11/11}{Added a \texttt{\%}, removed +% \texttt{by}} +% \begin{macrocode} +\ifx\newlanguage\@undefined + \def\addlanguage#1{% + \global\advance\last@language \@ne + \ifnum\last@language<\@cclvi + \else + \errmessage{No room for a new \string\language!}% + \fi + \global\chardef#1\last@language + \wlog{\string#1 = \string\language\the\last@language}} +% \end{macrocode} +% +% For formats based on plain version~3.0 the definition of +% |\newlanguage| can be simply copied, removing |\outer|. +% +% \begin{macrocode} +\else + \def\addlanguage{\alloc@9\language\chardef\@cclvi} +\fi +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\adddialect} +% The macro |\adddialect| can be used to add the name of a dialect +% or variant language, for which an already defined hyphenation +% table can be used. +% \changes{babel~3.2}{1991/11/11}{Added \cs{relax}} +% \begin{macrocode} +\def\adddialect#1#2{% + \global\chardef#1#2\relax + \wlog{\string#1 = a dialect from \string\language#2}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\iflanguage} +% Users might want to test (in a private package for instance) +% which language is currently active. For this we provide a test +% macro, |\iflanguage|, that has three arguments. It checks +% whether the first argument is a known language. If so, it +% compares the first argument with the value of |\language|. Then, +% depending on the result of the comparison, it executes either the +% second or the third argument. +% \changes{babel~3.0a}{1991/05/29}{Added \cs{@bsphack} and +% \cs{@esphack}} +% \changes{babel~3.0c}{1991/07/21}{Added comment character after +% \texttt{\#2}} +% \changes{babel~3.0d}{1991/08/08}{Removed superfluous +% \cs{expandafter}} +% \changes{babel~3.0d}{1991/10/07}{Removed space hacks and use of +% \cs{@ifundefined}} +% \changes{babel~3.2}{1991/11/11}{Rephrased \cs{ifnum} test} +% \changes{babel~3.7a}{1998/06/10}{Now evaluate the \cs{ifnum} test +% \emph{after} the \cs{fi} from the \cs{ifx} test and use +% \cs{@firstoftwo} and \cs{@secondoftwo}} +% \changes{babel~3.7b}{1998/06/29}{Slight enhancement: added braces +% around first argument of \cs{bbl@afterfi}} +% \begin{macrocode} +\def\iflanguage#1{% + \expandafter\ifx\csname l@#1\endcsname\relax + \@nolanerr{#1}% + \else + \bbl@afterfi{\ifnum\csname l@#1\endcsname=\language + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi}% + \fi} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\selectlanguage} +% The macro |\selectlanguage| checks whether the language is +% already defined before it performs its actual task, which is to +% update |\language| and activate language-specific definitions. +% +% To allow the call of |\selectlanguage| either with a control +% sequence name or with a simple string as argument, we have to use +% a trick to delete the optional escape character. +% +% To convert a control sequence to a string, we use the |\string| +% primitive. Next we have to look at the first character of this +% string and compare it with the escape character. Because this +% escape character can be changed by setting the internal integer +% |\escapechar| to a character number, we have to compare this +% number with the character of the string. To do this we have to +% use \TeX's backquote notation to specify the character as a +% number. +% +% If the first character of the |\string|'ed argument is the +% current escape character, the comparison has stripped this +% character and the rest in the `then' part consists of the rest of +% the control sequence name. Otherwise we know that either the +% argument is not a control sequence or |\escapechar| is set to a +% value outside of the character range~$0$--$255$. +% +% If the user gives an empty argument, we provide a default +% argument for |\string|. This argument should expand to nothing. +% +% \changes{babel~3.0c}{1991/06/06}{Made \cs{selectlanguage} +% robust} +% \changes{babel~3.2}{1991/11/11}{Modified to allow arguments that +% start with an escape character} +% \changes{babel~3.2a}{1991/11/17}{Simplified the modification to +% allow the use in a \cs{write} command} +% \changes{babel~3.5b}{1995/05/13}{Store the name of the current +% language in a control sequence instead of passing the whole macro +% construct to strip the escape character in the argument of +% \cs{selectlanguage }.} +% \changes{babel~3.5f}{1995/08/30}{Added a missing percent character} +% \changes{babel~3.5f}{1995/11/16}{Moved check for escape character +% one level down in the expansion} +% \begin{macrocode} +\edef\selectlanguage{% + \noexpand\protect + \expandafter\noexpand\csname selectlanguage \endcsname + } +% \end{macrocode} +% Because the command |\selectlanguage| could be used in a moving +% argument it expands to \verb*=\protect\selectlanguage =. +% Therefor, we have to make sure that a macro |\protect| exists. +% If it doesn't it is |\let| to |\relax|. +% \begin{macrocode} +\ifx\@undefined\protect\let\protect\relax\fi +% \end{macrocode} +% As \LaTeX$\:$2.09 writes to files \textit{expanded} whereas +% \LaTeXe\ takes care \textit{not} to expand the arguments of +% |\write| statements we need to be a bit clever about the way we +% add information to \file{.aux} files. Therefor we introduce the +% macro |\xstring| which should expand to the right amount of +% |\string|'s. +% \begin{macrocode} +\ifx\documentclass\@undefined + \def\xstring{\string\string\string} +\else + \let\xstring\string +\fi +% \end{macrocode} +% +% \changes{babel~3.5b}{1995/03/04}{Changed the name of the internal +% macro to \cs{selectlanguage }.} +% \changes{babel~3.5b}{1995/03/05}{Added an extra level of expansion to +% separate the switching mechanism from writing to aux files} +% \changes{babel~3.7f}{2000/09/25}{Use \cs{aftergroup} to keep the +% language grouping correct in auxiliary files {PR3091}} +% Since version 3.5 \babel\ writes entries to the auxiliary files in +% order to typeset table of contents etc. in the correct language +% environment. +% \begin{macro}{\bbl@pop@language} +% \emph{But} when the language change happens \emph{inside} a group +% the end of the group doesn't write anything to the auxiliary +% files. Therefor we need \TeX's |aftergroup| mechanism to help +% us. The command |\aftergroup| stores the token immediately +% following it to be executed when the current group is closed. So +% we define a temporary control sequence |\bbl@pop@language| to be +% executed at the end of the group. It calls |\bbl@set@language| +% with the name of the current language as its argument. +% +% \changes{babel~3.7j}{2003/03/18}{Introduce the language stack +% mechanism} +% \begin{macro}{\bbl@language@stack} +% The previous solution works for one level of nesting groups, but +% as soon as more levels are used it is no longer adequate. For +% that case we need to keep track of the nested languages using a +% stack mechanism. This stack is called |\bbl@language@stack| and +% initially empty. +% \begin{macrocode} +\xdef\bbl@language@stack{} +% \end{macrocode} +% When using a stack we need a mechanism to push an element on the +% stack and to retrieve the information afterwards. +% \begin{macro}{\bbl@push@language} +% \begin{macro}{\bbl@pop@language} +% The stack is simply a list of languagenames, separated with a `+' +% sign; the push function can be simple: +% \begin{macrocode} +\def\bbl@push@language{% + \xdef\bbl@language@stack{\languagename+\bbl@language@stack}% + } +% \end{macrocode} +% Retrieving information from the stack is a little bit less simple, +% as we need to remove the element from the stack while storing it +% in the macro |\languagename|. For this we first define a helper function. +% \begin{macro}{\bbl@pop@lang} +% This macro stores its first element (which is delimited by the +% `+'-sign) in |\languagename| and stores the rest of the string +% (delimited by `-') in its third argument. +% \begin{macrocode} +\def\bbl@pop@lang#1+#2-#3{% + \def\languagename{#1}\xdef#3{#2}% + } +% \end{macrocode} +% \end{macro} +% The reason for the somewhat weird arrangement of arguments to the +% helper function is the fact it is called in the following way: +% \begin{macrocode} +\def\bbl@pop@language{% + \expandafter\bbl@pop@lang\bbl@language@stack-\bbl@language@stack +% \end{macrocode} +% This means that before |\bbl@pop@lang| is executed \TeX\ first +% \emph{expands} the stack, stored in |\bbl@language@stack|. The +% result of that is that the argument string of |\bbl@pop@lang| +% contains one or more language names, each followed by a `+'-sign +% (zero language names won't occur as this macro will only be +% called after something has been pushed on the stack) followed by +% the `-'-sign and finally the reference to the stack. +% \begin{macrocode}$$ + \expandafter\bbl@set@language\expandafter{\languagename}% + } +% \end{macrocode} +% Once the name of the previous language is retrieved from the stack, +% it is fed to |\bbl@set@language| to do the actual work of +% switching everything that needs switching. +% \end{macro} +% \end{macro} +% \end{macro} +% +% \changes{babel~3.7j}{2003/03/18}{Now use the language stack mechanism} +% \begin{macrocode} +\expandafter\def\csname selectlanguage \endcsname#1{% + \bbl@push@language + \aftergroup\bbl@pop@language + \bbl@set@language{#1}} +% \end{macrocode} +% \changes{babel~3.7m}{2003/11/12}{Removed the superfluous empty +% definition of \cs{bbl@pop@language}} +% \end{macro} +% +% \begin{macro}{\bbl@set@language} +% \changes{babel~3.5f}{1995/11/16}{Now also define \cs{languagename} +% at this level} +% \changes{babel~3.7f}{2000/09/25}{Macro \cs{bbl@set@language} +% introduced} +% The macro |\bbl@set@language| takes care of switching the language +% environment \emph{and} of writing entries on the auxiliary files. +% \begin{macrocode} +\def\bbl@set@language#1{% + \edef\languagename{% + \ifnum\escapechar=\expandafter`\string#1\@empty + \else \string#1\@empty\fi}% + \select@language{\languagename}% +% \end{macrocode} +% We also write a command to change the current language in the +% auxiliary files. +% \changes{babel~3.5a}{1995/02/17}{write the language change to the +% auxiliary files} +% \begin{macrocode} + \if@filesw + \protected@write\@auxout{}{\string\select@language{\languagename}}% + \addtocontents{toc}{\xstring\select@language{\languagename}}% + \addtocontents{lof}{\xstring\select@language{\languagename}}% + \addtocontents{lot}{\xstring\select@language{\languagename}}% + \fi} +% \end{macrocode} +% \end{macro} +% +% First, check if the user asks for a known language. If so, +% update the value of |\language| and call |\originalTeX| +% to bring \TeX\ in a certain pre-defined state. +% \changes{babel~3.0a}{1991/05/29}{Added \cs{@bsphack} and +% \cs{@esphack}} +% \changes{babel~3.0d}{1991/08/08}{Removed superfluous +% \cs{expandafter}} +% \changes{babel~3.0d}{1991/10/07}{Removed space hacks and use of +% \cs{@ifundefined}} +% \changes{babel~3.2a}{1991/11/17}{Added \cs{relax} as first command +% to stop an expansion if \cs{protect} is empty} +% \changes{babel~3.6a}{1996/11/07}{Check for the existence of +% \cs{date...} instead of \cs{l@...}} +% \changes{babel~3.7m}{2003/11/16}{Check for the existence of both +% \cs{l@...} and \cs{date...}} +% \begin{macrocode} +\def\select@language#1{% + \expandafter\ifx\csname l@#1\endcsname\relax + \@nolanerr{#1}% + \else + \expandafter\ifx\csname date#1\endcsname\relax + \@noopterr{#1}% + \else + \language=\csname l@#1\endcsname\relax + \originalTeX +% \end{macrocode} +% The name of the language is stored in the control sequence +% |\languagename|. The contents of this control sequence could be +% tested in the following way: +% \begin{verbatim} +% \edef\tmp{\string english} +% \ifx\languagename\tmp +% ... +% \else +% ... +% \fi +% \end{verbatim} +% The construction with |\string| is necessary because +% |\languagename| returns the name with characters of category code +% \texttt{12} (other). Then we have to \emph{re}define +% |\originalTeX| to compensate for the things that have been +% activated. To save memory space for the macro definition of +% |\originalTeX|, we construct the control sequence name for the +% |\noextras|\langvar\ command at definition time by expanding the +% |\csname| primitive. +% \changes{babel~3.0a}{1991/06/06}{Replaced \cs{gdef} with \cs{def}} +% \changes{babel~3.1}{1991/10/31}{\cs{originalTeX} should only be +% executed once} +% \changes{babel~3.2a}{1991/11/17}{Added three \cs{expandafter}s +% to save macro space for \cs{originalTeX}} +% \changes{babel~3.2a}{1991/11/20}{Moved definition of +% \cs{originalTeX} before \cs{extras\langvar}} +% \changes{babel~3.2a}{1991/11/24}{Set \cs{originalTeX} to +% \cs{empty}, because it should be expandable.} +% \begin{macrocode} + \expandafter\def\expandafter\originalTeX + \expandafter{\csname noextras#1\endcsname + \let\originalTeX\@empty}% +% \end{macrocode} +% \changes{babel~3.6d}{1997/01/07}{set the language shorthands to +% `none' before switching on the extras} +% \begin{macrocode} + \languageshorthands{none}% + \babel@beginsave +% \end{macrocode} +% Now activate the language-specific definitions. This is done by +% constructing the names of three macros by concatenating three +% words with the argument of |\selectlanguage|, and calling these +% macros. +% \changes{babel~3.5b}{1995/05/13}{Separated the setting of the +% hyphenmin values} +% \begin{macrocode} + \csname captions#1\endcsname + \csname date#1\endcsname + \csname extras#1\endcsname\relax +% \end{macrocode} +% The switching of the values of |\lefthyphenmin| and +% |\righthyphenmin| is somewhat different. First we save their +% current values, then we check if |\|\langvar|hyphenmins| is +% defined. If it is not, we set default values (2 and 3), otherwise +% the values in |\|\langvar|hyphenmins| will be used. +% \changes{babel~3.5b}{1995/06/05}{Addedd default setting of hyphenmin +% parameters} +% \begin{macrocode} + \babel@savevariable\lefthyphenmin + \babel@savevariable\righthyphenmin + \expandafter\ifx\csname #1hyphenmins\endcsname\relax + \set@hyphenmins\tw@\thr@@\relax + \else + \expandafter\expandafter\expandafter\set@hyphenmins + \csname #1hyphenmins\endcsname\relax + \fi + \fi + \fi} +% \end{macrocode} +% \end{macro} +% +% \begin{environment}{otherlanguage} +% The \Lenv{otherlanguage} environment can be used as an +% alternative to using the |\selectlanguage| declarative +% command. When you are typesetting a document which mixes +% left-to-right and right-to-left typesetting you have to use this +% environment in order to let things work as you expect them to. +% +% The first thing this environment does is store the name of the +% language in |\languagename|; it then calls +% \verb*=\selectlanguage = to switch on everything that is needed for +% this language The |\ignorespaces| command is necessary to hide +% the environment when it is entered in horizontal mode. +% \changes{babel~3.5d}{1995/06/22}{environment added} +% \changes{babel~3.5e}{1995/07/07}{changed name} +% \changes{babel~3.7j}{2003/03/18}{rely on \cs{selectlanguage } to +% keep track of the nesting} +% \begin{macrocode} +\long\def\otherlanguage#1{% + \csname selectlanguage \endcsname{#1}% + \ignorespaces + } +% \end{macrocode} +% The |\endotherlanguage| part of the environment calls +% |\originalTeX| to restore (most of) the settings and tries to +% hide itself when it is called in horizontal mode. +% \begin{macrocode} +\long\def\endotherlanguage{% + \originalTeX + \global\@ignoretrue\ignorespaces + } +% \end{macrocode} +% \end{environment} +% +% +% \begin{environment}{otherlanguage*} +% The \Lenv{otherlanguage} environment is meant to be used when a +% large part of text from a different language needs to be typeset, +% but without changing the translation of words such as `figure'. +% +% This environment makes use of |\foreign@language|. +% \changes{babel~3.5f}{1996/05/29}{environment added} +% \changes{babel~3.6d}{1997/01/07}{Introduced \cs{foreign@language}} +% \begin{macrocode} +\expandafter\def\csname otherlanguage*\endcsname#1{% + \foreign@language{#1}% + } +% \end{macrocode} +% At the end of the environment we need to switch off the extra +% definitions. The grouping mechanism of the environment will take +% care of resetting the correct hyphenation rules. +% \begin{macrocode} +\expandafter\def\csname endotherlanguage*\endcsname{% + \csname noextras\languagename\endcsname + } +% \end{macrocode} +% \end{environment} +% +% \begin{macro}{\foreignlanguage} +% The |\foreignlanguage| command is another substitute for the +% |\selectlanguage| command. This command takes two arguments, the +% first argument is the name of the language to use for typesetting +% the text specified in the second argument. +% +% Unlike |\selectlanguage| this command doesn't switch +% \emph{everything}, it only switches the hyphenation rules and the +% extra definitions for the language specified. It does this within +% a group and assumes the |\extras|\langvar\ command doesn't make +% any |\global| changes. The coding is very similar to part of +% |\selectlanguage|. +% \changes{babel~3.5d}{1995/06/22}{Macro added} +% \changes{babel~3.6d}{1997/01/07}{Introduced \cs{foreign@language}} +% \changes{babel~3.7a}{1998/03/12}{Added executing \cs{originalTeX}} +% \begin{macrocode} +\def\foreignlanguage{\protect\csname foreignlanguage \endcsname} +\expandafter\def\csname foreignlanguage \endcsname#1#2{% + \begingroup + \originalTeX + \foreign@language{#1}% + #2% + \csname noextras#1\endcsname + \endgroup + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\foreign@language} +% \changes{babel~3.6d}{1997/01/07}{New macro} +% This macro does the work for |\foreignlanguage| and the +% \Lenv{otherlanguage*} environment. +% \begin{macrocode} +\def\foreign@language#1{% +% \end{macrocode} +% First we need to store the name of the language and check that it +% is a known language. +% \begin{macrocode} + \def\languagename{#1}% + \expandafter\ifx\csname l@#1\endcsname\relax + \@nolanerr{#1}% + \else +% \end{macrocode} +% If it is we can select the proper hyphenation table and switch on +% the extra definitions for this language. +% \changes{babel~3.6d}{1997/01/07}{set the language shorthands to +% `none' before switching on the extras} +% \begin{macrocode} + \language=\csname l@#1\endcsname\relax + \languageshorthands{none}% +% \end{macrocode} +% Then we set the left- and right hyphenmin variables. +% \changes{babel~3.6d}{1997/01/07}{Added \cs{relax} to prevent +% disappearance of the first token after this command.} +% \begin{macrocode} + \csname extras#1\endcsname + \expandafter\ifx\csname #1hyphenmins\endcsname\relax + \set@hyphenmins\tw@\thr@@\relax + \else + \expandafter\expandafter\expandafter\set@hyphenmins + \csname #1hyphenmins\endcsname\relax + \fi + \fi + } +% \end{macrocode} +% \end{macro} +% +% \begin{environment}{hyphenrules} +% \changes{babel~3.7e}{2000/01/28}{Added environment hyphenrules} +% The environment \Lenv{hyphenrules} can be used to select +% \emph{just} the hyphenation rules. This environment does +% \emph{not} change |\languagename| and when the hyphenation rules +% specified were not loaded it has no effect. +% \begin{macrocode} +\def\hyphenrules#1{% + \expandafter\ifx\csname l@#1\endcsname\@undefined + \@nolanerr{#1}% + \else + \language=\csname l@#1\endcsname\relax + \languageshorthands{none}% + \fi + } +\def\endhyphenrules{} +% \end{macrocode} +% \end{environment} +% +% \begin{macro}{\providehyphenmins} +% \changes{babel~3.7f}{2000/02/18}{added macro} +% The macro |\providehyphenmins| should be used in the language +% definition files to provide a \emph{default} setting for the +% hyphenation parameters |\lefthyphenmin| and |\righthyphenmin|. If +% the macro |\|\langvar|hyphenmins| is already defined this command +% has no effect. +% \begin{macrocode} +\def\providehyphenmins#1#2{% + \expandafter\ifx\csname #1hyphenmins\endcsname\relax + \@namedef{#1hyphenmins}{#2}% + \fi} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\set@hyphenmins} +% This macro sets the values of |\lefthyphenmin| and +% |\righthyphenmin|. It expects two values as its argument. +% \begin{macrocode} +\def\set@hyphenmins#1#2{\lefthyphenmin#1\righthyphenmin#2} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\LdfInit} +% \changes{babel~3.6a}{1996/10/16}{Macro added} +% This macro is defined in two versions. The first version is to be +% part of the `kernel' of \babel, ie. the part that is loaded in +% the format; the second version is defined in \file{babel.def}. +% The version in the format just checks the category code of the +% ampersand and then loads \file{babel.def}. +% \begin{macrocode} +\def\LdfInit{% + \chardef\atcatcode=\catcode`\@ + \catcode`\@=11\relax + \input babel.def\relax +% \end{macrocode} +% The category code of the ampersand is restored and the macro +% calls itself again with the new definition from +% \file{babel.def} +% \begin{macrocode} + \catcode`\@=\atcatcode \let\atcatcode\relax + \LdfInit} +% +% \end{macrocode} +% The second version of this macro takes two arguments. The first +% argument is the name of the language that will be defined in the +% language definition file; the second argument is either a control +% sequence or a string from which a control sequence should be +% constructed. The existence of the control sequence indicates that +% the file has been processed before. +% +% At the start of processing a language definition file we always +% check the category code of the ampersand. We make sure that it is +% a `letter' during the processing of the file. +% \begin{macrocode} +%<*core> +\def\LdfInit#1#2{% + \chardef\atcatcode=\catcode`\@ + \catcode`\@=11\relax +% \end{macrocode} +% Another character that needs to have the correct category code +% during processing of language definition files is the equals sign, +% `=', because it is sometimes used in constructions with the +% |\let| primitive. Therefor we store its current catcode and +% restore it later on. +% \changes{babel~3.7o}{2003/11/26}{make sure the equals sign has its +% default category code} +% \begin{macrocode} + \chardef\eqcatcode=\catcode`\= + \catcode`\==12\relax +% \end{macrocode} +% Now we check whether we should perhaps stop the processing of +% this file. To do this we first need to check whether the second +% argument that is passed to |\LdfInit| is a control sequence. We +% do that by looking at the first token after passing |#2| through +% |string|. When it is equal to |\@backslashchar| we are dealing +% with a control sequence which we can compare with |\@undefined|. +% \begin{macrocode} + \let\bbl@tempa\relax + \expandafter\if\expandafter\@backslashchar + \expandafter\@car\string#2\@nil + \ifx#2\@undefined + \else +% \end{macrocode} +% If so, we call |\ldf@quit| (but after the end of this |\if| +% construction) to set the main language, restore the category code +% of the @-sign and call |\endinput|. +% \begin{macrocode} + \def\bbl@tempa{\ldf@quit{#1}} + \fi + \else +% \end{macrocode} +% When |#2| was \emph{not} a control sequence we construct one and +% compare it with |\relax|. +% \begin{macrocode} + \expandafter\ifx\csname#2\endcsname\relax + \else + \def\bbl@tempa{\ldf@quit{#1}} + \fi + \fi + \bbl@tempa +% \end{macrocode} +% Finally we check |\originalTeX|. +% \begin{macrocode} + \ifx\originalTeX\@undefined + \let\originalTeX\@empty + \else + \originalTeX + \fi} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\ldf@quit} +% \changes{babel~3.6a}{1996/10/29}{Macro added} +% This macro interrupts the processing of a language definition file. +% \changes{babel~3.7o}{2003/11/26}{Also restore the category code of +% the equals sign} +% \begin{macrocode} +\def\ldf@quit#1{% + \expandafter\main@language\expandafter{#1}% + \catcode`\@=\atcatcode \let\atcatcode\relax + \catcode`\==\eqcatcode \let\eqcatcode\relax + \endinput +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\ldf@finish} +% \changes{babel~3.6a}{1996/10/16}{Macro added} +% This macro takes one argument. It is the name of the language +% that was defined in the language definition file. +% +% We load the local configuration file if one is present, we set +% the main language (taking into account that the argument might be +% a control sequence that needs to be expanded) and reset the +% category code of the @-sign. +% \changes{babel~3.7o}{2003/11/26}{Also restore the category code of +% the equals sign} +% \begin{macrocode} +\def\ldf@finish#1{% + \loadlocalcfg{#1}% + \expandafter\main@language\expandafter{#1}% + \catcode`\@=\atcatcode \let\atcatcode\relax + \catcode`\==\eqcatcode \let\eqcatcode\relax + } +% \end{macrocode} +% \end{macro} +% +% After the preamble of the document the commands |\LdfInit|, +% |\ldf@quit| and |\ldf@finish| are no longer needed. Therefor +% they are turned into warning messages in \LaTeX. +% \begin{macrocode} +\@onlypreamble\LdfInit +\@onlypreamble\ldf@quit +\@onlypreamble\ldf@finish +% \end{macrocode} +% +% \begin{macro}{\main@language} +% \changes{babel~3.5a}{1995/02/17}{Macro added} +% \changes{babel~3.6a}{1996/10/16}{\cs{main@language} now also sets +% \cs{languagename} and \cs{l@languagename} for use by other +% packages in the preamble of a document} +% \begin{macro}{\bbl@main@language} +% \changes{babel~3.5a}{1995/02/17}{Macro added} +% This command should be used in the various language definition +% files. It stores its argument in |\bbl@main@language|; to be used +% to switch to the correct language at the beginning of the +% document. +% \begin{macrocode} +\def\main@language#1{% + \def\bbl@main@language{#1}% + \let\languagename\bbl@main@language + \language=\csname l@\languagename\endcsname\relax + } +% \end{macrocode} +% The default is to use English as the main language. +% \changes{babel~3.6c}{1997/01/05}{When \file{hyphen.cfg} is not +% loaded in the format \cs{l@english} might not be defined; assume +% english is language 0} +% \begin{macrocode} +\ifx\l@english\@undefined + \let\l@english\z@ +\fi +\main@language{english} +% \end{macrocode} +% We also have to make sure that some code gets executed at the +% beginning of the document. +% \begin{macrocode} +\AtBeginDocument{% + \expandafter\selectlanguage\expandafter{\bbl@main@language}} +% +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\originalTeX} +% The macro|\originalTeX| should be known to \TeX\ at this moment. +% As it has to be expandable we |\let| it to |\@empty| instead of +% |\relax|. +% \changes{babel~3.2a}{1991/11/24}{Set \cs{originalTeX} to +% \cs{empty}, because it should be expandable.} +% \begin{macrocode} +%<*kernel> +\ifx\originalTeX\@undefined\let\originalTeX\@empty\fi +% \end{macrocode} +% Because this part of the code can be included in a format, we +% make sure that the macro which initialises the save mechanism, +% |\babel@beginsave|, is not considered to be undefined. +% \begin{macrocode} +\ifx\babel@beginsave\@undefined\let\babel@beginsave\relax\fi +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@nolanerr} +% \changes{babel~3.4e}{1994/06/25}{Use \cs{PackageError} in \LaTeXe\ +% mode} +% \begin{macro}{\@nopatterns} +% \changes{babel~3.4e}{1994/06/25}{Macro added} +% The \babel\ package will signal an error when a documents tries +% to select a language that hasn't been defined earlier. When a +% user selects a language for which no hyphenation patterns were +% loaded into the format he will be given a warning about that +% fact. We revert to the patterns for |\language|=0 in that case. +% In most formats that will be (US)english, but it might also be +% empty. +% \begin{macro}{\@noopterr} +% \changes{babel~3.7m}{2003/11/16}{Macro added} +% When the package was loaded without options not everything will +% work as expected. An error message is issued in that case. +% +% When the format knows about |\PackageError| it must be \LaTeXe, +% so we can safely use its error handling interface. Otherwise +% we'll have to `keep it simple'. +% \changes{babel~3.0d}{1991/10/07}{Added a percent sign to remove +% unwanted white space} +% \changes{babel~3.5a}{1995/02/15}{Added \cs{@activated} to log active +% characters} +% \changes{babel~3.5c}{1995/06/19}{Added missing closing brace} +% \begin{macrocode} +\ifx\PackageError\@undefined + \def\@nolanerr#1{% + \errhelp{Your command will be ignored, type to proceed}% + \errmessage{You haven't defined the language #1\space yet}} + \def\@nopatterns#1{% + \message{No hyphenation patterns were loaded for}% + \message{the language `#1'}% + \message{I will use the patterns loaded for \string\language=0 + instead}} + \def\@noopterr#1{% + \errmessage{The option #1 was not specified in \string\usepackage} + \errhelp{You may continue, but expect unexpected results}} + \def\@activated#1{% + \wlog{Package babel Info: Making #1 an active character}} +\else + \newcommand*{\@nolanerr}[1]{% + \PackageError{babel}% + {You haven't defined the language #1\space yet}% + {Your command will be ignored, type to proceed}} + \newcommand*{\@nopatterns}[1]{% + \PackageWarningNoLine{babel}% + {No hyphenation patterns were loaded for\MessageBreak + the language `#1'\MessageBreak + I will use the patterns loaded for \string\language=0 + instead}} + \newcommand*{\@noopterr}[1]{% + \PackageError{babel}% + {You haven't loaded the option #1\space yet}% + {You may proceed, but expect unexpected results}} + \newcommand*{\@activated}[1]{% + \PackageInfo{babel}{% + Making #1 an active character}} +\fi +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% The following code is meant to be read by ini\TeX\ because it +% should instruct \TeX\ to read hyphenation patterns. To this end +% the \texttt{docstrip} option \texttt{patterns} can be used to +% include this code in the file \file{hyphen.cfg}. +% \begin{macrocode} +%<*patterns> +% \end{macrocode} +% +% \changes{babel~3.5g}{1996/07/09}{Removed the use of +% \cs{patterns@loaded} altogether} +% +% \begin{macro}{\process@line} +% \changes{babel~3.5b}{1995/04/28}{added macro} +% Each line in the file \file{language.dat} is processed by +% |\process@line| after it is read. The first thing this macro does +% is to check whether the line starts with \texttt{=}. +% When the first token of a line is an \texttt{=}, the macro +% |\process@synonym| is called; otherwise the macro +% |\process@language| will continue. +% \changes{babel~3.5g}{1996/07/09}{Simplified code, removing +% \cs{bbl@eq@}} +% \changes{babel~3.7c}{1999/04/09}{added an extra argument in order to +% prevent a trailing space from becoming part of the control +% sequence when defining a synonym (PR 2851)} +% \begin{macrocode} +\def\process@line#1#2 #3/{% + \ifx=#1 + \process@synonym#2 / + \else + \process@language#1#2 #3/% + \fi + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\process@synonym} +% \changes{babel~3.5b}{1995/04/28}{added macro} +% This macro takes care of the lines which start with an +% \texttt{=}. It needs an empty token register to begin with. +% \begin{macrocode} +\toks@{} +\def\process@synonym#1 /{% + \ifnum\last@language=\m@ne +% \end{macrocode} +% When no languages have been loaded yet, the name following the +% \texttt{=} will be a synonym for hyphenation register 0. +% \begin{macrocode} + \expandafter\chardef\csname l@#1\endcsname0\relax + \wlog{\string\l@#1=\string\language0} +% \end{macrocode} +% As no hyphenation patterns are read in yet, we can not yet set +% the hyphenmin parameters. Therefor a commands to do so is stored +% in a token register and executed when the first pattern file has +% been processed. +% \changes{babel~3.7c}{1999/04/27}{Use a token register to temporarily +% store a command to set hyphenmin parameters for the synonym which +% is defined \emph{before} the first pattern file is processed} +% \begin{macrocode} + \toks@\expandafter{\the\toks@ + \expandafter\let\csname #1hyphenmins\expandafter\endcsname + \csname\languagename hyphenmins\endcsname}% + \else +% \end{macrocode} +% Otherwise the name will be a synonym for the language loaded last. +% \begin{macrocode} + \expandafter\chardef\csname l@#1\endcsname\last@language + \wlog{\string\l@#1=\string\language\the\last@language} +% \end{macrocode} +% We also need to copy the hyphenmin parameters for the synonym. +% \changes{babel~3.7c}{1999/04/22}{Now also store hyphenmin parameters +% for language synonyms} +% \begin{macrocode} + \expandafter\let\csname #1hyphenmins\expandafter\endcsname + \csname\languagename hyphenmins\endcsname + \fi + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\process@language} +% The macro |\process@language| is used to process a non-empty line +% from the `configuration file'. It has three arguments, each +% delimited by white space. The third argument is optional, +% so a |/| character is expected to delimit the last +% argument. The first argument is the `name' of a language; the +% second is the name of the file that contains the patterns. The +% optional third argument is the name of a file containing +% hyphenation exceptions. +% +% The first thing to do is call |\addlanguage| to allocate a +% pattern register and to make that register `active'. +% \changes{babel~3.0d}{1991/08/08}{Removed superfluous +% \cs{expandafter}} +% \changes{babel~3.0d}{1991/08/21}{Reinserted \cs{expandafter}} +% \changes{babel~3.0d}{1991/10/27}{Added the collection of pattern +% names.} +% \changes{babel~3.7c}{1999/04/22}{Also store \cs{languagename} for +% possible later use in \cs{process@synonym}} +% \begin{macrocode} +\def\process@language#1 #2 #3/{% + \expandafter\addlanguage\csname l@#1\endcsname + \expandafter\language\csname l@#1\endcsname + \def\languagename{#1}% +% \end{macrocode} +% Then the `name' of the language that will be loaded now is +% added to the token register |\toks8|. and finally +% the pattern file is read. +% \begin{macrocode} + \global\toks8\expandafter{\the\toks8#1, }% +% \end{macrocode} +% \changes{babel~3.7f}{2000/02/18}{Allow for the encoding to be used +% as part of the language name} +% For some hyphenation patterns it is needed to load them with a +% specific font encoding selected. This can be specified in the +% file \file{language.dat} by adding for instance `\texttt{:T1}' to +% the name of the language. The macro |\bbl@get@enc| extracts the +% font encoding from the language name and stores it in +% |\bbl@hyph@enc|. +% \begin{macrocode} + \begingroup + \bbl@get@enc#1:\@@@ + \ifx\bbl@hyph@enc\@empty + \else + \fontencoding{\bbl@hyph@enc}\selectfont + \fi +% \end{macrocode} +% +% \changes{babel~3.4e}{1994/06/24}{Added code to detect assignments to +% left- and righthyphenmin in the patternfile.} +% Some pattern files contain assignments to |\lefthyphenmin| and +% |\righthyphenmin|. \TeX\ does not keep track of these +% assignments. Therefor we try to detect such assignments and +% store them in the |\|\langvar|hyphenmins| macro. When no +% assignments were made we provide a default setting. +% \begin{macrocode} + \lefthyphenmin\m@ne +% \end{macrocode} +% Some pattern files contain changes to the |\lccode| en |\uccode| +% arrays. Such changes should remain local to the language; +% therefor we process the pattern file in a group; the |\patterns| +% command acts globally so its effect will be remembered. +% \changes{babel~3.7a}{1998/03/27}{Read pattern files in a group} +% \changes{babel~3.7c}{1999/04/05}{need to set hyphenmin values +% globally} +% \changes{babel~3.7c}{1999/04/22}{Set \cs{lefthyphenmin} to \cs{m@ne} +% \emph{inside} the group; explicitly set the hyphenmin parameters +% for language 0} +% \begin{macrocode} + \input #2\relax +% \end{macrocode} +% Now we globally store the settings of |\lefthyphenmin| and +% |\righthyphenmin| and close the group. +% \changes{babel~3.7c}{1999/04/25}{Only set hyphenmin values when the +% pattern file changed them} +% \begin{macrocode} + \ifnum\lefthyphenmin=\m@ne + \else + \expandafter\xdef\csname #1hyphenmins\endcsname{% + \the\lefthyphenmin\the\righthyphenmin}% + \fi + \endgroup +% \end{macrocode} +% If the counter |\language| is still equal to zero we set the +% hyphenmin parameters to the values for the language loaded on +% pattern register 0. +% \begin{macrocode} + \ifnum\the\language=\z@ + \expandafter\ifx\csname #1hyphenmins\endcsname\relax + \set@hyphenmins\tw@\thr@@\relax + \else + \expandafter\expandafter\expandafter\set@hyphenmins + \csname #1hyphenmins\endcsname + \fi +% \end{macrocode} +% Now execute the contents of token register zero as it may +% contain commands which set the hyphenmin parameters for synonyms +% that were defined before the first pattern file is read in. +% \changes{babel~3.7c}{1999/04/27}{Added the execution of the contents +% of \cs{toks@}} +% \begin{macrocode} + \the\toks@ + \fi +% \end{macrocode} +% Empty the token register after use. +% \begin{macrocode} + \toks@{}% +% \end{macrocode} +% When the hyphenation patterns have been processed we need to see +% if a file with hyphenation exceptions needs to be read. This is +% the case when the third argument is not empty and when it does +% not contain a space token. +% \changes{babel~3.5b}{1995/04/28}{Added optional reading of file with +% hyphenation exceptions} +% \changes{babel~3.5f}{1995/07/25}{Use \cs{empty} instead of +% \cs{@empty} as the latter is unknown in plain} +% \begin{macrocode} + \def\bbl@tempa{#3}% + \ifx\bbl@tempa\@empty + \else + \ifx\bbl@tempa\space + \else + \input #3\relax + \fi + \fi + } +% \end{macrocode} +% +% \begin{macro}{\bbl@get@enc} +% \changes{babel~3.7f}{2000/02/18}{Added macro} +% \begin{macro}{\bbl@hyph@enc} +% The macro |\bbl@get@enc| extracts the font encoding from the +% language name and stores it in |\bbl@hyph@enc|. It uses delimited +% arguments to achieve this. +% \begin{macrocode} +\def\bbl@get@enc#1:#2\@@@{% +% \end{macrocode} +% First store both arguments in temporary macros, +% \begin{macrocode} + \def\bbl@tempa{#1}% + \def\bbl@tempb{#2}% +% \end{macrocode} +% then, if the second argument was empty, no font encoding was +% specified and we're done. +% \begin{macrocode} + \ifx\bbl@tempb\@empty + \let\bbl@hyph@enc\@empty + \else +% \end{macrocode} +% But if the second argument was \emph{not} empty it will now have +% a superfluous colon attached to it which we need to remove. This +% done by feeding it to |\bbl@get@enc|. The string that we are +% after will then be in the first argument and be stored in +% |\bbl@tempa|. +% \begin{macrocode} + \bbl@get@enc#2\@@@ + \edef\bbl@hyph@enc{\bbl@tempa}% + \fi} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\readconfigfile} +% The configuration file can now be opened for reading. +% \begin{macrocode} +\openin1 = language.dat +% \end{macrocode} +% +% See if the file exists, if not, use the default hyphenation file +% \file{hyphen.tex}. The user will be informed about this. +% +% \begin{macrocode} +\ifeof1 + \message{I couldn't find the file language.dat,\space + I will try the file hyphen.tex} + \input hyphen.tex\relax +\else +% \end{macrocode} +% +% Pattern registers are allocated using count register +% |\last@language|. Its initial value is~0. The definition of the +% macro |\newlanguage| is such that it first increments the count +% register and then defines the language. In order to have the +% first patterns loaded in pattern register number~0 we initialize +% |\last@language| with the value~$-1$. +% +% \changes{babel~3.1}{1991/05/21}{Removed use of \cs{toks0}} +% \begin{macrocode} + \last@language\m@ne +% \end{macrocode} +% +% We now read lines from the file until the end is found +% +% \begin{macrocode} + \loop +% \end{macrocode} +% +% While reading from the input, it is useful to switch off +% recognition of the end-of-line character. This saves us stripping +% off spaces from the contents of the control sequence. +% +% \begin{macrocode} + \endlinechar\m@ne + \read1 to \bbl@line + \endlinechar`\^^M +% \end{macrocode} +% +% Empty lines are skipped. +% \begin{macrocode} + \ifx\bbl@line\@empty + \else +% \end{macrocode} +% +% Now we add a space and a |/| character to the end of +% |\bbl@line|. This is needed to be able to recognize the third, +% optional, argument of |\process@language| later on. +% \changes{babel~3.5b}{1995/04/28}{Now add a \cs{space} and a / +% character} +% \begin{macrocode} + \edef\bbl@line{\bbl@line\space/}% + \expandafter\process@line\bbl@line + \fi +% \end{macrocode} +% +% Check for the end of the file. To avoid a new \texttt{if} +% control sequence we create the necessary |\iftrue| or |\iffalse| +% with the help of |\csname|. But there is one complication with +% this approach: when skipping the \texttt{loop...repeat} \TeX\ has +% to read |\if|/|\fi| pairs. So we have to insert a `dummy' +% |\iftrue|. +% \changes{babel~3.1}{1991/10/31}{Removed the extra \texttt{if} +% control sequence} +% \begin{macrocode} + \iftrue \csname fi\endcsname + \csname if\ifeof1 false\else true\fi\endcsname + \repeat +% \end{macrocode} +% +% Reactivate the default patterns, +% \begin{macrocode} + \language=0 +\fi +% \end{macrocode} +% and close the configuration file. +% \changes{babel~3.2a}{1991/11/20}{Free macro space for +% \cs{process@language}} +% \begin{macrocode} +\closein1 +% \end{macrocode} +% Also remove some macros from memory +% \begin{macrocode} +\let\process@language\@undefined +\let\process@synonym\@undefined +\let\process@line\@undefined +\let\bbl@tempa\@undefined +\let\bbl@tempb\@undefined +\let\bbl@eq@\@undefined +\let\bbl@line\@undefined +\let\bbl@get@enc\@undefined +% \end{macrocode} +% +% \changes{babel~3.5f}{1995/11/08}{Moved the fiddling with \cs{dump} +% to \file{bbplain.dtx} as it is no longer needed for \LaTeX} +% We add a message about the fact that babel is loaded in the +% format and with which language patterns to the \cs{everyjob} +% register. +% \changes{babel~3.6h}{1997/01/23}{Added a couple of \cs{expandafter}s +% to copy the contents of \cs{toks8} into \cs{everyjob} instead of +% the reference} +% \begin{macrocode} +\ifx\addto@hook\@undefined +\else + \expandafter\addto@hook\expandafter\everyjob\expandafter{% + \expandafter\typeout\expandafter{\the\toks8 loaded.}} +\fi +% \end{macrocode} +% Here the code for ini\TeX\ ends. +% \begin{macrocode} +% +% +% \end{macrocode} +% \end{macro} +% +% \subsection{Support for active characters} +% +% \begin{macro}{\bbl@add@special} +% \changes{babel~3.2}{1991/11/10}{Added macro} +% The macro |\bbl@add@special| is used to add a new character (or +% single character control sequence) to the macro |\dospecials| +% (and |\@sanitize| if \LaTeX\ is used). +% +% To keep all changes local, we begin a new group. Then we +% redefine the macros |\do| and |\@makeother| to add themselves and +% the given character without expansion. +% \begin{macrocode} +%<*core|shorthands> +\def\bbl@add@special#1{\begingroup + \def\do{\noexpand\do\noexpand}% + \def\@makeother{\noexpand\@makeother\noexpand}% +% \end{macrocode} +% To add the character to the macros, we expand the original macros +% with the additional character inside the redefinition of the +% macros. Because |\@sanitize| can be undefined, we put the +% definition inside a conditional. +% \begin{macrocode} + \edef\x{\endgroup + \def\noexpand\dospecials{\dospecials\do#1}% + \expandafter\ifx\csname @sanitize\endcsname\relax \else + \def\noexpand\@sanitize{\@sanitize\@makeother#1}% + \fi}% +% \end{macrocode} +% The macro |\x| contains at this moment the following:\\ +% |\endgroup\def\dospecials{|\textit{old contents}% +% |\do|\meta{char}|}|.\\ +% If |\@sanitize| is defined, it contains an additional definition +% of this macro. The last thing we have to do, is the expansion of +% |\x|. Then |\endgroup| is executed, which restores the old +% meaning of |\x|, |\do| and |\@makeother|. After the group is +% closed, the new definition of |\dospecials| (and |\@sanitize|) is +% assigned. +% \begin{macrocode} + \x} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\bbl@remove@special} +% \changes{babel~3.2}{1991/11/10}{Added macro} +% The companion of the former macro is |\bbl@remove@special|. It +% is used to remove a character from the set macros |\dospecials| +% and |\@sanitize|. +% +% To keep all changes local, we begin a new group. Then we define +% a help macro |\x|, which expands to empty if the characters +% match, otherwise it expands to its nonexpandable input. Because +% \TeX\ inserts a |\relax|, if the corresponding |\else| or |\fi| +% is scanned before the comparison is evaluated, we provide a `stop +% sign' which should expand to nothing. +% \begin{macrocode} +\def\bbl@remove@special#1{\begingroup + \def\x##1##2{\ifnum`#1=`##2\noexpand\@empty + \else\noexpand##1\noexpand##2\fi}% +% \end{macrocode} +% With the help of this macro we define |\do| and |\make@other|. +% \begin{macrocode} + \def\do{\x\do}% + \def\@makeother{\x\@makeother}% +% \end{macrocode} +% The rest of the work is similar to |\bbl@add@special|. +% \begin{macrocode} + \edef\x{\endgroup + \def\noexpand\dospecials{\dospecials}% + \expandafter\ifx\csname @sanitize\endcsname\relax \else + \def\noexpand\@sanitize{\@sanitize}% + \fi}% + \x} +% \end{macrocode} +% \end{macro} +% +% \subsection{Shorthands} +% +% \begin{macro}{\initiate@active@char} +% \changes{babel~3.5a}{1995/02/11}{Added macro} +% \changes{babel~3.5b}{1995/03/03}{Renamed macro} +% A language definition file can call this macro to make a +% character active. This macro takes one argument, the character +% that is to be made active. When the character was already active +% this macro does nothing. Otherwise, this macro defines the +% control sequence |\normal@char|\m{char} to expand to the +% character in its `normal state' and it defines the active +% character to expand to |\normal@char|\m{char} by default +% (\m{char} being the character to be made active). Later its +% definition can be changed to expand to |\active@char|\m{char} +% by calling |\bbl@activate{|\m{char}|}|. +% +% For example, to make the double quote character active one could +% have the following line in a language definition file: +% \begin{verbatim} +% \initiate@active@char{"} +% \end{verbatim} +% +% \begin{macro}{\bbl@afterelse} +% \begin{macro}{\bbl@afterfi} +% Because the code that is used in the handling of active +% characters may need to look ahead, we take extra care to `throw' +% it over the |\else| and |\fi| parts of an +% |\if|-statement\footnote{This code is based on code presented in +% TUGboat vol. 12, no2, June 1991 in ``An expansion Power Lemma'' +% by Sonja Maus.}. These macros will break if another |\if...\fi| +% statement appears in one of the arguments. +% \changes{babel~3.6i}{1997/02/20}{Made \cs{bbl@afterelse} and +% \cs{bbl@afterfi} \cs{long}} +% \begin{macrocode} +\long\def\bbl@afterelse#1\else#2\fi{\fi#1} +\long\def\bbl@afterfi#1\fi{\fi#1} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \changes{babel~3.7a}{1997/02/23}{Commented out \c{peek@token} and +% \cs{test@token} as shorthands are made expandable again} +% +% \begin{macro}{\peek@token} +% \changes{babel~3.5f}{1995/12/06}{macro added} +% \changes{babel~3.6i}{1998/03/10}{Renamed \cs{test@token} to +% \cs{bbl@test@token} to prevent a clash with Arab\TeX} +% To prevent error messages when a shorthand, which +% normally takes an argument, sees a |\par|, or |}|, or similar +% tokens, we need to be able to `peek' at what is coming up next in +% the input stream. Depending on the category code of the token +% that is seen, we need to either continue the code for the active +% character, or insert the non-active version of that character in +% the output. The macro |\peek@token| therefore takes two +% arguments, with which it constructs the control sequence to +% expand next. It |\let|'s |\bbl@nexta| and |\bbl@nextb| to the two +% possible macros. This is necessary for |\bbl@test@token| to take +% the right decision. +% \begin{macrocode} +%\def\peek@token#1#2{% +% \expandafter\let\expandafter\bbl@nexta\csname #1\string#2\endcsname +% \expandafter\let\expandafter\bbl@nextb +% \csname system@active\string#2\endcsname +% \futurelet\bbl@token\bbl@test@token} +% \end{macrocode} +% +% \begin{macro}{\bbl@test@token} +% \changes{babel~3.5f}{1995/12/06}{macro added} +% \changes{babel~3.6i}{1998/03/10}{renamed \cs{bbl@token} to +% \cs{bbl@test@token} to prevent a clash with Arab\TeX} +% When the result of peeking at the next token has yielded a token +% with category `letter', `other' or `active' it is safe to proceed +% with evaluating the code for the shorthand. When a token is found +% with any other category code proceeding is unsafe and therefor +% the original shorthand character is inserted in the output. The +% macro that calls |\bbl@test@token| needs to setup |\bbl@nexta| +% and |\bbl@nextb| in order to achieve this. +% \begin{macrocode} +%\def\bbl@test@token{% +% \let\bbl@next\bbl@nexta +% \ifcat\noexpand\bbl@token a% +% \else +% \ifcat\noexpand\bbl@token=% +% \else +% \ifcat\noexpand\bbl@token\noexpand\bbl@next +% \else +% \let\bbl@next\bbl@nextb +% \fi +% \fi +% \fi +% \bbl@next} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +%^^A +%^^A Tekens met mathcode >"8000 zorgen voor problemen. +%^^A hier kan op getest worden door ze catcode13 te geven +%^^A en te vragen of er een undefined macro ontstaat: +%^^A \ifx#1\undefined{matchcode<"8000}\else get active definition +%^^A using \let \fi +%^^A +% The macro |\initiate@active@char| takes all the necessary actions +% to make its argument a shorthand character. The real work is +% performed once for each character. +% \changes{babel~3.7c}{1999/04/30}{Only execute +% \cs{initiate@active@char} for each character} +% \begin{macrocode} +\def\initiate@active@char#1{% + \expandafter\ifx\csname active@char\string##1\endcsname\relax + \bbl@afterfi{\@initiate@active@char{#1}}% + \fi} +% \end{macrocode} +% Note that the definition of |\@initiate@active@char| needs an +% active character, for this the |~| is used. Some of the changes +% we need, do not have to become available later on, so we do it +% inside a group. +% \begin{macrocode} +\begingroup + \catcode`\~\active + \def\x{\endgroup + \def\@initiate@active@char##1{% +% \end{macrocode} +% If the character is already active we provide the default +% expansion under this shorthand mechanism. +% \changes{babel~3.5f}{1996/01/09}{Deal correctly with already active +% characters, provide top level expansion and define all lower +% level expansion macros outside of the \cs{else} branch.} +% \changes{babel~3.5g}{1996/08/13}{Top level expansion of +% \cs{normal@char char} where char is already active, should be the +% expansion of the active character, not the active character +% itself as this causes an endless loop} +% \changes{babel~3.7d}{1999/08/19}{Make sure the active character +% doesn't get expanded more then once by the \cs{edef} by adding +% \cs{expandafter}\cs{strip@prefix}\cs{meaning}} +% \changes{babel~3.7e}{1999/09/06}{previous change was rubbish; use +% \cs{let} instead of \cs{edef}} +% \begin{macrocode} + \ifcat\noexpand##1\noexpand~\relax + \@ifundefined{normal@char\string##1}{% + \expandafter\let\csname normal@char\string##1\endcsname##1% + \expandafter\gdef + \expandafter##1% + \expandafter{% + \expandafter\active@prefix\expandafter##1% + \csname normal@char\string##1\endcsname}}{}% + \else +% \end{macrocode} +% Otherwise we write a message in the transcript file, +% \begin{macrocode} + \@activated{##1}% +% \end{macrocode} +% and define |\normal@char|\m{char} to expand to the character in +% its default state. +% \begin{macrocode} + \@namedef{normal@char\string##1}{##1}% +% \end{macrocode} +% If we are making the right quote active we need to change +% |\pr@m@s| as well. +% \changes{babel~3.5a}{1995/03/10}{Added a check for right quote and +% adapt \cs{pr@m@s} if necessary} +% \changes{babel~3.7f}{1999/12/18}{The redefinition needs to take +% place on level higher, \cs{prim@s} needs to be redefined.} +% \begin{macrocode} + \ifx##1'% + \let\prim@s\bbl@prim@s +% \end{macrocode} +% Also, make sure that a single |'| in math mode `does the right +% thing'. +% \changes{babel~3.7f}{1999/12/18}{Insert a check for math mode in the +% definition of \cs{normal@char'}} +% \changes{babel~3.7g}{2000/10/02}{use \cs{textormath} to get rid of +% the \cs{fi} (PR 3266)} +% \begin{macrocode} + \@namedef{normal@char\string##1}{% + \textormath{##1}{^\bgroup\prim@s}}% + \fi +% \end{macrocode} +% If we are using the caret as a shorthand character special care +% should be taken to make sure math still works. Therefor an extra +% level of expansion is introduced with a check for math mode on +% the upper level. +% \changes{babel~3.7f}{1999/12/18}{Introduced an extra level of +% expansion in the definition of an active caret} +% \begin{macrocode} + \ifx##1^% + \gdef\bbl@act@caret{% + \ifmmode + \csname normal@char\string^\endcsname + \else + \bbl@afterfi + {\if@safe@actives + \bbl@afterelse\csname normal@char\string##1\endcsname + \else + \bbl@afterfi\csname user@active\string##1\endcsname + \fi}% + \fi} + \fi +% \end{macrocode} +% To prevent problems with the loading of other packages after +% \babel\ we reset the catcode of the character at the end of the +% package. +% \changes{babel~3.5f}{1995/12/01}{Restore the category code of a +% shorthand char at end of package} +% \changes{babel~3.6f}{1997/01/14}{Made restoring of the category code +% of shorthand characters optional} +% \changes{babel~3.7a}{1997/03/21}{Use \cs{@ifpackagewith} to +% determine whether shorthand characters need to remain active} +% \begin{macrocode} + \@ifpackagewith{babel}{KeepShorthandsActive}{}{% + \edef\bbl@tempa{\catcode`\noexpand##1\the\catcode`##1}% + \expandafter\AtEndOfPackage\expandafter{\bbl@tempa}}% +% \end{macrocode} +% Now we set the lowercase code of the |~| equal to that of the +% character to be made active and execute the rest of the code +% inside a |\lowercase| `environment'. +% \changes{babel~3.5f}{1996/01/25}{store the \cs{lccode} of the tie +% before changing it} +% \begin{macrocode} + \@tempcnta=\lccode`\~ + \lccode`~=`##1% + \lowercase{% +% \end{macrocode} +% Make the character active and add it to |\dospecials| and +% |\@sanitize|. +% \begin{macrocode} + \catcode`~\active + \expandafter\bbl@add@special + \csname \string##1\endcsname +% \end{macrocode} +% Also re-activate it again at |\begin{document}|. +% \begin{macrocode} + \AtBeginDocument{% + \catcode`##1\active +% \end{macrocode} +% We also need to make sure that the shorthands are active during +% the processing of the \file{.aux} file. Otherwise some citations +% may give unexpected results in the printout when a shorthand was +% used in the optional argument of |\bibitem| for example. +% \changes{babel~3.6i}{1997/03/01}{Make shorthands active during +% \file{.aux} file processing} +% \begin{macrocode} + \if@filesw + \immediate\write\@mainaux{% + \string\catcode`##1\string\active}% + \fi}% +% \end{macrocode} +% Define the character to expand to +% \begin{center} +% |\active@prefix| \m{char} |\normal@char|\m{char} +% \end{center} +% (where |\active@char|\m{char} is \emph{one} control sequence!). +% \changes{babel~3.5f}{1996/01/25}{restore the \cs{lccode} of the tie} +% \begin{macrocode} + \expandafter\gdef + \expandafter~% + \expandafter{% + \expandafter\active@prefix\expandafter##1% + \csname normal@char\string##1\endcsname}}% + \lccode`\~\@tempcnta + \fi +% \end{macrocode} +% For the active caret we first expand to |\bbl@act@caret| in order +% to be able to handle math mode correctly. +% \changes{babel~3.7f}{2000/09/25}{Make an exception for the active +% caret which needs an extra level of expansion} +% \begin{macrocode} + \ifx##1^% + \@namedef{active@char\string##1}{\bbl@act@caret}% + \else +% \end{macrocode} +% We define the first level expansion of |\active@char|\m{char} to +% check the status of the |@safe@actives| flag. If it is set to +% true we expand to the `normal' version of this character, +% otherwise we call |\@active@char|\m{char}. +% \begin{macrocode} + \@namedef{active@char\string##1}{% + \if@safe@actives + \bbl@afterelse\csname normal@char\string##1\endcsname + \else + \bbl@afterfi\csname user@active\string##1\endcsname + \fi}% + \fi +% \end{macrocode} +% The next level of the code checks whether a user has defined a +% shorthand for himself with this character. First we check for a +% single character shorthand. If that doesn't exist we check for a +% shorthand with an argument. +% \changes{babel~3.5d}{1995/07/02}{Skip the user-level active char +% with argument if no shorthands with arguments were defined} +% \changes{babel~3.8b}{2004/04/19}{Now use \cs{bbl@sh@select}} +% \begin{macrocode} + \@namedef{user@active\string##1}{% + \expandafter\ifx + \csname \user@group @sh@\string##1@\endcsname + \relax + \bbl@afterelse\bbl@sh@select\user@group##1% + {user@active@arg\string##1}{language@active\string##1}% + \else + \bbl@afterfi\csname \user@group @sh@\string##1@\endcsname + \fi}% +% \end{macrocode} +% When there is also no user-level shorthand with an argument we +% will check whether there is a language defined shorthand for +% this active character. Before the next token is absorbed as +% argument we need to make sure that this is safe. Therefor +% |\peek@token| is called to decide that. +% \changes{babel~3.5f}{1995/12/07}{use \cs{peek@token} to check whether +% it is safe to proceed} +% \changes{babel~3.6i}{1997/02/20}{Remove the use of \cs{peek@token} +% again and make the \cs{...active@arg...} commands \cs{long}} +% \changes{babel~3.7e}{1999/09/24}{pass the argument on with braces in +% order to prevent it from breaking up} +% \changes{babel~3.7f}{2000/02/18}{remove the braces again} +% \begin{macrocode} + \long\@namedef{user@active@arg\string##1}####1{% + \expandafter\ifx + \csname \user@group @sh@\string##1@\string####1@\endcsname + \relax + \bbl@afterelse + \csname language@active\string##1\endcsname####1% + \else + \bbl@afterfi + \csname \user@group @sh@\string##1@\string####1@% + \endcsname + \fi}% +% \end{macrocode} +% In order to do the right thing when a shorthand with an argument +% is used by itself at the end of the line we provide a definition +% for the case of an empty argument. For that case we let the +% shorthand character expand to its non-active self. +% \begin{macrocode} + \@namedef{\user@group @sh@\string##1@@}{% + \csname normal@char\string##1\endcsname} +% \end{macrocode} +% +% Like the shorthands that can be defined by the user, a language +% definition file can also define shorthands with and without an +% argument, so we need two more macros to check if they exist. +% \changes{babel~3.5d}{1995/07/02}{Skip the language-level active char +% with argument if no shorthands with arguments were defined} +% \changes{babel~3.8b}{2004/04/19}{Now use \cs{bbl@sh@select}} +% \begin{macrocode} + \@namedef{language@active\string##1}{% + \expandafter\ifx + \csname \language@group @sh@\string##1@\endcsname + \relax + \bbl@afterelse\bbl@sh@select\language@group##1% + {language@active@arg\string##1}{system@active\string##1}% + \else + \bbl@afterfi + \csname \language@group @sh@\string##1@\endcsname + \fi}% +% \end{macrocode} +% \changes{babel~3.5f}{1995/12/07}{use \cs{peek@token} to check whether +% it is safe to proceed} +% \changes{babel~3.6i}{1997/02/20}{Remove the use of \cs{peek@token} +% again} +% \changes{babel~3.7e}{1999/09/24}{pass the argument on with braces in +% order to prevent it from breaking up} +% \changes{babel~3.7f}{2000/02/18}{remove the braces again} +% \begin{macrocode} + \long\@namedef{language@active@arg\string##1}####1{% + \expandafter\ifx + \csname \language@group @sh@\string##1@\string####1@\endcsname + \relax + \bbl@afterelse + \csname system@active\string##1\endcsname####1% + \else + \bbl@afterfi + \csname \language@group @sh@\string##1@\string####1@% + \endcsname + \fi}% +% \end{macrocode} +% And the same goes for the system level. +% \changes{babel~3.8b}{2004/04/19}{Now use \cs{bbl@sh@select}} +% \begin{macrocode} + \@namedef{system@active\string##1}{% + \expandafter\ifx + \csname \system@group @sh@\string##1@\endcsname + \relax + \bbl@afterelse\bbl@sh@select\system@group##1% + {system@active@arg\string##1}{normal@char\string##1}% + \else + \bbl@afterfi\csname \system@group @sh@\string##1@\endcsname + \fi}% +% \end{macrocode} +% When no shorthands were found the `normal' version of the active +% character is inserted. +% \changes{babel~3.5f}{1995/12/07}{use \cs{peek@token} to check whether +% it is safe to proceed} +% \changes{babel~3.6i}{1997/02/20}{Remove the use of \cs{peek@token} +% again} +% \begin{macrocode} + \long\@namedef{system@active@arg\string##1}####1{% + \expandafter\ifx + \csname \system@group @sh@\string##1@\string####1@\endcsname + \relax + \bbl@afterelse\csname normal@char\string##1\endcsname####1% + \else + \bbl@afterfi + \csname \system@group @sh@\string##1@\string####1@\endcsname + \fi}% +% \end{macrocode} +% When a shorthand combination such as |''| ends up in a heading +% \TeX\ would see |\protect'\protect'|. To prevent this from +% happening a shorthand needs to be defined at user level. +% \changes{babel~3.7f}{1999/12/09}{Added an extra shorthand +% combination on user level to catch an interfering \cs{protect}} +% \begin{macrocode} + \@namedef{user@sh@\string##1@\string\protect@}{% + \csname user@active\string##1\endcsname}% + }% + }\x +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\bbl@sh@select} +% This command helps the shorthand supporting macros to select how +% to proceed. Note that this macro needs to be expandable as do all +% the shorthand macros in order for them to work in expansion-only +% environments such as the argument of |\hyphenation|. +% +% This macro expects the name of a group of shorthands in its first +% argument and a shorthand character in its second argument. It +% will expand to either |\bbl@firstcs| or |\bbl@scndcs|. Hence two +% more arguments need to follow it. +% \changes{babel~3.8b}{2004/04/19}{Added command} +% \begin{macrocode} +\def\bbl@sh@select#1#2{% + \expandafter\ifx\csname#1@sh@\string#2@sel\endcsname\relax + \bbl@afterelse\bbl@scndcs + \else + \bbl@afterfi\csname#1@sh@\string#2@sel\endcsname + \fi +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\active@prefix} +% The command |\active@prefix| which is used in the expansion of +% active characters has a function similar to |\OT1-cmd| in that it +% |\protect|s the active character whenever |\protect| is +% \emph{not} |\@typeset@protect|. +% \changes{babel~3.5d}{1995/07/02}{\cs{@protected@cmd} has vanished +% from \file{ltoutenc.dtx}} +% \changes{babel~3.7o}{2003/11/17}{Added handling of the situation +% where \cs{protect} is set to \cs{@unexpandable@protect}} +% \begin{macrocode} +\def\active@prefix#1{% + \ifx\protect\@typeset@protect + \else +% \end{macrocode} +% When |\protect| is set to |\@unexpandable@protect| we make sure +% that the active character is als \emph{not} expanded by inserting +% |\noexpand| in front of it. The |\@gobble| is needed to remove +% a token such as |\activechar:| (when the double colon was the +% active character to be dealt with). +% \begin{macrocode} + \ifx\protect\@unexpandable@protect + \bbl@afterelse\bbl@afterfi\noexpand#1\@gobble + \else + \bbl@afterfi\bbl@afterfi\protect#1\@gobble + \fi + \fi} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\if@safe@actives} +% In some circumstances it is necessary to be able to change the +% expansion of an active character on the fly. For this purpose the +% switch |@safe@actives| is available. The setting of this switch +% should be checked in the first level expansion of +% |\active@char|\m{char}. +% \begin{macrocode} +\newif\if@safe@actives +\@safe@activesfalse +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\bbl@restore@actives} +% \changes{babel~3.7m}{2003/11/15}{New macro added} +% When the output routine kicks in while the +% active characters were made ``safe'' this must be undone in +% the headers to prevent unexpected typeset results. For this +% situation we define a command to make them ``unsafe'' again. +% \begin{macrocode} +\def\bbl@restore@actives{\if@safe@actives\@safe@activesfalse\fi} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\bbl@activate} +% \changes{babel~3.5a}{1995/02/11}{Added macro} +% +% This macro takes one argument, like |\initiate@active@char|. The +% macro is used to change the definition of an active character to +% expand to |\active@char|\m{char} instead of +% |\normal@char|\m{char}. +% \begin{macrocode} +\def\bbl@activate#1{% + \expandafter\def + \expandafter#1\expandafter{% + \expandafter\active@prefix + \expandafter#1\csname active@char\string#1\endcsname}% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\bbl@deactivate} +% \changes{babel~3.5a}{1995/02/11}{Added macro} +% This macro takes one argument, like |\bbl@activate|. The macro +% doesn't really make a character non-active; it changes its +% definition to expand to |\normal@char|\m{char}. +% \begin{macrocode} +\def\bbl@deactivate#1{% + \expandafter\def + \expandafter#1\expandafter{% + \expandafter\active@prefix + \expandafter#1\csname normal@char\string#1\endcsname}% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\bbl@firstcs} +% \begin{macro}{\bbl@scndcs} +% These macros have two arguments. They use one of their arguments +% to build a control sequence from. +% \begin{macrocode} +\def\bbl@firstcs#1#2{\csname#1\endcsname} +\def\bbl@scndcs#1#2{\csname#2\endcsname} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\declare@shorthand} +% The command |\declare@shorthand| is used to declare a shorthand +% on a certain level. It takes three arguments: +% \begin{enumerate} +% \item a name for the collection of shorthands, i.e. `system', or +% `dutch'; +% \item the character (sequence) that makes up the shorthand, +% i.e. |~| or |"a|; +% \item the code to be executed when the shorthand is encountered. +% \end{enumerate} +% \changes{babel~3.5d}{1995/07/02}{Make a `note' when a shorthand with +% an argument is defined.} +% \changes{babel~3.6i}{1997/02/23}{Make it possible to distinguish the +% constructed control sequences for the case with argument} +% \changes{babel~3.8b}{2004/04/19}{We need to support shorthands with +% and without argument in different groups; added the name of the +% group to the storage macro} +% \begin{macrocode} +\def\declare@shorthand#1#2{\@decl@short{#1}#2\@nil} +\def\@decl@short#1#2#3\@nil#4{% + \def\bbl@tempa{#3}% + \ifx\bbl@tempa\@empty + \expandafter\let\csname #1@sh@\string#2@sel\endcsname\bbl@scndcs + \@namedef{#1@sh@\string#2@}{#4}% + \else + \expandafter\let\csname #1@sh@\string#2@sel\endcsname\bbl@firstcs + \@namedef{#1@sh@\string#2@\string#3@}{#4}% + \fi} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\textormath} +% Some of the shorthands that will be declared by the language +% definition files have to be usable in both text and mathmode. To +% achieve this the helper macro |\textormath| is provided. +% \begin{macrocode} +\def\textormath#1#2{% + \ifmmode + \bbl@afterelse#2% + \else + \bbl@afterfi#1% + \fi} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\user@group} +% \begin{macro}{\language@group} +% \begin{macro}{\system@group} +% The current concept of `shorthands' supports three levels or +% groups of shorthands. For each level the name of the level or +% group is stored in a macro. The default is to have a user group; +% use language group `english' and have a system group called +% `system'. +% \changes{babel~3.6i}{1997/02/24}{Have a user group called `user' by +% default} +% \begin{macrocode} +\def\user@group{user} +\def\language@group{english} +\def\system@group{system} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\useshorthands} +% This is the user level command to tell \LaTeX\ that user level +% shorthands will be used in the document. It takes one argument, +% the character that starts a shorthand. +% \changes{babel~3.7j}{2001/11/11}{When \TeX\ has seen a character +% its category code is fixed; need to use a `stand-in' for the +% call of \cs{bbl@activate}} +% \begin{macrocode} +\def\useshorthands#1{% +% \end{macrocode} +% First note that this is user level. +% \begin{macrocode} + \def\user@group{user}% +% \end{macrocode} +% Then initialize the character for use as a shorthand character. +% \begin{macrocode} + \initiate@active@char{#1}% +% \end{macrocode} +% Now that \TeX\ has seen the character its category code is +% fixed, but for the actions of |\bbl@activate| to succeed we need +% it to be active. Hence the trick with the |\lccode| to circumvent +% this. +% \changes{babel~3.7j}{2003/09/11}{The change from 11/112001 was +% incomplete} +% \begin{macrocode} + \@tempcnta\lccode`\~ + \lccode`~=`#1% + \lowercase{\catcode`~\active\bbl@activate{~}}% + \lccode`\~\@tempcnta} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\defineshorthand} +% Currently we only support one group of user level shorthands, +% called `user'. +% \begin{macrocode} +\def\defineshorthand{\declare@shorthand{user}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\languageshorthands} +% A user level command to change the language from which shorthands +% are used. +% \begin{macrocode} +\def\languageshorthands#1{\def\language@group{#1}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\aliasshorthand} +% \changes{babel~3.5f}{1996/01/25}{New command} +% \begin{macrocode} +\def\aliasshorthand#1#2{% +% \end{macrocode} +% First the new shorthand needs to be initialized, +% \begin{macrocode} + \expandafter\ifx\csname active@char\string#2\endcsname\relax + \ifx\document\@notprerr + \@notshorthand{#2} + \else + \initiate@active@char{#2}% +% \end{macrocode} +% Then we need to use the |\lccode| trick to make the new shorthand +% behave like the old one. Therefore we save the current |\lccode| +% of the |~|-character and restore it later. Then we |\let| the new +% shorthand character be equal to the original. +% \begin{macrocode} + \@tempcnta\lccode`\~ + \lccode`~=`#2% + \lowercase{\let~#1}% + \lccode`\~\@tempcnta + \fi + \fi +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@notshorthand} +% \changes{v3.8d}{2004/11/20}{Error message added} +% +% \begin{macrocode} +\def\@notshorthand#1{% + \PackageError{babel}{% + The character `\string #1´ should be made + a shorthand character;\MessageBreak + add the command \string\useshorthands\string{#1\string} to + the preamble.\MessageBreak + I will ignore your instruction}{}% + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\shorthandon} +% \changes{babel~3.7a}{1998/06/07}{Added command} +% \begin{macro}{\shorthandoff} +% \changes{babel~3.7a}{1998/06/07}{Added command} +% The first level definition of these macros just passes the +% argument on to |\bbl@switch@sh|, adding |\@nil| at the end to +% denote the end of the list of characters. +% \begin{macrocode} +\newcommand*\shorthandon[1]{\bbl@switch@sh{on}#1\@nil} +\newcommand*\shorthandoff[1]{\bbl@switch@sh{off}#1\@nil} +% \end{macrocode} +% +% \begin{macro}{\bbl@switch@sh} +% \changes{babel~3.7a}{1998/06/07}{Added command} +% The macro |\bbl@switch@sh| takes the list of characters apart one +% by one and subsequently switches the category code of the +% shorthand character according to the first argument of +% |\bbl@switch@sh|. +% \begin{macrocode} +\def\bbl@switch@sh#1#2#3\@nil{% +% \end{macrocode} +% But before any of this switching takes place we make sure that +% the character we are dealing with is known as a shorthand +% character. If it is, a macro such as |\active@char"| should +% exist. +% \begin{macrocode} + \@ifundefined{active@char\string#2}{% + \PackageError{babel}{% + The character '\string #2' is not a shorthand character + in \languagename}{% + Maybe you made a typing mistake?\MessageBreak + I will ignore your instruction}}{% + \csname bbl@switch@sh@#1\endcsname#2}% +% \end{macrocode} +% Now that, as the first character in the list has been taken care +% of, we pass the rest of the list back to |\bbl@switch@sh|. +% \begin{macrocode} + \ifx#3\@empty\else + \bbl@afterfi\bbl@switch@sh{#1}#3\@nil + \fi} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\bbl@switch@sh@off} +% All that is left to do is define the actual switching +% macros. Switching off is easy, we just set the category code to +% `other' (12). +% \begin{macrocode} +\def\bbl@switch@sh@off#1{\catcode`#112\relax} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\bbl@switch@sh@on} +% But switching the shorthand character back on is a bit more +% tricky. It involves making sure that we have an active character +% to begin with when the macro is being defined. It also needs the +% use of |\lowercase| and |\lccode| trickery to get everything to +% work out as expected. And to keep things local that need to +% remain local a group is opened, which is closed as soon as |\x| +% gets executed. +% \begin{macrocode} +\begingroup + \catcode`\~\active + \def\x{\endgroup + \def\bbl@switch@sh@on##1{% + \lccode`~=`##1% + \lowercase{% + \catcode`~\active + }% + }% + } +% \end{macrocode} +% \end{macro} +% The next operation makes the above definition effective. +% \begin{macrocode} +\x +% +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% To prevent problems with constructs such as |\char"01A| when the +% double quote is made active, we define a shorthand on +% system level. +% \changes{babel~3.5a}{1995/03/10}{Replaced 16 system shorthands to +% deal with hex numbers by one} +% \begin{macrocode} +\declare@shorthand{system}{"}{\csname normal@char\string"\endcsname} +% \end{macrocode} +% +% When the right quote is made active we need to take care of +% handling it correctly in mathmode. Therefore we define a +% shorthand at system level to make it expand to a non-active right +% quote in textmode, but expand to its original definition in +% mathmode. (Note that the right quote is `active' in mathmode +% because of its mathcode.) +% \changes{babel~3.5a}{1995/03/10}{Added a system shorthand for the +% right quote} +% \begin{macrocode} +\declare@shorthand{system}{'}{% + \textormath{\csname normal@char\string'\endcsname}% + {\sp\bgroup\prim@s}} +% \end{macrocode} +% +% When the left quote is made active we need to take care of +% handling it correctly when it is followed by for instance an open +% brace token. Therefore we define a shorthand at system level to +% make it expand to a non-active left quote. +% \changes{babel~3.5f}{1996/03/06}{Added a system shorthand for the +% left quote} +% \begin{macrocode} +\declare@shorthand{system}{`}{\csname normal@char\string`\endcsname} +% \end{macrocode} +% +% \begin{macro}{\bbl@prim@s} +% \changes{babel~3.7f}{1999/12/01}{Need to redefine \cs{prim@s} as +% well as plain \TeX's definition uses \cs{next}} +% \begin{macro}{\bbl@pr@m@s} +% \changes{babel~3.5a}{1995/03/10}{Added macro} +% One of the internal macros that are involved in substituting +% |\prime| for each right quote in mathmode is |\prim@s|. This +% checks if the next character is a right quote. When the right +% quote is active, the definition of this macro needs to be adapted +% to look for an active right quote. +% \begin{macrocode} +\def\bbl@prim@s{% + \prime\futurelet\@let@token\bbl@pr@m@s} +\begingroup + \catcode`\'\active\let'\relax + \def\x{\endgroup + \def\bbl@pr@m@s{% + \ifx'\@let@token + \expandafter\pr@@@s + \else + \ifx^\@let@token + \expandafter\expandafter\expandafter\pr@@@t + \else + \egroup + \fi + \fi}% + } +\x +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macrocode} +% +% \end{macrocode} +% +% Normally the |~| is active and expands to \verb*=\penalty\@M\ =. +% When it is written to the \file{.aux} file it is written +% expanded. To prevent that and to be able to use the character |~| +% as a start character for a shorthand, it is redefined here as a +% one character shorthand on system level. +% \changes{babel~3.5f}{1996/04/02}{No need to reset the category code +% of the tilde as \cs{initiate@active@char} now correctly deals +% with active characters} +% \begin{macrocode} +%<*core> +\initiate@active@char{~} +\declare@shorthand{system}{~}{\leavevmode\nobreak\ } +\bbl@activate{~} +% \end{macrocode} +% +% \begin{macro}{\OT1dqpos} +% \begin{macro}{\T1dqpos} +% The position of the double quote character is different for the +% OT1 and T1 encodings. It will later be selected using the +% |\f@encoding| macro. Therefor we define two macros here to store +% the position of the character in these encodings. +% \begin{macrocode} +\expandafter\def\csname OT1dqpos\endcsname{127} +\expandafter\def\csname T1dqpos\endcsname{4} +% \end{macrocode} +% When the macro |\f@encoding| is undefined (as it is in plain +% \TeX) we define it here to expand to \texttt{OT1} +% \begin{macrocode} +\ifx\f@encoding\@undefined + \def\f@encoding{OT1} +\fi +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \subsection{Language attributes} +% +% Language attributes provide a means to give the user control over +% which features of the language definition files he wants to +% enable. +% \changes{babel~3.7c}{1998/07/02}{Added support for language +% attributes} +% \begin{macro}{\languageattribute} +% The macro |\languageattribute| checks whether its arguments are +% valid and then activates the selected language attribute. +% \begin{macrocode} +\newcommand\languageattribute[2]{% +% \end{macrocode} +% First check whether the language is known. +% \begin{macrocode} + \expandafter\ifx\csname l@#1\endcsname\relax + \@nolanerr{#1}% + \else +% \end{macrocode} +% Than process each attribute in the list. +% \begin{macrocode} + \@for\bbl@attr:=#2\do{% +% \end{macrocode} +% We want to make sure that each attribute is selected only once; +% therefor we store the already selected attributes in +% |\bbl@known@attribs|. When that control sequence is not yet +% defined this attribute is certainly not selected before. +% \begin{macrocode} + \ifx\bbl@known@attribs\@undefined + \in@false + \else +% \end{macrocode} +% Now we need to see if the attribute occurs in the list of +% already selected attributes. +% \begin{macrocode} + \edef\bbl@tempa{\noexpand\in@{,#1-\bbl@attr,}% + {,\bbl@known@attribs,}}% + \bbl@tempa + \fi +% \end{macrocode} +% When the attribute was in the list we issue a warning; this might +% not be the users intention. +% \begin{macrocode} + \ifin@ + \PackageWarning{Babel}{% + You have more than once selected the attribute + '\bbl@attr'\MessageBreak for language #1}% + \else +% \end{macrocode} +% When we end up here the attribute is not selected before. So, we +% add it to the list of selected attributes and execute the +% associated \TeX-code. +% \begin{macrocode} + \edef\bbl@tempa{% + \noexpand\bbl@add@list\noexpand\bbl@known@attribs{#1-\bbl@attr}}% + \bbl@tempa + \edef\bbl@tempa{#1-\bbl@attr}% + \expandafter\bbl@ifknown@ttrib\expandafter{\bbl@tempa}\bbl@attributes% + {\csname#1@attr@\bbl@attr\endcsname}% + {\@attrerr{#1}{\bbl@attr}}% + \fi + } + \fi} +% \end{macrocode} +% This command should only be used in the preamble of a document. +% \begin{macrocode} +\@onlypreamble\languageattribute +% \end{macrocode} +% The error text to be issued when an unknown attribute is +% selected. +% \begin{macrocode} + \newcommand*{\@attrerr}[2]{% + \PackageError{babel}% + {The attribute #2 is unknown for language #1.}% + {Your command will be ignored, type to proceed}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\bbl@declare@ttribute} +% This command adds the new language/attribute combination to the +% list of known attributes. +% \begin{macrocode} +\def\bbl@declare@ttribute#1#2#3{% + \bbl@add@list\bbl@attributes{#1-#2}% +% \end{macrocode} +% Then it defines a control sequence to be executed when the +% attribute is used in a document. The result of this should be +% that the macro |\extras...| for the current language is extended, +% otherwise the attribute will not work as its code is removed from +% memory at |\begin{document}|. +% \begin{macrocode} + \expandafter\def\csname#1@attr@#2\endcsname{#3}% + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\bbl@ifattributeset} +% \changes{babel~3.7f}{2000/02/12}{macro added} +% This internal macro has 4 arguments. It can be used to interpret +% \TeX\ code based on whether a certain attribute was set. This +% command should appear inside the argument to |\AtBeginDocument| +% because the attributes are set in the document preamble, +% \emph{after} \babel\ is loaded. +% +% The first argument is the language, the second argument the +% attribute being checked, and the third and fourth arguments are +% the true and false clauses. +% \begin{macrocode} +\def\bbl@ifattributeset#1#2#3#4{% +% \end{macrocode} +% First we need to find out if any attributes were set; if not +% we're done. +% \begin{macrocode} + \ifx\bbl@known@attribs\@undefined + \in@false + \else +% \end{macrocode} +% The we need to check the list of known attributes. +% \begin{macrocode} + \edef\bbl@tempa{\noexpand\in@{,#1-#2,}% + {,\bbl@known@attribs,}}% + \bbl@tempa + \fi +% \end{macrocode} +% When we're this far |\ifin@| has a value indicating if the +% attribute in question was set or not. Just to be safe the code to +% be executed is `thrown over the |\fi|'. +% \begin{macrocode} + \ifin@ + \bbl@afterelse#3% + \else + \bbl@afterfi#4% + \fi + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\bbl@add@list} +% This internal macro adds its second argument to a comma +% separated list in its first argument. When the list is not +% defined yet (or empty), it will be initiated +% \begin{macrocode} +\def\bbl@add@list#1#2{% + \ifx#1\@undefined + \def#1{#2}% + \else + \ifx#1\@empty + \def#1{#2}% + \else + \edef#1{#1,#2}% + \fi + \fi + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\bbl@ifknown@ttrib} +% An internal macro to check whether a given language/attribute is +% known. The macro takes 4 arguments, the language/attribute, the +% attribute list, the \TeX-code to be executed when the attribute +% is known and the \TeX-code to be executed otherwise. +% \begin{macrocode} +\def\bbl@ifknown@ttrib#1#2{% +% \end{macrocode} +% We first assume the attribute is unknown. +% \begin{macrocode} + \let\bbl@tempa\@secondoftwo +% \end{macrocode} +% Then we loop over the list of known attributes, trying to find a +% match. +% \begin{macrocode} + \@for\bbl@tempb:=#2\do{% + \expandafter\in@\expandafter{\expandafter,\bbl@tempb,}{,#1,}% + \ifin@ +% \end{macrocode} +% When a match is found the definition of |\bbl@tempa| is changed. +% \begin{macrocode} + \let\bbl@tempa\@firstoftwo + \else + \fi}% +% \end{macrocode} +% Finally we execute |\bbl@tempa|. +% \begin{macrocode} + \bbl@tempa +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\bbl@clear@ttribs} +% This macro removes all the attribute code from \LaTeX's memory at +% |\begin{document}| time (if any is present). +% \changes{babel~3.7e}{1999/09/24}{When \cs{bbl@attributes} is +% undefined this should be a no-op} +% \begin{macrocode} +\def\bbl@clear@ttribs{% + \ifx\bbl@attributes\@undefined\else + \@for\bbl@tempa:=\bbl@attributes\do{% + \expandafter\bbl@clear@ttrib\bbl@tempa. + }% + \let\bbl@attributes\@undefined + \fi + } +\def\bbl@clear@ttrib#1-#2.{% + \expandafter\let\csname#1@attr@#2\endcsname\@undefined} +\AtBeginDocument{\bbl@clear@ttribs} +% \end{macrocode} +% \end{macro} +% +% \subsection{Support for saving macro definitions} +% +% To save the meaning of control sequences using |\babel@save|, we +% use temporary control sequences. To save hash table entries for +% these control sequences, we don't use the name of the control +% sequence to be saved to construct the temporary name. Instead we +% simply use the value of a counter, which is reset to zero each +% time we begin to save new values. This works well because we +% release the saved meanings before we begin to save a new set of +% control sequence meanings (see |\selectlanguage| and +% |\originalTeX|). +% +% \begin{macro}{\babel@savecnt} +% \changes{babel~3.2}{1991/11/10}{Added macro} +% \begin{macro}{\babel@beginsave} +% \changes{babel~3.2}{1991/11/10}{Added macro} +% The initialization of a new save cycle: reset the counter to +% zero. +% \begin{macrocode} +\def\babel@beginsave{\babel@savecnt\z@} +% \end{macrocode} +% Before it's forgotten, allocate the counter and initialize all. +% \begin{macrocode} +\newcount\babel@savecnt +\babel@beginsave +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\babel@save} +% \changes{babel~3.2}{1991/11/10}{Added macro} +% The macro |\babel@save|\meta{csname} saves the current meaning of +% the control sequence \meta{csname} to +% |\originalTeX|\footnote{\cs{originalTeX} has to be +% expandable, i.\,e.\ you shouldn't let it to \cs{relax}.}. +% To do this, we let the current meaning to a temporary control +% sequence, the restore commands are appended to |\originalTeX| and +% the counter is incremented. +% \changes{babel~3.2c}{1992/03/17}{missing backslash led to errors +% when executing \cs{originalTeX}} +% \changes{babel~3.2d}{1992/07/02}{saving in \cs{babel@i} and +% restoring from \cs{@babel@i} doesn't work very well...} +% \begin{macrocode} +\def\babel@save#1{% + \expandafter\let\csname babel@\number\babel@savecnt\endcsname #1\relax + \begingroup + \toks@\expandafter{\originalTeX \let#1=}% + \edef\x{\endgroup + \def\noexpand\originalTeX{\the\toks@ \expandafter\noexpand + \csname babel@\number\babel@savecnt\endcsname\relax}}% + \x + \advance\babel@savecnt\@ne} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\babel@savevariable} +% \changes{babel~3.2}{1991/11/10}{Added macro} +% The macro |\babel@savevariable|\meta{variable} saves the value of +% the variable. \meta{variable} can be anything allowed after the +% |\the| primitive. +% \begin{macrocode} +\def\babel@savevariable#1{\begingroup + \toks@\expandafter{\originalTeX #1=}% + \edef\x{\endgroup + \def\noexpand\originalTeX{\the\toks@ \the#1\relax}}% + \x} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\bbl@frenchspacing} +% \begin{macro}{\bbl@nonfrenchspacing} +% Some languages need to have |\frenchspacing| in effect. Others +% don't want that. The command |\bbl@frenchspacing| switches it on +% when it isn't already in effect and |\bbl@nonfrenchspacing| +% switches it off if necessary. +% \begin{macrocode} +\def\bbl@frenchspacing{% + \ifnum\the\sfcode`\.=\@m + \let\bbl@nonfrenchspacing\relax + \else + \frenchspacing + \let\bbl@nonfrenchspacing\nonfrenchspacing + \fi} +\let\bbl@nonfrenchspacing\nonfrenchspacing +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \subsection{Support for extending macros} +% +% \begin{macro}{\addto} +% For each language four control sequences have to be defined that +% control the language-specific definitions. To be able to add +% something to these macro once they have been defined the macro +% |\addto| is introduced. It takes two arguments, a \meta{control +% sequence} and \TeX-code to be added to the \meta{control +% sequence}. +% +% If the \meta{control sequence} has not been defined before it is +% defined now. +% \changes{babel~3.1}{1991/11/05}{Added macro} +% \changes{babel~3.4}{1994/02/04}{Changed to use toks register} +% \changes{babel~3.6b}{1996/12/30}{Also check if control sequence +% expands to \cs{relax}} +% \begin{macrocode} +\def\addto#1#2{% + \ifx#1\@undefined + \def#1{#2}% + \else +% \end{macrocode} +% The control sequence could also expand to |\relax|, in which case +% a circular definition results. The net result is a stack overflow. +% \begin{macrocode} + \ifx#1\relax + \def#1{#2}% + \else +% \end{macrocode} +% Otherwise the replacement text for the \meta{control sequence} is +% expanded and stored in a token register, together with the +% \TeX-code to be added. Finally the \meta{control sequence} is +% \emph{re}defined, using the contents of the token register. +% \begin{macrocode} + {\toks@\expandafter{#1#2}% + \xdef#1{\the\toks@}}% + \fi + \fi +} +% \end{macrocode} +% \end{macro} +% +% \subsection{Macros common to a number of languages} +% +% \begin{macro}{\allowhyphens} +% \changes{babel~3.2b}{1992/02/16}{Moved macro from language +% definition files} +% \changes{babel~3.7a}{1998/03/12}{Make \cs{allowhyphens} a no-op for +% T1 fontencoding} +% This macro makes hyphenation possible. Basically its definition +% is nothing more than |\nobreak| |\hskip| \texttt{0pt plus +% 0pt}\footnote{\TeX\ begins and ends a word for hyphenation at a +% glue node. The penalty prevents a linebreak at this glue node.}. +% \begin{macrocode} +\def\bbl@t@one{T1} +\def\allowhyphens{% + \ifx\cf@encoding\bbl@t@one\else\bbl@allowhyphens\fi} +\def\bbl@allowhyphens{\nobreak\hskip\z@skip} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\set@low@box} +% \changes{babel~3.2b}{1992/02/16}{Moved macro from language +% definition files} +% The following macro is used to lower quotes to the same level as +% the comma. It prepares its argument in box register~0. +% \begin{macrocode} +\def\set@low@box#1{\setbox\tw@\hbox{,}\setbox\z@\hbox{#1}% + \dimen\z@\ht\z@ \advance\dimen\z@ -\ht\tw@% + \setbox\z@\hbox{\lower\dimen\z@ \box\z@}\ht\z@\ht\tw@ \dp\z@\dp\tw@} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\save@sf@q} +% \changes{babel~3.2b}{1992/02/16}{Moved macro from language +% definition files} +% The macro |\save@sf@q| is used to save and reset the current +% space factor. +% \changes{babel~3.7f}{2000/09/19}{PR3119, don't start a paragraph in +% a local group} +% \begin{macrocode} +\def\save@sf@q #1{\leavevmode + \begingroup + \edef\@SF{\spacefactor \the\spacefactor}#1\@SF + \endgroup +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\bbl@disc} +% \changes{babel~3.5f}{1996/01/24}{Macro moved from language +% definition files} +% For some languages the macro |\bbl@disc| is used to ease the +% insertion of discretionaries for letters that behave `abnormally' +% at a breakpoint. +% \begin{macrocode} +\def\bbl@disc#1#2{% + \nobreak\discretionary{#2-}{}{#1}\allowhyphens} +% \end{macrocode} +% \end{macro} +% +% \changes{babel~3.5c}{1995/06/14}{Repaired a typo (itlaic, PR1652)} +% +% \subsection{Making glyphs available} +% +% The file \file{\filename}\footnote{The file described in this +% section has version number \fileversion, and was last revised on +% \filedate.} makes a number of glyphs available that either do not +% exist in the \texttt{OT1} encoding and have to be `faked', or +% that are not accessible through \file{T1enc.def}. +% +% \subsection{Quotation marks} +% +% \begin{macro}{\quotedblbase} +% In the \texttt{T1} encoding the opening double quote at the +% baseline is available as a separate character, accessible via +% |\quotedblbase|. In the \texttt{OT1} encoding it is not +% available, therefor we make it available by lowering the normal +% open quote character to the baseline. +% \begin{macrocode} +\ProvideTextCommand{\quotedblbase}{OT1}{% + \save@sf@q{\set@low@box{\textquotedblright\/}% + \box\z@\kern-.04em\allowhyphens}} +% \end{macrocode} +% Make sure that when an encoding other than \texttt{OT1} or +% \texttt{T1} is used this glyph can still be typeset. +% \begin{macrocode} +\ProvideTextCommandDefault{\quotedblbase}{% + \UseTextSymbol{OT1}{\quotedblbase}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\quotesinglbase} +% We also need the single quote character at the baseline. +% \begin{macrocode} +\ProvideTextCommand{\quotesinglbase}{OT1}{% + \save@sf@q{\set@low@box{\textquoteright\/}% + \box\z@\kern-.04em\allowhyphens}} +% \end{macrocode} +% Make sure that when an encoding other than \texttt{OT1} or +% \texttt{T1} is used this glyph can still be typeset. +% \begin{macrocode} +\ProvideTextCommandDefault{\quotesinglbase}{% + \UseTextSymbol{OT1}{\quotesinglbase}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\guillemotleft} +% \begin{macro}{\guillemotright} +% The guillemet characters are not available in \texttt{OT1} +% encoding. They are faked. +% \begin{macrocode} +\ProvideTextCommand{\guillemotleft}{OT1}{% + \ifmmode + \ll + \else + \save@sf@q{\nobreak + \raise.2ex\hbox{$\scriptscriptstyle\ll$}\allowhyphens}% + \fi} +\ProvideTextCommand{\guillemotright}{OT1}{% + \ifmmode + \gg + \else + \save@sf@q{\nobreak + \raise.2ex\hbox{$\scriptscriptstyle\gg$}\allowhyphens}% + \fi} +% \end{macrocode} +% Make sure that when an encoding other than \texttt{OT1} or +% \texttt{T1} is used these glyphs can still be typeset. +% \begin{macrocode} +\ProvideTextCommandDefault{\guillemotleft}{% + \UseTextSymbol{OT1}{\guillemotleft}} +\ProvideTextCommandDefault{\guillemotright}{% + \UseTextSymbol{OT1}{\guillemotright}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\guilsinglleft} +% \begin{macro}{\guilsinglright} +% The single guillemets are not available in \texttt{OT1} +% encoding. They are faked. +% \begin{macrocode} +\ProvideTextCommand{\guilsinglleft}{OT1}{% + \ifmmode + <% + \else + \save@sf@q{\nobreak + \raise.2ex\hbox{$\scriptscriptstyle<$}\allowhyphens}% + \fi} +\ProvideTextCommand{\guilsinglright}{OT1}{% + \ifmmode + >% + \else + \save@sf@q{\nobreak + \raise.2ex\hbox{$\scriptscriptstyle>$}\allowhyphens}% + \fi} +% \end{macrocode} +% Make sure that when an encoding other than \texttt{OT1} or +% \texttt{T1} is used these glyphs can still be typeset. +% \begin{macrocode} +\ProvideTextCommandDefault{\guilsinglleft}{% + \UseTextSymbol{OT1}{\guilsinglleft}} +\ProvideTextCommandDefault{\guilsinglright}{% + \UseTextSymbol{OT1}{\guilsinglright}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% +% \subsection{Letters} +% +% \begin{macro}{\ij} +% \begin{macro}{\IJ} +% The dutch language uses the letter `ij'. It is available in +% \texttt{T1} encoded fonts, but not in the \texttt{OT1} encoded +% fonts. Therefor we fake it for the \texttt{OT1} encoding. +% \changes{dutch-3.7a}{1995/02/04}{Changed the kerning in the faked ij +% to match the dc-version of it} +% \begin{macrocode} +\DeclareTextCommand{\ij}{OT1}{% + \allowhyphens i\kern-0.02em j\allowhyphens} +\DeclareTextCommand{\IJ}{OT1}{% + \allowhyphens I\kern-0.02em J\allowhyphens} +\DeclareTextCommand{\ij}{T1}{\char188} +\DeclareTextCommand{\IJ}{T1}{\char156} +% \end{macrocode} +% Make sure that when an encoding other than \texttt{OT1} or +% \texttt{T1} is used these glyphs can still be typeset. +% \begin{macrocode} +\ProvideTextCommandDefault{\ij}{% + \UseTextSymbol{OT1}{\ij}} +\ProvideTextCommandDefault{\IJ}{% + \UseTextSymbol{OT1}{\IJ}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\dj} +% \begin{macro}{\DJ} +% The croatian language needs the letters |\dj| and |\DJ|; they are +% available in the \texttt{T1} encoding, but not in the +% \texttt{OT1} encoding by default. +% +% Some code to construct these glyphs for the \texttt{OT1} encoding +% was made available to me by Stipcevic Mario, +% (\texttt{stipcevic@olimp.irb.hr}). +% \changes{babel~3.5f}{1996/03/28}{New definition of \cs{dj}, see PR +% 2058} +% \begin{macrocode} +\def\crrtic@{\hrule height0.1ex width0.3em} +\def\crttic@{\hrule height0.1ex width0.33em} +% +\def\ddj@{% + \setbox0\hbox{d}\dimen@=\ht0 + \advance\dimen@1ex + \dimen@.45\dimen@ + \dimen@ii\expandafter\rem@pt\the\fontdimen\@ne\font\dimen@ + \advance\dimen@ii.5ex + \leavevmode\rlap{\raise\dimen@\hbox{\kern\dimen@ii\vbox{\crrtic@}}}} +\def\DDJ@{% + \setbox0\hbox{D}\dimen@=.55\ht0 + \dimen@ii\expandafter\rem@pt\the\fontdimen\@ne\font\dimen@ + \advance\dimen@ii.15ex % correction for the dash position + \advance\dimen@ii-.15\fontdimen7\font % correction for cmtt font + \dimen\thr@@\expandafter\rem@pt\the\fontdimen7\font\dimen@ + \leavevmode\rlap{\raise\dimen@\hbox{\kern\dimen@ii\vbox{\crttic@}}}} +% +\DeclareTextCommand{\dj}{OT1}{\ddj@ d} +\DeclareTextCommand{\DJ}{OT1}{\DDJ@ D} +% \end{macrocode} +% Make sure that when an encoding other than \texttt{OT1} or +% \texttt{T1} is used these glyphs can still be typeset. +% \begin{macrocode} +\ProvideTextCommandDefault{\dj}{% + \UseTextSymbol{OT1}{\dj}} +\ProvideTextCommandDefault{\DJ}{% + \UseTextSymbol{OT1}{\DJ}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\SS} +% For the \texttt{T1} encoding |\SS| is defined and selects a +% specific glyph from the font, but for other encodings it is not +% available. Therefor we make it available here. +% \begin{macrocode} +\DeclareTextCommand{\SS}{OT1}{SS} +\ProvideTextCommandDefault{\SS}{\UseTextSymbol{OT1}{\SS}} +% \end{macrocode} +% \end{macro} +% +% \subsection{Shorthands for quotation marks} +% +% Shorthands are provided for a number of different quotation +% marks, which make them usable both outside and inside mathmode. +% +% \begin{macro}{\glq} +% \begin{macro}{\grq} +% \changes{babel~3.7a}{1997/04/25}{Make the definition of \cs{grq} +% dependent on the font encoding} +% \changes{babel~3.8b}{2004/05/02}{Made \cs{glq} fontencoding +% dependent as well} +% The `german' single quotes. +% \begin{macrocode} +\ProvideTextCommand{\glq}{OT1}{% + \textormath{\quotesinglbase}{\mbox{\quotesinglbase}}} +\ProvideTextCommand{\glq}{T1}{% + \textormath{\quotesinglbase}{\mbox{\quotesinglbase}}} +\ProvideTextCommandDefault{\glq}{\UseTextSymbol{OT1}\glq} +% \end{macrocode} +% The definition of |\grq| depends on the fontencoding. With +% \texttt{T1} encoding no extra kerning is needed. +% \begin{macrocode} +\ProvideTextCommand{\grq}{T1}{% + \textormath{\textquoteleft}{\mbox{\textquoteleft}}} +\ProvideTextCommand{\grq}{OT1}{% + \save@sf@q{\kern-.0125em% + \textormath{\textquoteleft}{\mbox{\textquoteleft}}% + \kern.07em\relax}} +\ProvideTextCommandDefault{\grq}{\UseTextSymbol{OT1}\grq} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\glqq} +% \begin{macro}{\grqq} +% \changes{babel~3.7a}{1997/04/25}{Make the definition of \cs{grqq} +% dependent on the font encoding} +% \changes{babel~3.8b}{2004/05/02}{Made \cs{grqq} fontencoding +% dependent as well} +% The `german' double quotes. +% \begin{macrocode} +\ProvideTextCommand{\glqq}{OT1}{% + \textormath{\quotedblbase}{\mbox{\quotedblbase}}} +\ProvideTextCommand{\glqq}{T1}{% + \textormath{\quotedblbase}{\mbox{\quotedblbase}}} +\ProvideTextCommandDefault{\glqq}{\UseTextSymbol{OT1}\glqq} +% \end{macrocode} +% The definition of |\grqq| depends on the fontencoding. With +% \texttt{T1} encoding no extra kerning is needed. +% \begin{macrocode} +\ProvideTextCommand{\grqq}{T1}{% + \textormath{\textquotedblleft}{\mbox{\textquotedblleft}}} +\ProvideTextCommand{\grqq}{OT1}{% + \save@sf@q{\kern-.07em% + \textormath{\textquotedblleft}{\mbox{\textquotedblleft}}% + \kern.07em\relax}} +\ProvideTextCommandDefault{\grqq}{\UseTextSymbol{OT1}\grqq} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\flq} +% \begin{macro}{\frq} +% \changes{babel~3.5f}{1995/08/07}{corrected spelling of +% \cs{quilsingl...}} +% \changes{babel~3.5f}{1995/09/05}{now use \cs{textormath} in these +% definitions} +% \changes{babel~3.8b}{2004/05/02}{Made \cs{flq} and \cs{frq} +% fontencoding dependent} +% The `french' single guillemets. +% \begin{macrocode} +\ProvideTextCommand{\flq}{OT1}{% + \textormath{\guilsinglleft}{\mbox{\guilsinglleft}}} +\ProvideTextCommand{\flq}{T1}{% + \textormath{\guilsinglleft}{\mbox{\guilsinglleft}}} +\ProvideTextCommandDefault{\flq}{\UseTextSymbol{OT1}\flq} +% \end{macrocode} +% +% \begin{macrocode} +\ProvideTextCommand{\frq}{OT1}{% + \textormath{\guilsinglright}{\mbox{\guilsinglright}}} +\ProvideTextCommand{\frq}{T1}{% + \textormath{\guilsinglright}{\mbox{\guilsinglright}}} +\ProvideTextCommandDefault{\frq}{\UseTextSymbol{OT1}\frq} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\flqq} +% \begin{macro}{\frqq} +% \changes{babel~3.5f}{1995/08/07}{corrected spelling of +% \cs{quillemot...}} +% \changes{babel~3.5f}{1995/09/05}{now use \cs{textormath} in these +% definitions} +% \changes{babel~3.8b}{2004/05/02}{Made \cs{flqq} and \cs{frqq} +% fontencoding dependent} +% The `french' double guillemets. +% \begin{macrocode} +\ProvideTextCommand{\flqq}{OT1}{% + \textormath{\guillemotleft}{\mbox{\guillemotleft}}} +\ProvideTextCommand{\flqq}{T1}{% + \textormath{\guillemotleft}{\mbox{\guillemotleft}}} +\ProvideTextCommandDefault{\flqq}{\UseTextSymbol{OT1}\flqq} +% \end{macrocode} +% +% \begin{macrocode} +\ProvideTextCommand{\frqq}{OT1}{% + \textormath{\guillemotright}{\mbox{\guillemotright}}} +\ProvideTextCommand{\frqq}{T1}{% + \textormath{\guillemotright}{\mbox{\guillemotright}}} +\ProvideTextCommandDefault{\frqq}{\UseTextSymbol{OT1}\frqq} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \subsection{Umlauts and trema's} +% +% The command |\"| needs to have a different effect for different +% languages. For German for instance, the `umlaut' should be +% positioned lower than the default position for placing it over +% the letters a, o, u, A, O and U. When placed over an e, i, E or I +% it can retain its normal position. For Dutch the same glyph is +% always placed in the lower position. +% +% \begin{macro}{\umlauthigh} +% \changes{v3.8a}{2004/02/19}{Use \cs{leavevmode}\cs{bgroup} to +% prevent problems when this command occurs in vertical mode.} +% \begin{macro}{\umlautlow} +% To be able to provide both positions of |\"| we provide two +% commands to switch the positioning, the default will be +% |\umlauthigh| (the normal positioning). +% \begin{macrocode} +\def\umlauthigh{% + \def\bbl@umlauta##1{\leavevmode\bgroup% + \expandafter\accent\csname\f@encoding dqpos\endcsname + ##1\allowhyphens\egroup}% + \let\bbl@umlaute\bbl@umlauta} +\def\umlautlow{% + \def\bbl@umlauta{\protect\lower@umlaut}} +\def\umlautelow{% + \def\bbl@umlaute{\protect\lower@umlaut}} +\umlauthigh +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\lower@umlaut} +% The command |\lower@umlaut| is used to position the |\"| closer +% the the letter. +% +% We want the umlaut character lowered, nearer to the letter. To do +% this we need an extra \meta{dimen} register. +% \begin{macrocode} +\expandafter\ifx\csname U@D\endcsname\relax + \csname newdimen\endcsname\U@D +\fi +% \end{macrocode} +% The following code fools \TeX's \texttt{make\_accent} procedure +% about the current x-height of the font to force another placement +% of the umlaut character. +% \begin{macrocode} +\def\lower@umlaut#1{% +% \end{macrocode} +% First we have to save the current x-height of the font, because +% we'll change this font dimension and this is always done +% globally. +% \changes{v3.8a}{2004/02/19}{Use \cs{leavevmode}\cs{bgroup} to +% prevent problems when this command occurs in vertical mode.} +% \begin{macrocode} + \leavevmode\bgroup + \U@D 1ex% +% \end{macrocode} +% Then we compute the new x-height in such a way that the umlaut +% character is lowered to the base character. The value of +% \texttt{.45ex} depends on the \MF\ parameters with which the +% fonts were built. (Just try out, which value will look best.) +% \begin{macrocode} + {\setbox\z@\hbox{% + \expandafter\char\csname\f@encoding dqpos\endcsname}% + \dimen@ -.45ex\advance\dimen@\ht\z@ +% \end{macrocode} +% If the new x-height is too low, it is not changed. +% \begin{macrocode} + \ifdim 1ex<\dimen@ \fontdimen5\font\dimen@ \fi}% +% \end{macrocode} +% Finally we call the |\accent| primitive, reset the old x-height +% and insert the base character in the argument. +% \changes{babel~3.5f}{1996/04/02}{Added a \cs{allowhyphens}} +% \changes{babel~3.5f}{1996/06/25}{removed \cs{allowhyphens}} +% \begin{macrocode} + \expandafter\accent\csname\f@encoding dqpos\endcsname + \fontdimen5\font\U@D #1% + \egroup} +% \end{macrocode} +% \end{macro} +% +% For all vowels we declare |\"| to be a composite command which +% uses |\bbl@umlauta| or |\bbl@umlaute| to position the umlaut +% character. We need to be sure that these definitions override the +% ones that are provided when the package \pkg{fontenc} with +% option \Lopt{OT1} is used. Therefor these declarations are +% postponed until the beginning of the document. +% \begin{macrocode} +\AtBeginDocument{% + \DeclareTextCompositeCommand{\"}{OT1}{a}{\bbl@umlauta{a}}% + \DeclareTextCompositeCommand{\"}{OT1}{e}{\bbl@umlaute{e}}% + \DeclareTextCompositeCommand{\"}{OT1}{i}{\bbl@umlaute{\i}}% + \DeclareTextCompositeCommand{\"}{OT1}{\i}{\bbl@umlaute{\i}}% + \DeclareTextCompositeCommand{\"}{OT1}{o}{\bbl@umlauta{o}}% + \DeclareTextCompositeCommand{\"}{OT1}{u}{\bbl@umlauta{u}}% + \DeclareTextCompositeCommand{\"}{OT1}{A}{\bbl@umlauta{A}}% + \DeclareTextCompositeCommand{\"}{OT1}{E}{\bbl@umlaute{E}}% + \DeclareTextCompositeCommand{\"}{OT1}{I}{\bbl@umlaute{I}}% + \DeclareTextCompositeCommand{\"}{OT1}{O}{\bbl@umlauta{O}}% + \DeclareTextCompositeCommand{\"}{OT1}{U}{\bbl@umlauta{U}}% +} +% \end{macrocode} +% +% \subsection{The redefinition of the style commands} +% +% The rest of the code in this file can only be processed by +% \LaTeX, so we check the current format. If it is plain \TeX, +% processing should stop here. But, because of the need to limit +% the scope of the definition of |\format|, a macro that is used +% locally in the following |\if|~statement, this comparison is done +% inside a group. To prevent \TeX\ from complaining about an +% unclosed group, the processing of the command |\endinput| is +% deferred until after the group is closed. This is accomplished by +% the command |\aftergroup|. +% \begin{macrocode} +{\def\format{lplain} +\ifx\fmtname\format +\else + \def\format{LaTeX2e} + \ifx\fmtname\format + \else + \aftergroup\endinput + \fi +\fi} +% \end{macrocode} +% +% Now that we're sure that the code is seen by \LaTeX\ only, we +% have to find out what the main (primary) document style is +% because we want to redefine some macros. This is only necessary +% for releases of \LaTeX\ dated before December~1991. Therefor +% this part of the code can optionally be included in +% \file{babel.def} by specifying the \texttt{docstrip} option +% \texttt{names}. +% \begin{macrocode} +%<*names> +% \end{macrocode} +% +% The standard styles can be distinguished by checking whether some +% macros are defined. In table~\ref{styles} an overview is given of +% the macros that can be used for this purpose. +% \begin{table}[htb] +% \begin{center} +% \DeleteShortVerb{\|} +% \begin{tabular}{|lcp{8cm}|} +% \hline +% article & : & both the \verb+\chapter+ and \verb+\opening+ +% macros are undefined\\ +% report and book & : & the \verb+\chapter+ macro is defined and +% the \verb+\opening+ is undefined\\ +% letter & : & the \verb+\chapter+ macro is undefined and +% the \verb+\opening+ is defined\\ +% \hline +% \end{tabular} +% \caption{How to determine the main document style}\label{styles} +% \MakeShortVerb{\|} +% \end{center} +% \end{table} +% +% \noindent The macros that have to be redefined for the +% \texttt{report} and \texttt{book} document styles happen to be +% the same, so there is no need to distinguish between those two +% styles. +% +% \begin{macro}{\doc@style} +% First a parameter |\doc@style| is defined to identify the current +% document style. This parameter might have been defined by a +% document style that already uses macros instead of hard-wired +% texts, such as \file{artikel1.sty}~\cite{BEP}, so the existence of +% |\doc@style| is checked. If this macro is undefined, i.\,e., if +% the document style is unknown and could therefore contain +% hard-wired texts, |\doc@style| is defined to the default +% value~`0'. +% \changes{babel~3.0d}{1991/10/29}{Removed use of \cs{@ifundefined}} +% \begin{macrocode} +\ifx\@undefined\doc@style + \def\doc@style{0}% +% \end{macrocode} +% This parameter is defined in the following \texttt{if} +% construction (see table~\ref{styles}): +% +% \begin{macrocode} + \ifx\@undefined\opening + \ifx\@undefined\chapter + \def\doc@style{1}% + \else + \def\doc@style{2}% + \fi + \else + \def\doc@style{3}% + \fi% +\fi% +% \end{macrocode} +% \end{macro} +% +% \changes{babel~3.1}{1991/11/05}{Removed definition of +% \cs{if@restonecol}} +% +% \subsubsection{Redefinition of macros} +% +% Now here comes the real work: we start to redefine things and +% replace hard-wired texts by macros. These redefinitions should be +% carried out conditionally, in case it has already been done. +% +% For the \texttt{figure} and \texttt{table} environments we have +% in all styles: +% \begin{macrocode} +\@ifundefined{figurename}{\def\fnum@figure{\figurename{} \thefigure}}{} +\@ifundefined{tablename}{\def\fnum@table{\tablename{} \thetable}}{} +% \end{macrocode} +% +% The rest of the macros have to be treated differently for each +% style. When |\doc@style| still has its default value nothing +% needs to be done. +% \begin{macrocode} +\ifcase \doc@style\relax +\or +% \end{macrocode} +% +% This means that \file{babel.def} is read after the +% \texttt{article} style, where no |\chapter| and |\opening| +% commands are defined\footnote{A fact that was pointed out to me +% by Nico Poppelier and was already used in Piet van Oostrum's +% document style option~\texttt{nl}.}. +% +% First we have the |\tableofcontents|, +% |\listoffigures| and |\listoftables|: +% \begin{macrocode} +\@ifundefined{contentsname}% + {\def\tableofcontents{\section*{\contentsname\@mkboth + {\uppercase{\contentsname}}{\uppercase{\contentsname}}}% + \@starttoc{toc}}}{} + +\@ifundefined{listfigurename}% + {\def\listoffigures{\section*{\listfigurename\@mkboth + {\uppercase{\listfigurename}}{\uppercase{\listfigurename}}}% + \@starttoc{lof}}}{} + +\@ifundefined{listtablename}% + {\def\listoftables{\section*{\listtablename\@mkboth + {\uppercase{\listtablename}}{\uppercase{\listtablename}}}% + \@starttoc{lot}}}{} +% \end{macrocode} +% +% Then the |\thebibliography| and |\theindex| environments. +% +% \begin{macrocode} +\@ifundefined{refname}% + {\def\thebibliography#1{\section*{\refname + \@mkboth{\uppercase{\refname}}{\uppercase{\refname}}}% + \list{[\arabic{enumi}]}{\settowidth\labelwidth{[#1]}% + \leftmargin\labelwidth + \advance\leftmargin\labelsep + \usecounter{enumi}}% + \def\newblock{\hskip.11em plus.33em minus.07em}% + \sloppy\clubpenalty4000\widowpenalty\clubpenalty + \sfcode`\.=1000\relax}}{} + +\@ifundefined{indexname}% + {\def\theindex{\@restonecoltrue\if@twocolumn\@restonecolfalse\fi + \columnseprule \z@ + \columnsep 35pt\twocolumn[\section*{\indexname}]% + \@mkboth{\uppercase{\indexname}}{\uppercase{\indexname}}% + \thispagestyle{plain}% + \parskip\z@ plus.3pt\parindent\z@\let\item\@idxitem}}{} +% \end{macrocode} +% +% The |abstract| environment: +% +% \begin{macrocode} +\@ifundefined{abstractname}% + {\def\abstract{\if@twocolumn + \section*{\abstractname}% + \else \small + \begin{center}% + {\bf \abstractname\vspace{-.5em}\vspace{\z@}}% + \end{center}% + \quotation + \fi}}{} +% \end{macrocode} +% +% And last but not least, the macro |\part|: +% +% \begin{macrocode} +\@ifundefined{partname}% +{\def\@part[#1]#2{\ifnum \c@secnumdepth >\m@ne + \refstepcounter{part}% + \addcontentsline{toc}{part}{\thepart + \hspace{1em}#1}\else + \addcontentsline{toc}{part}{#1}\fi + {\parindent\z@ \raggedright + \ifnum \c@secnumdepth >\m@ne + \Large \bf \partname{} \thepart + \par \nobreak + \fi + \huge \bf + #2\markboth{}{}\par}% + \nobreak + \vskip 3ex\@afterheading}% +}{} +% \end{macrocode} +% +% This is all that needs to be done for the \texttt{article} style. +% +% \begin{macrocode} +\or +% \end{macrocode} +% +% The next case is formed by the two styles \texttt{book} and +% \texttt{report}. Basically we have to do the same as for the +% \texttt{article} style, except now we must also change the +% |\chapter| command. +% +% The tables of contents, figures and tables: +% \begin{macrocode} +\@ifundefined{contentsname}% + {\def\tableofcontents{\@restonecolfalse + \if@twocolumn\@restonecoltrue\onecolumn + \fi\chapter*{\contentsname\@mkboth + {\uppercase{\contentsname}}{\uppercase{\contentsname}}}% + \@starttoc{toc}% + \csname if@restonecol\endcsname\twocolumn + \csname fi\endcsname}}{} + +\@ifundefined{listfigurename}% + {\def\listoffigures{\@restonecolfalse + \if@twocolumn\@restonecoltrue\onecolumn + \fi\chapter*{\listfigurename\@mkboth + {\uppercase{\listfigurename}}{\uppercase{\listfigurename}}}% + \@starttoc{lof}% + \csname if@restonecol\endcsname\twocolumn + \csname fi\endcsname}}{} + +\@ifundefined{listtablename}% + {\def\listoftables{\@restonecolfalse + \if@twocolumn\@restonecoltrue\onecolumn + \fi\chapter*{\listtablename\@mkboth + {\uppercase{\listtablename}}{\uppercase{\listtablename}}}% + \@starttoc{lot}% + \csname if@restonecol\endcsname\twocolumn + \csname fi\endcsname}}{} +% \end{macrocode} +% +% Again, the |bibliography| and |index| environments; notice that +% in this case we use |\bibname| instead of |\refname| as in the +% definitions for the \texttt{article} style. The reason for this +% is that in the \texttt{article} document style the term +% `References' is used in the definition of |\thebibliography|. In +% the \texttt{report} and \texttt{book} document styles the term +% `Bibliography' is used. +% \begin{macrocode} +\@ifundefined{bibname}% + {\def\thebibliography#1{\chapter*{\bibname + \@mkboth{\uppercase{\bibname}}{\uppercase{\bibname}}}% + \list{[\arabic{enumi}]}{\settowidth\labelwidth{[#1]}% + \leftmargin\labelwidth \advance\leftmargin\labelsep + \usecounter{enumi}}% + \def\newblock{\hskip.11em plus.33em minus.07em}% + \sloppy\clubpenalty4000\widowpenalty\clubpenalty + \sfcode`\.=1000\relax}}{} + +\@ifundefined{indexname}% + {\def\theindex{\@restonecoltrue\if@twocolumn\@restonecolfalse\fi + \columnseprule \z@ + \columnsep 35pt\twocolumn[\@makeschapterhead{\indexname}]% + \@mkboth{\uppercase{\indexname}}{\uppercase{\indexname}}% + \thispagestyle{plain}% + \parskip\z@ plus.3pt\parindent\z@ \let\item\@idxitem}}{} +% \end{macrocode} +% +% Here is the |abstract| environment: +% \begin{macrocode} +\@ifundefined{abstractname}% + {\def\abstract{\titlepage + \null\vfil + \begin{center}% + {\bf \abstractname}% + \end{center}}}{} +% \end{macrocode} +% +% And last but not least the |\chapter|, |\appendix| and +% |\part| macros. +% \begin{macrocode} +\@ifundefined{chaptername}{\def\@chapapp{\chaptername}}{} +% +\@ifundefined{appendixname}% + {\def\appendix{\par + \setcounter{chapter}{0}% + \setcounter{section}{0}% + \def\@chapapp{\appendixname}% + \def\thechapter{\Alph{chapter}}}}{} +% +\@ifundefined{partname}% + {\def\@part[#1]#2{\ifnum \c@secnumdepth >-2\relax + \refstepcounter{part}% + \addcontentsline{toc}{part}{\thepart + \hspace{1em}#1}\else + \addcontentsline{toc}{part}{#1}\fi + \markboth{}{}% + {\centering + \ifnum \c@secnumdepth >-2\relax + \huge\bf \partname{} \thepart + \par + \vskip 20pt \fi + \Huge \bf + #1\par}\@endpart}}{}% +% \end{macrocode} +% +% \begin{macrocode} +\or +% \end{macrocode} +% +% Now we address the case where \file{babel.def} is read after the +% \texttt{letter} style. The \texttt{letter} document style +% defines the macro |\opening| and some other macros that are +% specific to \texttt{letter}. This means that we have to redefine +% other macros, compared to the previous two cases. +% +% First two macros for the material at the end of a letter, the +% |\cc| and |\encl| macros. +% \begin{macrocode} +\@ifundefined{ccname}% + {\def\cc#1{\par\noindent + \parbox[t]{\textwidth}% + {\@hangfrom{\rm \ccname : }\ignorespaces #1\strut}\par}}{} + +\@ifundefined{enclname}% + {\def\encl#1{\par\noindent + \parbox[t]{\textwidth}% + {\@hangfrom{\rm \enclname : }\ignorespaces #1\strut}\par}}{} +% \end{macrocode} +% +% The last thing we have to do here is to redefine the +% \texttt{headings} pagestyle: +% \changes{babel~3.3}{1993/07/11}{\cs{headpagename} should be +% \cs{pagename}} +% \begin{macrocode} +\@ifundefined{headtoname}% + {\def\ps@headings{% + \def\@oddhead{\sl \headtoname{} \ignorespaces\toname \hfil + \@date \hfil \pagename{} \thepage}% + \def\@oddfoot{}}}{} +% \end{macrocode} +% +% This was the last of the four standard document styles, so if +% |\doc@style| has another value we do nothing and just close the +% \texttt{if} construction. +% \begin{macrocode} +\fi +% \end{macrocode} +% Here ends the code that can be optionally included when a version +% of \LaTeX\ is in use that is dated \emph{before} December~1991. +% \begin{macrocode} +% +% +% \end{macrocode} +% +% \subsection{Cross referencing macros} +% +% The \LaTeX\ book states: +% \begin{quote} +% The \emph{key} argument is any sequence of letters, digits, and +% punctuation symbols; upper- and lowercase letters are regarded as +% different. +% \end{quote} +% When the above quote should still be true when a document is +% typeset in a language that has active characters, special care +% has to be taken of the category codes of these characters when +% they appear in an argument of the cross referencing macros. +% +% When a cross referencing command processes its argument, all +% tokens in this argument should be character tokens with category +% `letter' or `other'. +% +% The only way to accomplish this in most cases is to use the trick +% described in the \TeX book~\cite{DEK} (Appendix~D, page~382). +% The primitive |\meaning| applied to a token expands to the +% current meaning of this token. For example, `|\meaning\A|' with +% |\A| defined as `|\def\A#1{\B}|' expands to the characters +% `|macro:#1->\B|' with all category codes set to `other' or +% `space'. +% +% \begin{macro}{\bbl@redefine} +% \changes{babel~3.5f}{1995/11/15}{Macro added} +% To redefine a command, we save the old meaning of the macro. +% Then we redefine it to call the original macro with the +% `sanitized' argument. The reason why we do it this way is that +% we don't want to redefine the \LaTeX\ macros completely in case +% their definitions change (they have changed in the past). +% +% Because we need to redefine a number of commands we define the +% command |\bbl@redefine| which takes care of this. It creates a +% new control sequence, |\org@...| +% \begin{macrocode} +%<*core|shorthands> +\def\bbl@redefine#1{% + \edef\bbl@tempa{\expandafter\@gobble\string#1}% + \expandafter\let\csname org@\bbl@tempa\endcsname#1 + \expandafter\def\csname\bbl@tempa\endcsname} +% \end{macrocode} +% +% This command should only be used in the preamble of the document. +% \begin{macrocode} +\@onlypreamble\bbl@redefine +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\bbl@redefine@long} +% \changes{babel~3.6f}{1997/01/14}{Macro added} +% This version of |\babel@redefine| can be used to redefine |\long| +% commands such as |\ifthenelse|. +% \begin{macrocode} +\def\bbl@redefine@long#1{% + \edef\bbl@tempa{\expandafter\@gobble\string#1}% + \expandafter\let\csname org@\bbl@tempa\endcsname#1 + \expandafter\long\expandafter\def\csname\bbl@tempa\endcsname} +\@onlypreamble\bbl@redefine@long +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\bbl@redefinerobust} +% \changes{babel~3.5f}{1995/11/15}{Macro added} +% For commands that are redefined, but which \textit{might} be +% robust we need a slightly more intelligent macro. A robust +% command |foo| is defined to expand to |\protect|\verb*|\foo |. So +% it is necessary to check whether \verb*|\foo | exists. +% \begin{macrocode} +\def\bbl@redefinerobust#1{% + \edef\bbl@tempa{\expandafter\@gobble\string#1}% + \expandafter\ifx\csname \bbl@tempa\space\endcsname\relax + \expandafter\let\csname org@\bbl@tempa\endcsname#1 + \expandafter\edef\csname\bbl@tempa\endcsname{\noexpand\protect + \expandafter\noexpand\csname\bbl@tempa\space\endcsname}% + \else + \expandafter\let\csname org@\bbl@tempa\expandafter\endcsname + \csname\bbl@tempa\space\endcsname + \fi +% \end{macrocode} +% The result of the code above is that the command that is being +% redefined is always robust afterwards. Therefor all we need to do +% now is define \verb*|\foo |. +% \changes{babel~3.5f}{1996/04/09}{Define \cs*{foo } instead of +% \cs{foo}} +% \begin{macrocode} + \expandafter\def\csname\bbl@tempa\space\endcsname} +% \end{macrocode} +% +% This command should only be used in the preamble of the document. +% \begin{macrocode} +\@onlypreamble\bbl@redefinerobust +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\newlabel} +% \changes{babel~3.5f}{1995/11/15}{Now use \cs{bbl@redefine}} +% The macro |\label| writes a line with a |\newlabel| command +% into the |.aux| file to define labels. +% \begin{macrocode} +%\bbl@redefine\newlabel#1#2{% +% \@safe@activestrue\org@newlabel{#1}{#2}\@safe@activesfalse} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@newl@bel} +% \changes{babel~3.6i}{1997/03/01}{Now redefine \cs{@newl@bel} instead +% of \cs{@lbibitem} and \cs{newlabel}} +% We need to change the definition of the \LaTeX-internal macro +% |\@newl@bel|. This is needed because we need to make sure that +% shorthand characters expand to their non-active version. +% +%^^A The following lines commented out in preparation for a change +%^^A in the LaTeX definition of \@enwl@bel... JLB 2000/10/01 +%^^A +%^^A To play it safe when redefining a \LaTeX-internal command we +%^^A first check whether its definition didn't change. +%^^A \begin{macrocode} +%^^A\CheckCommand*\@newl@bel[3]{% +%^^A \@ifundefined{#1@#2}% +%^^A \relax +%^^A {\gdef \@multiplelabels {% +%^^A \@latex@warning@no@line{There were multiply-defined labels}}% +%^^A \@latex@warning@no@line{Label `#2' multiply defined}}% +%^^A \global\@namedef{#1@#2}{#3}} +%^^A \end{macrocode} +%^^A Then we give the new definition. +% \begin{macrocode} +\def\@newl@bel#1#2#3{% +% \end{macrocode} +% First we open a new group to keep the changed setting of +% |\protect| local and then we set the |@safe@actives| switch to +% true to make sure that any shorthand that appears in any of the +% arguments immediately expands to its non-active self. +% \changes{babel~3.7a}{1997/12/19}{Call \cs{@safe@activestrue} +% directly} +% \begin{macrocode} + {% + \@safe@activestrue + \@ifundefined{#1@#2}% + \relax + {% + \gdef \@multiplelabels {% + \@latex@warning@no@line{There were multiply-defined labels}}% + \@latex@warning@no@line{Label `#2' multiply defined}% + }% + \global\@namedef{#1@#2}{#3}% + }% + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@testdef} +% An internal \LaTeX\ macro used to test if the labels that have +% been written on the |.aux| file have changed. It is called by +% the |\enddocument| macro. This macro needs to be completely +% rewritten, using |\meaning|. The reason for this is that in some +% cases the expansion of |\#1@#2| contains the same characters as +% the |#3|; but the character codes differ. Therefor \LaTeX\ keeps +% reporting that the labels may have changed. +% \changes{babel~3.4g}{1994/08/30}{Moved the \cs{def} inside the +% macrocode environment} +% \changes{babel~3.5f}{1995/11/15}{Now use \cs{bbl@redefine}} +% \changes{babel~3.5f}{1996/01/09}{Complete rewrite of this macro as +% the same character ended up with different category codes in the +% labels that are being compared. Now use \cs{meaning}} +% \changes{babel~3.5f}{1996/01/16}{Use \cs{strip@prefix} only on +% \cs{bbl@tempa} when it is not \cs{relax}} +% \changes{babel~3.6i}{1997/02/28}{Make sure that shorthands don't get +% expanded at the wrong moment.} +% \changes{babel~3.6i}{1997/03/01}{\cs{@safe@activesfalse} is now +% part of the label definition} +% \changes{babel~3.7a}{1998/03/13}{Removed \cs{@safe@activesfalse} +% from the label definition} +% \begin{macrocode} +\CheckCommand*\@testdef[3]{% + \def\reserved@a{#3}% + \expandafter \ifx \csname #1@#2\endcsname \reserved@a + \else + \@tempswatrue + \fi} +% \end{macrocode} +% Now that we made sure that |\@testdef| still has the same +% definition we can rewrite it. First we make the shorthands +% `safe'. +% \begin{macrocode} +\def\@testdef #1#2#3{% + \@safe@activestrue +% \end{macrocode} +% Then we use |\bbl@tempa| as an `alias' for the macro that +% contains the label which is being checked. +% \begin{macrocode} + \expandafter\let\expandafter\bbl@tempa\csname #1@#2\endcsname +% \end{macrocode} +% Then we define |\bbl@tempb| just as |\@newl@bel| does it. +% \begin{macrocode} + \def\bbl@tempb{#3}% + \@safe@activesfalse +% \end{macrocode} +% When the label is defined we replace the definition of +% |\bbl@tempa| by its meaning. +% \begin{macrocode} + \ifx\bbl@tempa\relax + \else + \edef\bbl@tempa{\expandafter\strip@prefix\meaning\bbl@tempa}% + \fi +% \end{macrocode} +% We do the same for |\bbl@tempb|. +% \begin{macrocode} + \edef\bbl@tempb{\expandafter\strip@prefix\meaning\bbl@tempb}% +% \end{macrocode} +% If the label didn't change, |\bbl@tempa| and |\bbl@tempb| should +% be identical macros. +% \begin{macrocode} + \ifx \bbl@tempa \bbl@tempb + \else + \@tempswatrue + \fi} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\ref} +% \begin{macro}{\pageref} +% The same holds for the macro |\ref| that references a label +% and |\pageref| to reference a page. So we redefine |\ref| and +% |\pageref|. While we change these macros, we make them robust as +% well (if they weren't already) to prevent problems if they should +% become expanded at the wrong moment. +% \changes{babel~3.5b}{1995/03/07}{Made \cs{ref} and \cs{pageref} +% robust (PR1353)} +% \changes{babel~3.5d}{1995/07/04}{use a different control sequence +% while making \cs{ref} and \cs{pageref} robust} +% \changes{babel~3.5f}{1995/11/06}{redefine \cs*{ref } if it exists +% instead of \cs{ref}} +% \changes{babel~3.5f}{1995/11/15}{Now use \cs{bbl@redefinerobust}} +% \changes{babel~3.5f}{1996/01/19}{redefine \cs{\@setref} instead of +% \cs{ref} and \cs{pageref} in \LaTeXe.} +% \changes{babel~3.5f}{1996/01/21}{Reverse the previous change as it +% inhibits the use of active characters in labels} +% \begin{macrocode} +\bbl@redefinerobust\ref#1{% + \@safe@activestrue\org@ref{#1}\@safe@activesfalse} +\bbl@redefinerobust\pageref#1{% + \@safe@activestrue\org@pageref{#1}\@safe@activesfalse} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\@citex} +% \changes{babel~3.5f}{1995/11/15}{Now use \cs{bbl@redefine}} +% The macro used to cite from a bibliography, |\cite|, uses an +% internal macro, |\@citex|. +% It is this internal macro that picks up the argument(s), +% so we redefine this internal macro and leave |\cite| alone. The +% first argument is used for typesetting, so the shorthands need +% only be deactivated in the second argument. +% \changes{babel~3.7g}{2000/10/01}{The shorthands need to be +% deactivated for the second argument of \cs{@citex} only.} +% \begin{macrocode} +\bbl@redefine\@citex[#1]#2{% + \@safe@activestrue\edef\@tempa{#2}\@safe@activesfalse + \org@@citex[#1]{\@tempa}} +% \end{macrocode} +% Unfortunately, the packages \pkg{natbib} and \pkg{cite} need a +% different definition of |\@citex|... +% To begin with, \pkg{natbib} has a definition for |\@citex| with +% \emph{three} arguments... We only know that a package is loaded +% when |\begin{document}| is executed, so we need to postpone the +% different redefinition. +% \begin{macrocode} +\AtBeginDocument{% + \@ifpackageloaded{natbib}{% +% \end{macrocode} +% Notice that we use |\def| here instead of |\bbl@redefine| because +% |\org@@citex| is already defined and we don't want to overwrite +% that definition (it would result in parameter stack overflow +% because of a circular definition). +% \begin{macrocode} + \def\@citex[#1][#2]#3{% + \@safe@activestrue\edef\@tempa{#3}\@safe@activesfalse + \org@@citex[#1][#2]{\@tempa}}% + }{}} +% \end{macrocode} +% The package \pkg{cite} has a definition of |\@citex| where the +% shorthands need to be turned off in both arguments. +% \begin{macrocode} +\AtBeginDocument{% + \@ifpackageloaded{cite}{% + \def\@citex[#1]#2{% + \@safe@activestrue\org@@citex[#1]{#2}\@safe@activesfalse}% + }{}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\nocite} +% \changes{babel~3.5f}{1995/11/15}{Now use \cs{bbl@redefine}} +% The macro |\nocite| which is used to instruct BiB\TeX\ to +% extract uncited references from the database. +% \begin{macrocode} +\bbl@redefine\nocite#1{% + \@safe@activestrue\org@nocite{#1}\@safe@activesfalse} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\bibcite} +% \changes{babel~3.5f}{1995/11/15}{Now use \cs{bbl@redefine}} +% The macro that is used in the |.aux| file to define citation +% labels. When packages such as \pkg{natbib} or \pkg{cite} are not +% loaded its second argument is used to typeset the citation +% label. In that case, this second argument can contain active +% characters but is used in an environment where +% |\@safe@activestrue| is in effect. This switch needs to be reset +% inside the |\hbox| which contains the citation label. In order to +% determine during \file{.aux} file processing which definition of +% |\bibcite| is needed we define |\bibcite| in such a way that it +% redefines itself with the proper definition. +% \changes{babel~3.6s}{1999/04/13}{Need to determine `online' which +% definition of \cs{bibcite} is needed} +% \changes{babel~3.6v}{1999/04/21}{Also check for \pkg{cite} it can't +% handle \cs{@safe@activesfalse} in its second argument} +% \begin{macrocode} +\bbl@redefine\bibcite{% +% \end{macrocode} +% We call |\bbl@cite@choice| to select the proper definition for +% |\bibcite|. This new definition is then activated. +% \begin{macrocode} + \bbl@cite@choice + \bibcite} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\bbl@bibcite} +% \changes{babel~3.6v}{1999/04/21}{Macro \cs{bbl@bibcite} added} +% The macro |\bbl@bibcite| holds the definition of |\bibcite| +% needed when neither \pkg{natbib} nor \pkg{cite} is loaded. +% \begin{macrocode} +\def\bbl@bibcite#1#2{% + \org@bibcite{#1}{\@safe@activesfalse#2}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\bbl@cite@choice} +% \changes{babel~3.6v}{1999/04/21}{Macro \cs{bbl@cite@choice} added} +% The macro |\bbl@cite@choice| determines which definition of +% |\bibcite| is needed. +% \begin{macrocode} +\def\bbl@cite@choice{% +% \end{macrocode} +% First we give |\bibcite| its default definition. +% \begin{macrocode} + \global\let\bibcite\bbl@bibcite +% \end{macrocode} +% Then, when \pkg{natbib} is loaded we restore the original +% definition of |\bibcite| . +% \begin{macrocode} + \@ifpackageloaded{natbib}{\global\let\bibcite\org@bibcite}{}% +% \end{macrocode} +% For \pkg{cite} we do the same. +% \begin{macrocode} + \@ifpackageloaded{cite}{\global\let\bibcite\org@bibcite}{}% +% \end{macrocode} +% Make sure this only happens once. +% \begin{macrocode} + \global\let\bbl@cite@choice\relax + } +% \end{macrocode} +% +% When a document is run for the first time, no \file{.aux} file is +% available, and |\bibcite| will not yet be properly defined. In +% this case, this has to happen before the document starts. +% \begin{macrocode} +\AtBeginDocument{\bbl@cite@choice} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@bibitem} +% \changes{babel~3.5f}{1995/11/15}{Now use \cs{bbl@redefine}} +% One of the two internal \LaTeX\ macros called by |\bibitem| +% that write the citation label on the |.aux| file. +% \begin{macrocode} +\bbl@redefine\@bibitem#1{% + \@safe@activestrue\org@@bibitem{#1}\@safe@activesfalse} +% \end{macrocode} +% \end{macro} +% +% \subsection{marks} +% +% \begin{macro}{\markright} +% \begin{macro}{\markboth} +% \changes{babel~3.6i}{1997/03/15}{Added redefinition of \cs{mark...} +% commands} +% Because the output routine is asynchronous, we must +% pass the current language attribute to the head lines, together +% with the text that is put into them. To achieve this we need to +% adapt the definition of |\markright| and |\markboth| somewhat. +% \changes{babel~3.7c}{1999/04/08}{Removed the use of \cs{head@lang} +% (PR 2990)} +% \changes{babel~3.7c}{1999/04/09}{Avoid expanding the arguments by +% storing them in token registers} +% \changes{babel~3.7m}{2003/11/15}{added \cs{bbl@restore@actives} to +% the mark} +% \changes{babel~3.8c}{2004/05/26}{No need to add \emph{anything} to +% an empty mark; prevented this by checking the contents of the +% argument} +% \changes{babel~3.8f}{2005/05/15}{Make the definition independent of +% the original definition; expand \cs{languagename} before passing +% it into the token registers} +% \begin{macrocode} +\bbl@redefine\markright#1{% +% \end{macrocode} +% First of all we temporarily store the language switching command, +% using an expanded definition in order to get the current value of +% |\languagename|. +% \begin{macrocode} + \edef\bbl@tempb{\noexpand\protect + \noexpand\foreignlanguage{\languagename}}% +% \end{macrocode} +% Then, we check whether the argument is empty; if it is, we +% just make sure the scratch token register is empty. +% \begin{macrocode} + \def\bbl@arg{#1}% + \ifx\bbl@arg\@empty + \toks@{}% + \else +% \end{macrocode} +% Next, we store the argument to |\markright| in the scratch token +% register, together with the expansion of |\bbl@tempb| (containing +% the language switching command) as defined before. This way +% these commands will not be expanded by using |\edef| later +% on, and we make sure that the text is typeset using the +% correct language settings. While doing so, we make sure that +% active characters that may end up in the mark are not disabled by +% the output routine kicking in while \cs{@safe@activestrue} is in +% effect. +% \begin{macrocode} + \expandafter\toks@\expandafter{% + \bbl@tempb{\protect\bbl@restore@actives#1}}% + \fi +% \end{macrocode} +% Then we define a temporary control sequence using |\edef|. +% \begin{macrocode} + \edef\bbl@tempa{% +% \end{macrocode} +% When |\bbl@tempa| is executed, only |\languagename| will be +% expanded, because of the way the token register was filled. +% \begin{macrocode} + \noexpand\org@markright{\the\toks@}}% + \bbl@tempa +} +% \end{macrocode} +% The definition of |\markboth| is equivalent to that of +% |\markright|, except that we need two token registers. +% \changes{babel~3.7m}{2003/11/15}{added \cs{bbl@restore@actives} to +% the mark} +% \changes{babel~3.8c}{2004/05/26}{No need to add \emph{anything} to +% an empty mark, prevented this by checking the contents of the +% arguments} +% \changes{babel~3.8f}{2005/05/15}{Make the definition independent of +% the original definition; expand \cs{languagename} before passing +% it into the token registers} +% \begin{macrocode} +\bbl@redefine\markboth#1#2{% + \edef\bbl@tempb{\noexpand\protect + \noexpand\foreignlanguage{\languagename}}% + \def\bbl@arg{#1}% + \ifx\bbl@arg\@empty + \toks@{}% + \else + \expandafter\toks@\expandafter{% + \bbl@tempb{\protect\bbl@restore@actives#1}}% + \fi + \def\bbl@arg{#2}% + \ifx\bbl@arg\@empty + \toks8{}% + \else + \expandafter\toks8\expandafter{% + \bbl@tempb{\protect\bbl@restore@actives#2}}% + \fi + \edef\bbl@tempa{% + \noexpand\org@markboth{\the\toks@}{\the\toks8}}% + \bbl@tempa +} +% +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \subsection{Encoding issues (part 2)} +% +% \changes{babel~3.7c}{1999/04/16}{Removed redefinition of \cs{@roman} +% and \cs{@Roman}} +% +% \begin{macro}{\TeX} +% \begin{macro}{\LaTeX} +% \changes{babel~3.7a}{1998/03/12}{Make \TeX\ and \LaTeX\ logos +% encoding-independent} +% Because documents may use font encodings other than one of the +% latin encodings, we make sure that the logos of \TeX\ and +% \LaTeX\ always come out in the right encoding. +% \begin{macrocode} +%<*core> +\bbl@redefine\TeX{\textlatin{\org@TeX}} +\bbl@redefine\LaTeX{\textlatin{\org@LaTeX}} +% +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \subsection{Preventing clashes with other packages} +% +% \subsubsection{\pkg{ifthen}} +% +% \begin{macro}{\ifthenelse} +% \changes{babel~3.5g}{1996/08/11}{Redefinition of \cs{ifthenelse} +% added to circumvent problems with \cs{pageref} in the argument of +% \cs{isodd}} +% Sometimes a document writer wants to create a special effect +% depending on the page a certain fragment of text appears on. This +% can be achieved by the following piece of code: +% \begin{verbatim} +% \ifthenelse{\isodd{\pageref{some:label}}} +% {code for odd pages} +% {code for even pages} +% \end{verbatim} +% In order for this to work the argument of |\isodd| needs to be +% fully expandable. With the above redefinition of |\pageref| it is +% not in the case of this example. To overcome that, we add some +% code to the definition of |\ifthenelse| to make things work. +% +% The first thing we need to do is check if the package +% \pkg{ifthen} is loaded. This should be done at |\begin{document}| +% time. +% \begin{macrocode} +%<*package> +\AtBeginDocument{% + \@ifpackageloaded{ifthen}{% +% \end{macrocode} +% Then we can redefine |\ifthenelse|: +% \changes{babel~3.6f}{1997/01/14}{\cs{ifthenelse} needs to be long} +% \begin{macrocode} + \bbl@redefine@long\ifthenelse#1#2#3{% +% \end{macrocode} +% We want to revert the definition of |\pageref| to its original +% definition for the duration of |\ifthenelse|, so we first need to +% store its current meaning. +% \begin{macrocode} + \let\bbl@tempa\pageref + \let\pageref\org@pageref +% \end{macrocode} +% Then we can set the |\@safe@actives| switch and call the original +% |\ifthenelse|. In order to be able to use shorthands in the +% second and third arguments of |\ifthenelse| the resetting of the +% switch \emph{and} the definition of |\pageref| happens inside +% those arguments. +% \changes{babel~3.6i}{1997/02/25}{Now reset the @safe@actives switch +% inside the 2nd and 3rd arguments of \cs{ifthenelse}} +% \changes{babel~3.7f}{2000/06/29}{\cs{pageref} needs to have its +% babel definition reinstated in the second and third arguments} +% \begin{macrocode} + \@safe@activestrue + \org@ifthenelse{#1}{% + \let\pageref\bbl@tempa + \@safe@activesfalse + #2}{% + \let\pageref\bbl@tempa + \@safe@activesfalse + #3}% + }% +% \end{macrocode} +% When the package wasn't loaded we do nothing. +% \begin{macrocode} + }{}% + } +% \end{macrocode} +% \end{macro} +% +% \subsubsection{\pkg{varioref}} +% +% \begin{macro}{\@@vpageref} +% \changes{babel~3.6a}{1996/10/29}{Redefinition of \cs{@@vpageref} +% added to circumvent problems with active \texttt{:} in the +% argument of \cs{vref} when \pkg{varioref} is used} +% \begin{macro}{\vrefpagenum} +% \changes{babel~3.7o}{2003/11/18}{Added redefinition of +% \cs{vrefpagenum} which deals with ranges of pages} +% \begin{macro}{\Ref} +% \changes{babel~3.8g}{2005/05/21}{We also need to adapt \cs{Ref} +% which needs to be able to uppercase the first letter of the +% expansion of \cs{ref}} +% When the package varioref is in use we need to modify its +% internal command |\@@vpageref| in order to prevent problems when +% an active character ends up in the argument of |\vref|. +% \begin{macrocode} +\AtBeginDocument{% + \@ifpackageloaded{varioref}{% + \bbl@redefine\@@vpageref#1[#2]#3{% + \@safe@activestrue + \org@@@vpageref{#1}[#2]{#3}% + \@safe@activesfalse}% +% \end{macrocode} +% The same needs to happen for |\vrefpagenum|. +% \begin{macrocode} + \bbl@redefine\vrefpagenum#1#2{% + \@safe@activestrue + \org@vrefpagenum{#1}{#2}% + \@safe@activesfalse}% +% \end{macrocode} +% The package \pkg{varioref} defines |\Ref| to be a robust command +% wich uppercases the first character of the reference text. In +% order to be able to do that it needs to access the exandable form +% of |\ref|. So we employ a little trick here. We redefine the +% (internal) command \verb*|\Ref | to call |\org@ref| instead of +% |\ref|. The disadvantgage of this solution is that whenever the +% derfinition of |\Ref| changes, this definition needs to be updated +% as well. +% \begin{macrocode} + \expandafter\def\csname Ref \endcsname#1{% + \protected@edef\@tempa{\org@ref{#1}}\expandafter\MakeUppercase\@tempa} + }{}% + } +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \subsubsection{\pkg{hhline}} +% +% \begin{macro}{\hhline} +% Delaying the activation of the shorthand characters has introduced +% a problem with the \pkg{hhline} package. The reason is that it +% uses the `:' character which is made active by the french support +% in \babel. Therefor we need to \emph{reload} the package when +% the `:' is an active character. +% +% So at |\begin{document}| we check whether \pkg{hhline} is loaded. +% \begin{macrocode} +\AtBeginDocument{% + \@ifpackageloaded{hhline}% +% \end{macrocode} +% Then we check whether the expansion of |\normal@char:| is not +% equal to |\relax|. +% \changes{babel~3.8b}{2004/04/19}{added \cs{string} to prevent +% unwanted expansion of the colon} +% \begin{macrocode} + {\expandafter\ifx\csname normal@char\string:\endcsname\relax + \else +% \end{macrocode} +% In that case we simply reload the package. Note that this happens +% \emph{after} the category code of the @-sign has been changed to +% other, so we need to temporarily change it to letter again. +% \begin{macrocode} + \makeatletter + \def\@currname{hhline}\input{hhline.sty}\makeatother + \fi}% + {}} +% \end{macrocode} +% \end{macro} +% +% \subsubsection{General} +% +% \begin{macro}{\FOREIGNLANGUAGE} +% The package \pkg{fancyhdr} treats the running head and fout lines +% somewhat differently as the standard classes. A symptom of this is +% that the command |\foreignlanguage| which \babel\ adds to the +% marks can end up inside the argument of |\MakeUppercase|. To +% prevent unexpected results we need to define |\FOREIGNLANGUAGE| +% here. +% \changes{babel~3.7j}{2003/05/23}{Define \cs{FOREIGNLANGUAGE} +% unconditionally} +% \begin{macrocode} +\DeclareRobustCommand{\FOREIGNLANGUAGE}[1]{% + \lowercase{\foreignlanguage{#1}}} +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\nfss@catcodes} +% \changes{babel~3.5g}{1996/08/18}{Need to add the double quote and +% acute characters to \cs{nfss@catcodes} to prevent problems when +% reading in .fd files} +% \LaTeX's font selection scheme sometimes wants to read font +% definition files in the middle of processing the document. In +% order to guard against any characters having the wrong +% |\catcode|s it always calls |\nfss@catcodes| before loading a +% file. Unfortunately, the characters |"| and |'| are not dealt +% with. Therefor we have to add them until \LaTeX\ does that +% herself. +% \begin{macrocode} +%<*core|shorthands> +\ifx\nfss@catcodes\@undefined +\else + \addto\nfss@catcodes{% + \@makeother\'% + \@makeother\"% + } +\fi +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +% +% \end{macrocode} +% +% \section{Local Language Configuration} +% +% \begin{macro}{\loadlocalcfg} +% At some sites it may be necessary to add site-specific actions to +% a language definition file. This can be done by creating a file +% with the same name as the language definition file, but with the +% extension \file{.cfg}. For instance the file \file{norsk.cfg} +% will be loaded when the language definition file \file{norsk.ldf} +% is loaded. +% +% \changes{babel~3.5d}{1995/06/22}{Added macro} +% \begin{macrocode} +%<*core> +% \end{macrocode} +% For plain-based formats we don't want to override the definition +% of |\loadlocalcfg| from \file{plain.def}. +% \begin{macrocode} +\ifx\loadlocalcfg\@undefined + \def\loadlocalcfg#1{% + \InputIfFileExists{#1.cfg} + {\typeout{*************************************^^J% + * Local config file #1.cfg used^^J% + *}% + } + {}} +\fi +% \end{macrocode} +% Just to be compatible with \LaTeX$\:$2.09 we add a few more lines +% of code: +% \begin{macrocode} +\ifx\@unexpandable@protect\@undefined + \def\@unexpandable@protect{\noexpand\protect\noexpand} + \long\def \protected@write#1#2#3{% + \begingroup + \let\thepage\relax + #2% + \let\protect\@unexpandable@protect + \edef\reserved@a{\write#1{#3}}% + \reserved@a + \endgroup + \if@nobreak\ifvmode\nobreak\fi\fi + } +\fi +% +% \end{macrocode} +% \end{macro} +% +% +% \clearpage +% \section{Driver files for the documented source code} +% +% Since \babel\ version 3.4 all source files that are part of the +% \babel\ system can be typeset separately. But to typeset +% them all in one document, the file \file{babel.drv} can be used. +% If you only want the information on how to use the \babel\ system +% and what goodies are provided by the language-specific files, you +% can run the file \file{user.drv} through \LaTeX\ to get a user +% guide. +% +% \changes{babel~3.4b}{1994/05/18}{Use the ltxdoc class instead of +% article} +% \changes{babel~3.7a}{1997/05/21}{Now need packages t1enc and +% supertabular to be loaded; the documentation for icelandic needs +% its \file{.ldf} file to be present} +% \changes{babel~3.8a}{2004/02/20}{Also load package url} +% \begin{macrocode} +%<*driver> +\documentclass{ltxdoc} +\usepackage{url,t1enc,supertabular} +\usepackage[icelandic,english]{babel} +\DoNotIndex{\!,\',\,,\.,\-,\:,\;,\?,\/,\^,\`,\@M} +\DoNotIndex{\@,\@ne,\@m,\@afterheading,\@date,\@endpart} +\DoNotIndex{\@hangfrom,\@idxitem,\@makeschapterhead,\@mkboth} +\DoNotIndex{\@oddfoot,\@oddhead,\@restonecolfalse,\@restonecoltrue} +\DoNotIndex{\@starttoc,\@unused} +\DoNotIndex{\accent,\active} +\DoNotIndex{\addcontentsline,\advance,\Alph,\arabic} +\DoNotIndex{\baselineskip,\begin,\begingroup,\bf,\box,\c@secnumdepth} +\DoNotIndex{\catcode,\centering,\char,\chardef,\clubpenalty} +\DoNotIndex{\columnsep,\columnseprule,\crcr,\csname} +\DoNotIndex{\day,\def,\dimen,\discretionary,\divide,\dp,\do} +\DoNotIndex{\edef,\else,\@empty,\end,\endgroup,\endcsname,\endinput} +\DoNotIndex{\errhelp,\errmessage,\expandafter,\fi,\filedate} +\DoNotIndex{\fileversion,\fmtname,\fnum@figure,\fnum@table,\fontdimen} +\DoNotIndex{\gdef,\global} +\DoNotIndex{\hbox,\hidewidth,\hfil,\hskip,\hspace,\ht,\Huge,\huge} +\DoNotIndex{\ialign,\if@twocolumn,\ifcase,\ifcat,\ifhmode,\ifmmode} +\DoNotIndex{\ifnum,\ifx,\immediate,\ignorespaces,\input,\item} +\DoNotIndex{\kern} +\DoNotIndex{\labelsep,\Large,\large,\labelwidth,\lccode,\leftmargin} +\DoNotIndex{\lineskip,\leavevmode,\let,\list,\ll,\long,\lower} +\DoNotIndex{\m@ne,\mathchar,\mathaccent,\markboth,\month,\multiply} +\DoNotIndex{\newblock,\newbox,\newcount,\newdimen,\newif,\newwrite} +\DoNotIndex{\nobreak,\noexpand,\noindent,\null,\number} +\DoNotIndex{\onecolumn,\or} +\DoNotIndex{\p@,par, \parbox,\parindent,\parskip,\penalty} +\DoNotIndex{\protect,\ps@headings} +\DoNotIndex{\quotation} +\DoNotIndex{\raggedright,\raise,\refstepcounter,\relax,\rm,\setbox} +\DoNotIndex{\section,\setcounter,\settowidth,\scriptscriptstyle} +\DoNotIndex{\sfcode,\sl,\sloppy,\small,\space,\spacefactor,\strut} +\DoNotIndex{\string} +\DoNotIndex{\textwidth,\the,\thechapter,\thefigure,\thepage,\thepart} +\DoNotIndex{\thetable,\thispagestyle,\titlepage,\tracingmacros} +\DoNotIndex{\tw@,\twocolumn,\typeout,\uppercase,\usecounter} +\DoNotIndex{\vbox,\vfil,\vskip,\vspace,\vss} +\DoNotIndex{\widowpenalty,\write,\xdef,\year,\z@,\z@skip} +% \end{macrocode} +% +% Here |\dlqq| is defined so that an example of |"'| can be +% given. +% \begin{macrocode} +\makeatletter +\gdef\dlqq{{\setbox\tw@=\hbox{,}\setbox\z@=\hbox{''}% + \dimen\z@=\ht\z@ \advance\dimen\z@-\ht\tw@ + \setbox\z@=\hbox{\lower\dimen\z@\box\z@}\ht\z@=\ht\tw@ + \dp\z@=\dp\tw@ \box\z@\kern-.04em}} +% \end{macrocode} +% +% The code lines are numbered within sections, +% \begin{macrocode} +%<*!user> +\@addtoreset{CodelineNo}{section} +\renewcommand\theCodelineNo{% + \reset@font\scriptsize\thesection.\arabic{CodelineNo}} +% \end{macrocode} +% which should also be visible in the index; hence this +% redefinition of a macro from \file{doc.sty}. +% \begin{macrocode} +\renewcommand\codeline@wrindex[1]{\if@filesw + \immediate\write\@indexfile + {\string\indexentry{#1}% + {\number\c@section.\number\c@CodelineNo}}\fi} +% \end{macrocode} +% +% The glossary environment is used or the change log, but its +% definition needs changing for this document. +% \begin{macrocode} +\renewenvironment{theglossary}{% + \glossary@prologue% + \GlossaryParms \let\item\@idxitem \ignorespaces}% + {} +% +\makeatother +% \end{macrocode} +% +% A few shorthands used in the documentation +% \changes{babel~3.5g}{1996/07/06}{Added definition of \cs{Babel}} +% \begin{macrocode} +\font\manual=logo10 % font used for the METAFONT logo, etc. +\newcommand*\MF{{\manual META}\-{\manual FONT}} +\newcommand*\TeXhax{\TeX hax} +\newcommand*\babel{\textsf{babel}} +\newcommand*\Babel{\textsf{Babel}} +\newcommand*\m[1]{\mbox{$\langle$\it#1\/$\rangle$}} +\newcommand*\langvar{\m{lang}} +% \end{macrocode} +% +% Some more definitions needed in the documentation. +% \begin{macrocode} +%\newcommand*\note[1]{\textbf{#1}} +\newcommand*\note[1]{} +\newcommand*\bsl{\protect\bslash} +\newcommand*\Lopt[1]{\textsf{#1}} +\newcommand*\Lenv[1]{\textsf{#1}} +\newcommand*\file[1]{\texttt{#1}} +\newcommand*\cls[1]{\texttt{#1}} +\newcommand*\pkg[1]{\texttt{#1}} +\newcommand*\langdeffile[1]{% +%<-user> \clearpage + \DocInput{#1}} +% \end{macrocode} +% +% When a full index should be generated uncomment the line with +% |\EnableCrossrefs|. Beware, processing may take some time. +% Use |\DisableCrossrefs| when the index is ready. +% \begin{macrocode} +% \EnableCrossrefs +\DisableCrossrefs +% \end{macrocode} +% +% Inlude the change log. +% \begin{macrocode} +%<-user>\RecordChanges +% \end{macrocode} +% The index should use the linenumbers of the code. +% \begin{macrocode} +%<-user>\CodelineIndex +% \end{macrocode} +% +% Set everything in |\MacroFont| instead of |\AltMacroFont| +% \begin{macrocode} +\setcounter{StandardModuleDepth}{1} +% \end{macrocode} +% +% For the user guide we only want the description parts of all the +% files. +% \begin{macrocode} +%<+user>\OnlyDescription +% \end{macrocode} +% Here starts the document +% \begin{macrocode} +\begin{document} +\DocInput{babel.dtx} +% \end{macrocode} +% +% All the language definition files. +% \changes{babel~3.2e}{1992/07/07}{Added slovak} +% \changes{babel~3.3}{1993/07/11}{Added catalan and galician} +% \changes{babel~3.3}{1993/07/11}{Added turkish} +% \changes{babel~3.4}{1994/02/28}{Added bahasa} +% \changes{babel~3.5a}{1995/02/16}{Added breton, irish, scottish} +% \changes{babel~3.5b}{1995/05/19}{Added lsorbian, usorbian} +% \changes{babel~3.5c}{1995/06/14}{Changed the order of including the +% language files somewhat (PR1652)} +% \changes{babel~3.5g}{1996/07/06}{Added greek} +% \changes{babel~3.6a}{1996/12/14}{Added welsh} +%^^A \changes{babel~3.6i}{1997/02/07}{Added sanskrit} +% \changes{babel~3.6i}{1997/02/22}{Added basque} +^^A% \changes{babel~3.6i}{1997/02/22}{Added kannada} +% \changes{babel~3.7a}{1997/05/21}{Added icelandic} +% \changes{babel~3.7b}{1998/06/25}{Added Latin} +% \changes{babel~3.7c}{1999/03/09}{Added ukrainian} +% \changes{babel~3.7c}{1999/05/09}{Added hebrew and serbian} +% \changes{babel~3.7e}{1999/11/22}{Added missing hebrew files} +% \changes{babel~3.7f}{2000/09/21}{Added bulgarian} +% \changes{babel~3.7f}{2000/09/26}{Added samin} +% \changes{babel~3.8a}{2004/02/20}{Added interlingua} +% \begin{macrocode} +%<+user>\clearpage +\langdeffile{esperanto.dtx} +\langdeffile{interlingua.dtx} +% +\langdeffile{dutch.dtx} +\langdeffile{english.dtx} +\langdeffile{germanb.dtx} +\langdeffile{ngermanb.dtx} +% +\langdeffile{breton.dtx} +\langdeffile{welsh.dtx} +\langdeffile{irish.dtx} +\langdeffile{scottish.dtx} +% +\langdeffile{greek.dtx} +% +\langdeffile{frenchb.dtx} +\langdeffile{italian.dtx} +\langdeffile{latin.dtx} +\langdeffile{portuges.dtx} +\langdeffile{spanish.dtx} +\langdeffile{catalan.dtx} +\langdeffile{galician.dtx} +\langdeffile{basque.dtx} +\langdeffile{romanian.dtx} +% +\langdeffile{danish.dtx} +\langdeffile{icelandic.dtx} +\langdeffile{norsk.dtx} +\langdeffile{swedish.dtx} +\langdeffile{samin.dtx} +% +\langdeffile{finnish.dtx} +\langdeffile{magyar.dtx} +\langdeffile{estonian.dtx} +% +\langdeffile{croatian.dtx} +\langdeffile{czech.dtx} +\langdeffile{polish.dtx} +\langdeffile{serbian.dtx} +\langdeffile{slovak.dtx} +\langdeffile{slovene.dtx} +\langdeffile{russianb.dtx} +\langdeffile{bulgarian.dtx} +\langdeffile{ukraineb.dtx} +% +\langdeffile{lsorbian.dtx} +\langdeffile{usorbian.dtx} +\langdeffile{turkish.dtx} +% +\langdeffile{hebrew.dtx} +\DocInput{hebinp.dtx} +\DocInput{hebrew.fdd} +\DocInput{heb209.dtx} +\langdeffile{bahasa.dtx} +%\langdeffile{sanskrit.dtx} +%\langdeffile{kannada.dtx} +%\langdeffile{nagari.dtx} +%\langdeffile{tamil.dtx} +\clearpage +\DocInput{bbplain.dtx} +% \end{macrocode} +% Finally print the index and change log (not for the user guide). +% \begin{macrocode} +%<*!user> +\clearpage +\def\filename{index} +\PrintIndex +\clearpage +\def\filename{changes} +\PrintChanges +% +\end{document} +% +% \end{macrocode} +% +% \Finale +% +%% +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +\endinput + diff --git a/Master/texmf-dist/source/generic/babel/babel.ins b/Master/texmf-dist/source/generic/babel/babel.ins new file mode 100644 index 00000000000..c4680ba4555 --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/babel.ins @@ -0,0 +1,250 @@ +%% +%% This file will generate fast loadable files and documentation +%% driver files from the doc files in this package when run through +%% LaTeX or TeX. +%% +%% Copyright 1989-2005 Johannes L. Braams and any individual authors +%% listed elsewhere in this file. All rights reserved. +%% +%% This file is part of the Babel system. +%% -------------------------------------- +%% +%% It 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 +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% The Current Maintainer of this work is Johannes Braams. +%% +%% The list of all files belonging to the LaTeX base distribution is +%% given in the file `manifest.bbl. See also `legal.bbl' 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. +%% +%% --------------- start of docstrip commands ------------------ +%% +%% Copyright 2005 Johannes L. Braams +%% +%% This file is part of the `babel' system. +%% +\def\filedate{2004/02/20} +\def\batchfile{babel.ins} +\input docstrip.tex + +{\ifx\generate\undefined +\Msg{**********************************************} +\Msg{*} +\Msg{* This installation requires docstrip} +\Msg{* version 2.3c or later.} +\Msg{*} +\Msg{* An older version of docstrip has been input} +\Msg{*} +\Msg{**********************************************} +\errhelp{Move or rename old docstrip.tex.} +\errmessage{Old docstrip in input path} +\batchmode +\csname @@end\endcsname +\fi} + +\ifx\askonceonly\undefined + \let\OriginalAsk\Ask + \def\askonceonly{% + \def\Ask##1##2{% + \OriginalAsk{##1}{##2}% + \global\let\Ask\OriginalAsk + \Ask\noprompt{% + By default you will be asked this question for every file.^^J% + If you enter `y' now,^^J% + I will asssume `y' for all future questions^^J% + without prompting.}% + \ifx\y\noprompt\let\noprompt\yes\fi + \ifx\yes\noprompt\gdef\Ask####1####2{\def####1{y}}\fi}} + } +\fi +%% This is the preamble that will be placed on +%% unpacked files + +\declarepreamble\mainpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl 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. +\endpreamble + +\declarepreamble\fdpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl for additional +information. + +In particular, permission is granted to customize the declarations in +this file to serve the needs of your installation. + +However, NO PERMISSION is granted to distribute a modified version +of this file under its original name. + +\endpreamble + +\keepsilent +\askonceonly +% +% Make some arrangements to use docstrip files in subdirectories +% unchanged... +% To do this I need to insert a path in front of the source file +% name, for this purpose I need to save the definition of an +% internal docstrip macro: +\let\ds@@from\@from +% +% Then it is convenient to have a special command to load docstrip +% files in subdirectories, it takes the directory path in the first +% argument, the name of the file in the second: +\def\BblInstallSubDir#1#2{% + \def\@from##1{\ds@@from{#1/##1}} + \batchinput{#1/#2.ins} + \let\@from\ds@@from} +% +% When a flat distribution is used a much simpler command +% is needed. +\def\BblInstallFlat#1#2{% + \batchinput{#2.ins}} + +% Now choose which installation to use. +\let\BblInstall\BblInstallFlat %% For now... + +\usepreamble\mainpreamble +\usedir{tex/generic/babel} +% +% First produce the base files for the babel system +% +\BblInstall{base}{base} +% +% Languages have their own subdirectory +% +\BblInstall{bahasa}{bahasa} +\BblInstall{basque}{basque} +\BblInstall{breton}{breton} +\BblInstall{bulgarian}{bulgarian} +\BblInstall{catalan}{catalan} +\BblInstall{croatian}{croatian} +\BblInstall{cyrillic}{russianb} +\BblInstall{cyrillic}{ukraineb} +\BblInstall{czech}{czech} +\BblInstall{danish}{danish} +\BblInstall{dutch}{dutch} +\BblInstall{english}{english} +\BblInstall{esperanto}{esperanto} +\BblInstall{estonian}{estonian} +\BblInstall{finnish}{finnish} +\BblInstall{frenchb}{frenchb} +\BblInstall{galician}{galician} +\BblInstall{german}{german} +\BblInstall{greek}{greek} +\BblInstall{hebrew}{hebrew} +\BblInstall{icelandic}{icelandic} +\BblInstall{interlingua}{interlingua} +\BblInstall{irish}{irish} +\BblInstall{italian}{italian} +%\BblInstall{kannada}{kannada} +\BblInstall{latin}{latin} +\BblInstall{magyar}{magyar} +%\BblInstall{nagari}{nagari} +\BblInstall{norsk}{norsk} +\BblInstall{polish}{polish} +\BblInstall{portuges}{portuges} +\BblInstall{romanian}{romanian} +%\BblInstall{tamil}{tamil} +\BblInstall{samin}{samin} +%\BblInstall{sanskrit}{sanskrit} +\BblInstall{scottish}{scottish} +\BblInstall{serbian}{serbian} +\BblInstall{slovak}{slovak} +\BblInstall{slovene}{slovene} +\BblInstall{sorbian}{sorbian} +\BblInstall{spanish}{spanish} +\BblInstall{swedish}{swedish} +\BblInstall{turkish}{turkish} +\BblInstall{welsh}{welsh} + +\Msg{***********************************************************} +\Msg{*} +\Msg{* To finish the installation you have to move all the files} +\Msg{* with names ending in .ldf, .sty, .def or .fd into a} +\Msg{* directory searched by TeX} +\Msg{*} +\Msg{* For making a format the following files have to be in a} +\Msg{* directory which is searched by IniTeX:} +\Msg{* \space\space hyphen.cfg} +\Msg{* \space\space language.dat} +\Msg{* \space\space and files with hyphenation patterns} +\Msg{*} +\Msg{* To produce source listings you can run files with names} +\Msg{* ending in .dtx and/or .drv through LaTeX} +\Msg{*} +\Msg{* To produce the complete source listing MakeIndex needs to be} +\Msg{* able to find the following files} +\Msg{* \space\space bbind.ist} +\Msg{* \space\space bbglo.ist} +\Msg{*} +\Msg{* Happy TeXing} +\Msg{*} +\Msg{***********************************************************} + + diff --git a/Master/texmf-dist/source/generic/babel/bahasa.dtx b/Master/texmf-dist/source/generic/babel/bahasa.dtx new file mode 100644 index 00000000000..c679c2e4a33 --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/bahasa.dtx @@ -0,0 +1,243 @@ +% \iffalse meta-comment +% +% Copyright 1989-2005 Johannes L. Braams and any individual authors +% listed elsewhere in this file. All rights reserved. +% +% This file is part of the Babel system. +% -------------------------------------- +% +% It 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 +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2003/12/01 or later. +% +% This work has the LPPL maintenance status "maintained". +% +% The Current Maintainer of this work is Johannes Braams. +% +% The list of all files belonging to the Babel system is +% given in the file `manifest.bbl. See also `legal.bbl' 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 +% \CheckSum{86} +%\iffalse +% Tell the \LaTeX\ system who we are and write an entry on the +% transcript. +%<*dtx> +\ProvidesFile{bahasa.dtx} +% +%\ProvidesLanguage{bahasa} +%\fi +%\ProvidesFile{bahasa.dtx} + [2005/03/29 v1.0i Bahasa support from the babel system] +%\iffalse +%% File `bahasa.dtx' +%% Babel package for LaTeX version 2e +%% Copyright (C) 1989 - 2005 +%% by Johannes Braams, TeXniek +% +%% Bahasa Language Definition File +%% Copyright (C) 1994 - 2005 +%% by J"org Knappen, (joerg.knappen at alpha.ntp.springer.de) +% Terry Mart (mart at vkpmzd.kph.uni-mainz.de) +% Institut f\"ur Kernphysik +% Johannes Gutenberg-Universit\"at Mainz +% D-55099 Mainz +% Germany +% +%% Please report errors to: J"org Knappen +%% knappen at alpha.ntp.springer.de +%% J.L. Braams +%% babel at braams.cistron.nl +% +% This file is part of the babel system, it provides the source +% code for the bahasa indonesia / bahasa melayu language definition +% file. The original version of this file was written by Terry +% Mart (mart@vkpmzd.kph.uni-mainz.de) and J"org Knappen +% (knappen@vkpmzd.kph.uni-mainz.de). +%<*filedriver> +\documentclass{ltxdoc} +\newcommand*\TeXhax{\TeX hax} +\newcommand*\babel{\textsf{babel}} +\newcommand*\langvar{$\langle \it lang \rangle$} +\newcommand*\note[1]{} +\newcommand*\Lopt[1]{\textsf{#1}} +\newcommand*\file[1]{\texttt{#1}} +\begin{document} + \DocInput{bahasa.dtx} +\end{document} +% +%\fi +% \GetFileInfo{bahasa.dtx} +% +% \changes{bahasa-0.9c}{1994/06/26}{Removed the use of \cs{filedate} +% and moved identification after the loading of \file{babel.def}} +% \changes{bahasa-1.0d}{1996/07/10}{Replaced \cs{undefined} with +% \cs{@undefined} and \cs{empty} with \cs{@empty} for consistency +% with \LaTeX} +% \changes{bahasa-1.0e}{1996/10/10}{Moved the definition of +% \cs{atcatcode} right to the beginning.} +% +% \section{The Bahasa language} +% +% The file \file{\filename}\footnote{The file described in this +% section has version number \fileversion\ and was last revised on +% \filedate.} defines all the language definition macros for the +% bahasa indonesia / bahasa melayu language. Bahasa just means +% `language' in bahasa indonesia / bahasa melayu. Since both +% national versions of the language use the same writing, although +% differing in pronounciation, this file can be used for both +% languages. +% +% For this language currently no special definitions are needed or +% available. +% +% \StopEventually{} +% +% The macro |\LdfInit| takes care of preventing that this file is +% loaded more than once, checking the category code of the +% \texttt{@} sign, etc. +% \changes{bahasa-1.0e}{1996/11/02}{Now use \cs{LdfInit} to perform +% initial checks} +% \begin{macrocode} +%<*code> +\LdfInit{bahasa}\captionsbahasa +% \end{macrocode} +% +% When this file is read as an option, i.e. by the |\usepackage| +% command, \texttt{bahasa} could be an `unknown' language in which +% case we have to make it known. So we check for the existence of +% |\l@bahasa| to see whether we have to do something here. +% +% \changes{bahasa-0.9c}{1994/06/26}{Now use \cs{@patterns} to produce +% the warning} +% \begin{macrocode} +\ifx\l@bahasa\@undefined + \@nopatterns{Bahasa} + \adddialect\l@bahasa0\fi +% \end{macrocode} +% +% The next step consists of defining commands to switch to (and +% from) the Bahasa language. +% +% \begin{macro}{\captionsbahasa} +% The macro |\captionsbahasa| defines all strings used in the four +% standard documentclasses provided with \LaTeX. +% \changes{bahasa-1.0b}{1995/07/04}{Added \cs{proofname} for +% AMS-\LaTeX} +% \changes{bahasa-1.0d}{1996/07/09}{Replaced `Proof' by `Bukti' +% (PR2214)} +% \changes{bahasa-1.0h}{2000/09/19}{Added \cs{glossaryname}} +% \changes{bahasa-1.0i}{2003/11/17}{Inserted translation for Glossary} +% \begin{macrocode} +\addto\captionsbahasa{% + \def\prefacename{Pendahuluan}% + \def\refname{Pustaka}% + \def\abstractname{Ringkasan}% (sometime it's called 'intisari' + % or 'ikhtisar') + \def\bibname{Bibliografi}% + \def\chaptername{Bab}% + \def\appendixname{Lampiran}% + \def\contentsname{Daftar Isi}% + \def\listfigurename{Daftar Gambar}% + \def\listtablename{Daftar Tabel}% + \def\indexname{Indeks}% + \def\figurename{Gambar}% + \def\tablename{Tabel}% + \def\partname{Bagian}% +% Subject: Subyek +% From: Dari + \def\enclname{Lampiran}% + \def\ccname{cc}% + \def\headtoname{Kepada}% + \def\pagename{Halaman}% +% Notes (Endnotes): Catatan + \def\seename{lihat}% + \def\alsoname{lihat juga}% + \def\proofname{Bukti}% + \def\glossaryname{Daftar Istilah}% + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\datebahasa} +% The macro |\datebahasa| redefines the command |\today| to produce +% Bahasa dates. +% \changes{bahasa-1.0f}{1997/10/01}{Use \cs{edef} to define \cs{today}} +% \changes{bahasa~1.0f}{1998/03/28}{use \cs{def} instead of \cs{edef} +% to save memory} +% \changes{bahasa-1.0g}{1999/03/12}{Februari should be spelled as +% Pebruari} +% \begin{macrocode} +\def\datebahasa{% + \def\today{\number\day~\ifcase\month\or + Januari\or Pebruari\or Maret\or April\or Mei\or Juni\or + Juli\or Agustus\or September\or Oktober\or Nopember\or Desember\fi + \space \number\year}} +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\extrasbahasa} +% \begin{macro}{\noextrasbahasa} +% The macro |\extrasbahasa| will perform all the extra definitions +% needed for the Bahasa language. The macro |\extrasbahasa| is used +% to cancel the actions of |\extrasbahasa|. For the moment these +% macros are empty but they are defined for compatibility with the +% other language definition files. +% +% \begin{macrocode} +\addto\extrasbahasa{} +\addto\noextrasbahasa{} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\bahasahyphenmins} +% The bahasa hyphenation patterns should be used with +% |\lefthyphenmin| set to~2 and |\righthyphenmin| set to~2. +% \changes{bahasa-1.0e}{1996/08/07}{use \cs{bahasahyphenmins} to store +% the correct values} +% \changes{bahasa-1.0h}{2000/09/22}{Now use \cs{providehyphenmins} to +% provide a default value} +% \begin{macrocode} +\providehyphenmins{\CurrentOption}{\tw@\tw@} +% \end{macrocode} +% \end{macro} +% +% The macro |\ldf@finish| takes care of looking for a +% configuration file, setting the main language to be switched on +% at |\begin{document}| and resetting the category code of +% \texttt{@} to its original value. +% \changes{bahasa-1.0e}{1996/11/02}{Now use \cs{ldf@finish} to wrap up} +% \begin{macrocode} +\ldf@finish{bahasa} +% +% \end{macrocode} +% +% \Finale +%% +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +%% +\endinput diff --git a/Master/texmf-dist/source/generic/babel/bahasa.ins b/Master/texmf-dist/source/generic/babel/bahasa.ins new file mode 100644 index 00000000000..a444a015e17 --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/bahasa.ins @@ -0,0 +1,148 @@ +%% +%% This file will generate fast loadable files and documentation +%% driver files from the doc files in this package when run through +%% LaTeX or TeX. +%% +%% Copyright 1989-2005 Johannes L. Braams and any individual authors +%% listed elsewhere in this file. All rights reserved. +%% +%% This file is part of the Babel system. +%% -------------------------------------- +%% +%% It 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 +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% The Current Maintainer of this work is Johannes Braams. +%% +%% The list of all files belonging to the LaTeX base distribution is +%% given in the file `manifest.bbl. See also `legal.bbl' 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. +%% +%% --------------- start of docstrip commands ------------------ +%% +\def\filedate{1999/04/11} +\def\batchfile{bahasa.ins} +\input docstrip.tex + +{\ifx\generate\undefined +\Msg{**********************************************} +\Msg{*} +\Msg{* This installation requires docstrip} +\Msg{* version 2.3c or later.} +\Msg{*} +\Msg{* An older version of docstrip has been input} +\Msg{*} +\Msg{**********************************************} +\errhelp{Move or rename old docstrip.tex.} +\errmessage{Old docstrip in input path} +\batchmode +\csname @@end\endcsname +\fi} + +\declarepreamble\mainpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl 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. +\endpreamble + +\declarepreamble\fdpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl for additional +information. + +In particular, permission is granted to customize the declarations in +this file to serve the needs of your installation. + +However, NO PERMISSION is granted to distribute a modified version +of this file under its original name. + +\endpreamble + +\keepsilent + +\usedir{tex/generic/babel} + +\usepreamble\mainpreamble +\generate{\file{bahasa.ldf}{\from{bahasa.dtx}{code}} + } +\usepreamble\fdpreamble + +\ifToplevel{ +\Msg{***********************************************************} +\Msg{*} +\Msg{* To finish the installation you have to move the following} +\Msg{* files into a directory searched by TeX:} +\Msg{*} +\Msg{* \space\space All *.def, *.fd, *.ldf, *.sty} +\Msg{*} +\Msg{* To produce the documentation run the files ending with} +\Msg{* '.dtx' and `.fdd' through LaTeX.} +\Msg{*} +\Msg{* Happy TeXing} +\Msg{***********************************************************} +} + +\endinput diff --git a/Master/texmf-dist/source/generic/babel/base.ins b/Master/texmf-dist/source/generic/babel/base.ins new file mode 100644 index 00000000000..7f13287fd29 --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/base.ins @@ -0,0 +1,299 @@ +%% +%% This file will generate fast loadable files and documentation +%% driver files from the doc files in this package when run through +%% LaTeX or TeX. +%% +%% Copyright 1989-2005 Johannes L. Braams and any individual authors +%% listed elsewhere in this file. All rights reserved. +%% +%% This file is part of the Babel system. +%% -------------------------------------- +%% +%% It 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 +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% The Current Maintainer of this work is Johannes Braams. +%% +%% The list of all files belonging to the LaTeX base distribution is +%% given in the file `manifest.bbl. See also `legal.bbl' 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. +%% +%% --------------- start of docstrip commands ------------------ +%% +%% Copyright 2004 Johannes L. Braams +%% +%% This file is part of the `babel' system. +%% +%% You are allowed to distribute this file together with all files +%% mentioned in manifest.bbl. +%% +%% You are not allowed to modify its contents. +%% +\def\filedate{2004/02/20} +\def\batchfile{base.ins} +\input docstrip.tex + +{\ifx\generate\undefined +\Msg{**********************************************} +\Msg{*} +\Msg{* This installation requires docstrip} +\Msg{* version 2.3c or later.} +\Msg{*} +\Msg{* An older version of docstrip has been input} +\Msg{*} +\Msg{**********************************************} +\errhelp{Move or rename old docstrip.tex.} +\errmessage{Old docstrip in input path} +\batchmode +\csname @@end\endcsname +\fi} + +% The following command will be added to dostrip in the next LaTeX +% release ... +\ifx\askonceonly\undefined + \let\OriginalAsk\Ask + \def\askonceonly{% + \def\Ask##1##2{% + \OriginalAsk{##1}{##2}% + \global\let\Ask\OriginalAsk + \Ask\noprompt{% + By default you will be asked this question for every file.^^J% + If you enter `y' now,^^J% + I will asssume `y' for all future questions^^J% + without prompting.}% + \ifx\y\noprompt\let\noprompt\yes\fi + \ifx\yes\noprompt\gdef\Ask####1####2{\def####1{y}}\fi}} + } +\fi +%% This is the preamble that will be placed on +%% unpacked files + +\declarepreamble\mainpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl 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. +\endpreamble + +\declarepreamble\fdpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl for additional +information. + +In particular, permission is granted to customize the declarations in +this file to serve the needs of your installation. + +However, NO PERMISSION is granted to distribute a modified version +of this file under its original name. + +\endpreamble + +\declarepreamble\drvpreamble + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +Copyright (C) 2004 Johannes Braams. All rights reserved. + +To produce the documentation in the way you like you are allowed +to change this driver file. + +\endpreamble + +\declarepreamble\istpreamble +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +Copyright (C) 2004 Johannes Braams. All rights reserved. + +This file is a style file for the MakeIndex program + +\endpreamble + +\declarepostamble\istpost +\endpostamble + +\keepsilent +\askonceonly + +\usepreamble\mainpreamble +\usedir{tex/generic/babel} + +\generate{\file{babel.sty}{\from{babel.dtx}{package}} + \file{babel.def}{\from{babel.dtx}{core}} + \file{switch.def}{\from{babel.dtx}{kernel}} + \file{hyphen.cfg}{\from{babel.dtx}{kernel,patterns}} + } +% Support for plain users +\generate{\file{plain.def}{\from{bbplain.dtx}{code}} + \file{bplain.tex}{\from{bbplain.dtx}{bplain}} + \file{blplain.tex}{\from{bbplain.dtx}{blplain}} + } + +% compatibility files + +\usepreamble\mainpreamble + +\def\compatfile#1{\file{#1.sty}{\from{bbcompat.dtx}{#1}}} + +\generate{% + \compatfile{esperanto} + \compatfile{afrikaans} + \compatfile{dutch} + \compatfile{american} + \compatfile{british} + \compatfile{english} + \compatfile{UKenglish} + \compatfile{USenglish} + \compatfile{germanb} + \compatfile{austrian} + \compatfile{ngermanb} + \compatfile{naustrian} + \compatfile{irish} + \compatfile{scottish} + \compatfile{welsh} + \compatfile{breton} + } +\generate{% + \compatfile{francais} + \compatfile{italian} + \compatfile{portuges} + \compatfile{spanish} + \compatfile{catalan} + \compatfile{galician} + \compatfile{danish} + \compatfile{norsk} + \compatfile{swedish} + \compatfile{finnish} + \compatfile{magyar} + \compatfile{greek} + \compatfile{croatian} + \compatfile{czech} + \compatfile{slovak} + \compatfile{polish} + } +\generate{% + \compatfile{estonian} + \compatfile{romanian} + \compatfile{slovene} + \compatfile{russianb} + \compatfile{ukraineb} + \compatfile{turkish} + \compatfile{lsorbian} + \compatfile{usorbian} + \compatfile{bahasa} + \compatfile{hebrew} + %\compatfile{sanskrit} + \compatfile{basque} + \compatfile{latin} + \compatfile{icelandic} + \compatfile{serbian} + \compatfile{bulgarian} + } +\generate{% + \compatfile{samin} + \compatfile{interlingua} + } + +% driver files + +\usepreamble\drvpreamble + +\generate{\file{babel.drv}{\from{babel.dtx}{driver}} + \file{user.drv}{\from{babel.dtx}{driver,user}}} + +% MakeIndex style files + +\usepreamble\istpreamble +\usepostamble\istpost + +\generate{\file{bbind.ist}{\from{bbidxglo.dtx}{idx}} + \file{bbglo.ist}{\from{bbidxglo.dtx}{glo}}} + +\Msg{***********************************************************} +\Msg{*} +\Msg{* To finish the installation you have to move all the files} +\Msg{* with names ending in .ldf, .sty, .def or .fd into a} +\Msg{* directory searched by TeX} +\Msg{*} +\Msg{* For making a format the following files have to be in a} +\Msg{* directory which is searched by IniTeX:} +\Msg{* \space\space hyphen.cfg} +\Msg{* \space\space language.dat} +\Msg{* \space\space and files with hyphenation patterns} +\Msg{*} +\Msg{* To produce source listings you can run files with names} +\Msg{* ending in .dtx and/or .drv through LaTeX} +\Msg{*} +\Msg{* To produce the complete source listing MakeIndex needs to be} +\Msg{* able to find the following files} +\Msg{* \space\space bbind.ist} +\Msg{* \space\space bbglo.ist} +\Msg{*} +\Msg{* Happy TeXing} +\Msg{*} +\Msg{***********************************************************} + + diff --git a/Master/texmf-dist/source/generic/babel/basque.dtx b/Master/texmf-dist/source/generic/babel/basque.dtx new file mode 100644 index 00000000000..33789ccdfd4 --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/basque.dtx @@ -0,0 +1,390 @@ +% \iffalse meta-comment +% +% Copyright 1989-2005 Johannes L. Braams and any individual authors +% listed elsewhere in this file. All rights reserved. +% +% This file is part of the Babel system. +% -------------------------------------- +% +% It 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 +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2003/12/01 or later. +% +% This work has the LPPL maintenance status "maintained". +% +% The Current Maintainer of this work is Johannes Braams. +% +% The list of all files belonging to the Babel system is +% given in the file `manifest.bbl. See also `legal.bbl' 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 +% \CheckSum{193} +% \iffalse +% Tell the \LaTeX\ system who we are and write an entry on the +% transcript. +%<*dtx> +\ProvidesFile{basque.dtx} +% +%\ProvidesLanguage{basque} +%\fi +%\ProvidesFile{basque.dtx} + [2005/03/29 v1.0f Basque support from the babel system] +%\iffalse +%% File `Basque.dtx' +%% Babel package for LaTeX version 2e +%% Copyright (C) 1989 - 2005 +%% by Johannes Braams, TeXniek +% +%% Basque Language Definition File +%% Copyright (C) 1997 - 2005 +%% by Juan M. Aguirregabiria +% The University of the Basque Country +% Dept. of Theoretical Physics +% Apdo. 644 +% E-48080 Bilbao +% Spain +% tel: +34 946 012 593 +% fax: +34 944 648 500 +% e-mail: wtpagagj at lg.ehu.es +% WWW: http://tp.lc.ehu.es/jma.html +% based on the +% Spanish Language Definition File +% Copyright (C) 1991 - 1998 +% by Julio Sanchez +% GMV, SA +% c/ Isaac Newton 11 +% PTM - Tres Cantos +% E-28760 Madrid +% Spain +% tel: +34 1 807 21 85 +% fax +34 1 807 21 99 +% jsanchez at gmv.es +% +% Acknowledgements: I am indebted to Zunbeltz Izaola, +% who suggested the use of \discretionary in "- +% +%% Please report errors to: Juan M. Aguirregabiria +%% (or J.L. Braams ) +% +% This file is part of the babel system, it provides the source +% code for the basque language definition file. +%<*filedriver> +\documentclass{ltxdoc} +\newcommand*\TeXhax{\TeX hax} +\newcommand*\babel{\textsf{babel}} +\newcommand*\langvar{$\langle \it lang \rangle$} +\newcommand*\note[1]{} +\newcommand*\Lopt[1]{\textsf{#1}} +\newcommand*\file[1]{\texttt{#1}} +\begin{document} + \DocInput{basque.dtx} +\end{document} +% +%\fi +% \GetFileInfo{basque.dtx} +% +% \section{The Basque language} +% +% The file \file{\filename}\footnote{The file described in this +% section has version number \fileversion\ and was last revised on +% \filedate. The original author is Juan M. Aguirregabiria, +% (\texttt{wtpagagj@lg.ehu.es}) and is based on the Spanish file +% by Julio S\'anchez, +% (\texttt{jsanchez@gmv.es}).} defines all the language definition +% macro's for the Basque language. +% +% For this language the characters |~| and |"| are made +% active. In table~\ref{tab:basque-quote} an overview is given of +% their purpose. +% \begin{table}[htb] +% \centering +% \begin{tabular}{lp{8cm}} +% \verb="|= & disable ligature at this position.\\ +% |"-| & an explicit hyphen sign, allowing hyphenation +% in the rest of the word.\\ +% |\-| & like the old |\-|, but allowing hyphenation +% in the rest of the word. \\ +% |"<| & for French left double quotes (similar to $<<$).\\ +% |">| & for French right double quotes (similar to $>>$).\\ +% |~n| & a n with tilde. Works for uppercase too. +% \end{tabular} +% \caption{The extra definitions made by \file{basque.ldf}} +% \label{tab:basque-quote} +% \end{table} +% These active accent characters behave according to their original +% definitions if not followed by one of the characters indicated in +% that table. +% +% \changes{basque-1.0f}{2002/01/07}{Changed url's for the patterns +% file} +% This option includes support for working with extended, 8-bit +% fonts, if available. Support is based on +% providing an appropriate definition for the accent macros on +% entry to the Basque language. This is automatically done by +% \LaTeXe\ or NFSS2. If T1 encoding is chosen, and provided that +% adequate hyphenation patterns\footnote{One source for such +% patterns is the archive at \texttt{tp.lc.ehu.es} that can be +% accessed by anonymous FTP or in +% \texttt{http://tp.lc.ehu.es/jma/basque.html}} are available. +% The easiest way to use the new encoding with \LaTeXe{} is +% to load the package \texttt{t1enc} with |\usepackage|. This must +% be done before loading \babel. +% +% \StopEventually{} +% +% The macro |\LdfInit| takes care of preventing that this file is +% loaded more than once, checking the category code of the +% \texttt{@} sign, etc. +% \begin{macrocode} +%<*code> +\LdfInit{basque}\captionsbasque +% \end{macrocode} +% +% When this file is read as an option, i.e. by the |\usepackage| +% command, \texttt{basque} could be an `unknown' language in which +% case we have to make it known. So we check for the existence of +% |\l@basque| to see whether we have to do something here. +% +% \begin{macrocode} +\ifx\l@basque\@undefined + \@nopatterns{Basque} + \adddialect\l@basque0 +\fi +% \end{macrocode} +% +% The next step consists of defining commands to switch to (and +% from) the Basque language. +% +% \begin{macro}{\captionsbasque} +% The macro |\captionsbasque| defines all strings used in +% the four standard documentclasses provided with \LaTeX. +% \changes{basque-1.0e}{2000/09/19}{Added \cs{glossaryname}} +% \changes{basque-1.0f}{2002/01/07}{Added translation for Glossary} +% \begin{macrocode} +\addto\captionsbasque{% + \def\prefacename{Hitzaurrea}% + \def\refname{Erreferentziak}% + \def\abstractname{Laburpena}% + \def\bibname{Bibliografia}% + \def\chaptername{Kapitulua}% + \def\appendixname{Eranskina}% + \def\contentsname{Gaien Aurkibidea}% + \def\listfigurename{Irudien Zerrenda}% + \def\listtablename{Taulen Zerrenda}% + \def\indexname{Kontzeptuen Aurkibidea}% + \def\figurename{Irudia}% + \def\tablename{Taula}% + \def\partname{Atala}% + \def\enclname{Erantsia}% + \def\ccname{Kopia}% + \def\headtoname{Nori}% + \def\pagename{Orria}% + \def\seename{Ikusi}% + \def\alsoname{Ikusi, halaber}% + \def\proofname{Frogapena}% + \def\glossaryname{Glosarioa}% + }% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\datebasque} +% The macro |\datebasque| redefines the command |\today| to +% produce Basque +% \changes{basque-1.0b}{1997/10/01}{Use \cs{edef} to define \cs{today} +% to save memory} +% \changes{basque-1.0b}{1998/03/28}{use \cs{def} instead of \cs{edef}} +% \changes{basque-1.0c}{1999/11/22}{fixed typo in April's name} +% \begin{macrocode} +\def\datebasque{% + \def\today{\number\year.eko\space\ifcase\month\or + urtarrilaren\or otsailaren\or martxoaren\or apirilaren\or + maiatzaren\or ekainaren\or uztailaren\or abuztuaren\or + irailaren\or urriaren\or azaroaren\or + abenduaren\fi~\number\day}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\extrasbasque} +% \begin{macro}{\noextrasbasque} +% The macro |\extrasbasque| will perform all the extra definitions +% needed for the Basque language. The macro |\noextrasbasque| is +% used to cancel the actions of |\extrasbasque|. For Basque, some +% characters are made active or are redefined. In particular, the +% \texttt{"} character and the |~| character receive new +% meanings. Therefore these characters have to be treated as +% `special' characters. +% +% \begin{macrocode} +\addto\extrasbasque{\languageshorthands{basque}} +\initiate@active@char{"} +\initiate@active@char{~} +\addto\extrasbasque{% + \bbl@activate{"}% + \bbl@activate{~}} +% \end{macrocode} +% Don't forget to turn the shorthands off again. +% \changes{basque-1.0d}{1999/12/16}{Deactivate shorthands ouside of +% Basque} +% \begin{macrocode} +\addto\noextrasbasque{ + \bbl@deactivate{"}\bbl@deactivate{~}} +% \end{macrocode} +% +% Apart from the active characters some other macros get a new +% definition. Therefore we store the current one to be able to +% restore them later. +% \begin{macrocode} +\addto\extrasbasque{% + \babel@save\"% + \babel@save\~% + \def\"{\protect\@umlaut}% + \def\~{\protect\@tilde}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\basquehyphenmins} +% Basque hyphenation uses |\lefthyphenmin| and |\righthyphenmin| +% both set to~2. +% \changes{basque-1.0e}{2000/09/22}{Now use \cs{providehyphenmins} to +% provide a default value} +% \begin{macrocode} +\providehyphenmins{\CurrentOption}{\tw@\tw@} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\dieresia} +% \begin{macro}{\texttilde} +% The original definition of |\"| is stored as |\dieresia|, because +% the we do not know what is its definition, since it depends on +% the encoding we are using or on special macros that the user +% might have loaded. The expansion of the macro might use the \TeX\ +% |\accent| primitive using some particular accent that the font +% provides or might check if a combined accent exists in the font. +% These two cases happen with respectively OT1 and T1 encodings. +% For this reason we save the definition of |\"| and use that in +% the definition of other macros. We do likewise for |\'| and +% |\~|. The present coding of this option file is incorrect in that +% it can break when the encoding changes. We do not use +% |\tilde| as the macro name because it is already defined as +% |\mathaccent|. +% \begin{macrocode} +\let\dieresia\" +\let\texttilde\~ +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\@umlaut} +% \begin{macro}{\@tilde} +% We check the encoding and if not using T1, we make the accents +% expand but enabling hyphenation beyond the accent. If this is the +% case, not all break positions will be found in words that contain +% accents, but this is a limitation in \TeX. An unsolved problem +% here is that the encoding can change at any time. The definitions +% below are made in such a way that a change between two 256-char +% encodings are supported, but changes between a 128-char and a +% 256-char encoding are not properly supported. We check if T1 is +% in use. If not, we will give a warning and proceed redefining the +% accent macros so that \TeX{} at least finds the breaks that are +% not too close to the accent. The warning will only be printed to +% the log file. +% \begin{macrocode} +\ifx\DeclareFontShape\@undefined + \wlog{Warning: You are using an old LaTeX} + \wlog{Some word breaks will not be found.} + \def\@umlaut#1{\allowhyphens\dieresia{#1}\allowhyphens} + \def\@tilde#1{\allowhyphens\texttilde{#1}\allowhyphens} +\else + \edef\bbl@next{T1} + \ifx\f@encoding\bbl@next + \let\@umlaut\dieresia + \let\@tilde\texttilde + \else + \wlog{Warning: You are using encoding \f@encoding\space + instead of T1.} + \wlog{Some word breaks will not be found.} + \def\@umlaut#1{\allowhyphens\dieresia{#1}\allowhyphens} + \def\@tilde#1{\allowhyphens\texttilde{#1}\allowhyphens} + \fi +\fi +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% Now we can define our shorthands: the french quotes, +% \changes{basque-1.0b}{1997/04/03}{Removed empty groups after +% guillemot characters} +% \begin{macrocode} +\declare@shorthand{basque}{"<}{% + \textormath{\guillemotleft}{\mbox{\guillemotleft}}} +\declare@shorthand{basque}{">}{% + \textormath{\guillemotright}{\mbox{\guillemotright}}} +% \end{macrocode} +% ordinals\footnote{The code for the ordinals was taken from the +% answer provided by Raymond Chen +% (\texttt{raymond@math.berkeley.edu}) to a question by Joseph Gil +% (\texttt{yogi@cs.ubc.ca}) in \texttt{comp.text.tex}.}, +% \begin{macrocode} + \declare@shorthand{basque}{''}{% + \textormath{\textquotedblright}{\sp\bgroup\prim@s'}} +% \end{macrocode} +% tildes, +% \begin{macrocode} +\declare@shorthand{basque}{~n}{\textormath{\~n}{\@tilde n}} +\declare@shorthand{basque}{~N}{\textormath{\~N}{\@tilde N}} +% \end{macrocode} +% and some additional commands. +% +% The shorthand |"-| should be used in places where a word contains +% an explictit hyphenation character. According to the Academy of +% the Basque language, when a word break occurs at an explicit +% hyphen it must appear \emph{both} at the end of the first line +% \emph{and} at the beginning of the second line. +% \changes{changes-1.0f}{2002/01/07}{The hyphen char needs to appear +% at the beginning of the line as well.} +% \begin{macrocode} +\declare@shorthand{basque}{"-}{% + \nobreak\discretionary{-}{-}{-}\bbl@allowhyphens} +\declare@shorthand{basque}{"|}{% + \textormath{\nobreak\discretionary{-}{}{\kern.03em}% + \allowhyphens}{}} +% \end{macrocode} +% +% The macro |\ldf@finish| takes care of looking for a +% configuration file, setting the main language to be switched on +% at |\begin{document}| and resetting the category code of +% \texttt{@} to its original value. +% \begin{macrocode} +\ldf@finish{basque} +% +% \end{macrocode} +% +% \Finale +% +%% +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +%% +\endinput diff --git a/Master/texmf-dist/source/generic/babel/basque.ins b/Master/texmf-dist/source/generic/babel/basque.ins new file mode 100644 index 00000000000..ccebb561bae --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/basque.ins @@ -0,0 +1,148 @@ +%% +%% This file will generate fast loadable files and documentation +%% driver files from the doc files in this package when run through +%% LaTeX or TeX. +%% +%% Copyright 1989-2005 Johannes L. Braams and any individual authors +%% listed elsewhere in this file. All rights reserved. +%% +%% This file is part of the Babel system. +%% -------------------------------------- +%% +%% It 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 +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% The Current Maintainer of this work is Johannes Braams. +%% +%% The list of all files belonging to the LaTeX base distribution is +%% given in the file `manifest.bbl. See also `legal.bbl' 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. +%% +%% --------------- start of docstrip commands ------------------ +%% +\def\filedate{1999/04/11} +\def\batchfile{basque.ins} +\input docstrip.tex + +{\ifx\generate\undefined +\Msg{**********************************************} +\Msg{*} +\Msg{* This installation requires docstrip} +\Msg{* version 2.3c or later.} +\Msg{*} +\Msg{* An older version of docstrip has been input} +\Msg{*} +\Msg{**********************************************} +\errhelp{Move or rename old docstrip.tex.} +\errmessage{Old docstrip in input path} +\batchmode +\csname @@end\endcsname +\fi} + +\declarepreamble\mainpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl 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. +\endpreamble + +\declarepreamble\fdpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl for additional +information. + +In particular, permission is granted to customize the declarations in +this file to serve the needs of your installation. + +However, NO PERMISSION is granted to distribute a modified version +of this file under its original name. + +\endpreamble + +\keepsilent + +\usedir{tex/generic/babel} + +\usepreamble\mainpreamble +\generate{\file{basque.ldf}{\from{basque.dtx}{code}} + } +\usepreamble\fdpreamble + +\ifToplevel{ +\Msg{***********************************************************} +\Msg{*} +\Msg{* To finish the installation you have to move the following} +\Msg{* files into a directory searched by TeX:} +\Msg{*} +\Msg{* \space\space All *.def, *.fd, *.ldf, *.sty} +\Msg{*} +\Msg{* To produce the documentation run the files ending with} +\Msg{* '.dtx' and `.fdd' through LaTeX.} +\Msg{*} +\Msg{* Happy TeXing} +\Msg{***********************************************************} +} + +\endinput diff --git a/Master/texmf-dist/source/generic/babel/bbcompat.dtx b/Master/texmf-dist/source/generic/babel/bbcompat.dtx new file mode 100644 index 00000000000..b90991e12fb --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/bbcompat.dtx @@ -0,0 +1,261 @@ +% \iffalse meta-comment +% +% Copyright 1989-2005 Johannes L. Braams and any individual authors +% listed elsewhere in this file. All rights reserved. +% +% This file is part of the Babel system. +% -------------------------------------- +% +% It 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 +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2003/12/01 or later. +% +% This work has the LPPL maintenance status "maintained". +% +% The Current Maintainer of this work is Johannes Braams. +% +% The list of all files belonging to the Babel system is +% given in the file `manifest.bbl. See also `legal.bbl' 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 +% \CheckSum{251} +% +% \iffalse +%<*dtx> +\ProvidesFile{bbcompat.dtx}[2004/02/19 v1.2h] +% +% +%% File 'bbcompat.dtx' +%% Copyright (C) 1989 -- 2004 by Johannes Braams, +%% TeXniek +%% all rights reserved. +% +%% Please report errors to: J.L. Braams +%% babel at braams.cistron.nl +%<*filedriver> +\documentclass{ltxdoc} +\newcommand*\TeXhax{\TeX hax} +\newcommand*\babel{\textsf{babel}} +\newcommand*\Lopt[1]{\textsf{#1}} +\newcommand*\file[1]{\texttt{#1}} +\newcommand*\pkg[1]{\texttt{#1}} +\begin{document} + \DocInput{bbcompat.dtx} +\end{document} +% +% \fi +% +% \GetFileInfo{bbcompat.dtx} +% \StopEventually{} +% +% \changes{bbcompat-1.2}{1996/11/02}{Added the check for \cs{LdfInit}} +% \changes{bbcompat-1.2d}{1999/04/12}{When these files are read by a +% non-babel plain format the @ has still category code `other' so +% can't use \cd{@undefined}} +% \begin{macrocode} +\ifx\LdfInit\undefined + \def\LdfInit{% + \chardef\atcatcode=\catcode`\@ + \catcode`\@=11\relax + \input babel.def\relax + \catcode`\@=\atcatcode \let\atcatcode\relax + \LdfInit} +\fi +% \end{macrocode} +% It seems that these files, although meant for compatibility with +% \file{plain.tex} are also used as packages in \LaTeXe. The +% disadvantage of that is that a number of compatibility measures +% with other packages that are part of \file{babel.sty} are not +% present. Therefore we issue an error and then load +% \file{babel.def} to let the user continue processing his +% document (at his own risk). +% +% First we determine whether we are loaded from \LaTeX\ by checking +% whether |\PackageError| is defined. +% \begin{macrocode} +\ifx\PackageError\undefined +% \end{macrocode} +% In this case we are not being loaded by \LaTeXe, so just define +% |\ProvidesLanguage| to prevent an error when the \file{.ldf} file +% is loaded. +% \begin{macrocode} + \def\ProvidesLanguage#1[#2 #3 #4]{% + \wlog{Language: #1 #4 #3 <#2>}}% +\else +% \end{macrocode} +% Now we define an error message which `deletes' itself from +% memory. +% \begin{macrocode} + \def\bblstyerror{% + \PackageError{babel}% + {You have used an old interface to call babel\MessageBreak + You may expect compatibility problems wit other packages}% + {You could proceed but don't complain if you run into errors}% + \let\bblstyerror\@undefined + } +% \end{macrocode} +% Now we can issue the error, it should appear when these files are +% loaded from \LaTeXe, with \emph{or} without \file{hyphen.cfg} +% preloaded in the format. +% \changes{bbcompat-1.2e}{1999/04/20}{Added a check for +% \cs{ProvidesLanguage}} +% \begin{macrocode} + \ifx\ProvidesLanguage\undefined +% \end{macrocode} +% In this case \file{hyphen.cfg} wasn't loaded in the \LaTeXe\ +% format so we also need to provide a suitable definition for +% |\ProvidesLanguage|. +% \begin{macrocode} + \bblstyerror + \def\ProvidesLanguage{% + \chardef\atcatcode=\catcode`\@ + \catcode`\@=11\relax + \input babel.def\relax + \catcode`\@=\atcatcode \let\atcatcode\relax + \ProvidesLanguage} +% \end{macrocode} +% When we end up here, \file{hyphen.cfg} was loaded into the +% format; we only need to issue the error from \LaTeXe. +% \begin{macrocode} + \else + \bblstyerror + \fi +\fi +% \end{macrocode} +% \changes{bbcompat-1.2}{1996/07/13}{Added \file{.sty} files and +% definition of \cs{CurrentOption} for language definition files +% that are loaded by more than one option.} +% \changes{bbcompat-1.2}{1996/12/14}{Added \file{welsh.sty}} +% \changes{bbcompat-1.2b}{1997/02/07}{Added \file{sanskrit.sty}} +% \changes{bbcompat-1.2c}{1998/03/24}{Added \file{hebrew.sty}} +% \changes{bbcompat-1.2d}{1999/03/09}{Added \file{ukraineb.sty}} +% \changes{bbcompat-1.2d}{1999/04/10}{Added \file{ngerman.sty} and +% \file{naustrian.sty}} +% \changes{bbcompat-1.2f}{2000/09/26}{Added \file{icelandic.sty}, +% \file{bulgarian.sty} and \file{samin.sty}} +% \changes{bbcompat-1.2f}{2000/09/27}{Define \cs{CurrentOption} in +% each file} +% \changes{bbcompat-1.2g}{2001/01/19}{Added code for usenglish and +% ukenglish.sty} +% \changes{bbcompat-1.2h}{2003/11/13}{Added \file{interlingua.sty}} +% \begin{macrocode} +%<+american>\def\CurrentOption{american} +%<+USenglish>\def\CurrentOption{USenglish} +%<+british>\def\CurrentOption{british} +%<+english>\def\CurrentOption{english} +%<+UKenglish>\def\CurrentOption{UKenglish} +%\input english.ldf\relax +%<+bahasa>\def\CurrentOption{bahasa}} +%<+bahasa>\input bahasa.ldf\relax +%<+breton>\def\CurrentOption{breton} +%<+breton>\input breton.ldf\relax +%<+bulgarian>\def\CurrentOption{bulgarian} +%<+bulgarian>\input bulgarian.ldf\relax +%<+catalan>\def\CurrentOption{catalan} +%<+catalan>\input catalan.ldf\relax +%<+croatian>\def\CurrentOption{croatian} +%<+croatian>\input croatian.ldf\relax +%<+czech>\def\CurrentOption{czech} +%<+czech>\input czech.ldf\relax +%<+danish>\def\CurrentOption{danish} +%<+danish>\input danish.ldf\relax +%<+afrikaans>\def\CurrentOption{afrikaans} +%<+dutch>\def\CurrentOption{dutch} +%<+afrikaans|dutch>\input dutch.ldf\relax +%<+esperanto>\def\CurrentOption{esperanto} +%<+esperanto>\input esperanto.ldf\relax +%<+estonian>\def\CurrentOption{estonian} +%<+estonian>\input estonian.ldf\relax +%<+finnish>\def\CurrentOption{finnish} +%<+finnish>\input finnish.ldf\relax +%<+francais>\def\CurrentOption{francais} +%<+french>\def\CurrentOption{french} +%<+francais|french>\input frenchb.ldf\relax +%<+galician>\def\CurrentOption{galician} +%<+galician>\input galician.ldf\relax +%<+austrian>\def\CurrentOption{austrian} +%<+german>\def\CurrentOption{german} +%<+germanb>\def\CurrentOption{german} +%<+austrian|german|germanb>\input germanb.ldf\relax +%<+naustrian>\def\CurrentOption{naustrian} +%<+ngerman>\def\CurrentOption{ngerman} +%<+naustrian|ngerman>\input ngermanb.ldf\relax +%<+greek>\def\CurrentOption{greek} +%<+greek>\input greek.ldf\relax +%<+icelandic>\def\CurrentOption{icelandic} +%<+icelandic>\input icelandic.ldf\relax +%<+interlingua>\def\CurrentOption{interlingua} +%<+interlingua>\input interlingua.ldf\relax +%<+irish>\def\CurrentOption{irish} +%<+irish>\input irish.ldf\relax +%<+italian>\def\CurrentOption{italian} +%<+italian>\input italian.ldf\relax +%<+lsorbian>\def\CurrentOption{lsorbian} +%<+lsorbian>\input lsorbian.ldf\relax +%<+magyar>\def\CurrentOption{magyar} +%<+hungarian>\def\CurrentOption{hungarian} +%<+magyar|hungarian>\input magyar.ldf\relax +%<+norsk>\def\CurrentOption{norsk} +%<+nynorsk>\def\CurrentOption{nynorsk} +%<+norsk|nynorsk>\input norsk.ldf\relax +%<+polish>\def\CurrentOption{polish} +%<+polish>\input polish.ldf\relax +%<+portuges>\def\CurrentOption{portuges} +%<+portuguese>\def\CurrentOption{portuguese} +%<+brazil>\def\CurrentOption{brazil} +%<+brazilian>\def\CurrentOption{brazilian} +%<+portuges|portuguese|brazil|brazilian>\input portuges.ldf\relax +%<+romanian>\def\CurrentOption{romanian} +%<+romanian>\input romanian.ldf\relax +%<+russianb>\def\CurrentOption{russianb} +%<+russianb>\input russianb.ldf\relax +%<+ukraineb>\def\CurrentOption{ukraineb} +%<+ukraineb>\input ukraineb.ldf\relax +%<+samin>\def\CurrentOption{samin} +%<+samin>\input samin.ldf\relax +%<+sanskrit>\def\CurrentOption{sanskrit} +%<+sanskrit>\input sanskrit.ldf\relax +%<+scottish>\def\CurrentOption{scottish} +%<+scottish>\input scottish.ldf\relax +%<+slovak>\def\CurrentOption{slovak} +%<+slovak>\input slovak.ldf\relax +%<+slovene>\def\CurrentOption{slovene} +%<+slovene>\input slovene.ldf\relax +%<+spanish>\def\CurrentOption{spanish} +%<+spanish>\input spanish.ldf\relax +%<+swedish>\def\CurrentOption{swedish} +%<+swedish>\input swedish.ldf\relax +%<+turkish>\def\CurrentOption{turkish} +%<+turkish>\input turkish.ldf\relax +%<+usorbian>\def\CurrentOption{usorbian} +%<+usorbian>\input usorbian.ldf\relax +%<+welsh>\def\CurrentOption{welsh} +%<+welsh>\input welsh.ldf\relax +%<+hebrew>\def\CurrentOption{hebrew} +%<+hebrew>\input rlbabel.def\input hebrew.ldf\relax +% \end{macrocode} +%% +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +\endinput diff --git a/Master/texmf-dist/source/generic/babel/bbidxglo.dtx b/Master/texmf-dist/source/generic/babel/bbidxglo.dtx new file mode 100644 index 00000000000..f58e44890a3 --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/bbidxglo.dtx @@ -0,0 +1,124 @@ +% \iffalse meta-comment +% +% Copyright 1989-2005 Johannes L. Braams and any individual authors +% listed elsewhere in this file. All rights reserved. +% +% This file is part of the Babel system. +% -------------------------------------- +% +% It 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 +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2003/12/01 or later. +% +% This work has the LPPL maintenance status "maintained". +% +% The Current Maintainer of this work is Johannes Braams. +% +% The list of all files belonging to the Babel system is +% given in the file `manifest.bbl. See also `legal.bbl' 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 +% \CheckSum{66} +% +% \iffalse +% +% \begin{macrocode} +%<*driver> +\ProvidesFile{bbidxglo.drv}[2004/02/19 v1.0b] +\documentclass{ltxdoc} +\GetFileInfo{bbidxglo.drv} +\newcommand{\babel}{\textsf{babel}} +\newcommand{\mkidx}{\texttt{MakeIndex}} +\newcommand{\file}[1]{\texttt{#1}} +\newcommand{\Lopt}[1]{\textsf{#1}} +\begin{document} +\DocInput{bbidxglo.dtx} +\end{document} +% +% \end{macrocode} +% +% \fi +% \title{Generating the index and chage log for the Babel system} +% \author{Johannes Braams} +% \date{\filedate} +% \maketitle +% +% \section{Description} +% +% This file contains the source for the style files for the \mkidx\ +% program. These are needed to produce the index for the complete +% source listing and to produce the listing of the changes. +% +% \StopEventually{} +% +% \section{The index and the list of changes } Most of the entries are +% the same as in the files \file{gind.ist} and \file{gglo.ist} from +% the \Lopt{doc} package. +% +% \begin{macrocode} +%<*idx|glo> +actual '=' +quote '!' +level '>' +% +% \end{macrocode} +% +% Because the \babel\ system consists of so many files the default +% codeline numbering scheme of the \Lopt{doc} package has been +% adapted. The line numbers consist of two parts seperated with a +% dot. This has to made known to the \mkidx\ program when it +% produces the index. +% +% \begin{macrocode} +%<+idx>page_compositor "." +% \end{macrocode} +% +% Any further entries are again copied from \file{gind.ist} and +% \file{gglo.ist}. +% +% \begin{macrocode} +%<*idx> +preamble +"\n \\begin{theindex} \n \\makeatletter\\scan@allowedfalse\n" +postamble +"\n\n \\end{theindex}\n" +% +%<*glo> +preamble +"\n \\begin{theglossary} \n + \\makeatletter\\scan@allowedfalse\n" +postamble +"\n\n \\end{theglossary}\n" +keyword "\\glossaryentry" +% +%<+idx|glo>item_x1 "\\efill \n \\subitem " +%<+idx>item_x2 "\\efill \n \\subsubitem " +%<+glo>item_x2 "\\ " +%<*idx|glo> +delim_0 "\\pfill " +delim_1 "\\pfill " +delim_2 "\\pfill " +% The next lines will produce some warnings when +% running Makeindex as they try to cover two different +% versions of the program: +lethead_prefix "{\\bfseries\\hfil " +lethead_suffix "\\hfil}\\nopagebreak\n" +% +%<+idx>lethead_flag 1 +%<+glo>lethead_flag 0 +%<*idx|glo> +heading_prefix "{\\bfseries\\hfil " +heading_suffix "\\hfil}\\nopagebreak\n" +% +%<+idx>headings_flag 1 +%<+glo>headings_flag 0 +% \end{macrocode} +% diff --git a/Master/texmf-dist/source/generic/babel/bbplain.dtx b/Master/texmf-dist/source/generic/babel/bbplain.dtx new file mode 100644 index 00000000000..ba2aad20de2 --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/bbplain.dtx @@ -0,0 +1,717 @@ +% \iffalse meta-comment +% +% Copyright 1989-2005 Johannes L. Braams and any individual authors +% listed elsewhere in this file. All rights reserved. +% +% This file is part of the Babel system. +% -------------------------------------- +% +% It 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 +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2003/12/01 or later. +% +% This work has the LPPL maintenance status "maintained". +% +% The Current Maintainer of this work is Johannes Braams. +% +% The list of all files belonging to the Babel system is +% given in the file `manifest.bbl. See also `legal.bbl' 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 +% \CheckSum{795} +% +% \iffalse +%<*dtx> +\ProvidesFile{bbplain.dtx} + [2004/02/19 v1.0r Babel support for plain-based formats] +% +% +%% File `bbplain.dtx' +%% Babel package for LaTeX version 2e +%% Copyright (C) 1989 - 2004 +%% by Johannes Braams +% +%% Please report errors to: J.L. Braams +%% babel at braams.cistron.nl +% +% This file is part of the babel system, it provides the source +% code for the extra definitions needed to be able to use babel +% with a plain-based format. +%<*filedriver> +\documentclass{ltxdoc} +\font\manual=logo10 % font used for the METAFONT logo, etc. +\newcommand*\MF{{\manual META}\-{\manual FONT}} +\newcommand*{\babel}{\textsf{babel}} +\newcommand*{\langvar}{$\langle \it lang \rangle$} +\newcommand*{\note}[1]{} +\newcommand*{\pkg}[1]{\textsf{#1}} +\newcommand*{\Lopt}[1]{\textsf{#1}} +\newcommand*{\file}[1]{\texttt{#1}} +\begin{document} + \DocInput{bbplain.dtx} +\end{document} +% +% \fi +% +% \GetFileInfo{bbplain.dtx} +% \StopEventually{} +% \changes{bbplain-1.0n}{1998/06/08}{Added the source for the format +% wrapper files} +% +% \section{Not renaming \file{hyphen.tex}} +% As Don Knuth has declared that the filename \file{hyphen.tex} may +% only be used to designate \emph{his} version of the american +% English hyphenation patterns, a new solution has to be found in +% order to be able to load hyphenation patterns for other languages +% in a plain-based \TeX-format. +% When asked he responded: +% \begin{quote} +% That file name is "sacred", and if anybody changes it they will +% cause severe upward/downward compatibility headaches. +% +% People can have a file localhyphen.tex or whatever they like, +% but they mustn't diddle with hyphen.tex (or plain.tex except to +% preload additional fonts). +% \end{quote} +% +% The files \file{bplain.tex} and \file{blplain.tex} can be used as +% replacement wrappers around \file{plain.tex} and +% \file{lplain.tex} to acheive the desired effect, based on the +% \pkg{babel} package. If you load each of them with ini\TeX, you +% will get a file called either \file{bplain.fmt} or +% \file{blplain.fmt}, which you can use as replacements for +% \file{plain.fmt} and \file{lplain.fmt}. +% +% As these files are going to be read as the first thing ini\TeX\ +% sees, we need to set some category codes just to be able to +% change the definition of |\input| +% \begin{macrocode} +%<*bplain|blplain> +\catcode`\{=1 % left brace is begin-group character +\catcode`\}=2 % right brace is end-group character +\catcode`\#=6 % hash mark is macro parameter character +% \end{macrocode} +% Now let's see if a file called \file{hyphen.cfg} can be found +% somewhere on \TeX's input path by trying to open it for +% reading... +% \begin{macrocode} +\openin 0 hyphen.cfg +% \end{macrocode} +% If the file wasn't found the following test turns out true. +% \begin{macrocode} +\ifeof0 +\else +% \end{macrocode} +% When \file{hyphen.cfg} could be opened we make sure that +% \emph{it} will be read instead of the file \file{hyphen.tex} +% which should (according to Don Knuth's ruling) contain the +% american English hyphenation patterns and nothing else. +% +% We do this by first saving the original meaning of |\input| (and +% I use a one letter control sequence for that so as not to waste +% multi-letter control sequence on this in the format). +% \begin{macrocode} + \let\a\input +% \end{macrocode} +% Then |\input| is defined to forget about its argument and load +% \file{hyphen.cfg} instead. +% \begin{macrocode} + \def\input #1 {% + \let\input\a + \a hyphen.cfg +% \end{macrocode} +% Once that's done the original meaning of |\input| can be restored +% and the definition of |\a| can be forgotten. +% \begin{macrocode} + \let\a\undefined + } +\fi +% +% \end{macrocode} +% Now that we have made sure that \file{hyphen.cfg} will be loaded +% at the right moment it is time to load \file{plain.tex}. +% \begin{macrocode} +%\a plain.tex +%\a lplain.tex +% \end{macrocode} +% Finally we change the contents of |\fmtname| to indicate that +% this is \emph{not} the plain format, but a format based on plain +% with the \pkg{babel} package preloaded. +% \begin{macrocode} +%\def\fmtname{babel-plain} +%\def\fmtname{babel-lplain} +% \end{macrocode} +% +% When you are using a different format, based on plain.tex you can +% make a copy of blplain.tex, rename it and replace \file{plain.tex} +% with the name of your format file. +% +% \section{Support for formats based on \textsc{plain}\TeX} +% +% The following code duplicates or emulates parts of \LaTeXe\ that +% are needed for \babel. +% +% \changes{bbplain-1.0f}{1996/07/09}{Consistently use \cs{@undefined} +% instead of \cs{undefined}} +% \changes{bbplain-1.0f}{1996/07/09}{added \cs{@empty}} +% \changes{bbplain-1.0h}{1996/10/07}{Only load the necessary parts +% into the format, let this file be read agian by babel.def} +% \begin{macrocode} +%<*code> +\ifx\adddialect\@undefined +% \end{macrocode} +% When |\adddialect| is still undefined we are making a +% format. In that case only the first part of this file is needed. +% \begin{macrocode} + \def\@empty{} +% \end{macrocode} +% We need to define |\loadlocalcfg| for plain users as the +% \LaTeX\ definition uses |\InputIfFileExists|. +% \changes{bbplain-1.0c}{1995/07/26}{Added definition of +% \cs{loadlocalcfg}} +% \changes{bbplain-1.0d}{1996/01/08}{Also reset category codes after +% loading the configuration file as \cs{AtEndOfPackage} is +% undefined in this case} +% \begin{macrocode} + \def\loadlocalcfg#1{% + \openin0#1.cfg + \ifeof0 + \closein0 + \else + \closein0 + {\immediate\write16{*************************************}% + \immediate\write16{* Local config file #1.cfg used}% + \immediate\write16{*}% + } + \input #1.cfg\relax + \fi +% \end{macrocode} +% We have to execute \cs{@endofldf} in this case +% \begin{macrocode} + \@endofldf + } +% \end{macrocode} +% +% \changes{bbplain-1.0c}{1995/11/08}{Moved the \cs{dump} code here from +% \file{babel.dtx}} +% +% \changes{bbplain-0.1}{1991/10/31}{Added redefinition of \cs{dump} to +% add a message to \cs{everyjob}} +% We want to add a message to the message \LaTeX$\:$2.09 puts in +% the |\everyjob| register. This could be done by the following +% code: +% \begin{verbatim} +% \let\orgeveryjob\everyjob +% \def\everyjob#1{% +% \orgeveryjob{#1}% +% \orgeveryjob\expandafter{\the\orgeveryjob\immediate\write16{% +% hyphenation patterns for \the\loaded@patterns loaded.}}% +% \let\everyjob\orgeveryjob\let\orgeveryjob\@undefined} +% \end{verbatim} +% The code above redefines the control sequence \cs{everyjob} +% in order to be able to add something to the current contents of +% the register. This is necessary because the processing of +% hyphenation patterns happens long before \LaTeX\ fills the +% register.\\ +% There are some problems with this approach though. +% \begin{itemize} +% \item When someone wants to use several hyphenation patterns with +% \SliTeX\ the above scheme won't work. The reason is that \SliTeX\ +% overwrites the contents of the |\everyjob| register with its own +% message. +% \item Plain \TeX\ does not use the |\everyjob| register so the +% message would not be displayed. +% \end{itemize} +% To circumvent this a `dirty trick' can be used. As this code is +% only processed when creating a new format file there is one +% command that is sure to be used, |\dump|. Therefore the original +% |\dump| is saved in |\org@dump| and a new definition is supplied. +% \begin{macrocode} + \let\orig@dump=\dump + \def\dump{% +% \end{macrocode} +% To make sure that \LaTeX$\:$2.09 executes the +% |\@begindocumenthook| we would want to alter |\begin{document}|, +% but as this done too often already, we add the new code at the +% front of |\@preamblecmds|. But we can only do that after it has +% been defined, so we add this piece of code to |\dump|. +% \changes{bbplain-1.0c}{1995/11/19}{Add execution of +% \cs{@begindocumenthook} to \cs{@preamblecmds}} +% \changes{bbplain-1.0i}{1997/01/02}{\cs{document} is not a +% \LaTeX2.09-only command; AMS\TeX defines it too; now use +% \cs{@ztryfc} to detect \LaTeX2.09} +% \changes{bbplain-1.0j}{1997/01/07}{Add the definition of +% \cs{@begindocumenthook} to the \LaTeX2.09 format} +% \begin{macrocode} + \ifx\@ztryfc\@undefined + \else + \toks0=\expandafter{\@preamblecmds} + \edef\@preamblecmds{\noexpand\@begindocumenthook\the\toks0} + \def\@begindocumenthook{} + \fi +% \end{macrocode} +% This new definition starts by adding an instruction to write a +% message on the terminal and in the transcript file to inform the +% user of the preloaded hyphenation patterns. +% \changes{bbplain-1.0f}{1996/07/09}{Use \cs{toks8} instead of +% \cs{patterns@loaded}} +% \begin{macrocode} + \everyjob\expandafter{\the\everyjob% + \immediate\write16{\the\toks8 loaded.}}% +% \end{macrocode} +% Then everything is restored to the old situation and the format +% is dumped. +% \begin{macrocode} + \let\dump\orig@dump\let\orig@dump\@undefined\dump} + \expandafter\endinput +\fi +% \end{macrocode} +% The rest of this file is not processed by ini\TeX\ but during the +% normal document run. +% A number of \LaTeX\ macro's that are needed later on. +% \changes{bbplain-1.0n}{1998/06/10}{Added \cs{@secondoftwo}} +% \changes{bbplain-1.0q}{1999/09/16}{Added \cs{@ifundefined}} +% \begin{macrocode} +\long\def\@firstofone#1{#1} +\long\def\@firstoftwo#1#2{#1} +\long\def\@secondoftwo#1#2{#2} +\def\@ifstar#1{\@ifnextchar *{\@firstoftwo{#1}}} +\def\@star@or@long#1{% + \@ifstar + {\let\l@ngrel@x\relax#1}% + {\let\l@ngrel@x\long#1}} +\let\l@ngrel@x\relax +\def\@car#1#2\@nil{#1} +\def\@cdr#1#2\@nil{#2} +\let\@typeset@protect\relax +\long\def\@gobble#1{} +\edef\@backslashchar{\expandafter\@gobble\string\\} +\def\strip@prefix#1>{} +\def\g@addto@macro#1#2{{% + \toks@\expandafter{#1#2}% + \xdef#1{\the\toks@}}} +\def\@namedef#1{\expandafter\def\csname #1\endcsname} +\def\@ifundefined#1{% + \expandafter\ifx\csname#1\endcsname\relax + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi} +% \end{macrocode} +% \LaTeXe\ has the command |\@onlypreamble| which adds commands to +% a list of commands that are no longer needed after +% |\begin{document}|. +% \begin{macrocode} +\ifx\@preamblecmds\@undefined + \def\@preamblecmds{} +\fi +\def\@onlypreamble#1{% + \expandafter\gdef\expandafter\@preamblecmds\expandafter{% + \@preamblecmds\do#1}} +\@onlypreamble\@onlypreamble +% \end{macrocode} +% Mimick \LaTeX's |\AtBeginDocument|; for this to work the user +% needs to add |\begindocument| to his file. +% \begin{macrocode} +\def\begindocument{% + \@begindocumenthook + \global\let\@begindocumenthook\@undefined + \def\do##1{\global\let ##1\@undefined}% + \@preamblecmds + \global\let\do\noexpand + } +% \end{macrocode} +% +% \changes{bbplain-1.0j}{1997/01/07}{\cs{@begindocumenthook} might +% already be defined} +% \changes{bbplain-1.0k}{1997/01/14}{missing \cs{@undefined} added} +% \begin{macrocode} +\ifx\@begindocumenthook\@undefined + \def\@begindocumenthook{} +\fi +\@onlypreamble\@begindocumenthook +\def\AtBeginDocument{\g@addto@macro\@begindocumenthook} +% \end{macrocode} +% We also have to mimick \LaTeX's |\AtEndOfPackage|. Our +% replacement macro is much simpler; it stores its argument in +% |\@endofldf|. +% \begin{macrocode} +\def\AtEndOfPackage#1{\g@addto@macro\@endofldf{#1}} +\@onlypreamble\AtEndOfPackage +\def\@endofldf{} +\@onlypreamble\@endofldf +% \end{macrocode} +% \LaTeX\ needs to be able to switch off writing to its auxiliary +% files; plain doesn't have them by default. +% \changes{bbplain-1.0m}{1997/04/28}{Set \cs{if@filesw} to +% \cs{iffalse} only for plain \TeX} +% \changes{bbplain-1.0n}{1997/09/11}{Repaired typo and added missing +% \cs{endcsname}} +% \begin{macrocode} +\ifx\if@filesw\@undefined + \expandafter\let\csname if@filesw\expandafter\endcsname + \csname iffalse\endcsname +\fi +% \end{macrocode} +% Mimick \LaTeX's commands to define control sequences. +% \changes{bbplain-1.0e}{1996/02/22}{Provide a more complete emulation +% of \cs{DeclareRobustCommand} and \cs{newcommand}} +% \begin{macrocode} +\def\newcommand{\@star@or@long\new@command} +\def\new@command#1{% + \@testopt{\@newcommand#1}0} +\def\@newcommand#1[#2]{% + \@ifnextchar [{\@xargdef#1[#2]}% + {\@argdef#1[#2]}} +\long\def\@argdef#1[#2]#3{% + \@yargdef#1\@ne{#2}{#3}} +\long\def\@xargdef#1[#2][#3]#4{% + \expandafter\def\expandafter#1\expandafter{% + \expandafter\@protected@testopt\expandafter #1% + \csname\string#1\expandafter\endcsname{#3}}% + \expandafter\@yargdef \csname\string#1\endcsname + \tw@{#2}{#4}} +\long\def\@yargdef#1#2#3{% + \@tempcnta#3\relax + \advance \@tempcnta \@ne + \let\@hash@\relax + \edef\reserved@a{\ifx#2\tw@ [\@hash@1]\fi}% + \@tempcntb #2% + \@whilenum\@tempcntb <\@tempcnta + \do{% + \edef\reserved@a{\reserved@a\@hash@\the\@tempcntb}% + \advance\@tempcntb \@ne}% + \let\@hash@##% + \l@ngrel@x\expandafter\def\expandafter#1\reserved@a} +\let\providecommand\newcommand +% \end{macrocode} +% +% \begin{macrocode} +\def\DeclareRobustCommand{\@star@or@long\declare@robustcommand} +\def\declare@robustcommand#1{% + \edef\reserved@a{\string#1}% + \def\reserved@b{#1}% + \edef\reserved@b{\expandafter\strip@prefix\meaning\reserved@b}% + \edef#1{% + \ifx\reserved@a\reserved@b + \noexpand\x@protect + \noexpand#1% + \fi + \noexpand\protect + \expandafter\noexpand\csname + \expandafter\@gobble\string#1 \endcsname + }% + \expandafter\new@command\csname + \expandafter\@gobble\string#1 \endcsname +} +\def\x@protect#1{% + \ifx\protect\@typeset@protect\else + \@x@protect#1% + \fi +} +\def\@x@protect#1\fi#2#3{% + \fi\protect#1% +} +% \end{macrocode} +% +% The following little macro |\in@| is taken from latex.ltx; it +% checks whether its first argument is part of its second +% argument. It uses the boolean |\in@|; allocating a new boolean +% inside conditionally executed code is not possible, hence the +% construct with the temporary definition of |\bbl@tempa|. +% \changes{bbplain-1.0o}{1998/07/02}{Added definition of \cs{in@}} +% \begin{macrocode} +\def\bbl@tmpa{\csname newif\endcsname\ifin@} +\ifx\in@\@undefined + \def\in@#1#2{% + \def\in@@##1#1##2##3\in@@{% + \ifx\in@##2\in@false\else\in@true\fi}% + \in@@#2#1\in@\in@@} +\else + \let\bbl@tmpa\@empty +\fi +\bbl@tmpa +% \end{macrocode} +% +% \LaTeX\ has a macro to check whether a certain package was loaded +% with specific options. The command has two extra arguments which +% are code to be executed in either the true or false case. +% This is used to detect whether the document needs one of the +% accents to be activated (\Lopt{activegrave} and +% \Lopt{activeacute}). For plain \TeX\ we assume that the user +% wants them to be active by default. Therefore the only thing we +% do is execute the third argument (the code for the true case). +% +% \begin{macrocode} +\def\@ifpackagewith#1#2#3#4{% + #3} +% \end{macrocode} +% The \LaTeX\ macro |\@ifl@aded| checks whether a file was +% loaded. This functionality is not needed for plain \TeX\ but we +% need the macro to be defined as a no-op. +% \changes{bbplain-1.0p}{1999/04/27}{Added \cs{@ifl@aded} as a no-op} +% \begin{macrocode} +\def\@ifl@aded#1#2#3#4{} +% \end{macrocode} +% +% \changes{bbplain-1.0e}{1996/01/15}{Added the \cs{newcommand} code} +% For the following code we need to make sure that the commands +% |\newcommand| and |\providecommand| exist with some sensible +% definition. They are not fully equivalent to their \LaTeXe\ +% versions; just enough to make things work in plain~\TeX +% environments. +% +% \changes{bbplain-1.0k}{1997/01/14}{\cs{newcount} is an \cs{outer} +% command, can't use it inside an \cs{if} construct} +% \changes{bbplain-1.0l}{1997/01/19}{Mixed up the definition of +% \cs{@tempcntb}} +% \begin{macrocode} +\ifx\@tempcnta\@undefined + \csname newcount\endcsname\@tempcnta\relax +\fi +\ifx\@tempcntb\@undefined + \csname newcount\endcsname\@tempcntb\relax +\fi +% \end{macrocode} +% To prevent wasting two counters in \LaTeX$\:$2.09 (because +% counters with the same name are allocated later by it) we reset +% the counter that holds the next free counter (|\count10|). +% \begin{macrocode} +\ifx\bye\@undefined + \advance\count10 by -2\relax +\fi +\ifx\@ifnextchar\@undefined + \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\@sptoken + \let\reserved@c\@xifnch + \else + \ifx\@let@token\reserved@d + \let\reserved@c\reserved@a + \else + \let\reserved@c\reserved@b + \fi + \fi + \reserved@c} + \def\:{\let\@sptoken= } \: % this makes \@sptoken a space token + \def\:{\@xifnch} \expandafter\def\: {\futurelet\@let@token\@ifnch} +\fi +\def\@testopt#1#2{% + \@ifnextchar[{#1}{#1[#2]}} +\def\@protected@testopt#1{%% + \ifx\protect\@typeset@protect + \expandafter\@testopt + \else + \@x@protect#1% + \fi} +\long\def\@whilenum#1\do #2{\ifnum #1\relax #2\relax\@iwhilenum{#1\relax + #2\relax}\fi} +\long\def\@iwhilenum#1{\ifnum #1\expandafter\@iwhilenum + \else\expandafter\@gobble\fi{#1}} +% \end{macrocode} +% Code from \file{ltoutenc.dtx}, adapted for use in the plain \TeX\ +% environment. +% \begin{macrocode} +\def\DeclareTextCommand{% + \@dec@text@cmd\providecommand +} +\def\ProvideTextCommand{% + \@dec@text@cmd\providecommand +} +\def\DeclareTextSymbol#1#2#3{% + \@dec@text@cmd\chardef#1{#2}#3\relax +} +\def\@dec@text@cmd#1#2#3{% + \expandafter\def\expandafter#2% + \expandafter{% + \csname#3-cmd\expandafter\endcsname + \expandafter#2% + \csname#3\string#2\endcsname + }% +% \let\@ifdefinable\@rc@ifdefinable + \expandafter#1\csname#3\string#2\endcsname +} +\def\@current@cmd#1{% + \ifx\protect\@typeset@protect\else + \noexpand#1\expandafter\@gobble + \fi +} +\def\@changed@cmd#1#2{% + \ifx\protect\@typeset@protect + \expandafter\ifx\csname\cf@encoding\string#1\endcsname\relax + \expandafter\ifx\csname ?\string#1\endcsname\relax + \expandafter\def\csname ?\string#1\endcsname{% + \@changed@x@err{#1}% + }% + \fi + \global\expandafter\let + \csname\cf@encoding \string#1\expandafter\endcsname + \csname ?\string#1\endcsname + \fi + \csname\cf@encoding\string#1% + \expandafter\endcsname + \else + \noexpand#1% + \fi +} +\def\@changed@x@err#1{% + \errhelp{Your command will be ignored, type to proceed}% + \errmessage{Command \protect#1 undefined in encoding \cf@encoding}} +\def\DeclareTextCommandDefault#1{% + \DeclareTextCommand#1?% +} +\def\ProvideTextCommandDefault#1{% + \ProvideTextCommand#1?% +} +\expandafter\let\csname OT1-cmd\endcsname\@current@cmd +\expandafter\let\csname?-cmd\endcsname\@changed@cmd +\def\DeclareTextAccent#1#2#3{% + \DeclareTextCommand#1{#2}[1]{\accent#3 ##1} +} +\def\DeclareTextCompositeCommand#1#2#3#4{% + \expandafter\let\expandafter\reserved@a\csname#2\string#1\endcsname + \edef\reserved@b{\string##1}% + \edef\reserved@c{% + \expandafter\@strip@args\meaning\reserved@a:-\@strip@args}% + \ifx\reserved@b\reserved@c + \expandafter\expandafter\expandafter\ifx + \expandafter\@car\reserved@a\relax\relax\@nil + \@text@composite + \else + \edef\reserved@b##1{% + \def\expandafter\noexpand + \csname#2\string#1\endcsname####1{% + \noexpand\@text@composite + \expandafter\noexpand\csname#2\string#1\endcsname + ####1\noexpand\@empty\noexpand\@text@composite + {##1}% + }% + }% + \expandafter\reserved@b\expandafter{\reserved@a{##1}}% + \fi + \expandafter\def\csname\expandafter\string\csname + #2\endcsname\string#1-\string#3\endcsname{#4} + \else + \errhelp{Your command will be ignored, type to proceed}% + \errmessage{\string\DeclareTextCompositeCommand\space used on + inappropriate command \protect#1} + \fi +} +\def\@text@composite#1#2#3\@text@composite{% + \expandafter\@text@composite@x + \csname\string#1-\string#2\endcsname +} +\def\@text@composite@x#1#2{% + \ifx#1\relax + #2% + \else + #1% + \fi +} +% +\def\@strip@args#1:#2-#3\@strip@args{#2} +\def\DeclareTextComposite#1#2#3#4{% + \def\reserved@a{\DeclareTextCompositeCommand#1{#2}{#3}}% + \bgroup + \lccode`\@=#4% + \lowercase{% + \egroup + \reserved@a @% + }% +} +% +\def\UseTextSymbol#1#2{% +% \let\@curr@enc\cf@encoding +% \@use@text@encoding{#1}% + #2% +% \@use@text@encoding\@curr@enc +} +\def\UseTextAccent#1#2#3{% +% \let\@curr@enc\cf@encoding +% \@use@text@encoding{#1}% +% #2{\@use@text@encoding\@curr@enc\selectfont#3}% +% \@use@text@encoding\@curr@enc +} +\def\@use@text@encoding#1{% +% \edef\f@encoding{#1}% +% \xdef\font@name{% +% \csname\curr@fontshape/\f@size\endcsname +% }% +% \pickup@font +% \font@name +% \@@enc@update +} +\def\DeclareTextSymbolDefault#1#2{% + \DeclareTextCommandDefault#1{\UseTextSymbol{#2}#1}% +} +\def\DeclareTextAccentDefault#1#2{% + \DeclareTextCommandDefault#1{\UseTextAccent{#2}#1}% +} +\def\cf@encoding{OT1} +% \end{macrocode} +% Currently we only use the \LaTeXe\ method for accents for those +% that are known to be made active in \emph{some} language +% definition file. +% \begin{macrocode} +\DeclareTextAccent{\"}{OT1}{127} +\DeclareTextAccent{\'}{OT1}{19} +\DeclareTextAccent{\^}{OT1}{94} +\DeclareTextAccent{\`}{OT1}{18} +\DeclareTextAccent{\~}{OT1}{126} +% \end{macrocode} +% The following control sequences are used in \file{babel.def} +% but are not defined for \textsc{plain} \TeX. +% \changes{bbplain-1.0f}{1996/07/10}{Added \cs{textquotedblright} and +% \cs{textquoteright}} +% \changes{bbplain-1.0g}{1996/08/15}{Added \cs{ss} and \cs{i}} +% \changes{bbplain-1.0r}{2000/10/02}{Added \cs{textquotedblleft} and +% \cs{textquoteleft}} +% \begin{macrocode} +\DeclareTextSymbol{\textquotedblleft}{OT1}{92} +\DeclareTextSymbol{\textquotedblright}{OT1}{`\"} +\DeclareTextSymbol{\textquoteleft}{OT1}{`\`} +\DeclareTextSymbol{\textquoteright}{OT1}{`\'} +\DeclareTextSymbol{\i}{OT1}{16} +\DeclareTextSymbol{\ss}{OT1}{25} +% \end{macrocode} +% For a couple of languages we need the \LaTeX-control sequence +% |\scriptsize| to be available. Because plain \TeX\ doesn't have +% such a sofisticated font mechanism as \LaTeX\ has, we just |\let| +% it to |\sevenrm|. +% \changes{bbplain-1.0f}{1996/07/10}{Added definition of +% \cs{scriptsize}} +% \begin{macrocode} +\ifx\scriptsize\@undefined + \let\scriptsize\sevenrm +\fi +% +% \end{macrocode} +% +\endinput +%% +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} diff --git a/Master/texmf-dist/source/generic/babel/breton.dtx b/Master/texmf-dist/source/generic/babel/breton.dtx new file mode 100644 index 00000000000..e87500aaf14 --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/breton.dtx @@ -0,0 +1,365 @@ +% \iffalse meta-comment +% +% Copyright 1989-2005 Johannes L. Braams and any individual authors +% listed elsewhere in this file. All rights reserved. +% +% This file is part of the Babel system. +% -------------------------------------- +% +% It 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 +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2003/12/01 or later. +% +% This work has the LPPL maintenance status "maintained". +% +% The Current Maintainer of this work is Johannes Braams. +% +% The list of all files belonging to the Babel system is +% given in the file `manifest.bbl. See also `legal.bbl' 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 +% \CheckSum{263} +% +% \iffalse +% Tell the \LaTeX\ system who we are and write an entry on the +% transcript. +%<*dtx> +\ProvidesFile{breton.dtx} +% +%\ProvidesLanguage{breton} +%\fi +%\ProvidesFile{breton.dtx} + [2005/03/29 v1.0h Breton support from the babel system] +%\iffalse +%% File `breton.dtx' +%% Babel package for LaTeX version 2e +%% Copyright (C) 1989 - 2005 +%% by Johannes Braams, TeXniek +% +%% Breton Language Definition File +%% Copyright (C) 1994 - 2005 +%% by Christian Rolland +% Universite de Bretagne occidentale +% Departement d'informatique +% 6, avenue Le Gorgeu +% BP 452 +% 29275 Brest Cedex -- FRANCE +% Christian.Rolland at univ-brest.fr (Internet) +% +%% Please report errors to: J.L. Braams +%% babel at braams.cistron.nl +% +% This file is part of the babel system, it provides the source +% code for the Breton language definition file. It is based on the +% language definition file for french, version 4.5c +%<*filedriver> +\documentclass{ltxdoc} +\newcommand*\TeXhax{\TeX hax} +\newcommand*\babel{\textsf{babel}} +\newcommand*\langvar{$\langle \it lang \rangle$} +\newcommand*\note[1]{} +\newcommand*\Lopt[1]{\textsf{#1}} +\newcommand*\file[1]{\texttt{#1}} +\begin{document} + \DocInput{breton.dtx} +\end{document} +% +%\fi +% \GetFileInfo{breton.dtx} +% \changes{breton-1.0e}{1996/10/10}{Replaced \cs{undefined} with +% \cs{@undefined} and \cs{empty} with \cs{@empty} for consistency +% with \LaTeX, moved the definition of \cs{atcatcode} right to the +% beginning.} +% +% \changes{breton-1.0}{1994/09/21}{First release} +% +% \section{The Breton language} +% +% The file \file{\filename}\footnote{The file described in this +% section has version number \fileversion\ and was last revised on +% \filedate.} defines all the language-specific macros for the Breton +% language. +% +% There are not really typographic rules for the Breton +% language. It is a local language (it's one of the celtic +% languages) which is spoken in Brittany (West of France). So we +% have a synthesis between french typographic rules and english +% typographic rules. The characters \texttt{:}, \texttt{;}, +% \texttt{!} and \texttt{?} are made active in order to get a +% whitespace automatically before these characters. +% +% \StopEventually{} +% +% The macro |\LdfInit| takes care of preventing that this file is +% loaded more than once, checking the category code of the +% \texttt{@} sign, etc. +% \changes{breton-1.0e}{1996/11/02}{Now use \cs{LdfInit} to perform +% initial checks} +% \begin{macrocode} +%<*code> +\LdfInit{breton}\captionsbreton +% \end{macrocode} +% +% When this file is read as an option, i.e. by the |\usepackage| +% command, \texttt{breton} will be an `unknown' language in which +% case we have to make it known. So we check for the existence of +% |\l@breton| to see whether we have to do something here. +% +% \begin{macrocode} +\ifx\l@breton\@undefined + \@nopatterns{Breton} + \adddialect\l@breton0\fi +% \end{macrocode} +% The next step consists of defining commands to switch to the +% English language. The reason for this is that a user might want +% to switch back and forth between languages. +% +% \begin{macro}{\captionsbreton} +% The macro |\captionsbreton| defines all strings used in the +% four standard document classes provided with \LaTeX. +% \changes{breton-1.0b}{1995/07/04}{Added \cs{proofname} for +% AMS-\LaTeX} +% \changes{breton-1.0h}{2000/09/19}{Added \cs{glossaryname}} +% \begin{macrocode} +\addto\captionsbreton{% + \def\prefacename{Rakskrid}% + \def\refname{Daveenno\`u}% + \def\abstractname{Dvierra\~n}% + \def\bibname{Lennadurezh}% + \def\chaptername{Pennad}% + \def\appendixname{Stagadenn}% + \def\contentsname{Taolenn}% + \def\listfigurename{Listenn ar Figurenno\`u}% + \def\listtablename{Listenn an taolenno\`u}% + \def\indexname{Meneger}% + \def\figurename{Figurenn}% + \def\tablename{Taolenn}% + \def\partname{Lodenn}% + \def\enclname{Diello\`u kevret}% + \def\ccname{Eilskrid da}% + \def\headtoname{evit} + \def\pagename{Pajenn}% + \def\seename{Gwelout}% + \def\alsoname{Gwelout ivez}% + \def\proofname{Proof}% <-- needs translation + \def\glossaryname{Glossary}% <-- Needs translation +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\datebreton} +% The macro |\datebreton| redefines the command +% |\today| to produce Breton dates. +% \changes{breton-1.0f}{1997/10/01}{Use \cs{edef} to define \cs{today} +% to save memory} +% \changes{breton-1.0f}{1998/03/28}{use \cs{def} instead of \cs{edef}} +% \begin{macrocode} +\def\datebreton{% + \def\today{\ifnum\day=1\relax 1\/$^{\rm a\tilde{n}}$\else + \number\day\fi \space a\space viz\space\ifcase\month\or + Genver\or C'hwevrer\or Meurzh\or Ebrel\or Mae\or Mezheven\or + Gouere\or Eost\or Gwengolo\or Here\or Du\or Kerzu\fi + \space\number\year}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\extrasbreton} +% \begin{macro}{\noextrasbreton} +% The macro |\extrasbreton| will perform all the extra +% definitions needed for the Breton language. The macro +% |\noextrasbreton| is used to cancel the actions of +% |\extrasbreton|. +% +% The category code of the characters \texttt{:}, \texttt{;}, +% \texttt{!} and \texttt{?} is made |\active| to insert a little +% white space. +% \changes{breton-1.0b}{1995/03/07}{Use the new mechanism for dealing +% with active chars} +% \begin{macrocode} +\initiate@active@char{:} +\initiate@active@char{;} +\initiate@active@char{!} +\initiate@active@char{?} +% \end{macrocode} +% We specify that the breton group of shorthands should be used. +% \begin{macrocode} +\addto\extrasbreton{\languageshorthands{breton}} +% \end{macrocode} +% These characters are `turned on' once, later their definition may +% vary. +% \begin{macrocode} +\addto\extrasbreton{% + \bbl@activate{:}\bbl@activate{;}% + \bbl@activate{!}\bbl@activate{?}} +% \end{macrocode} +% Don't forget to turn the shorthands off again. +% \changes{breton-1.0g}{1999/12/16}{Deactivate shorthands ouside of Breton} +% \begin{macrocode} +\addto\noextrasbreton{% + \bbl@deactivate{:}\bbl@deactivate{;}% + \bbl@deactivate{!}\bbl@deactivate{?}} +% \end{macrocode} +% +% The last thing |\extrasbreton| needs to do is to make sure that +% |\frenchspacing| is in effect. If this is not the case the +% execution of |\noextrasbreton| will switch it of again. +% \begin{macrocode} +\addto\extrasbreton{\bbl@frenchspacing} +\addto\noextrasbreton{\bbl@nonfrenchspacing} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\breton@sh@;@} +% We have to reduce the amount of white space before \texttt{;}, +% \texttt{:} and \texttt{!} when the user types a space in front of +% these characters. This should only happen outside mathmode, hence +% the test with |\ifmmode|. +% +% \begin{macrocode} +\declare@shorthand{breton}{;}{% + \ifmmode + \string;\space + \else\relax +% \end{macrocode} +% In horizontal mode we check for the presence of a `space' and +% replace it by a |\thinspace|. +% \begin{macrocode} + \ifhmode + \ifdim\lastskip>\z@ + \unskip\penalty\@M\thinspace + \fi + \fi + \string;\space + \fi}% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\breton@sh@:@} +% \begin{macro}{\breton@sh@!@} +% Because these definitions are very similar only one is displayed +% in a way that the definition can be easily checked. +% \begin{macrocode} +\declare@shorthand{breton}{:}{% + \ifmmode\string:\space + \else\relax + \ifhmode + \ifdim\lastskip>\z@\unskip\penalty\@M\thinspace\fi + \fi + \string:\space + \fi} +\declare@shorthand{breton}{!}{% + \ifmmode\string!\space + \else\relax + \ifhmode + \ifdim\lastskip>\z@\unskip\penalty\@M\thinspace\fi + \fi + \string!\space + \fi} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\breton@sh@?@} +% For the question mark something different has to be done. In this +% case the amount of white space that replaces the space character +% depends on the dimensions of the font. +% \begin{macrocode} +\declare@shorthand{breton}{?}{% + \ifmmode + \string?\space + \else\relax + \ifhmode + \ifdim\lastskip>\z@ + \unskip + \kern\fontdimen2\font + \kern-1.4\fontdimen3\font + \fi + \fi + \string?\space + \fi} +% \end{macrocode} +% \end{macro} +% +% All that is left to do now is provide the breton user with some +% extra utilities. +% +% Some definitions for special characters. +% \begin{macrocode} +\DeclareTextSymbol{\at}{OT1}{64} +\DeclareTextSymbol{\at}{T1}{64} +\DeclareTextSymbolDefault{\at}{OT1} +\DeclareTextSymbol{\boi}{OT1}{92} +\DeclareTextSymbol{\boi}{T1}{16} +\DeclareTextSymbolDefault{\boi}{OT1} +\DeclareTextSymbol{\circonflexe}{OT1}{94} +\DeclareTextSymbol{\circonflexe}{T1}{2} +\DeclareTextSymbolDefault{\circonflexe}{OT1} +\DeclareTextSymbol{\tild}{OT1}{126} +\DeclareTextSymbol{\tild}{T1}{3} +\DeclareTextSymbolDefault{\tild}{OT1} +\DeclareTextSymbol{\degre}{OT1}{23} +\DeclareTextSymbol{\degre}{T1}{6} +\DeclareTextSymbolDefault{\degre}{OT1} +% \end{macrocode} +% +% The following macros are used in the redefinition of |\^| and +% |\"| to handle the letter i. +% \changes{breton-1.0c}{1995/07/07}{Postpone the +% \cs{DeclareTextCompositeCommand}s untill \cs{AtBeginDocument}} +% +% \begin{macrocode} +\AtBeginDocument{% + \DeclareTextCompositeCommand{\^}{OT1}{i}{\^\i} + \DeclareTextCompositeCommand{\"}{OT1}{i}{\"\i}} +% \end{macrocode} +% +% And some more macros for numbering. +% \begin{macrocode} +\def\kentan{1\/${}^{\rm a\tilde{n}}$} +\def\eil{2\/${}^{\rm l}$} +\def\re{\/${}^{\rm re}$} +\def\trede{3\re} +\def\pevare{4\re} +\def\vet{\/${}^{\rm vet}$} +\def\pempvet{5\vet} +% \end{macrocode} +% +% The macro |\ldf@finish| takes care of looking for a +% configuration file, setting the main language to be switched on +% at |\begin{document}| and resetting the category code of +% \texttt{@} to its original value. +% \changes{breton-1.0e}{1996/11/02}{Now use \cs{ldf@finish} to wrap +% up} +% \begin{macrocode} +\ldf@finish{breton} +% +% \end{macrocode} +% +% \Finale +%% +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +%% +\endinput diff --git a/Master/texmf-dist/source/generic/babel/breton.ins b/Master/texmf-dist/source/generic/babel/breton.ins new file mode 100644 index 00000000000..595e0cba1bd --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/breton.ins @@ -0,0 +1,148 @@ +%% +%% This file will generate fast loadable files and documentation +%% driver files from the doc files in this package when run through +%% LaTeX or TeX. +%% +%% Copyright 1989-2005 Johannes L. Braams and any individual authors +%% listed elsewhere in this file. All rights reserved. +%% +%% This file is part of the Babel system. +%% -------------------------------------- +%% +%% It 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 +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% The Current Maintainer of this work is Johannes Braams. +%% +%% The list of all files belonging to the LaTeX base distribution is +%% given in the file `manifest.bbl. See also `legal.bbl' 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. +%% +%% --------------- start of docstrip commands ------------------ +%% +\def\filedate{1999/04/11} +\def\batchfile{breton.ins} +\input docstrip.tex + +{\ifx\generate\undefined +\Msg{**********************************************} +\Msg{*} +\Msg{* This installation requires docstrip} +\Msg{* version 2.3c or later.} +\Msg{*} +\Msg{* An older version of docstrip has been input} +\Msg{*} +\Msg{**********************************************} +\errhelp{Move or rename old docstrip.tex.} +\errmessage{Old docstrip in input path} +\batchmode +\csname @@end\endcsname +\fi} + +\declarepreamble\mainpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl 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. +\endpreamble + +\declarepreamble\fdpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl for additional +information. + +In particular, permission is granted to customize the declarations in +this file to serve the needs of your installation. + +However, NO PERMISSION is granted to distribute a modified version +of this file under its original name. + +\endpreamble + +\keepsilent + +\usedir{tex/generic/babel} + +\usepreamble\mainpreamble +\generate{\file{breton.ldf}{\from{breton.dtx}{code}} + } +\usepreamble\fdpreamble + +\ifToplevel{ +\Msg{***********************************************************} +\Msg{*} +\Msg{* To finish the installation you have to move the following} +\Msg{* files into a directory searched by TeX:} +\Msg{*} +\Msg{* \space\space All *.def, *.fd, *.ldf, *.sty} +\Msg{*} +\Msg{* To produce the documentation run the files ending with} +\Msg{* '.dtx' and `.fdd' through LaTeX.} +\Msg{*} +\Msg{* Happy TeXing} +\Msg{***********************************************************} +} + +\endinput diff --git a/Master/texmf-dist/source/generic/babel/bulgarian.dtx b/Master/texmf-dist/source/generic/babel/bulgarian.dtx new file mode 100644 index 00000000000..decff6c221b --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/bulgarian.dtx @@ -0,0 +1,1037 @@ +% \iffalse meta-comment +% +% Copyright 1989-2005 Johannes L. Braams and any individual authors +% listed elsewhere in this file. All rights reserved. +% +% This file is part of the Babel system. +% -------------------------------------- +% +% It 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 +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2003/12/01 or later. +% +% This work has the LPPL maintenance status "maintained". +% +% The Current Maintainer of this work is Johannes Braams. +% +% The list of all files belonging to the Babel system is +% given in the file `manifest.bbl. See also `legal.bbl' 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 +% \CheckSum{1266} +% +% \iffalse +% Tell the \LaTeX\ system who we are and write an entry on the +% transcript. +%<*dtx> +\ProvidesFile{bulgarian.dtx} +% +%\ProvidesLanguage{bulgarian} + [2005/03/29 v1.0d Bulgarian support from the babel system] +% +%% File `bulgarian.dtx' +%% Babel package for LaTeX version 2e +%% Copyright (C) 1989-2005 +%% by Johannes Braams,TeXniek +% +%% Bulgarian Language Definition File +%% Copyright (C) 1995-2005 +%% by Georgi.Boshnakov +%% Johannes Braams,TeXniek +% +%% Adapted from russianb.dtx +%% by Georgi.Boshnakov +% +%% Please report errors to:J.L.Braams +%% babal at braams.cistron.nl +% +%<*filedriver> +\documentclass{ltxdoc} +\newcommand\TeXhax{\TeX hax} +\newcommand\babel{\textsf{babel}} +\newcommand\langvar{$\langle\it lang \rangle$} +\newcommand\note[1]{} +\newcommand\Lopt[1]{\textsf{#1}} +\newcommand\file[1]{\texttt{#1}} +\newcommand\pkg[1]{\texttt{#1}} +\begin{document} + \DocInput{bulgarian.dtx} +\end{document} +% +%\fi +% \GetFileInfo{bulgarian.dtx} +% +% \changes{bulgarian-0.99}{2000/06/10}{% +% This is a prerelease version of this file. +% Features needing further testing are removed.} +% +% \section{The Bulgarian language} +% +% The file \file{\filename}\footnote{The file described in this +% section has version number \fileversion\ and was last revised on +% \filedate. This file was initially derived from the August-1998 +% version of \file{russianb.dtx}. +% +% It is (reasonably) backward compatible with the 1994/1996 +% (non-babel) bulgarian style (bulgaria.sty) by Georgi +% Boshnakov---files prepared for that style should compile +% successfully (with vastly improved appearance due to usage of +% standard fonts).} provides the language-specific macros for the +% Bulgarian language. +% +% Users should take note of the vaious ``cyrillic'' dashes +% available now (see below). These should remove many causes of +% headache. Also, although by default the Bulgarian quotation marks +% will appear automatically when typesetting in Bulgarian, it is +% better to use the new commands \cs{"'} and \cs{"'} which +% explicitly typeset them. +% Note: automatic switch to Bulgarian quotation is withdrawn +% for the moment and may not be reintroduced at all. +% +% For this language the character |"| is made active. In +% table~\ref{tab:bulgarian-quote} an overview is given of its +% purpose. +% +% \begin{table}[htb] +% \begin{center} +% \begin{tabular}{lp{8cm}} +% \verb="|= & disable ligature at this position. \\ +% |"-| & an explicit hyphen sign, allowing hyphenation +% in the rest of the word. \\ +% |"---| & Cyrillic emdash in plain text. \\ +% |"--~| & Cyrillic emdash in compound names (surnames). \\ +% |"--*| & Cyrillic emdash for denoting direct speech. \\ +% |""| & like |"-|, but producing no hyphen sign +% (for compound words with hyphen, e.g.\ |x-""y| +% or some other signs as ``disable/enable''). \\ +% |"~| & for a compound word mark without a breakpoint. \\ +% |"=| & for a compound word mark with a breakpoint, allowing +% hyphenation in the composing words. \\ +% |",| & thinspace for initials with a breakpoint +% in following surname. \\ +% |"`| & for German left double quotes +% (looks like ,\kern-0.08em,). \\ +% |"'| & for German right double quotes (looks like ``). \\%'' +% |"<| & for French left double quotes (looks like $<\!\!<$).\\ +% |">| & for French right double quotes (looks like $>\!\!>$).\\ +% \end{tabular} +% \caption{The extra definitions made +% by\file{bulgarian}}\label{tab:bulgarian-quote} +% \end{center} +% \end{table} +% +% The quotes in table~\ref{tab:bulgarian-quote} can also be typeset +% by using the commands in table~\ref{tab:bmore-quote}. +% +% \begin{table}[htb] +% \begin{center} +% \begin{tabular}{lp{8cm}} +% |\cdash---| & Cyrillic emdash in plain text. \\ +% |\cdash--~| & Cyrillic emdash in compound names (surnames). \\ +% |\cdash--*| & Cyrillic emdash for denoting direct speech. \\ +% |\glqq| & for German left double quotes +% (looks like,\kern-0.08em,). \\ +% |\grqq| & for German right double quotes (looks like ``).\\%'' +% |\flqq| & for French left double quotes (looks like $<\!\!<$).\\ +% |\frqq| & for French right double quotes (looks like $>\!\!>$).\\ +% |\dq| & the original quotes character (|"|). +% \end{tabular} +% \caption{More commands which produce quotes, defined +% by \babel}\label{tab:bmore-quote} +% \end{center} +% \end{table} +% +% The French quotes are also available as ligatures `|<<|' and +% `|>>|' in 8-bit Cyrillic font encodings (\texttt{LCY}, +% \texttt{X2}, \texttt{T2*}) and as `|<|' and `|>|' characters in +% 7-bit Cyrillic font encodings (\texttt{OT2} and \texttt{LWN}). +% +% The quotation marks traditionally used in Bulgarian were borrowed +% from German o they keep their original names. French quotation +% marks may be seen as well in older books. +% +% \StopEventually{} +% +% The macro |\LdfInit| takes care of preventing that this file is +% loaded more than once, checking the category code of the +% \texttt{@} sign, etc. +% +% \begin{macrocode} +%<*code> +\LdfInit{bulgarian}{captionsbulgarian} +% \end{macrocode} +% +% When this file is read as an option, i.e., by the |\usepackage| +% command, \texttt{bulgarian} will be an `unknown' language, in +% which case we have to make it known. So we check for the +% existence of |\l@bulgarian| to see whether we have to do +% something here. +% +% \begin{macrocode} +\ifx\l@bulgarian\@undefined + \@nopatterns{Bulgarian} + \adddialect\l@bulgarian0 +\fi +% \end{macrocode} +% +% +% +% \begin{macro}{\latinencoding} +% +% We need to know the encoding for text that is supposed to be +% which is active at the end of the \babel\ package. If the +% \pkg{fontenc} package is loaded later, then \ldots too bad! +% +% \begin{macrocode} +\let\latinencoding\cf@encoding +% \end{macrocode} +% +% \end{macro} +% +% The user may choose between different available Cyrillic +% encodings---e.g., \texttt{X2}, \texttt{LCY}, or \texttt{LWN}. +% If the user wants to use a font encoding other than the default +% (\texttt{T2A}), he has to load the corresponding file +% \emph{before} \file{bulgarian.sty}. +% This may be done in the following way: +% +% \begin{verbatim} +% \usepackage[LCY,OT1]{fontenc} %overwrite the default encoding; +% \usepackage[english,bulgarian]{babel} +% \end{verbatim} +% \unskip +% +% Note: most people would prefer the \texttt{T2A} to \texttt{X2}, +% because \texttt{X2} does not contain Latin letters, and users +% should be very careful to switch the language every time they +% want to typeset a Latin word inside a Bulgarian phrase or vice +% versa. On the other hand, switching the language is a good +% practice anyway. With a decent text processing program it does +% not involve more work than switching between the Bulgarian and +% English keyboard. Moreover that the far most common disruption +% occurs as a result of forgetting to switch back to cyrillic +% keyboard. +% +% We parse the |\cdp@list| containing the encodings known to +% \LaTeX\ in the order they were loaded. We set the +% |\cyrillicencoding| to the \emph{last} loaded encoding in the +% list of supported Cyrillic encodings: \texttt{OT2}, \texttt{LWN}, +% \texttt{LCY}, \texttt{X2}, \texttt{T2C}, \texttt{T2B}, +% \texttt{T2A}, if any. +% +% +% \begin{macrocode} +\def\reserved@a#1#2{% + \edef\reserved@b{#1}% + \edef\reserved@c{#2}% + \ifx\reserved@b\reserved@c + \let\cyrillicencoding\reserved@c + \fi} +\def\cdp@elt#1#2#3#4{% + \reserved@a{#1}{OT2}% + \reserved@a{#1}{LWN}% + \reserved@a{#1}{LCY}% + \reserved@a{#1}{X2}% + \reserved@a{#1}{T2C}% + \reserved@a{#1}{T2B}% + \reserved@a{#1}{T2A}} +\cdp@list +% \end{macrocode} +% +% Now, if |\cyrillicencoding| is undefined, then the user did not +% load any of supported encodings. So, we have to set +% |\cyrillicencoding| to some default value. We test the presence +% of the encoding definition files in the order from less +% preferable to more preferable encodings. We use the lowercase +% names (i.e., \file{lcyenc.def} instead of \file{LCYenc.def}). +% +% \begin{macrocode} +\ifx\cyrillicencoding\undefined + \IfFileExists{ot2enc.def}{\def\cyrillicencoding{OT2}}\relax + \IfFileExists{lwnenc.def}{\def\cyrillicencoding{LWN}}\relax + \IfFileExists{lcyenc.def}{\def\cyrillicencoding{LCY}}\relax + \IfFileExists{x2enc.def}{\def\cyrillicencoding{X2}}\relax + \IfFileExists{t2cenc.def}{\def\cyrillicencoding{T2C}}\relax + \IfFileExists{t2benc.def}{\def\cyrillicencoding{T2B}}\relax + \IfFileExists{t2aenc.def}{\def\cyrillicencoding{T2A}}\relax +% \end{macrocode} +% +% If |\cyrillicencoding| is still undefined, then the user seems +% not to have a properly installed distribution. A fatal error. +% +% \begin{macrocode} +\ifx\cyrillicencoding\undefined + \PackageError{babel}% + {No Cyrillic encoding definition files were found}% + {Your installation is incomplete. \MessageBreak + You need at least one of the following files: \MessageBreak + \space\space + x2enc.def, t2aenc.def, t2benc.def, t2cenc.def, \MessageBreak + \space\space + lcyenc.def, lwnenc.def, ot2enc.def.}% + \else +% \end{macrocode} +% +% We avoid |\usepackage[\cyrillicencoding]{fontenc}| because we +% don't want to force the switch of |\encodingdefault|. +% +% \begin{macrocode} + \lowercase + \expandafter{\expandafter\input\cyrillicencoding enc.def\relax}% + \fi +\fi +% \end{macrocode} +% +% \begin{verbatim} +% \PackageInfo{babel} +% {Using `\cyrillicencoding' as a default Cyrillic encoding}% +% \end{verbatim} +% \unskip +% +% +% +% \begin{macrocode} +\DeclareRobustCommand{\Bulgarian}{% + \fontencoding\cyrillicencoding\selectfont + \let\encodingdefault\cyrillicencoding + \expandafter\set@hyphenmins\bulgarianhyphenmins + \language\l@bulgarian} +\DeclareRobustCommand{\English}{% + \fontencoding\latinencoding\selectfont + \let\encodingdefault\latinencoding + \expandafter\set@hyphenmins\englishhyphenmins + \language\l@english} +\let\Bul\Bulgarian +\let\Bg\Bulgarian +\let\cyrillictext\Bulgarian +\let\cyr\Bulgarian +\let\Eng\English +\def\selectenglanguage{\selectlanguage{english}} +\def\selectbglanguage{\selectlanguage{bulgarian}} +% \end{macrocode} +% +% Since the \texttt{X2} encoding does not contain Latin letters,we +% should make some redefinitions of \LaTeX\ macros which implicitly +% produce Latin letters. +% +% +% \begin{macrocode} +\expandafter\ifx\csname T@X2\endcsname\relax\else +% \end{macrocode} +% +% We put |\latinencoding| in braces to avoid problems with |\@alph| +% inside minipages (e.g., footnotes inside minipages) where +% |\@alph| is expanded and we get for example `|\fontencoding OT1|' +% (|\fontencoding| is robust). +% +% \changes{bulgarian-1.0c}{2003/06/14}{Added missing closing brace} +% \begin{macrocode} + \def\@Alph@eng#1{{\fontencoding{\latinencoding}\selectfont + \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\else \@ctrerr\fi}}% + \def\@alph@eng#1{{\fontencoding{\latinencoding}\selectfont + \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\else \@ctrerr\fi}}% + \let\@Alph\@Alph@eng + \let\@alph\@alph@eng +% \end{macrocode} +% +% Unfortunately, the commands |\AA| and |\aa| are not encoding +% dependent in \LaTeX\ (unlike e.g., |\oe| or |\DH|). They are +% defined as |\r{A}| and |\r{a}|. This leads to unpredictable +% results when the font encoding does not contain the Latin letters +% `A' and `a' (like \texttt{X2}). +% +% \begin{macrocode} + \DeclareTextSymbolDefault{\AA}{OT1} + \DeclareTextSymbolDefault{\aa}{OT1} + \DeclareTextCommand{\AA}{OT1}{\r A} + \DeclareTextCommand{\aa}{OT1}{\r a} +\fi +% \end{macrocode} +% +% The following block redefines the character class of uppercase +% Greek letters and some accents, if it is equal to 7 (variable +% family), to avoid incorrect results if the font encoding in some +% math family does not contain these characters in places of OT1 +% encoding. The code was taken from |amsmath.dtx|. See comments and +% further explanation there. +% +% \begin{macrocode} +\begingroup\catcode`\"=12 +% uppercase greek letters: +\def\@tempa#1{\expandafter\@tempb\meaning#1\relax\relax\relax\relax + "0000\@nil#1} +\def\@tempb#1"#2#3#4#5#6\@nil#7{% +\ifnum"#2=7 \count@"1#3#4#5\relax +\ifnum\count@<"1000 \else \global\mathchardef#7="0#3#4#5\relax \fi + \fi} +\@tempa\Gamma\@tempa\Delta\@tempa\Theta\@tempa\Lambda\@tempa\Xi +\@tempa\Pi\@tempa\Sigma\@tempa\Upsilon\@tempa\Phi\@tempa\Psi +\@tempa\Omega +% some accents: +\def\@tempa#1#2\@nil{\def\@tempc{#1}}\def\@tempb{\mathaccent} +\expandafter\@tempa\hat\relax\relax\@nil +\ifx\@tempb\@tempc +\def\@tempa#1\@nil{#1}% +\def\@tempb#1{\afterassignment\@tempa\mathchardef\@tempc=}% +\def\do#1"#2{} +\def\@tempd#1{\expandafter\@tempb#1\@nil + \ifnum\@tempc>"FFF + \xdef#1{\mathaccent"\expandafter\do\meaning\@tempc\space}% + \fi} +\@tempd\hat\@tempd\check\@tempd\tilde\@tempd\acute\@tempd\grave +\@tempd\dot\@tempd\ddot\@tempd\breve\@tempd\bar +\fi +\endgroup +% \end{macrocode} +% +% The user should use the \pkg{inputenc} package when any 8-bit +% Cyrillic font encoding is used, selecting one of the Cyrillic +% input encodings. We do not assume any default input encoding, so +% the user should explicitly call the \pkg{inputenc} package by +% |\usepackage{inputenc}|. We also removed |\AtBeginDocument|, so +% \pkg{inputenc} should be used before \babel. +% +% \begin{macrocode} +\@ifpackageloaded{inputenc}{}{% +\def\reserved@a{LWN}% +\ifx\reserved@a\cyrillicencoding\else +\def\reserved@a{OT2}% +\ifx\reserved@a\cyrillicencoding\else +\PackageWarning{babel}% +{No input encoding specified for Bulgarian language}\fi\fi} +% \end{macrocode} +% +% Now we define two commands that offer the possibility to switch +% between Cyrillic and Roman encodings. +% +% \begin{macro}{\cyrillictext} +% \begin{macro}{\latintext} +% +% The command |\cyrillictext| will switch from Latin font encoding +% to the Cyrillic font encoding, the command |\latintext| switches +% back. This assumes that the `normal' font encoding is a Latin +% one. These commands are \emph{declarations}, for shorter peaces +% of text the commands |\textlatin| and |\textcyrillic| can be +% used. +% +% We comment out |\latintext| since it is defined in the core of +% babel (babel.def). We add the shorthand |\lat| for |\latintext|. +% Note that |\cyrillictext| has been defined above. +% +% \begin{macrocode} +% \DeclareRobustCommand{\latintext}{% +% \fontencoding{\latinencoding}\selectfont +% \def\encodingdefault{\latinencoding}} +\let\lat\latintext +% \end{macrocode} +% +% \end{macro} +% \end{macro} +% +% \begin{macro}{\textcyrillic} +% \begin{macro}{\textlatin} +% +% These commands take an argument which is then typeset using the +% requested font encoding. +% |\textlatin| is commented out since it is defined in the core of +% babel. (It is defined there with |\DeclareRobustCommand| instead.) +% +% \begin{macrocode} +\DeclareTextFontCommand{\textcyrillic}{\cyrillictext} +% \DeclareTextFontCommand{\textlatin}{\latintext} +% \end{macrocode} +% +% \end{macro} +% \end{macro} +% +% The next step consists of defining commands to switch to (and +% from) the Bulgarian language. +% +% \begin{macro}{\captionsbulgarian} +% +% The macro |\captionsbulgarian| defines all strings used in the +% four standard document classes provided with \LaTeX. The two +% commands |\cyr| and |\lat| activate Cyrillic resp. Latin encoding. +% +% \begin{macrocode} +\addto\captionsbulgarian{% + \def\prefacename{% + {\cyr\CYRP\cyrr\cyre\cyrd\cyrg\cyro\cyrv\cyro\cyrr}}% + \def\refname{% + {\cyr\CYRL\cyri\cyrt\cyre\cyrr\cyra\cyrt\cyru\cyrr\cyra}}% + \def\abstractname{% + {\cyr\CYRA\cyrb\cyrs\cyrt\cyrr\cyra\cyrk\cyrt}}% + \def\bibname{% + {\cyr\CYRB\cyri\cyrb\cyrl\cyri\cyro\cyrg\cyrr\cyra\cyrf\cyri\cyrya}}% + \def\chaptername{% + {\cyr\CYRG\cyrl\cyra\cyrv\cyra}}% + \def\appendixname{% + {\cyr\CYRP\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyre}}% + \def\contentsname{% + {\cyr\CYRS\cyrhrdsn\cyrd\cyrhrdsn\cyrr\cyrzh\cyra\cyrn\cyri\cyre}}% + \def\listfigurename{% + {\cyr\CYRS\cyrp\cyri\cyrs\cyrhrdsn\cyrk\ \cyrn\cyra\ \cyrf\cyri\cyrg\cyru\cyrr\cyri\cyrt\cyre}}% + \def\listtablename{% + {\cyr\CYRS\cyrp\cyri\cyrs\cyrhrdsn\cyrk\ \cyrn\cyra\ \cyrt\cyra\cyrb\cyrl\cyri\cyrc\cyri\cyrt\cyre}}% + \def\indexname{% + {\cyr\CYRA\cyrz\cyrb\cyru\cyrch\cyre\cyrn\ \cyru\cyrk\cyra\cyrz\cyra\cyrt\cyre\cyrl}}% + \def\authorname{% + {\cyr\CYRI\cyrm\cyre\cyrn\cyre\cyrn\ \cyru\cyrk\cyra\cyrz\cyra\cyrt\cyre\cyrl}}% + \def\figurename{% + {\cyr\CYRF\cyri\cyrg\cyru\cyrr\cyra}}% + \def\tablename{% + {\cyr\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyra}}% + \def\partname{% + {\cyr\CYRCH\cyra\cyrs\cyrt}}% + \def\enclname{% + {\cyr\CYRP\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyrya}}% + \def\ccname{% + {\cyr\cyrk\cyro\cyrp\cyri\cyrya}}% + \def\headtoname{% + {\cyr\CYRZ\cyra}}% + \def\pagename{% + {\cyr\CYRS\cyrt\cyrr.}}% + \def\seename{% + {\cyr\cyrv\cyrzh.}}% + \def\alsoname{% + {\cyr\cyrv\cyrzh.\ \cyrs\cyrhrdsn\cyrshch\cyro\ \cyri}}% + \def\proofname{Proof}% <-- Needs translation + \def\glossaryname{Glossary}% <-- Needs translation +} +% \end{macrocode} +% \end{macro} +%% +% \begin{macro}{\datebulgarian} +% +% The macro |\datebulgarian| redefines the command |\today| to +% produce Bulgarian dates. +% It also provides the command |\todayRoman| which produces the +% date with the month in capital roman numerals, a popular format +% for dates in Bulgarian. +% +% \begin{macrocode} +\def\datebulgarian{% + \def\month@bulgarian{\ifcase\month\or + \cyrya\cyrn\cyru\cyra\cyrr\cyri\or + \cyrf\cyre\cyrv\cyrr\cyru\cyra\cyrr\cyri\or + \cyrm\cyra\cyrr\cyrt\or + \cyra\cyrp\cyrr\cyri\cyrl\or + \cyrm\cyra\cyrishrt\or + \cyryu\cyrn\cyri\or + \cyryu\cyrl\cyri\or + \cyra\cyrv\cyrg\cyru\cyrs\cyrt\or + \cyrs\cyre\cyrp\cyrt\cyre\cyrm\cyrv\cyrr\cyri\or + \cyro\cyrk\cyrt\cyro\cyrm\cyrv\cyrr\cyri\or + \cyrn\cyro\cyre\cyrm\cyrv\cyrr\cyri\or + \cyrd\cyre\cyrk\cyre\cyrm\cyrv\cyrr\cyri\fi}% + \def\month@Roman{\expandafter\@Roman\month}% + \def\today{\number\day~\month@bulgarian\ \number\year~\cyrg.}% + \def\todayRoman{\number\day.\,\month@Roman.\,\number\year~\cyrg.}% +} +% \end{macrocode} +% +% \end{macro} +% +% +% +% \begin{macro}{\todayRoman} +% +% The month is often written with roman numbers in Bulgarian dates. +% Here we define date in this format: +% +% \begin{macrocode} +\def\Romannumeral#1{\uppercase\expandafter{\romannumeral #1}} +\def\todayRoman{\number\day.\Romannumeral{\month}.\number\year~\cyrg.} +% \end{macrocode} +% +% \end{macro} +% +% \begin{macro}{\extrasbulgarian} +% +% The macro |\extrasbulgarian| will perform all the extra +% definitions needed for the Bulgarian language. +% The macro |\noextrasbulgarian| is used to cancel the actions of +% |\extrasbulgarian|. +% +% The first action we define is to switch on the selected Cyrillic +% encoding whenever we enter `bulgarian'. +% +% \begin{macrocode} +\addto\extrasbulgarian{\cyrillictext} +% \end{macrocode} +% +% When the encoding definition file was processed by \LaTeX\ the +% current font encoding is stored in |\latinencoding|, assuming +% that \LaTeX\ uses \texttt{T1} or \texttt{OT1} as +% default. Therefore we switch back to |\latinencoding| whenever +% the Bulgarian language is no longer `active'. +% +% \begin{macrocode} +\addto\noextrasbulgarian{\latintext} +% \end{macrocode} +% +% For Bulgarian the \texttt{"} character also is made active. +% +% \begin{macrocode} +\initiate@active@char{"} +% \end{macrocode} +% +% The code above is necessary because we need extra active +% characters. The character |"| is used as indicated in +% table~\ref{tab:bulgarian-quote}. We specify that the Bulgarian +% group of shorthands should be used. +% +% \begin{macrocode} +\addto\extrasbulgarian{\languageshorthands{bulgarian}} +% \end{macrocode} +% +% These characters are `turned on' once, later their definition may +% vary. +% +% \begin{macrocode} +\addto\extrasbulgarian{% + \bbl@activate{"}} +\addto\noextrasbulgarian{% + \bbl@deactivate{"}} +% \end{macrocode} +% +% The \texttt{X2} and \texttt{T2*} encodings do not contain +% |spanish_shriek| and |spanish_query| symbols; as a consequence, +% the ligatures `|?`|' and `|!`|' do not work with them (these +% characters are useless for Cyrillic texts anyway). But we define +% the shorthands to emulate these ligatures (optionally). +% +% We do not use |\latinencoding| here (but instead explicitly use +% \texttt{OT1}) because the user may choose \texttt{T2A} to be the +% primary encoding, but it does not contain these characters. +% +% \begin{macrocode} +%<*spanishligs> +\declare@shorthand{bulgarian}{?`}{\UseTextSymbol{OT1}\textquestiondown} +\declare@shorthand{bulgarian}{!`}{\UseTextSymbol{OT1}\textexclamdown} +% +% \end{macrocode} +% +% To be able to define the function of `|"|', we first define a +% couple of `support' macros. +% +% \begin{macro}{\dq} +% +% We save the original double quote character in |\dq| to keep it +% available, the math accent |\"|can now be typed as `|"|'. +% \changes{bulgarian-1.0c}{2003/04/10}{repaired typo} +% \begin{macrocode} +\begingroup \catcode`\"12 +\def\reserved@a{\endgroup + \def\@SS{\mathchar"7019} + \def\dq{"}} +\reserved@a +% \end{macrocode} +% +% \end{macro} +% +% Now we can define the doublequote macros: german and french +% quotes. We use definitions of these quotes made in babel.sty. +% The french quotes are contained in the \texttt{T2*} encodings. +% +% \begin{macrocode} +\declare@shorthand{bulgarian}{"`}{\glqq} +\declare@shorthand{bulgarian}{"'}{\grqq} +\declare@shorthand{bulgarian}{"<}{\flqq} +\declare@shorthand{bulgarian}{">}{\frqq} +% \end{macrocode} +% +% Some additional commands: +% +% \begin{macrocode} +\declare@shorthand{bulgarian}{""}{\hskip\z@skip} +\declare@shorthand{bulgarian}{"~}{\textormath{\leavevmode\hbox{-}}{-}} +\declare@shorthand{bulgarian}{"=}{\nobreak-\hskip\z@skip} +\declare@shorthand{bulgarian}{"|}{% +\textormath{\nobreak\discretionary{-}{}{\kern.03em}% +\allowhyphens}{}} +% \end{macrocode} +% +% The next two macros for |"-| and |"---| are somewhat different. +% We must check whether the second token is a hyphen character: +% +% \begin{macrocode} +\declare@shorthand{bulgarian}{"-}{% +% \end{macrocode} +% +% If the next token is `|-|', we typeset an emdash, otherwise a +% hyphen sign: +% +% \begin{macrocode} + \def\bulgarian@sh@tmp{% + \if\bulgarian@sh@next-\expandafter\bulgarian@sh@emdash + \else\expandafter\bulgarian@sh@hyphen\fi + }% +% \end{macrocode} +% +% \TeX\ looks for the next token after the first `|-|': the meaning +% of this token is written to |\bulgarian@sh@next| and +% |\bulgarian@sh@tmp| is called. +% +% \begin{macrocode} + \futurelet\bulgarian@sh@next\bulgarian@sh@tmp} +% \end{macrocode} +% +% Here are the definitions of hyphen and emdash. First the hyphen: +% +% \begin{macrocode} +\def\bulgarian@sh@hyphen{\nobreak\-\bbl@allowhyphens} +% \end{macrocode} +% +% For the emdash definition, there are the two parameters: we must +% `eat' two last hyphen signs of our emdash \dots : +% +% \begin{macrocode} +\def\bulgarian@sh@emdash#1#2{\cdash-#1#2} +% \end{macrocode} +% +% \begin{macro}{\cdash} +% +% \dots\ these two parameters are useful for another macro: +% |\cdash|: +% +% \begin{macrocode} +\ifx\cdash\undefined % should be defined earlier +\def\cdash#1#2#3{\def\tempx@{#3}% +\def\tempa@{-}\def empb@{~}\def empc@{*}% + \ifx\tempx@\tempa@\@Acdash\else + \ifx\tempx@\tempb@\@Bcdash\else + \ifx\tempx@\tempc@\@Ccdash\else + \errmessage{Wrong usage of cdash}\fi\fi\fi} +% \end{macrocode} +% +% second parameter (or third for |\cdash|) shows what kind of emdash +% to create in next step +% \begin{center} +% \begin{tabular}{@{}p{.1\hsize}@{}p{.9\hsize}@{}} +% |"---| & ordinary (plain) Cyrillic emdash inside text: +% an unbreakable thinspace will be inserted before only in case of +% a \textit{space} before the dash (it is necessary for dashes after +% display maths formulae: there could be lists, enumerations etc.\ +% started with ``---where $a$ is ...'' i.e., the dash starts a line). +% (Firstly there were planned rather soft rules for user:he may put +% a space before the dash or not. But it is difficult to place this +% thinspace automatically, i.e., by checking modes because after +% display formulae \TeX{} uses horizontal mode. Maybe there is a +% misunderstanding? Maybe there is another way?) After a dash +% a breakable thinspace is always placed; \\ +% \end{tabular} +% \end{center} +% +% +% \begin{macrocode} +% What is more grammatically: .2em or .2\fontdimen6\font? +\def\@Acdash{\ifdim\lastskip>\z@\unskip\nobreak\hskip.2em\fi +\cyrdash\hskip.2em\ignorespaces}% +% \end{macrocode} +% +% \begin{center} +% \begin{tabular}{@{}p{.1\hsize}@{}p{.9\hsize}@{}} +% |"--~| & emdash in compound names or surnames +% (like Mendeleev--Klapeiron); this dash has no space characters +% around; after the dash some space is added +% |\exhyphenalty| \\ +% \end{tabular} +% \end{center} +% +% \begin{macrocode} +\def\@Bcdash{\leavevmode\ifdim\lastskip>\z@\unskip\fi + \nobreak\cyrdash\penalty\exhyphenpenalty\hskip\z@skip\ignorespaces}% +% \end{macrocode} +% +% \begin{center} +% \begin{tabular}{@{}p{.1\hsize}@{}p{.9\hsize}@{}} +% |"--*| & for denoting direct speech (a space like |\enskip| +% must follow the emdash); \\ +% \end{tabular} +% \end{center} +% +% \begin{macrocode} +\def\@Ccdash{\leavevmode + \nobreak\cyrdash\nobreak\hskip.35em\ignorespaces}% +%\fi +% \end{macrocode} +% +% \end{macro} +% +% +% +% \begin{macro}{\cyrdash} +% +% Finally the macro for ``body'' of the Cyrillic emdash. +% The |\cyrdash| macro will be defined in case this macro hasn't +% been defined in a fontenc file. For T2*fonts, cyrdash will be +% placed in the code of the English emdash thus it uses ligature +% |---|. +% +% \begin{macrocode} +% Is there an IF necessary? +\ifx\cyrdash\undefined +\def\cyrdash{\hbox to.8em{--\hss--}} +\fi +% \end{macrocode} +% +% \end{macro} +% +% Here a really new macro---to place thinspace between initials. +% This macro used instead of |\,| allows hyphenation in the +% following surname. +% +% \begin{macrocode} +\declare@shorthand{bulgarian}{",}{\nobreak\hskip.2em\ignorespaces} +% \end{macrocode} +% +% The Bulgarian hyphenation patterns can be used with +% |\lefthyphenmin| and |\righthyphenmin| set to~2. +% \changes{bulgarian-1.0b}{2000/09/22}{Now use \cs{providehyphenmins} to +% provide a default value} +% \begin{macrocode} +\providehyphenmins{\CurrentOption}{\tw@\tw@} +\fi +% \end{macrocode} +% +% Now the action |\extrasbulgarian| has to execute is to make sure +% that the command |\frenchspacing| is in effect. If this is not +% the case the execution of |\noextrasbulgarian| will switch it off +% again. +% +% \begin{macrocode} +\addto\extrasbulgarian{\bbl@frenchspacing} +\addto\noextrasbulgarian{\bbl@nonfrenchspacing} +% \end{macrocode} +% +% Make the double quotes produce the traditional quotes +% used in Bulgarian texts (these are the German quotes). +% +% \begin{macrocode} +% \initiate@active@char{`} +% \initiate@active@char{'} +% \addto\extrasbulgarian{% +% \bbl@activate{`}} +% \addto\extrasbulgarian{% +% \bbl@activate{'}} +% \addto\noextrasbulgarian{% +% \bbl@deactivate{`}} +% \addto\noextrasbulgarian{% +% \bbl@deactivate{'}} +% \def\mlron{\bbl@activate{`}\bbl@activate{'}} +% \def\mlroff{\bbl@deactivate{`}\bbl@deactivate{'}} +% \declare@shorthand{bulgarian}{``}{\glqq} +% \declare@shorthand{bulgarian}{''}{\grqq} +% \end{macrocode} +% +% \end{macro} +% +% Next we add a new enumeration style for Bulgarian manuscripts with +% Cyrillic letters,and later on we define some math operator names in +% accordance with Bulgarian typesetting traditions. +% +% \begin{macro}{\@Alph@bul} +% +% We begin by defining |\@Alph@bul| which works like |\@Alph|, but +% produces (uppercase) Cyrillic letters intead of Latin ones. The +% letters ISHRT, HRDSN and SFTSN are skipped, as usual for such +% enumeration. +% +% \begin{macrocode} +\def\enumBul{\let\@Alph\@Alph@bul \let\@alph\@alph@bul} +\def\enumEng{\let\@Alph\@Alph@eng \let\@alph\@alph@eng} +\def\enumLat{\let\@Alph\@Alph@eng \let\@alph\@alph@eng} +\addto\extrasbulgarian{\enumBul} +\addto\noextrasbulgarian{\enumLat} +\def\@Alph@bul#1{% + \ifcase#1\or + \CYRA\or \CYRB\or \CYRV\or \CYRG\or \CYRD\or \CYRE\or \CYRZH\or + \CYRZ\or \CYRI\or \CYRK\or \CYRL\or \CYRM\or \CYRN\or \CYRO\or + \CYRP\or \CYRR\or \CYRS\or \CYRT\or \CYRU\or \CYRF\or \CYRH\or + \CYRC\or \CYRCH\or \CYRSH\or \CYRSHCH\or \CYRYU\or \CYRYA\else + \@ctrerr\fi + } +\def\@Alph@eng#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\else + \@ctrerr\fi + } +% \end{macrocode} +% +% \end{macro} +% +% +% +% \begin{macro}{\@alph@bul} +% +% The macro |\@alph@bul| is similar to |\@Alph@bul|; +% it produces lowercase Bulgarian letters. +% +% \begin{macrocode} +\def\@alph@bul#1{% + \ifcase#1\or + \cyra\or \cyrb\or \cyrv\or \cyrg\or \cyrd\or \cyre\or \cyrzh\or + \cyrz\or \cyri\or \cyrk\or \cyrl\or \cyrm\or \cyrn\or \cyro\or + \cyrp\or \cyrr\or \cyrs\or \cyrt\or \cyru\or \cyrf\or \cyrh\or + \cyrc\or \cyrch\or \cyrsh\or \cyrshch\or \cyryu\or \cyrya\else + \@ctrerr\fi + } +\def\@alph@eng#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\else + \@ctrerr\fi + } +% \end{macrocode} +% +% \end{macro} +% +% Set up default Cyrillic math alphabets. To use Cyrillic letters +% in math mode user should load the |textmath| package +% \emph{before} loading fontenc package (or \babel). Note,that by +% default Cyrillic letters are taken from upright font in math mode +% (unlike Latin letters). +% +% \begin{macrocode} +%\RequirePackage{textmath} +\@ifundefined{sym\cyrillicencoding letters}{}{% +\SetSymbolFont{\cyrillicencoding letters}{bold}\cyrillicencoding + \rmdefault\bfdefault\updefault +\DeclareSymbolFontAlphabet\cyrmathrm{\cyrillicencoding letters} +% \end{macrocode} +% +% And we need a few commands to be able to switch to different +% variants. +% +% \begin{macrocode} +\DeclareMathAlphabet\cyrmathbf\cyrillicencoding + \rmdefault\bfdefault\updefault +\DeclareMathAlphabet\cyrmathsf\cyrillicencoding + \sfdefault\mddefault\updefault +\DeclareMathAlphabet\cyrmathit\cyrillicencoding + \rmdefault\mddefault\itdefault +\DeclareMathAlphabet\cyrmathtt\cyrillicencoding + \ttdefault\mddefault\updefault +\SetMathAlphabet\cyrmathsf{bold}\cyrillicencoding + \sfdefault\bfdefault\updefault +\SetMathAlphabet\cyrmathit{bold}\cyrillicencoding + \rmdefault\bfdefault\itdefault +} +% \end{macrocode} +% +% Some math functions in Bulgarian math books have other names: +% e.g., \texttt{sinh} in Bulgarian is written as \texttt{sh} +% etc. So we define a number of new math operators. +% +% |\sinh|: +% +% \begin{macrocode} +\def\sh{\mathop{\operator@font sh}\nolimits} +% \end{macrocode} +% +% |\cosh|: +% +% \begin{macrocode} +\def\ch{\mathop{\operator@font ch}\nolimits} +% \end{macrocode} +% +% |\tan|: +% +% \begin{macrocode} +\def\tg{\mathop{\operator@font tg}\nolimits} +% \end{macrocode} +% +% |\arctan|: +% +% \begin{macrocode} +\def\arctg{\mathop{\operator@font arctg}\nolimits} +% \end{macrocode} +% +% |\arccot|: +% +% \begin{macrocode} +\def\arcctg{\mathop{\operator@font arcctg}\nolimits} +% \end{macrocode} +% +% The following macro conflicts with |\th| defined in Latin~1 +% encoding: +% |\tanh|: +% \changes{bulgarian-1.0d}{2004/05/21}{Change definition of \cs{th} +% only for this language} +% \begin{macrocode} +\addto\extrasrussian{% + \babel@save{\th}% + \let\ltx@th\th + \def\th{\textormath{\ltx@th}% + {\mathop{\operator@font th}\nolimits}}% + } +% \end{macrocode} +% +% |\cot|: +% +% \begin{macrocode} +\def\ctg{\mathop{\operator@font ctg}\nolimits} +% \end{macrocode} +% +% |\coth|: +% +% \begin{macrocode} +\def\cth{\mathop{\operator@font cth}\nolimits} +% \end{macrocode} +% +% |\csc|: +% +% \begin{macrocode} +\def\cosec{\mathop{\operator@font cosec}\nolimits} +% \end{macrocode} +% +% This is for compatibility with older Bulgarian packages. +% +% \begin{macrocode} +\DeclareRobustCommand{\No}{% + \ifmmode{\nfss@text{\textnumero}}\else\textnumero\fi} +% \end{macrocode} +% +% The macro |\ldf@finish| takes care of looking for a configuration +% file, setting the main language to be switched on at +% |\begin{document}| and resetting the category code of \texttt{@} +% to its original value. +% +% \begin{macrocode} +\ldf@finish{bulgarian} +% +% \end{macrocode} +% +% \Finale +%% +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +%% +\endinput diff --git a/Master/texmf-dist/source/generic/babel/bulgarian.ins b/Master/texmf-dist/source/generic/babel/bulgarian.ins new file mode 100644 index 00000000000..85fa800211d --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/bulgarian.ins @@ -0,0 +1,148 @@ +%% +%% This file will generate fast loadable files and documentation +%% driver files from the doc files in this package when run through +%% LaTeX or TeX. +%% +%% Copyright 1989-2005 Johannes L. Braams and any individual authors +%% listed elsewhere in this file. All rights reserved. +%% +%% This file is part of the Babel system. +%% -------------------------------------- +%% +%% It 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 +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% The Current Maintainer of this work is Johannes Braams. +%% +%% The list of all files belonging to the LaTeX base distribution is +%% given in the file `manifest.bbl. See also `legal.bbl' 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. +%% +%% --------------- start of docstrip commands ------------------ +%% +\def\filedate{2000/09/21} +\def\batchfile{bulgarian.ins} +\input docstrip.tex + +{\ifx\generate\undefined +\Msg{**********************************************} +\Msg{*} +\Msg{* This installation requires docstrip} +\Msg{* version 2.3c or later.} +\Msg{*} +\Msg{* An older version of docstrip has been input} +\Msg{*} +\Msg{**********************************************} +\errhelp{Move or rename old docstrip.tex.} +\errmessage{Old docstrip in input path} +\batchmode +\csname @@end\endcsname +\fi} + +\declarepreamble\mainpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl 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. +\endpreamble + +\declarepreamble\fdpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl for additional +information. + +In particular, permission is granted to customize the declarations in +this file to serve the needs of your installation. + +However, NO PERMISSION is granted to distribute a modified version +of this file under its original name. + +\endpreamble + +\keepsilent + +\usedir{tex/generic/babel} + +\usepreamble\mainpreamble +\generate{\file{bulgarian.ldf}{\from{bulgarian.dtx}{code}} + } +\usepreamble\fdpreamble + +\ifToplevel{ +\Msg{***********************************************************} +\Msg{*} +\Msg{* To finish the installation you have to move the following} +\Msg{* files into a directory searched by TeX:} +\Msg{*} +\Msg{* \space\space All *.def, *.fd, *.ldf, *.sty} +\Msg{*} +\Msg{* To produce the documentation run the files ending with} +\Msg{* '.dtx' and `.fdd' through LaTeX.} +\Msg{*} +\Msg{* Happy TeXing} +\Msg{***********************************************************} +} + +\endinput \ No newline at end of file diff --git a/Master/texmf-dist/source/generic/babel/catalan.dtx b/Master/texmf-dist/source/generic/babel/catalan.dtx new file mode 100644 index 00000000000..b8185af4df8 --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/catalan.dtx @@ -0,0 +1,712 @@ +% \iffalse meta-comment +% +% Copyright 1989-2005 Johannes L. Braams and any individual authors +% listed elsewhere in this file. All rights reserved. +% +% This file is part of the Babel system. +% -------------------------------------- +% +% It 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 +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2003/12/01 or later. +% +% This work has the LPPL maintenance status "maintained". +% +% The Current Maintainer of this work is Johannes Braams. +% +% The list of all files belonging to the Babel system is +% given in the file `manifest.bbl. See also `legal.bbl' 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 +% \CheckSum{517} +% +% \iffalse +% Tell the \LaTeX\ system who we are and write an entry on the +% transcript. +%<*dtx> +\ProvidesFile{catalan.dtx} +% +%\ProvidesLanguage{catalan} +%\fi +%\ProvidesFile{catalan.dtx} + [2005/03/29 v2.2p Catalan support from the babel system] +%\iffalse +%% File `catalan.dtx' +%% Babel package for LaTeX version 2e +%% Copyright (C) 1989 - 2005 +%% by Johannes Braams, TeXniek +% +%% Catalan Language Definition File +%% Copyright (C) 1991 - 2005 +%% by Goncal Badenes +%% Johannes Braams, TeXniek +% +%% Please report errors to: J.L. Braams babel at braams.cistron.nl +%% +% This file is part of the babel system, it provides the source +% code for the Catalan language definition file. +% This file was developped out of spanish.sty and suggestions by +% Goncal Badenes and Joerg Knappen +% . +% +% The file spanish.sty was written by Julio Sanchez, +% (jsanchez@gmv.es) The code for the catalan language has been +% removed and now is in this file. +%<*filedriver> +\documentclass{ltxdoc} +\newcommand*\TeXhax{\TeX hax} +\newcommand*\babel{\textsf{babel}} +\newcommand*\langvar{$\langle \it lang \rangle$} +\newcommand*\note[1]{} +\newcommand*\Lopt[1]{\textsf{#1}} +\newcommand*\file[1]{\texttt{#1}} +\begin{document} + \DocInput{catalan.dtx} +\end{document} +% +%\fi +% +% \GetFileInfo{catalan.dtx} +% +% \changes{catalan-2.0b}{1993/09/23}{Incorporated the changes from +% \file{spanish.sty}} +% \changes{catalan-2.1}{1994/02/27}{Update for \LaTeXe} +% \changes{catalan-2.1d}{1994/06/26}{Removed the use of \cs{filedate} +% and moved identification after the loading of \file{babel.def}} +% \changes{catalan-2.2b}{1995/07/04}{Made the activation of the grave +% and acute accents optional} +% \changes{catalan-2.2c}{1995/07/08}{Removed the use of the tilde for +% catalan} +% \changes{catalan-2.2f}{1996/07/13}{Replaced \cs{undefined} with +% \cs{@undefined} and \cs{empty} with \cs{@empty} for consistency +% with \LaTeX} +% \changes{catalan-2.2g}{1996/10/10}{Moved the definition of +% \cs{atcatcode} right to the beginning.} +% \changes{catalan-2.2k}{1999/05/05}{A wrong \cs{changes} entry made +% typesetting impossible} +% +% \section{The Catalan language} +% +% The file \file{\filename}\footnote{The file described in this +% section has version number \fileversion\ and was last revised on +% \filedate.} defines all the language-specific macro's for the +% Catalan language. +% +% For this language only the double quote character (|"|) is made +% active by default. In table~\ref{tab:catalan-quote-def} an +% overview is given of the new macros defined and the new meanings +% of |"|. Additionally to that, the user can explicitly activate +% the acute accent or apostrophe (|'|) and/or the grave accent +% (|`|) characters by using the \Lopt{activeacute} and +% \Lopt{activegrave} options. In that case, the definitions shown +% in table~\ref{tab:catalan-quote-opt} also become +% available\footnote{Please note that if the acute accent character +% is active, it is necessary to take special care of coding +% apostrophes in a way which cannot be confounded with +% accents. Therefore, it is necessary to type \texttt{l'\{\}estri} +% instead of \texttt{l'estri}.}. +% +% \begin{table}[htb] +% \centering +% \begin{tabular}{lp{8cm}} +% |\l.l| & geminated-l digraph (similar to +% l$\cdot$l). |\L.L| produces the uppercase version.\\ +% |\lgem| & geminated-l digraph (similar to +% l$\cdot$l). |\Lgem| produces the uppercase version.\\ +% |\up| & Macro to help typing raised ordinals, like {1\raise +% 1ex\hbox{\small er}}. Takes one argument.\\ +% |\-| & like the old |\-|, but allowing hyphenation +% in the rest of the word. \\ +% |"i| & i with diaeresis, allowing hyphenation +% in the rest of the word. Valid for the following vowels: +% i, u (both lowercase and uppercase).\\ +% |"c| & c-cedilla (\c{c}). Valid for both uppercase and +% lowercase c.\\ +% |"l| & geminated-l digraph (similar to +% l$\cdot$l). Valid for both uppercase and lowercase l.\\ +% |"<| & French left double quotes (similar to $<<$).\\ +% |">| & French right double quotes (similar to $>>$).\\ +% |"-| & explicit hyphen sign, allowing hyphenation +% in the rest of the word.\\ +% \verb="|= & disable ligature at this position. +% \end{tabular} +% \caption{Extra definitions made by file \file{catalan.ldf} +% (activated by default)} +% \label{tab:catalan-quote-def} +% \end{table} +% +% \begin{table}[htb] +% \centering +% \begin{tabular}{lp{8cm}} +% |'e| & acute accented a, allowing hyphenation +% in the rest of the word. Valid for the following +% vowels: e, i, o, u (both lowercase and uppercase).\\ +% |`a| & grave accented a, allowing hyphenation +% in the rest of the word. Valid for the following +% vowels: a, e, o (both lowercase and uppercase). +% \end{tabular} +% \caption{Extra definitions made by file \file{catalan.ldf} +% (activated only when using the options \Lopt{activeacute} and +% \Lopt{activegrave})} +% \label{tab:catalan-quote-opt} +% \end{table} +% These active accents characters behave according to their original +% definitions if not followed by one of the characters indicated in +% that table. +% +% \StopEventually{} +% +% \changes{catalan-2.0}{1993/07/11}{Removed code to load +% \file{latexhax.com}} +% +% The macro |\LdfInit| takes care of preventing that this file is +% loaded more than once, checking the category code of the +% \texttt{@} sign, etc. +% \changes{catalan-2.2g}{1996/11/02}{Now use \cs{LdfInit} to perform +% initial checks} +% \begin{macrocode} +%<*code> +\LdfInit{catalan}\captionscatalan +% \end{macrocode} +% +% When this file is read as an option, i.e. by the |\usepackage| +% command, \texttt{catalan} could be an `unknown' language in which +% case we have to make it known. So we check for the existence of +% |\l@catalan| to see whether we have to do something here. +% +% \changes{catalan-2.1d}{1994/06/26}{Now use \cs{@nopatterns} to +% produce the warning} +% \begin{macrocode} +\ifx\l@catalan\@undefined + \@nopatterns{Catalan} + \adddialect\l@catalan0 +\fi +% \end{macrocode} +% +% The next step consists of defining commands to switch to (and +% from) the Catalan language. +% +% \begin{macro}{\catalanhyphenmins} +% This macro is used to store the correct values of the hyphenation +% parameters |\lefthyphenmin| and |\righthyphenmin|. +% \changes{catalan-2.2n}{2001/02/19}{Set the hyphenation parameters +% both to two as required by \texttt{cahyph.tex}} +% \begin{macrocode} +\providehyphenmins{catalan}{\tw@\tw@} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\captionscatalan} +% The macro |\captionscatalan| defines all strings used +% in the four standard documentclasses provided with \LaTeX. +% \changes{catalan-1.1}{1993/07/11}{\cs{headpagename} should be +% \cs{pagename}} +% \changes{catalan-2.0}{1993/07/11}{Added some names} +% \changes{catalan-2.1d}{1994/11/09}{Added a few missing translations} +% \changes{catalan-2.2b}{1995/07/03}{Added \cs{proofname} for +% AMS-\LaTeX} +% \changes{catalan-2.2d}{1995/07/10}{added translation of Proof} +% \changes{catalan-2.2d}{1995/11/15}{Translations revised} +% \changes{catalan-2.2m}{2000/09/19}{Added \cs{glossaryname}} +% \changes{catalan-2.2p}{2003/11/17}{Inserted translation for +% Glossary} +% \begin{macrocode} +\addto\captionscatalan{% + \def\prefacename{Pr\`oleg}% + \def\refname{Refer\`encies}% + \def\abstractname{Resum}% + \def\bibname{Bibliografia}% + \def\chaptername{Cap\'{\i}tol}% + \def\appendixname{Ap\`endix}% + \def\contentsname{\'Index}% + \def\listfigurename{\'Index de figures}% + \def\listtablename{\'Index de taules}% + \def\indexname{\'Index alfab\`etic}% + \def\figurename{Figura}% + \def\tablename{Taula}% + \def\partname{Part}% + \def\enclname{Adjunt}% + \def\ccname{C\`opies a}% + \def\headtoname{A}% + \def\pagename{P\`agina}% + \def\seename{Vegeu}% + \def\alsoname{Vegeu tamb\'e}% + \def\proofname{Demostraci\'o}% + \def\glossaryname{Glossari}% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\datecatalan} +% The macro |\datecatalan| redefines the command |\today| to +% produce Catalan dates. Months are written in +% lowercase\footnote{This seems to be the common practice. See for +% example: E.~Coromina, \emph{El 9 Nou: Manual de redacci\'o i +% estil}, Ed.~Eumo, Vic, 1993}. +% \changes{catalan-2.2b}{1995/06/18}{Month names in lowercase} +% \changes{catalan-2.2i}{1997/10/01}{Use \cs{edef} to define \cs{today} +% to save memory} +% \changes{catalan-2.2i}{1998/03/28}{use \cs{def} instead of \cs{edef}} +% \begin{macrocode} +\def\datecatalan{% + \def\today{\number\day~\ifcase\month\or + de gener\or de febrer\or de mar\c{c}\or d'abril\or de maig\or + de juny\or de juliol\or d'agost\or de setembre\or d'octubre\or + de novembre\or de desembre\fi + \space de~\number\year}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\extrascatalan} +% \changes{catalan-2.0}{1993/07/11}{Macro completely rewritten} +% \changes{catalan-2.2a}{1995/03/11}{Handling of active characters +% completely rewritten} +% +% \begin{macro}{\noextrascatalan} +% \changes{catalan-2.0}{1993/07/11}{Macro completely rewritten} +% +% The macro |\extrascatalan| will perform all the extra definitions +% needed for the Catalan language. The macro |\noextrascatalan| is +% used to cancel the actions of |\extrascatalan|. +% +% \changes{catalan-2.2e}{1995/11/10}{Now give the apostrophe a +% lowercase code} +% To improve hyphenation we give the grave character (\texttt{'}) a +% non-zero lower case code; when we do that \TeX\ will find more +% breakpoints in words that contain this character in its r\^ole as +% apostrophe. +% \begin{macrocode} +\addto\extrascatalan{% + \lccode`'=`'} +\addto\noextrascatalan{% + \lccode`'=0} +% \end{macrocode} +% +% For Catalan, some characters are made active or are redefined. In +% particular, the \texttt{"} character receives a new meaning; this +% can also happen for the \texttt{'} character and the \texttt{`} +% character when the options \Lopt{activegrave} and/or +% \Lopt{activeacute} are specified. +% +% \changes{catalan-2.2b}{1995/07/07}{Make activating the accent +% characters optional} +% \changes{catalan-2.2e}{1995/08/17}{Need to split up the +% \cs{@ifpackagewith} statements} +% \begin{macrocode} +\addto\extrascatalan{\languageshorthands{catalan}} +\initiate@active@char{"} +\addto\extrascatalan{\bbl@activate{"}} +% \end{macrocode} +% Because the grave character is being used in constructs such as +% |\catcode``=\active| it needs to have it's original category code%'' +% when the auxiliary file is being read. Note that this file is +% read twice, once at the beginning of the document; then there is +% no problem; but the second time it is read at the end of the +% document to check whether any labels changes. It's this second +% time round that the actived grave character leads to error +% messages. +% \changes{catalan-2.2l}{1999/11/29}{Make sure that the grave accent +% has catcode 12 \emph{before} it is made \cs{active}} +% \begin{macrocode} +\@ifpackagewith{babel}{activegrave}{% + \AtBeginDocument{% + \if@filesw\immediate\write\@auxout{\catcode096=12}\fi} + \initiate@active@char{`}% + }{} +\@ifpackagewith{babel}{activegrave}{% + \addto\extrascatalan{\bbl@activate{`}}% + }{} +\@ifpackagewith{babel}{activeacute}{% + \initiate@active@char{'}% + }{} +\@ifpackagewith{babel}{activeacute}{% + \addto\extrascatalan{\bbl@activate{'}}% + }{} +% \end{macrocode} +% Now make sure that the characters that have been turned into +% shorthanfd characters expand to `normal' characters outside the +% catalan environment. +% \changes{catalan-2.2l}{1999/12/16}{Don't forget do deactivate the +% shorthands} +% \begin{macrocode} +\addto\noextrascatalan{\bbl@deactivate{"}} +\@ifpackagewith{babel}{activegrave}{% + \addto\noextrascatalan{\bbl@deactivate{`}}}{} +\@ifpackagewith{babel}{activeacute}{% + \addto\noextrascatalan{\bbl@deactivate{'}}}{} +% \end{macrocode} +% +% \changes{catalan-2.2a}{1995/03/11}{All the code for handling active +% characters is now moved to \file{babel.def}} +% +% Apart from the active characters some other macros get a new +% definition. Therefore we store the current ones to be able +% to restore them later. +% When their current meanings are saved, we can safely redefine +% them. +% +% We provide new definitions for the accent macros when one or +% both of the options \Lopt{activegrave} or \Lopt{activeacute} +% were specified. +% +% \changes{catalan-2.2h}{1997/01/08}{Added some comment signs to +% prevent unwanted spaces in the output} +% \begin{macrocode} +\addto\extrascatalan{% + \babel@save\"% + \def\"{\protect\@umlaut}}% +\@ifpackagewith{babel}{activegrave}{% + \babel@save\`% + \addto\extrascatalan{\def\`{\protect\@grave}} + }{} +\@ifpackagewith{babel}{activeacute}{% + \babel@save\'% + \addto\extrascatalan{\def\'{\protect\@acute}} + }{} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% All the code above is necessary because we need a few extra +% active characters. These characters are then used as indicated in +% tables~\ref{tab:catalan-quote-def} +% and~\ref{tab:catalan-quote-opt}. +% +% \begin{macro}{\dieresis} +% \begin{macro}{\textacute} +% \changes{catalan-2.1d}{1994/06/26}{Renamed from \cs{acute} as that +% is a \cs{mathaccent}} +% \begin{macro}{\textgrave} +% +% The original definition of |\"| is stored as |\dieresis|, because +% the definition of |\"| might not be the default plain \TeX\ +% one. If the user uses \textsc{PostScript} fonts with the Adobe +% font encoding the \texttt{"} character is not in the same +% position as in Knuth's font encoding. In this case |\"| will not +% be defined as |\accent"7F 1|, but as |\accent'310 #1|. Something +% similar happens when using fonts that follow the Cork +% encoding. For this reason we save the definition of |\"| and use +% that in the definition of other macros. We do likewise for |\`|, +% and |\'|. +% \begin{macrocode} +\let\dieresis\" +\@ifpackagewith{babel}{activegrave}{\let\textgrave\`}{} +\@ifpackagewith{babel}{activeacute}{\let\textacute\'}{} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\@umlaut} +% \begin{macro}{\@acute} +% \begin{macro}{\@grave} +% We check the encoding and if not using T1, we make the accents +% expand but enabling hyphenation beyond the accent. If this is the +% case, not all break positions will be found in words that contain +% accents, but this is a limitation in \TeX. An unsolved problem +% here is that the encoding can change at any time. The definitions +% below are made in such a way that a change between two 256-char +% encodings are supported, but changes between a 128-char and a +% 256-char encoding are not properly supported. We check if T1 is +% in use. If not, we will give a warning and proceed redefining the +% accent macros so that \TeX{} at least finds the breaks that are +% not too close to the accent. The warning will only be printed to +% the log file. +% +% \begin{macrocode} +\ifx\DeclareFontShape\@undefined + \wlog{Warning: You are using an old LaTeX} + \wlog{Some word breaks will not be found.} + \def\@umlaut#1{\allowhyphens\dieresis{#1}\allowhyphens} + \@ifpackagewith{babel}{activeacute}{% + \def\@acute#1{\allowhyphens\textacute{#1}\allowhyphens}}{} + \@ifpackagewith{babel}{activegrave}{% + \def\@grave#1{\allowhyphens\textgrave{#1}\allowhyphens}}{} +\else + \ifx\f@encoding\bbl@t@one + \let\@umlaut\dieresis + \@ifpackagewith{babel}{activeacute}{% + \let\@acute\textacute}{} + \@ifpackagewith{babel}{activegrave}{% + \let\@grave\textgrave}{} + \else + \wlog{Warning: You are using encoding \f@encoding\space + instead of T1.} + \wlog{Some word breaks will not be found.} + \def\@umlaut#1{\allowhyphens\dieresis{#1}\allowhyphens} + \@ifpackagewith{babel}{activeacute}{% + \def\@acute#1{\allowhyphens\textacute{#1}\allowhyphens}}{} + \@ifpackagewith{babel}{activegrave}{% + \def\@grave#1{\allowhyphens\textgrave{#1}\allowhyphens}}{} + \fi +\fi +% \end{macrocode} +% If the user setup has extended fonts, the Ferguson macros are +% required to be defined. We check for their existance and, if +% defined, expand to whatever they are defined to. For instance, +% |\'a| would check for the existance of a |\@ac@a| macro. It is +% assumed to expand to the code of the accented letter. If it is +% not defined, we assume that no extended codes are available and +% expand to the original definition but enabling hyphenation beyond +% the accent. This is as best as we can do. It is better if you +% have extended fonts or ML-\TeX{} because the hyphenation +% algorithm can work on the whole word. The following macros are +% directly derived from ML-\TeX{}.\footnote{A problem is perceived +% here with these macros when used in a multilingual environment +% where extended hyphenation patterns are available for some but +% not all languages. Assume that no extended patterns exist at some +% site for French and that \file{french.sty} would adopt this +% scheme too. In that case, \mbox{\texttt{'e}} in French would +% produce the combined accented letter, but hyphenation around it +% would be suppressed. Both language options would need an +% independent method to know whether they have extended patterns +% available. The precise impact of this problem and the possible +% solutions are under study.} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \changes{catalan-2.2a}{1995/03/14}{All the code to deal with active +% characters is now in \file{babel.def}} +% +% Now we can define our shorthands: the diaeresis and ``ela +% geminada'' support, +% \begin{macrocode} +\declare@shorthand{catalan}{"i}{\textormath{\@umlaut\i}{\ddot\imath}} +\declare@shorthand{catalan}{"l}{\lgem{}} +\declare@shorthand{catalan}{"u}{\textormath{\@umlaut u}{\ddot u}} +\declare@shorthand{catalan}{"I}{\textormath{\@umlaut I}{\ddot I}} +\declare@shorthand{catalan}{"L}{\Lgem{}} +\declare@shorthand{catalan}{"U}{\textormath{\@umlaut U}{\ddot U}} +% \end{macrocode} +% cedille, +% \changes{catalan-2.2c}{1995/07/08}{cedile now produced by double +% quote shorthand} +% \begin{macrocode} +\declare@shorthand{catalan}{"c}{\textormath{\c c}{^{\prime} c}} +\declare@shorthand{catalan}{"C}{\textormath{\c C}{^{\prime} C}} +% \end{macrocode} +% `french' quote characters, +% \changes{catalan-2.2c}{1995/07/08}{Added shorthands for guillemets} +% \changes{catalan-2.2i}{1997/04/03}{Removed empty groups after +% guillemot characters} +% \begin{macrocode} +\declare@shorthand{catalan}{"<}{% + \textormath{\guillemotleft}{\mbox{\guillemotleft}}} +\declare@shorthand{catalan}{">}{% + \textormath{\guillemotright}{\mbox{\guillemotright}}} +% \end{macrocode} +% grave accents, +% \changes{catalan-2.2e}{1996/03/05}{Added `{}` as an axtra shorthand} +% \begin{macrocode} +\@ifpackagewith{babel}{activegrave}{% + \declare@shorthand{catalan}{`a}{\textormath{\@grave a}{\grave a}} + \declare@shorthand{catalan}{`e}{\textormath{\@grave e}{\grave e}} + \declare@shorthand{catalan}{`o}{\textormath{\@grave o}{\grave o}} + \declare@shorthand{catalan}{`A}{\textormath{\@grave A}{\grave A}} + \declare@shorthand{catalan}{`E}{\textormath{\@grave E}{\grave E}} + \declare@shorthand{catalan}{`O}{\textormath{\@grave O}{\grave O}} + \declare@shorthand{catalan}{``}{\textquotedblleft}%'' + }{} +% \end{macrocode} +% acute accents, +% \changes{catalan-2.2b}{1995/07/03}{Changed mathmode definition of +% acute shorthands to expand to a single prime followed by the next +% character in the input} +% \changes{catalan-2.2e}{1995/09/05}{Added vertical bar as argument to +% active acute} +% \begin{macrocode} +\@ifpackagewith{babel}{activeacute}{% + \declare@shorthand{catalan}{'a}{\textormath{\@acute a}{^{\prime} a}} + \declare@shorthand{catalan}{'e}{\textormath{\@acute e}{^{\prime} e}} + \declare@shorthand{catalan}{'i}{\textormath{\@acute\i{}}{^{\prime} i}} + \declare@shorthand{catalan}{'o}{\textormath{\@acute o}{^{\prime} o}} + \declare@shorthand{catalan}{'u}{\textormath{\@acute u}{^{\prime} u}} + \declare@shorthand{catalan}{'A}{\textormath{\@acute A}{^{\prime} A}} + \declare@shorthand{catalan}{'E}{\textormath{\@acute E}{^{\prime} E}} + \declare@shorthand{catalan}{'I}{\textormath{\@acute I}{^{\prime} I}} + \declare@shorthand{catalan}{'O}{\textormath{\@acute O}{^{\prime} O}} + \declare@shorthand{catalan}{'U}{\textormath{\@acute U}{^{\prime} U}} + \declare@shorthand{catalan}{'|}{% + \textormath{\csname normal@char\string'\endcsname}{^{\prime}}} +% \end{macrocode} +% the acute accent, +% \changes{catalan-2.2c}{1995/07/08}{Added '{}' as an axtra shorthand, +% removed 'n as a shorthand} +% \begin{macrocode} + \declare@shorthand{catalan}{''}{% + \textormath{\textquotedblright}{\sp\bgroup\prim@s'}} + }{} +% \end{macrocode} +% and finally, some support definitions +% \begin{macrocode} +\declare@shorthand{catalan}{"-}{\nobreak-\bbl@allowhyphens} +\declare@shorthand{catalan}{"|}{% + \textormath{\nobreak\discretionary{-}{}{\kern.03em}% + \allowhyphens}{}} +% \end{macrocode} +% +% \begin{macro}{\-} +% +% All that is left now is the redefinition of |\-|. The new version +% of |\-| should indicate an extra hyphenation position, while +% allowing other hyphenation positions to be generated +% automatically. The standard behaviour of \TeX\ in this respect is +% unfortunate for Catalan but not as much as for Dutch or German, +% where long compound words are quite normal and all one needs is a +% means to indicate an extra hyphenation position on top of the +% ones that \TeX\ can generate from the hyphenation +% patterns. However, the average length of words in Catalan makes +% this desirable and so it is kept here. +% +% \begin{macrocode} +\addto\extrascatalan{% + \babel@save{\-}% + \def\-{\bbl@allowhyphens\discretionary{-}{}{}\bbl@allowhyphens}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\lgem} +% \begin{macro}{\Lgem} +% \changes{catalan-2.2b}{1995/06/18}{Added support for typing the +% catalan ``ela geminada'' with the macros \cs{lgem} and \cs{Lgem}} +% \changes{catalan-2.2f}{1996/09/20}{Added a check for math mode as +% the use of \cs{lgem} and \cs{Lgem} in math mode is not sensible.} +% +% Here we define a macro for typing the catalan ``ela geminada'' +% (geminated l). The macros |\lgem| and |\Lgem| have been chosen +% for its lowercase and uppercase representation, +% respectively\footnote{The macro names \cs{ll} and \cs{LL} were +% not taken because of the fact that \cs{ll} is already used in +% mathematical mode.}. +% +% The code used in the actual macro used is a combination of the +% one proposed by Feruglio and Fuster\footnote{G.~Valiente and +% R.~Fuster, Typesetting Catalan Texts with \TeX, \emph{TUGboat} +% \textbf{14}(3), 1993.} and the proposal\footnote{G. Valiente, +% Modern Catalan Typographical Conventions, \emph{TUGboat} +% \textbf{16}(3), 1995.} from Valiente presented at the \TeX\ Users +% Group Annual Meeting in 1995. This last proposal has not been +% fully implemented due to its limitation to CM fonts. +% \begin{macrocode} +\newdimen\leftllkern \newdimen\rightllkern \newdimen\raiselldim +\def\lgem{% + \ifmmode + \csname normal@char\string"\endcsname l% + \else + \leftllkern=0pt\rightllkern=0pt\raiselldim=0pt% + \setbox0\hbox{l}\setbox1\hbox{l\/}\setbox2\hbox{.}% + \advance\raiselldim by \the\fontdimen5\the\font + \advance\raiselldim by -\ht2% + \leftllkern=-.25\wd0% + \advance\leftllkern by \wd1% + \advance\leftllkern by -\wd0% + \rightllkern=-.25\wd0% + \advance\rightllkern by -\wd1% + \advance\rightllkern by \wd0% + \allowhyphens\discretionary{l-}{l}% + {\hbox{l}\kern\leftllkern\raise\raiselldim\hbox{.}% + \kern\rightllkern\hbox{l}}\allowhyphens + \fi + } +\def\Lgem{% + \ifmmode + \csname normal@char\string"\endcsname L% + \else + \leftllkern=0pt\rightllkern=0pt\raiselldim=0pt% + \setbox0\hbox{L}\setbox1\hbox{L\/}\setbox2\hbox{.}% + \advance\raiselldim by .5\ht0% + \advance\raiselldim by -.5\ht2% + \leftllkern=-.125\wd0% + \advance\leftllkern by \wd1% + \advance\leftllkern by -\wd0% + \rightllkern=-\wd0% + \divide\rightllkern by 6% + \advance\rightllkern by -\wd1% + \advance\rightllkern by \wd0% + \allowhyphens\discretionary{L-}{L}% + {\hbox{L}\kern\leftllkern\raise\raiselldim\hbox{.}% + \kern\rightllkern\hbox{L}}\allowhyphens + \fi + } +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\l.l} +% \begin{macro}{\L.L} +% \changes{catalan-2.2e}{1996/06/26}{Added redefinition of \cs{l} and +% \cs{L}} +% It seems to be the most natural way of entering the ``ela +% geminda'' to use the sequences |\l.l| and |\L.L|. These are not +% really macro's by themselves but the macros |\l| and |\L| with +% delimited arguments. Therefor we define two macros that check if +% the next character is a period. If not the ``polish l'' will be +% typeset, otherwise a ``ela geminada'' will be typeset and the +% next two tokens will be `eaten'. +% \changes{catalan-2.2o}{2003/09/19}{Postpone the redefinition of +% \cs{l} and \cs{L} until begin document to prevent overwriting by +% fontenc} +% \begin{macrocode} +\AtBeginDocument{% + \let\lslash\l + \let\Lslash\L + \DeclareRobustCommand\l{\@ifnextchar.\bbl@l\lslash} + \DeclareRobustCommand\L{\@ifnextchar.\bbl@L\Lslash}} +\def\bbl@l#1#2{\lgem} +\def\bbl@L#1#2{\Lgem} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\up} +% +% A macro for typesetting things like 1\raise1ex\hbox{\small er} as +% proposed by Raymon Seroul\footnote{This macro has been borrowed +% from francais.dtx}. +% \changes{catalan-2.2b}{1995/06/18}{Added definition of macro +% \cs{up}, which can be used to type ordinals} +% \changes{catalan-2.2e}{1996/02/29}{Now use \cs{textsuperscript} and +% make \cs{up} robust} +% \begin{macrocode} +\DeclareRobustCommand*{\up}[1]{\textsuperscript{#1}} +% \end{macrocode} +% \end{macro} +% +% The macro |\ldf@finish| takes care of looking for a +% configuration file, setting the main language to be switched on +% at |\begin{document}| and resetting the category code of +% \texttt{@} to its original value. +% \changes{catalan-2.2g}{1996/11/02}{Now use \cs{ldf@finish} to wrap +% up} +% \begin{macrocode} +\ldf@finish{catalan} +% +% \end{macrocode} +% +% \Finale +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +%% +\endinput diff --git a/Master/texmf-dist/source/generic/babel/catalan.ins b/Master/texmf-dist/source/generic/babel/catalan.ins new file mode 100644 index 00000000000..982e9b8bbaf --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/catalan.ins @@ -0,0 +1,148 @@ +%% +%% This file will generate fast loadable files and documentation +%% driver files from the doc files in this package when run through +%% LaTeX or TeX. +%% +%% Copyright 1989-2005 Johannes L. Braams and any individual authors +%% listed elsewhere in this file. All rights reserved. +%% +%% This file is part of the Babel system. +%% -------------------------------------- +%% +%% It 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 +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% The Current Maintainer of this work is Johannes Braams. +%% +%% The list of all files belonging to the LaTeX base distribution is +%% given in the file `manifest.bbl. See also `legal.bbl' 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. +%% +%% --------------- start of docstrip commands ------------------ +%% +\def\filedate{1999/04/11} +\def\batchfile{catalan.ins} +\input docstrip.tex + +{\ifx\generate\undefined +\Msg{**********************************************} +\Msg{*} +\Msg{* This installation requires docstrip} +\Msg{* version 2.3c or later.} +\Msg{*} +\Msg{* An older version of docstrip has been input} +\Msg{*} +\Msg{**********************************************} +\errhelp{Move or rename old docstrip.tex.} +\errmessage{Old docstrip in input path} +\batchmode +\csname @@end\endcsname +\fi} + +\declarepreamble\mainpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl 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. +\endpreamble + +\declarepreamble\fdpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl for additional +information. + +In particular, permission is granted to customize the declarations in +this file to serve the needs of your installation. + +However, NO PERMISSION is granted to distribute a modified version +of this file under its original name. + +\endpreamble + +\keepsilent + +\usedir{tex/generic/babel} + +\usepreamble\mainpreamble +\generate{\file{catalan.ldf}{\from{catalan.dtx}{code}} + } +\usepreamble\fdpreamble + +\ifToplevel{ +\Msg{***********************************************************} +\Msg{*} +\Msg{* To finish the installation you have to move the following} +\Msg{* files into a directory searched by TeX:} +\Msg{*} +\Msg{* \space\space All *.def, *.fd, *.ldf, *.sty} +\Msg{*} +\Msg{* To produce the documentation run the files ending with} +\Msg{* '.dtx' and `.fdd' through LaTeX.} +\Msg{*} +\Msg{* Happy TeXing} +\Msg{***********************************************************} +} + +\endinput diff --git a/Master/texmf-dist/source/generic/babel/croatian.dtx b/Master/texmf-dist/source/generic/babel/croatian.dtx new file mode 100644 index 00000000000..3389033b0b4 --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/croatian.dtx @@ -0,0 +1,226 @@ +% \iffalse meta-comment +% +% Copyright 1989-2005 Johannes L. Braams and any individual authors +% listed elsewhere in this file. All rights reserved. +% +% This file is part of the Babel system. +% -------------------------------------- +% +% It 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 +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2003/12/01 or later. +% +% This work has the LPPL maintenance status "maintained". +% +% The Current Maintainer of this work is Johannes Braams. +% +% The list of all files belonging to the Babel system is +% given in the file `manifest.bbl. See also `legal.bbl' 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 +% \CheckSum{87} +% \iffalse +% Tell the \LaTeX\ system who we are and write an entry on the +% transcript. +%<*dtx> +\ProvidesFile{croatian.dtx} +% +%\ProvidesLanguage{croatian} +%\fi +%\ProvidesFile{croatian.dtx} + [2005/03/29 v1.3l Croatian support from the babel system] +%\iffalse +%% File `croatian.dtx' +%% Babel package for LaTeX version 2e +%% Copyright (C) 1989 - 2005 +%% by Johannes Braams, TeXniek +% +%% Please report errors to: J.L. Braams +%% babel at braams.cistron.nl +% +% This file is part of the babel system, it provides the source +% code for the Croatian language definition file. A contribution +% was made by Alan Pai\'{c} (paica@cernvm.cern.ch) +%<*filedriver> +\documentclass{ltxdoc} +\newcommand*\TeXhax{\TeX hax} +\newcommand*\babel{\textsf{babel}} +\newcommand*\langvar{$\langle \it lang \rangle$} +\newcommand*\note[1]{} +\newcommand*\Lopt[1]{\textsf{#1}} +\newcommand*\file[1]{\texttt{#1}} +\begin{document} + \DocInput{croatian.dtx} +\end{document} +% +%\fi +% \GetFileInfo{croatian.dtx} +% +% \changes{croatian-1.0a}{1991/07/15}{Renamed \file{babel.sty} in +% \file{babel.com}} +% \changes{croatian-1.0c}{1992/01/25}{Removed some typos} +% \changes{croatian-1.1}{1992/02/15}{Brought up-to-date with babel 3.2a} +% \changes{croatian-1.3}{1994/02/27}{Update for \LaTeXe} +% \changes{croatian-1.3g}{1996/10/10}{Replaced \cs{undefined} with +% \cs{@undefined} and \cs{empty} with \cs{@empty} for consistency +% with \LaTeX, moved the definition of \cs{atcatcode} right to the +% beginning.} +% +% \section{The Croatian language} +% +% The file \file{\filename}\footnote{The file described in this +% section has version number \fileversion\ and was last revised on +% \filedate. A contribution was made by Alan Pai\'{c} +% (\texttt{paica@cernvm.cern.ch}).} defines all the +% language definition macros for the Croatian language. +% +% For this language currently no special definitions are needed or +% available. +% +% \StopEventually{} +% +% The macro |\LdfInit| takes care of preventing that this file is +% loaded more than once, checking the category code of the +% \texttt{@} sign, etc. +% \changes{croatian-1.3g}{1996/11/02}{Now use \cs{LdfInit} to perform +% initial checks} +% \begin{macrocode} +%<*code> +\LdfInit{croatian}\captionscroatian +% \end{macrocode} +% +% When this file is read as an option, i.e. by the |\usepackage| +% command, \texttt{croatian} will be an `unknown' language in which +% case we have to make it known. So we check for the existence of +% |\l@croatian| to see whether we have to do something here. +% +% \changes{croatian-1.0b}{1991/10/07}{Removed use of +% \cs{@ifundefined}} +% \changes{croatian-1.1}{1992/02/15}{Added a warning when no +% hyphenation patterns were loaded.} +% \begin{macrocode} +\ifx\l@croatian\@undefined + \@nopatterns{Croatian} + \adddialect\l@croatian0\fi +% \end{macrocode} +% +% The next step consists of defining commands to switch to (and +% from) the Croatian language. +% +% \begin{macro}{\captionscroatian} +% The macro |\captionscroatian| defines all strings used +% in the four standard documentclasses provided with \LaTeX. +% \changes{croatian-1.1}{1992/02/15}{Added \cs{seename}, +% \cs{alsoname} and \cs{prefacename}} +% \changes{croatian-1.2}{1993/07/11}{\cs{headpagename} should be +% \cs{pagename}} +% \changes{croatian-1.3d}{1995/05/08}{Added a few translations} +% \changes{croatian-1.3e}{1995/07/04}{Added \cs{proofname} for +% AMS-\LaTeX} +% \changes{croatian-1.3f}{1996/01/18}{Added translation of Proof} +% \changes{croatian-1.3i}{1997/09/11}{Replaced some of the +% translations with `better' words} +% \changes{croatian-1.3k}{2000/09/19}{Added \cs{glossaryname}} +% \changes{croatian-1.3l}{2003/11/17}{Inserted translation for Glossary} +% \begin{macrocode} +\addto\captionscroatian{% + \def\prefacename{Predgovor}% + \def\refname{Literatura}% + \def\abstractname{Sa\v{z}etak}% + \def\bibname{Bibliografija}% + \def\chaptername{Poglavlje}% + \def\appendixname{Dodatak}% + \def\contentsname{Sadr\v{z}aj}% + \def\listfigurename{Popis slika}% + \def\listtablename{Popis tablica}% + \def\indexname{Indeks}% + \def\figurename{Slika}% + \def\tablename{Tablica}% + \def\partname{Dio}% + \def\enclname{Prilozi}% + \def\ccname{Kopije}% + \def\headtoname{Prima}% + \def\pagename{Stranica}% + \def\seename{Vidjeti}% + \def\alsoname{Vidjeti i}% + \def\proofname{Dokaz}% + \def\glossaryname{Kazalo}% + }% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\datecroatian} +% The macro |\datecroatian| redefines the command |\today| to +% produce Croatian dates. +% \changes{croatian-1.3f}{1996/01/18}{in croatian language, the +% genitive for the name of the month has to be used} +% \changes{croatian-1.3h}{1997/02/06}{\texttt{sijev\{c\}nja} should be +% \texttt{seij\cs{v}\{c\}nja} and there should be a period after +% the year} +% \changes{croatian-1.3i}{1997/10/01}{Use \cs{edef} to define +% \cs{today} to save memory} +% \changes{croatian-1.3i}{1998/03/28}{use \cs{def} instead of +% \cs{edef}} +% \changes{croatian-1.3j}{1999/03/12}{changed \cs{od} into \cs{or}} +% \begin{macrocode} +\def\datecroatian{% + \def\today{\number\day.~\ifcase\month\or + sije\v{c}nja\or velja\v{c}e\or o\v{z}ujka\or travnja\or svibnja\or + lipnja\or srpnja\or kolovoza\or rujna\or listopada\or studenog\or + prosinca\fi \space \number\year.}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\extrascroatian} +% \begin{macro}{\noextrascroatian} +% The macro |\extrascroatian| will perform all the extra +% definitions needed for the Croatian language. The macro +% |\noextrascroatian| is used to cancel the actions of +% |\extrascroatian|. For the moment these macros are empty but +% they are defined for compatibility with the other language +% definition files. +% +% \begin{macrocode} +\addto\extrascroatian{} +\addto\noextrascroatian{} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% The macro |\ldf@finish| takes care of looking for a +% configuration file, setting the main language to be switched on +% at |\begin{document}| and resetting the category code of +% \texttt{@} to its original value. +% \changes{croatian-1.3g}{1996/11/02}{Now use \cs{ldf@finish} to wrap +% up} +% \begin{macrocode} +\ldf@finish{croatian} +% +% \end{macrocode} +% +% \Finale +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +%% +\endinput diff --git a/Master/texmf-dist/source/generic/babel/croatian.ins b/Master/texmf-dist/source/generic/babel/croatian.ins new file mode 100644 index 00000000000..babb296ae01 --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/croatian.ins @@ -0,0 +1,148 @@ +%% +%% This file will generate fast loadable files and documentation +%% driver files from the doc files in this package when run through +%% LaTeX or TeX. +%% +%% Copyright 1989-2005 Johannes L. Braams and any individual authors +%% listed elsewhere in this file. All rights reserved. +%% +%% This file is part of the Babel system. +%% -------------------------------------- +%% +%% It 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 +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% The Current Maintainer of this work is Johannes Braams. +%% +%% The list of all files belonging to the LaTeX base distribution is +%% given in the file `manifest.bbl. See also `legal.bbl' 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. +%% +%% --------------- start of docstrip commands ------------------ +%% +\def\filedate{1999/04/11} +\def\batchfile{croatian.ins} +\input docstrip.tex + +{\ifx\generate\undefined +\Msg{**********************************************} +\Msg{*} +\Msg{* This installation requires docstrip} +\Msg{* version 2.3c or later.} +\Msg{*} +\Msg{* An older version of docstrip has been input} +\Msg{*} +\Msg{**********************************************} +\errhelp{Move or rename old docstrip.tex.} +\errmessage{Old docstrip in input path} +\batchmode +\csname @@end\endcsname +\fi} + +\declarepreamble\mainpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl 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. +\endpreamble + +\declarepreamble\fdpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl for additional +information. + +In particular, permission is granted to customize the declarations in +this file to serve the needs of your installation. + +However, NO PERMISSION is granted to distribute a modified version +of this file under its original name. + +\endpreamble + +\keepsilent + +\usedir{tex/generic/babel} + +\usepreamble\mainpreamble +\generate{\file{croatian.ldf}{\from{croatian.dtx}{code}} + } +\usepreamble\fdpreamble + +\ifToplevel{ +\Msg{***********************************************************} +\Msg{*} +\Msg{* To finish the installation you have to move the following} +\Msg{* files into a directory searched by TeX:} +\Msg{*} +\Msg{* \space\space All *.def, *.fd, *.ldf, *.sty} +\Msg{*} +\Msg{* To produce the documentation run the files ending with} +\Msg{* '.dtx' and `.fdd' through LaTeX.} +\Msg{*} +\Msg{* Happy TeXing} +\Msg{***********************************************************} +} + +\endinput diff --git a/Master/texmf-dist/source/generic/babel/czech.dtx b/Master/texmf-dist/source/generic/babel/czech.dtx new file mode 100644 index 00000000000..16f72d3f9bc --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/czech.dtx @@ -0,0 +1,276 @@ +% \iffalse meta-comment +% +% Copyright 1989-2005 Johannes L. Braams and any individual authors +% listed elsewhere in this file. All rights reserved. +% +% This file is part of the Babel system. +% -------------------------------------- +% +% It 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 +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2003/12/01 or later. +% +% This work has the LPPL maintenance status "maintained". +% +% The Current Maintainer of this work is Johannes Braams. +% +% The list of all files belonging to the Babel system is +% given in the file `manifest.bbl. See also `legal.bbl' 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 +% \CheckSum{190} +% +% \iffalse +% Tell the \LaTeX\ system who we are and write an entry on the +% transcript. +%<*dtx> +\ProvidesFile{czech.dtx} +% +%\ProvidesLanguage{czech} +%\fi +%\ProvidesFile{czech.dtx} + [2005/03/29 v1.3k Czech support from the babel system] +%\iffalse +%% File `czech.dtx' +%% Babel package for LaTeX version 2e +%% Copyright (C) 1989 - 2005 +%% by Johannes Braams, TeXniek +% +%% Please report errors to: J.L. Braams +%% babel at braams.cistron.nl +% +% This file is part of the babel system, it provides the source +% code for the Czech language definition file. +% Contributions were made by Milos Lokajicek (LOKAJICK@CERNVM). +%<*filedriver> +\documentclass{ltxdoc} +\newcommand*\TeXhax{\TeX hax} +\newcommand*\babel{\textsf{babel}} +\newcommand*\langvar{$\langle \it lang \rangle$} +\newcommand*\note[1]{} +\newcommand*\Lopt[1]{\textsf{#1}} +\newcommand*\file[1]{\texttt{#1}} +\begin{document} + \DocInput{czech.dtx} +\end{document} +% +%\fi +% +% \GetFileInfo{czech.dtx} +% +% \changes{czech-1.0a}{1991/07/15}{Renamed babel.sty in babel.com} +% \changes{czech-1.1}{1992/02/15}{Brought up-to-date with babel 3.2a} +% \changes{czech-1.2}{1993/07/11}{Included some features from Kasal's +% czech.sty} +% \changes{czech-1.3}{1994/02/27}{Update for \LaTeXe} +% \changes{czech-1.3d}{1994/06/26}{Removed the use of \cs{filedate} +% and moved identification after the loading of \file{babel.def}} +% \changes{czech-1.3h}{1996/10/10}{Replaced \cs{undefined} with +% \cs{@undefined} and \cs{empty} with \cs{@empty} for consistency +% with \LaTeX, moved the definition of \cs{atcatcode} right to the +% beginning.} +% +% \section{The Czech language} +% +% The file \file{\filename}\footnote{The file described in this +% section has version number \fileversion\ and was last revised on +% \filedate. Contributions were made by Milos Lokajicek +% (\texttt{LOKAJICK@CERNVM}).} defines all the language definition +% macros for the Czech language. +% +% For this language |\frenchspacing| is set and two macros |\q| and +% |\w| for easy access to two accents are defined. +% +% The command |\q| is used with the letters (\texttt{t}, +% \texttt{d}, \texttt{l}, and \texttt{L}) and adds a \texttt{'} to +% them to simulate a `hook' that should be there. The result looks +% like t\kern-2pt\char'47. The command |\w| is used to put the +% ring-accent which appears in \aa ngstr\o m over the letters +% \texttt{u} and \texttt{U}. +% +% \StopEventually{} +% +% The macro |\LdfInit| takes care of preventing that this file is +% loaded more than once, checking the category code of the +% \texttt{@} sign, etc. +% \changes{czech-1.3h}{1996/11/02}{Now use \cs{LdfInit} to perform +% initial checks} +% \begin{macrocode} +%<*code> +\LdfInit{czech}\captionsczech +% \end{macrocode} +% +% When this file is read as an option, i.e. by the |\usepackage| +% command, \texttt{czech} will be an `unknown' language in which case +% we have to make it known. So we check for the existence of +% |\l@czech| to see whether we have to do something here. +% +% \changes{czech-1.0b}{1991/10/27}{Removed use of \cs{@ifundefined}} +% \changes{czech-1.1}{1992/02/15}{Added a warning when no hyphenation +% patterns were loaded.} +% \changes{czech-1.3d}{1994/06/26}{Now use \cs{@nopatterns} to produce +% the warning} +% \begin{macrocode} +\ifx\l@czech\@undefined + \@nopatterns{Czech} + \adddialect\l@czech0\fi +% \end{macrocode} +% +% The next step consists of defining commands to switch to (and +% from) the Czech language. +% +% \begin{macro}{\captionsczech} +% The macro |\captionsczech| defines all strings used in the four +% standard documentclasses provided with \LaTeX. +% \changes{czech-1.1}{1992/02/15}{Added \cs{seename}, \cs{alsoname} +% and \cs{prefacename}} +% \changes{czech-1.3f}{1995/07/04}{Added \cs{proofname} for AMS-\LaTeX} +% \changes{czech-1.3g}{1996/02/12}{Fixed two errors and provided +% translation for `proof'} +% \changes{czech-1.3j}{2000/09/19}{Added \cs{glossaryname}} +% \changes{czech-1.3k}{2004/02/18}{Added translation for Glossary} +% \begin{macrocode} +\addto\captionsczech{% + \def\prefacename{P\v redmluva}% + \def\refname{Reference}% + \def\abstractname{Abstrakt}% + \def\bibname{Literatura}% + \def\chaptername{Kapitola}% + \def\appendixname{Dodatek}% + \def\contentsname{Obsah}% + \def\listfigurename{Seznam obr\'azk\r{u}}% + \def\listtablename{Seznam tabulek}% + \def\indexname{Index}% + \def\figurename{Obr\'azek}% + \def\tablename{Tabulka}% + \def\partname{\v{C}\'ast}% + \def\enclname{P\v{r}\'{\i}loha}% + \def\ccname{Na v\v{e}dom\'{\i}:}% + \def\headtoname{Komu}% + \def\pagename{Strana}% + \def\seename{viz}% + \def\alsoname{viz tak\'e}% + \def\proofname{D\r{u}kaz}% + \def\glossaryname{Glos\'a\v r}% + }% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\dateczech} +% The macro |\dateczech| redefines the command |\today| to produce +% Czech dates. +% \changes{czech-1.3i}{1997/10/01}{Use \cs{edef} to define \cs{today} +% to save memory} +% \changes{czech-1.3i}{1998/03/28}{use \cs{def} instead of \cs{edef}} +% \begin{macrocode} +\def\dateczech{% + \def\today{\number\day.~\ifcase\month\or + ledna\or \'unora\or b\v{r}ezna\or dubna\or kv\v{e}tna\or + \v{c}ervna\or \v{c}ervence\or srpna\or z\'a\v{r}\'{\i}\or + \v{r}\'{\i}jna\or listopadu\or prosince\fi + \space \number\year}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\extrasczech} +% \begin{macro}{\noextrasczech} +% The macro |\extrasczech| will perform all the extra definitions +% needed for the Czech language. The macro |\noextrasczech| is used +% to cancel the actions of |\extrasczech|. This means saving the +% meaning of two one-letter control sequences before defining them. +% +% \changes{czech-1.1a}{1992/07/07}{Removed typo, \cs{q} was restored +% twice, once too many.} +% \changes{czech-1.3e}{1995/03/15}{Use \LaTeX's \cs{v} and \cs{r} +% accent commands} +% \begin{macrocode} +\addto\extrasczech{\babel@save\q\let\q\v} +\addto\extrasczech{\babel@save\w\let\w\r} +% \end{macrocode} +% For Czech texts |\frenchspacing| should be in effect. We make +% sure this is the case and reset it if necessary. +% \changes{czech-1.3e}{1995/03/14}{now use \cs{bbl@frenchspacing} and +% \cs{bbl@nonfrenchspacing}} +% \begin{macrocode} +\addto\extrasczech{\bbl@frenchspacing} +\addto\noextrasczech{\bbl@nonfrenchspacing} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\v} +% \LaTeX's normal |\v| accent places a caron over the letter that +% follows it (\v{o}). This is not what we want for the letters d, +% t, l and L; for those the accent should change shape. This is +% acheived by the following. +% \begin{macrocode} +\AtBeginDocument{% + \DeclareTextCompositeCommand{\v}{OT1}{t}{% + t\kern-.23em\raise.24ex\hbox{'}} + \DeclareTextCompositeCommand{\v}{OT1}{d}{% + d\kern-.13em\raise.24ex\hbox{'}} + \DeclareTextCompositeCommand{\v}{OT1}{l}{\lcaron{}} + \DeclareTextCompositeCommand{\v}{OT1}{L}{\Lcaron{}}} +% \end{macrocode} +% +% \begin{macro}{\lcaron} +% \begin{macro}{\Lcaron} +% Fot the letters \texttt{l} and \texttt{L} we want to disinguish +% between normal fonts and monospaced fonts. +% \begin{macrocode} +\def\lcaron{% + \setbox0\hbox{M}\setbox\tw@\hbox{i}% + \ifdim\wd0>\wd\tw@\relax + l\kern-.13em\raise.24ex\hbox{'}\kern-.11em% + \else + l\raise.45ex\hbox to\z@{\kern-.35em '\hss}% + \fi} +\def\Lcaron{% + \setbox0\hbox{M}\setbox\tw@\hbox{i}% + \ifdim\wd0>\wd\tw@\relax + L\raise.24ex\hbox to\z@{\kern-.28em'\hss}% + \else + L\raise.45ex\hbox to\z@{\kern-.40em '\hss}% + \fi} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% The macro |\ldf@finish| takes care of looking for a +% configuration file, setting the main language to be switched on +% at |\begin{document}| and resetting the category code of +% \texttt{@} to its original value. +% \changes{czech-1.3h}{1996/11/02}{Now use \cs{ldf@finish} to wrap up} +% \begin{macrocode} +\ldf@finish{czech} +% +% \end{macrocode} +% +% \Finale +%% +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +%% +\endinput diff --git a/Master/texmf-dist/source/generic/babel/czech.ins b/Master/texmf-dist/source/generic/babel/czech.ins new file mode 100644 index 00000000000..06743474603 --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/czech.ins @@ -0,0 +1,148 @@ +%% +%% This file will generate fast loadable files and documentation +%% driver files from the doc files in this package when run through +%% LaTeX or TeX. +%% +%% Copyright 1989-2005 Johannes L. Braams and any individual authors +%% listed elsewhere in this file. All rights reserved. +%% +%% This file is part of the Babel system. +%% -------------------------------------- +%% +%% It 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 +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% The Current Maintainer of this work is Johannes Braams. +%% +%% The list of all files belonging to the LaTeX base distribution is +%% given in the file `manifest.bbl. See also `legal.bbl' 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. +%% +%% --------------- start of docstrip commands ------------------ +%% +\def\filedate{1999/04/11} +\def\batchfile{czech.ins} +\input docstrip.tex + +{\ifx\generate\undefined +\Msg{**********************************************} +\Msg{*} +\Msg{* This installation requires docstrip} +\Msg{* version 2.3c or later.} +\Msg{*} +\Msg{* An older version of docstrip has been input} +\Msg{*} +\Msg{**********************************************} +\errhelp{Move or rename old docstrip.tex.} +\errmessage{Old docstrip in input path} +\batchmode +\csname @@end\endcsname +\fi} + +\declarepreamble\mainpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl 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. +\endpreamble + +\declarepreamble\fdpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl for additional +information. + +In particular, permission is granted to customize the declarations in +this file to serve the needs of your installation. + +However, NO PERMISSION is granted to distribute a modified version +of this file under its original name. + +\endpreamble + +\keepsilent + +\usedir{tex/generic/babel} + +\usepreamble\mainpreamble +\generate{\file{czech.ldf}{\from{czech.dtx}{code}} + } +\usepreamble\fdpreamble + +\ifToplevel{ +\Msg{***********************************************************} +\Msg{*} +\Msg{* To finish the installation you have to move the following} +\Msg{* files into a directory searched by TeX:} +\Msg{*} +\Msg{* \space\space All *.def, *.fd, *.ldf, *.sty} +\Msg{*} +\Msg{* To produce the documentation run the files ending with} +\Msg{* '.dtx' and `.fdd' through LaTeX.} +\Msg{*} +\Msg{* Happy TeXing} +\Msg{***********************************************************} +} + +\endinput diff --git a/Master/texmf-dist/source/generic/babel/danish.dtx b/Master/texmf-dist/source/generic/babel/danish.dtx new file mode 100644 index 00000000000..d0b6a0d7807 --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/danish.dtx @@ -0,0 +1,304 @@ +% \iffalse meta-comment +% +% Copyright 1989-2005 Johannes L. Braams and any individual authors +% listed elsewhere in this file. All rights reserved. +% +% This file is part of the Babel system. +% -------------------------------------- +% +% It 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 +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2003/12/01 or later. +% +% This work has the LPPL maintenance status "maintained". +% +% The Current Maintainer of this work is Johannes Braams. +% +% The list of all files belonging to the Babel system is +% given in the file `manifest.bbl. See also `legal.bbl' 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 +% \CheckSum{138} +% \iffalse +% Tell the \LaTeX\ system who we are and write an entry on the +% transcript. +%<*dtx> +\ProvidesFile{danish.dtx} +% +%\ProvidesLanguage{danish} +%\fi +%\ProvidesFile{danish.dtx} + [2005/03/30 v1.3p Danish support from the babel system] +%\iffalse +%% File `danish.dtx' +%% Babel package for LaTeX version 2e +%% Copyright (C) 1989 - 2005 +%% by Johannes Braams, TeXniek +% +%% Please report errors to: J.L. Braams +%% babel at braams.cistron.nl +% +% This file is part of the babel system, it provides the source +% code for the Danish language definition file. +%<*filedriver> +\documentclass{ltxdoc} +\newcommand*\TeXhax{\TeX hax} +\newcommand*\babel{\textsf{babel}} +\newcommand*\langvar{$\langle \it lang \rangle$} +\newcommand*\note[1]{} +\newcommand*\Lopt[1]{\textsf{#1}} +\newcommand*\file[1]{\texttt{#1}} +\begin{document} + \DocInput{danish.dtx} +\end{document} +% +% A contribution was made by Henning Larsen (larsen@cernvm.cern.ch) +%\fi +% \GetFileInfo{danish.dtx} +% +% \changes{danish-1.0a}{1991/07/15}{Renamed \file{babel.sty} in +% \file{babel.com}} +% \changes{danish-1.1}{1992/02/15}{Brought up-to-date with babel 3.2a} +% \changes{danish-1.3}{1994/02/27}{Update for \LaTeXe} +% \changes{danish-1.3f}{1994/06/26}{Removed the use of \cs{filedate} +% and moved identification after the loading of \file{babel.def}} +% \changes{danish-1.3g}{1995/06/08}{Added the active double quote +% character as suggested by Peter Busk Laursen} +% \changes{danish-1.3j}{1996/10/10}{Replaced \cs{undefined} with +% \cs{@undefined} and \cs{empty} with \cs{@empty} for consistency +% with \LaTeX, moved the definition of \cs{atcatcode} right to the +% beginning.} +% +% \section{The Danish language} +% +% The file \file{\filename}\footnote{The file described in this +% section has version number \fileversion\ and was last revised on +% \filedate. A contribution was made by Henning Larsen +% (\texttt{larsen@cernvm.cern.ch})} defines all the +% language definition macros for the Danish language. +% +% For this language the character |"| is made active. In +% table~\ref{tab:danish-quote} an overview is given of its purpose. +% +% \begin{table}[htb] +% \centering +% \begin{tabular}{lp{8cm}} +% \verb="|= & disable ligature at this position.\\ +% |"-| & an explicit hyphen sign, allowing hyphenation +% in the rest of the word.\\ +% |""| & like \verb="-=, but producing no hyphen sign (for +% words that should break at some sign such as +% ``entrada/salida.''\\ +% |"`| & lowered double left quotes (looks like ,,)\\ +% |"'| & normal double right quotes\\ +% |"<| & for French left double quotes (similar to $<<$).\\ +% |">| & for French right double quotes (similar to $>>$).\\ +% \end{tabular} +% \caption{The extra definitions made by \file{danish.ldf}} +% \label{tab:danish-quote} +% \end{table} +% +% \StopEventually{} +% +% The macro |\LdfInit| takes care of preventing that this file is +% loaded more than once, checking the category code of the +% \texttt{@} sign, etc. +% \changes{danish-1.3j}{1996/11/02}{Now use \cs{LdfInit} to perform +% initial checks} +% \begin{macrocode} +%<*code> +\LdfInit{danish}\captionsdanish +% \end{macrocode} +% +% When this file is read as an option, i.e. by the |\usepackage| +% command, \texttt{danish} will be an `unknown' language in which +% case we have to make it known. So we check for the existence of +% |\l@danish| to see whether we have to do something here. +% +% \changes{danish-1.0b}{1991/10/27}{Removed use of \cs{@ifundefined}} +% \changes{danish-1.1}{1992/02/15}{Added a warning when no hyphenation +% patterns were loaded.} +% \changes{danish-1.3f}{1994/06/26}{Now use \cs{@nopatterns} to +% produce the warning} +% \begin{macrocode} +\ifx\l@danish\@undefined + \@nopatterns{Danish} + \adddialect\l@danish0\fi +% \end{macrocode} +% +% \begin{macro}{\englishhyphenmins} +% \changes{danish-1.3p}{2003/11/17}{Added default for setting of +% hyphenmin parameters} +% This macro is used to store the correct values of the hyphenation +% parameters |\lefthyphenmin| and |\righthyphenmin|. +% \begin{macrocode} +\providehyphenmins{\CurrentOption}{\@ne\tw@} +% \end{macrocode} +% \end{macro} +% +% The next step consists of defining commands to switch to (and +% from) the Danish language. +% +% \begin{macro}{\captionsdanish} +% The macro |\captionsdanish| defines all strings used in the four +% standard documentclasses provided with \LaTeX. +% \changes{danish-1.1}{1992/02/15}{Added \cs{seename}, \cs{alsoname} +% and \cs{prefacename}} +% \changes{danish-1.2}{1993/07/11}{\cs{headpagename} should be +% \cs{pagename}} +% \changes{danish-1.2b}{1993/10/23}{Added a few translations} +% \changes{danish-1.3c}{1994/06/04}{Included some revisions from Peter +% Busk Larsen} +% \changes{danish-1.3h}{1995/07/02}{Added \cs{proofname} for +% AMS-\LaTeX} +% \changes{danish-1.3i}{1995/07/13}{Added translation of `Proof'} +% \changes{danish-1.3n}{2000/09/19}{Added \cs{glossaryname}} +% \changes{danish-1.3o}{2003/04/10}{Added translation of `Glossary'} +% \begin{macrocode} +\addto\captionsdanish{% + \def\prefacename{Forord}% + \def\refname{Litteratur}% + \def\abstractname{Resum\'e}% + \def\bibname{Litteratur}% + \def\chaptername{Kapitel}% + \def\appendixname{Bilag}% + \def\contentsname{Indhold}% + \def\listfigurename{Figurer}% + \def\listtablename{Tabeller}% + \def\indexname{Indeks}% + \def\figurename{Figur}% + \def\tablename{Tabel}% + \def\partname{Del}% + \def\enclname{Vedlagt}% + \def\ccname{Kopi til}% or Kopi sendt til + \def\headtoname{Til}% in letter + \def\pagename{Side}% + \def\seename{Se}% + \def\alsoname{Se ogs{\aa}}% + \def\proofname{Bevis}% + \def\glossaryname{Gloseliste}% + }% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\datedanish} +% The macro |\datedanish| redefines the command |\today| to produce +% Danish dates. +% \changes{danish-1.3a}{1994/03/23}{Added `.' to definition of +% \cs{today}} +% \changes{danish-1.3k}{1997/10/01}{Use \cs{edef} to define \cs{today} +% to save memory} +% \changes{danish-1.3k}{1998/03/28}{use \cs{def} instead of \cs{edef}} +% \begin{macrocode} +\def\datedanish{% + \def\today{\number\day.~\ifcase\month\or + januar\or februar\or marts\or april\or maj\or juni\or + juli\or august\or september\or oktober\or november\or december\fi + \space\number\year}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\extrasdanish} +% \changes{danish-1.3h}{1995/07/02}{Added \cs{bbl@frenchspacing}} +% \begin{macro}{\noextrasdanish} +% \changes{danish-1.3h}{1995/07/02}{Added \cs{bbl@nonfrenchspacing}} +% The macro |\extrasdanish| will perform all the extra definitions +% needed for the Danish language. The macro |\noextrasdanish| is +% used to cancel the actions of |\extrasdanish|. +% +% Danish typesetting requires |\frenchspacing| to be in effect. +% \begin{macrocode} +\addto\extrasdanish{\bbl@frenchspacing} +\addto\noextrasdanish{\bbl@nonfrenchspacing} +% \end{macrocode} +% \end{macro} +% +% For Danish the \texttt{"} character is made active. This is +% done once, later on its definition may vary. Other languages in +% the same document may also use the \texttt{"} character for +% shorthands; we specify that the danish group of shorthands +% should be used. +% +% \begin{macrocode} +\initiate@active@char{"} +\addto\extrasdanish{\languageshorthands{danish}} +\addto\extrasdanish{\bbl@activate{"}} +% \end{macrocode} +% Don't forget to turn the shorthands off again. +% \changes{danish-1.3m}{1999/12/16}{Deactivate shorthands ouside of +% Danish} +% \begin{macrocode} +\addto\noextrasdanish{\bbl@deactivate{"}} +% \end{macrocode} +% +% First we define access to the low opening double quote and +% guillemets for quotations, +% \changes{danish-1.3j}{1996/08/15}{Changed definition of \texttt{"'} +% to print \texttt{``} instead of \texttt{''}} +% \changes{danish-1.3k}{1997/04/03}{Removed empty groups after double +% quote and guillemot characters} +% \begin{macrocode} +\declare@shorthand{danish}{"`}{% + \textormath{\quotedblbase}{\mbox{\quotedblbase}}} +\declare@shorthand{danish}{"'}{% + \textormath{\textquotedblleft}{\mbox{\textquotedblleft}}} +\declare@shorthand{danish}{"<}{% + \textormath{\guillemotleft}{\mbox{\guillemotleft}}} +\declare@shorthand{danish}{">}{% + \textormath{\guillemotright}{\mbox{\guillemotright}}} +% \end{macrocode} +% then we define to be able to specify hyphenation +% breakpoints that behave a little different from |\-|. +% \changes{danish-1.3j}{1996/08/15}{Added definition of +% \texttt{"\char126} and \texttt{"\char61}} +% \begin{macrocode} +\declare@shorthand{danish}{"-}{\nobreak-\bbl@allowhyphens} +\declare@shorthand{danish}{""}{\hskip\z@skip} +\declare@shorthand{danish}{"~}{\textormath{\leavevmode\hbox{-}}{-}} +\declare@shorthand{danish}{"=}{\nobreak-\hskip\z@skip} +% \end{macrocode} +% And we want to have a shorthand for disabling a ligature. +% \begin{macrocode} +\declare@shorthand{danish}{"|}{% + \textormath{\discretionary{-}{}{\kern.03em}}{}} +% \end{macrocode} +% \end{macro} +% +% The macro |\ldf@finish| takes care of looking for a +% configuration file, setting the main language to be switched on +% at |\begin{document}| and resetting the category code of +% \texttt{@} to its original value. +% \changes{danish-1.3j}{1996/11/02}{Now use \cs{ldf@finish} to wrap +% up} +% \begin{macrocode} +\ldf@finish{danish} +% +% \end{macrocode} +% +% \Finale +%% +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +%% +\endinput diff --git a/Master/texmf-dist/source/generic/babel/danish.ins b/Master/texmf-dist/source/generic/babel/danish.ins new file mode 100644 index 00000000000..203cff95ab9 --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/danish.ins @@ -0,0 +1,148 @@ +%% +%% This file will generate fast loadable files and documentation +%% driver files from the doc files in this package when run through +%% LaTeX or TeX. +%% +%% Copyright 1989-2005 Johannes L. Braams and any individual authors +%% listed elsewhere in this file. All rights reserved. +%% +%% This file is part of the Babel system. +%% -------------------------------------- +%% +%% It 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 +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% The Current Maintainer of this work is Johannes Braams. +%% +%% The list of all files belonging to the LaTeX base distribution is +%% given in the file `manifest.bbl. See also `legal.bbl' 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. +%% +%% --------------- start of docstrip commands ------------------ +%% +\def\filedate{1999/04/11} +\def\batchfile{danish.ins} +\input docstrip.tex + +{\ifx\generate\undefined +\Msg{**********************************************} +\Msg{*} +\Msg{* This installation requires docstrip} +\Msg{* version 2.3c or later.} +\Msg{*} +\Msg{* An older version of docstrip has been input} +\Msg{*} +\Msg{**********************************************} +\errhelp{Move or rename old docstrip.tex.} +\errmessage{Old docstrip in input path} +\batchmode +\csname @@end\endcsname +\fi} + +\declarepreamble\mainpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl 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. +\endpreamble + +\declarepreamble\fdpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl for additional +information. + +In particular, permission is granted to customize the declarations in +this file to serve the needs of your installation. + +However, NO PERMISSION is granted to distribute a modified version +of this file under its original name. + +\endpreamble + +\keepsilent + +\usedir{tex/generic/babel} + +\usepreamble\mainpreamble +\generate{\file{danish.ldf}{\from{danish.dtx}{code}} + } +\usepreamble\fdpreamble + +\ifToplevel{ +\Msg{***********************************************************} +\Msg{*} +\Msg{* To finish the installation you have to move the following} +\Msg{* files into a directory searched by TeX:} +\Msg{*} +\Msg{* \space\space All *.def, *.fd, *.ldf, *.sty} +\Msg{*} +\Msg{* To produce the documentation run the files ending with} +\Msg{* '.dtx' and `.fdd' through LaTeX.} +\Msg{*} +\Msg{* Happy TeXing} +\Msg{***********************************************************} +} + +\endinput diff --git a/Master/texmf-dist/source/generic/babel/dutch.dtx b/Master/texmf-dist/source/generic/babel/dutch.dtx new file mode 100644 index 00000000000..24e2031922d --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/dutch.dtx @@ -0,0 +1,560 @@ +% \iffalse meta-comment +% +% Copyright 1989-2005 Johannes L. Braams and any individual authors +% listed elsewhere in this file. All rights reserved. +% +% This file is part of the Babel system. +% -------------------------------------- +% +% It 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 +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2003/12/01 or later. +% +% This work has the LPPL maintenance status "maintained". +% +% The Current Maintainer of this work is Johannes Braams. +% +% The list of all files belonging to the Babel system is +% given in the file `manifest.bbl. See also `legal.bbl' 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 +% \CheckSum{300} +%\iffalse +% Tell the \LaTeX\ system who we are and write an entry on the +% transcript. +%<*dtx> +\ProvidesFile{dutch.dtx} +% +%\ProvidesLanguage{dutch} +%\fi +%\ProvidesFile{dutch.dtx} + [2005/03/30 v3.8i Dutch support from the babel system] +%\iffalse +%% File `dutch.dtx' +%% Babel package for LaTeX version 2e +%% Copyright (C) 1989 - 2005 +%% by Johannes Braams, TeXniek +% +%% Dutch Language Definition File +%% Copyright (C) 1989 - 2005 +%% by Johannes Braams, TeXniek +% +%% Please report errors to: J.L. Braams +%% babel at braams.cistron.nl +% +% This file is part of the babel system, it provides the source +% code for the Dutch language definition file. +%<*filedriver> +\documentclass{ltxdoc} +\makeatletter +\gdef\dlqq{{\setbox\tw@=\hbox{,}\setbox\z@=\hbox{''}% + \dimen\z@=\ht\z@ \advance\dimen\z@-\ht\tw@ + \setbox\z@=\hbox{\lower\dimen\z@\box\z@}\ht\z@=\ht\tw@ + \dp\z@=\dp\tw@ \box\z@\kern-.04em}} +\makeatother +\font\manual=logo10 % font used for the METAFONT logo, etc. +\newcommand*\MF{{\manual META}\-{\manual FONT}} +\newcommand*\TeXhax{\TeX hax} +\newcommand*\babel{\textsf{babel}} +\newcommand*\langvar{$\langle \it lang \rangle$} +\newcommand*\note[1]{} +\newcommand*\Lopt[1]{\textsf{#1}} +\newcommand*\file[1]{\texttt{#1}} +\begin{document} + \DocInput{dutch.dtx} +\end{document} +% +% \fi +% \GetFileInfo{dutch.dtx} +% +% \changes{dutch-2.0a}{1990/04/02}{Added checking of format} +% \changes{dutch-2.0b}{1990/04/02}{Added extrasdutch} +% \changes{dutch-2.0c}{1990/04/18}{Added grqq macros} +% \changes{dutch-2.1}{1990/04/24}{reflect change to version 2.1 in +% babel and changes in german v2.3} +% \changes{dutch-2.1a}{1990/05/01}{Incorporated Nico's comments} +% \changes{dutch-2.1b}{1990/07/04}{Incorporated more comments by Nico} +% \changes{dutch-2.1c}{1990/07/16}{Fixed some typos} +% \changes{dutch-2.2}{1990/07/16}{Fixed problem with the use of +% \texttt{"} in moving arguments while \texttt{"} is active} +% \changes{dutch-2.3}{1990/07/30}{When using PostScript fonts with the +% Adobe font-encoding, the dieresis-accent is located elsewhere, +% modified code} +% \changes{dutch-2.3a}{1990/08/27}{Modified the documentation somewhat} +% \changes{dutch-3.0}{1991/04/23}{Modified for babel 3.0} +% \changes{dutch-3.0a}{1991/05/25}{Removed some problems in change log} +% \changes{dutch-3.1}{1991/05/29}{Removed bug found by van der Meer} +% \changes{dutch-3.2a}{1991/07/15}{Renamed babel.sty in babel.com} +% \changes{dutch-3.3}{1991/10/31}{Rewritten parts of the code to use +% the new features of babel version 3.1} +% \changes{dutch-3.6}{1994/02/02}{Update or LaTeX2e} +% \changes{dutch-3.6c}{1994/06/26}{Removed the use of \cs{filedate}, +% moved identification after the loading of babel.def} +% \changes{dutch-3.7a}{1995/02/03}{Moved identification code to the +% top of the file} +% \changes{dutch-3.7a}{1995/02/04}{Rewrote the code with respect to +% the active double quote character} +% \changes{dutch-3.7f}{1996/07/11}{Replaced \cs{undefined} with +% \cs{@undefined} and \cs{empty} with \cs{@empty} for consistency +% with \LaTeX} +% \changes{dutch-3.8a}{1996/10/04}{Merged in the definitions for +% `afrikaans'} +% +% \section{The Dutch language} +% +% The file \file{\filename}\footnote{The file described in this +% section has version number \fileversion, and was last revised on +% \filedate.} defines all the language-specific macros for the Dutch +% language and the `Afrikaans' version\footnote{contributed by +% Stoffel Lombard (\texttt{lombc@b31pc87.up.ac.za})} of it. +% +% For this language the character |"| is made active. In +% table~\ref{tab:dutch-quote} an overview is given of its purpose. +% One of the reasons for this is that in the Dutch language a word +% with a dieresis can be hyphenated just before the letter with the +% umlaut, but the dieresis has to disappear if the word is broken +% between the previous letter and the accented letter. +% +% In~\cite{treebus} the quoting conventions for the Dutch language +% are discussed. The preferred convention is the single-quote +% Anglo-American convention, i.e. `This is a quote'. An +% alternative is the slightly old-fashioned Dutch method with +% initial double quotes lowered to the baseline, \dlqq This is a +% quote'', which should be typed as \texttt{"`This is a quote"'}. +% +% \begin{table}[htb] +% \centering +% \begin{tabular}{lp{8cm}} +% |"a| & |\"a| which hyphenates as |-a|; +% also implemented for the other letters. \\ +% |"y| & puts a negative kern between \texttt{i} and \texttt{j}\\ +% |"Y| & puts a negative kern between \texttt{I} and \texttt{J}\\ +% \verb="|= & disable ligature at this position. \\ +% |"-| & an explicit hyphen sign, allowing hyphenation +% in the rest of the word. \\ +% |"~| & to produce a hyphencharcter without the following +% |\discretionary{}{}{}|.\\ +% |""| & to produce an invisible `breakpoint'.\\ +% |"`| & lowered double left quotes (see example below).\\ +% |"'| & normal double right quotes. \\ +% |\-| & like the old |\-|, but allowing hyphenation +% in the rest of the word. +% \end{tabular} +% \caption{The extra definitions made by \file{dutch.ldf}} +% \label{tab:dutch-quote} +% \end{table} +% +% \StopEventually{} +% +% \changes{dutch-3.2c}{1991/10/22}{Removed code to load +% \file{latexhax.com}} +% \changes{dutch-3.2a}{1991/07/15}{Added reset of catcode of @ before +% \cs{endinput}.} +% \changes{dutch-3.2c}{1991/10/22}{removed use of \cs{@ifundefined}} +% \changes{dutch-3.3a}{1991/11/11}{Moved code to the beginning of the +% file and added \cs{selectlanguage} call} +% \begin{macrocode} +% \changes{dutch-3.8a}{1996/10/04}{made check dependant on +% \cs{CurrentOption}} +% +% The macro |\LdfInit| takes care of preventing that this file is +% loaded more than once, checking the category code of the +% \texttt{@} sign, etc. +% \changes{dutch-3.8a}{1996/10/30}{Now use \cs{LdfInit} to perform +% initial checks} +% \begin{macrocode} +%<*code> +\LdfInit\CurrentOption{captions\CurrentOption} +% \end{macrocode} +% +% When this file is read as an option, i.e. by the |\usepackage| +% command, \texttt{dutch} could be an `unknown' language in which +% case we have to make it known. So we check for the existence of +% |\l@dutch| or |l@afrikaans| to see whether we have to do +% something here. +% +% First we try to establish with which option we are being +% processed. +% +% \changes{dutch-3.0}{1991/04/23}{Now use \cs{adddialect} if language +% undefined} +% \changes{dutch-3.2c}{1991/10/22}{removed use of \cs{@ifundefined}} +% \changes{dutch-3.3b}{1992/01/25}{Added warning, if no dutch patterns +% loaded} +% \changes{dutch-3.6c}{1994/06/26}{Now use \cs{@nopatterns} to produce +% the warning} +% \changes{dutch-3.8a}{1996/10/04}{this needs a more complicated check +% as `afrikaans' may or may not have its own hyphenation patterns} +% \begin{macrocode} +\def\bbl@tempa{dutch} +\ifx\CurrentOption\bbl@tempa +% \end{macrocode} +% If it is \Lopt{dutch} then we first check if the Dutch +% hyphenation patterns wer loaded, +% \begin{macrocode} + \ifx\l@dutch\undefined +% \end{macrocode} +% if no we issue a warning and make dutch a `dialect' of either the +% hyphenation patterns that were loaded in slot 0 or of `afrikaans' +% when it is available. +% \begin{macrocode} + \@nopatterns{Dutch} + \ifx\l@afrikaans\undefined + \adddialect\l@dutch0 + \else + \adddialect\l@dutch\l@afrikaans + \fi + \fi +% \end{macrocode} +% +% The next step consists of defining commands to switch to (and +% from) the Dutch language. +% +% \begin{macro}{\captionsdutch} +% The macro |\captionsdutch| defines all strings used +% in the four standard document classes provided with \LaTeX. +% \changes{dutch-3.1a}{1991/06/06}{Removed \cs{global} definitions} +% \changes{dutch-3.1a}{1991/06/06}{\cs{pagename} should be +% \cs{headpagename}} +% \changes{dutch-3.3a}{1991/11/11}{added \cs{seename} and +% \cs{alsoname}} +% \changes{dutch-3.3b}{1992/01/25}{added \cs{prefacename}} +% \changes{dutch-3.5}{1993/07/11}{\cs{headpagename} should be +% \cs{pagename}} +% \changes{dutch-3.7c}{1995/06/08}{We need the \texttt{"} to be active +% while defining \cs{captionsdutch}} +% \changes{dutch-3.7d}{1995/07/04}{Added \cs{proofname} for +% AMS-\LaTeX} +% \changes{dutch-3.8b}{1997/01/06}{Use \texttt{Bew"ys} instead of +% \texttt{Bewijs}} +% \changes{dutch-3.8h}{2000/09/19}{Added \cs{glossaryname}} +% \begin{macrocode} + \begingroup + \catcode`\"\active + \def\x{\endgroup + \def\captionsdutch{% + \def\prefacename{Voorwoord}% + \def\refname{Referenties}% + \def\abstractname{Samenvatting}% + \def\bibname{Bibliografie}% + \def\chaptername{Hoofdstuk}% + \def\appendixname{B"ylage}% + \def\contentsname{Inhoudsopgave}% + \def\listfigurename{L"yst van figuren}% + \def\listtablename{L"yst van tabellen}% + \def\indexname{Index}% + \def\figurename{Figuur}% + \def\tablename{Tabel}% + \def\partname{Deel}% + \def\enclname{B"ylage(n)}% + \def\ccname{cc}% + \def\headtoname{Aan}% + \def\pagename{Pagina}% + \def\seename{zie}% + \def\alsoname{zie ook}% + \def\proofname{Bew"ys}% + \def\glossaryname{Verklarende Woordenl"yst}% + } + }\x +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\datedutch} +% The macro |\datedutch| redefines the command |\today| to produce +% Dutch dates. +% \changes{dutch-3.1a}{1991/06/06}{Removed \cs{global} definitions} +% \changes{dutch-3.8e}{1997/10/01}{Use \cs{edef} to define +% \cs{today} to save memory} +% \changes{dutch-3.8e}{1998/03/28}{use \cs{def} instead of \cs{edef}} +% \begin{macrocode} + \def\datedutch{% + \def\today{\number\day~\ifcase\month\or + januari\or februari\or maart\or april\or mei\or juni\or + juli\or augustus\or september\or oktober\or november\or + december\fi + \space \number\year}} +% \end{macrocode} +% \end{macro} +% +% When the option with which this file is being process was not +% \Lopt{dutch} we assume it was \Lopt{afrikaans}. We perform a +% similar check on the availability of the hyphenation paterns. +% \begin{macrocode} +\else + \ifx\l@afrikaans\undefined + \@nopatterns{Afrikaans} + \ifx\l@dutch\undefined + \adddialect\l@afrikaans0 + \else + \adddialect\l@afrikaans\l@dutch + \fi + \fi +% \end{macrocode} +% +% \begin{macro}{\captionsafrikaans} +% Now is the time to define the words for `Afrikaans'. +% \begin{macrocode} + \def\captionsafrikaans{% + \def\prefacename{Voorwoord}% + \def\refname{Verwysings}% + \def\abstractname{Samevatting}% + \def\bibname{Bibliografie}% + \def\chaptername{Hoofstuk}% + \def\appendixname{Bylae}% + \def\contentsname{Inhoudsopgawe}% + \def\listfigurename{Lys van figure}% + \def\listtablename{Lys van tabelle}% + \def\indexname{Inhoud}% + \def\figurename{Figuur}% + \def\tablename{Tabel}% + \def\partname{Deel}% + \def\enclname{Bylae(n)}% + \def\ccname{a.a.}% + \def\headtoname{Aan}% + \def\pagename{Bladsy}% + \def\seename{sien}% + \def\alsoname{sien ook}% + \def\proofname{Bewys}% + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\dateafrikaans} +% Here is the `Afrikaans' version of the date macro. +% \changes{dutch-3.8e}{1997/10/01}{Use \cs{edef} to define +% \cs{today} to save memory} +% \changes{dutch-3.8e}{1998/03/28}{use \cs{def} instead of \cs{edef}} +% \begin{macrocode} + \def\dateafrikaans{% + \def\today{\number\day~\ifcase\month\or + Januarie\or Februarie\or Maart\or April\or Mei\or Junie\or + Julie\or Augustus\or September\or Oktober\or November\or + Desember\fi + \space \number\year}} +\fi +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\extrasdutch} +% \begin{macro}{\extrasafrikaans} +% \changes{dutch-3.0b}{1991/05/29}{added some comment chars to prevent +% white space} +% \changes{dutch-3.1a}{1991/06/6}{Removed \cs{global} definitions} +% \changes{dutch-3.2}{1991/07/02}{Save all redefined macros} +% \changes{dutch-3.3}{1991/10/31}{Macro complete rewritten} +% \changes{dutch-3.3b}{1992/01/25}{modified handling of +% \cs{dospecials} and \cs{@sanitize}} +% +% \begin{macro}{\noextrasdutch} +% \begin{macro}{\noextrasafrikaans} +% \changes{dutch-2.3}{1990/07/30}{Added \cs{dieresis}} +% \changes{dutch-3.0b}{1991/05/29}{added some comment chars to prevent +% white space} +% \changes{dutch-3.1a}{1991/06/06}{Removed \cs{global} definitions} +% \changes{dutch-3.2}{1991/07/02}{Try to restore everything to its +% former state} +% \changes{dutch-3.3}{1991/10/31}{Macro complete rewritten} +% \changes{dutch-3.3b}{1992/01/25}{modified handling of \cs{dospecials} +% and \cs{@sanitize}} +% \changes{dutch-3.8a}{1996/10/04}{Made all definitions dependant on +% \cs{CurrentOption}} +% +% The macros |\extrasdutch| and |\captionsafrikaans| will perform +% all the extra definitions needed for the Dutch language. The +% macros |\noextrasdutch| and |noextrasafrikaans| is used +% to cancel the actions of |\extrasdutch| and |\captionsafrikaans|. +% +% For Dutch the \texttt{"} character is made active. This is done +% once, later on its definition may vary. Other languages in the +% same document may also use the \texttt{"} character for +% shorthands; we specify that the dutch group of shorthands should +% be used. +% \begin{macrocode} +\initiate@active@char{"} +% \end{macrocode} +% Both version of the language use the same set of shorthand +% definitions althoug the `ij' is not used in Afrikaans. +% \begin{macrocode} +\@namedef{extras\CurrentOption}{\languageshorthands{dutch}} +\expandafter\addto\csname extras\CurrentOption\endcsname{% + \bbl@activate{"}} +% \end{macrocode} +% +% The `umlaut' character should be positioned lower on \emph{all} +% vowels in Dutch texts. +% \begin{macrocode} +\expandafter\addto\csname extras\CurrentOption\endcsname{% + \umlautlow\umlautelow} +\@namedef{noextras\CurrentOption}{% + \umlauthigh} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\dutchhyphenmins} +% \begin{macro}{\afrikaanshyphenmins} +% The dutch hyphenation patterns can be used with |\lefthyphenmin| +% set to~2 and |\righthyphenmin| set to~3. +% \changes{dutch-3.7a}{1995/05/13}{use \cs{dutchhyphenmins} to store +% the correct values} +% \changes{dutch-3.8h}{2000/09/22}{Now use \cs{providehyphenmins} to +% provide a default value} +% \begin{macrocode} +\providehyphenmins{\CurrentOption}{\tw@\thr@@} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \changes{dutch-3.3a}{1991/11/11}{Added \cs{save@sf@q} macro from +% germanb and rewrote all quote macros to use it} +% \changes{dutch-3.4b}{1991/02/16}{moved definition of +% \cs{allowhyphens}, \cs{set@low@box} and \cs{save@sf@q} to +% \file{babel.com}} +% \changes{dutch-3.7a}{1995/02/04}{Removed \cs{dlqq}, \cs{@dlqq}, +% \cs{drqq}, \cs{@drqq} and \cs{dieresis}} +% \changes{dutch-3.7a}{1995/02/15}{moved the definition of the double +% quote character at the baseline to \file{glyhps.def}} +% +% \begin{macro}{\@trema} +% In the Dutch language vowels with a trema are treated +% specially. If a hyphenation occurs before a vowel-plus-trema, the +% trema should disappear. To be able to do this we could first +% define the hyphenation break behaviour for the five vowels, both +% lowercase and uppercase, in terms of |\discretionary|. But this +% results in a large |\if|-construct in the definition of the +% active |"|. Because we think a user should not use |"| when he +% really means something like |''| we chose not to distinguish +% between vowels and consonants. Therefore we have one macro +% |\@trema| which specifies the hyphenation break behaviour for all +% letters. +% +% \changes{dutch-2.3}{1990/07/30}{\cs{dieresis} instead of +% \cs{accent127}} +% \changes{dutch-3.3a}{1991/11/11}{renamed \cs{@umlaut} to +% \cs{@trema}} +% \begin{macrocode} +\def\@trema#1{\allowhyphens\discretionary{-}{#1}{\"{#1}}\allowhyphens} +% \end{macrocode} +% \end{macro} +% +% \changes{dutch-3.7a}{1995/02/15}{Moved the definition of \cs{ij} and +% \cs{IJ} to \file{glyphs.def}} +% \changes{dutch-3.7a}{1995/02/03}{The support macros for the active +% double quote have been moved to \file{babel.def}} +% +% Now we can define the doublequote macros: the tremas, +% +% \changes{dutch-2.3}{1990/07/30}{\cs{dieresis} instead of +% \cs{accent127}} +% \changes{dutch-3.2}{1991/07/02}{added case for \texttt{"y} and +% \texttt{"Y}} +% \changes{dutch-3.2b}{1991/07/16}{removed typo (allowhpyhens)} +% \changes{dutch-3.7a}{1995/02/03}{Now use \cs{Declaredq{dutch}} to +% define the functions of the active double quote} +% \changes{dutch-3.7a}{1995/02/03}{Use \cs{ddot} instead of +% \cs{@MATHUMLAUT}} +% \changes{dutch-3.7a}{1995/03/05}{Use more general mechanism of +% \cs{declare@shorthand}} +% \begin{macrocode} +\declare@shorthand{dutch}{"a}{\textormath{\@trema a}{\ddot a}} +\declare@shorthand{dutch}{"e}{\textormath{\@trema e}{\ddot e}} +\declare@shorthand{dutch}{"i}{\textormath + {\allowhyphens\discretionary{-}{i}{\"{\i}}\allowhyphens}% + {\ddot \imath}} +\declare@shorthand{dutch}{"o}{\textormath{\@trema o}{\ddot o}} +\declare@shorthand{dutch}{"u}{\textormath{\@trema u}{\ddot u}} +% \end{macrocode} +% dutch quotes, +% \changes{dutch-3.8e}{1997/04/03}{Removed empty groups after double +% quote characters} +% \begin{macrocode} +\declare@shorthand{dutch}{"`}{% + \textormath{\quotedblbase}{\mbox{\quotedblbase}}} +\declare@shorthand{dutch}{"'}{% + \textormath{\textquotedblright}{\mbox{\textquotedblright}}} +% \end{macrocode} +% and some additional commands: +% \changes{dutch-3.7b}{1995/06/04}{Added \texttt{""} shorthand} +% \changes{dutch-3.8c}{1997/01/14}{Added the \texttt{"\~{}} shorthand} +% \changes{dutch-3.8e}{1997/04/01}{Forgot to replace `german' by +% `dutch' when copying definition for \texttt{"\~{}}} +% \begin{macrocode} +\declare@shorthand{dutch}{"-}{\nobreak-\bbl@allowhyphens} +\declare@shorthand{dutch}{"~}{\textormath{\leavevmode\hbox{-}}{-}} +\declare@shorthand{dutch}{"|}{% + \textormath{\discretionary{-}{}{\kern.03em}}{}} +\declare@shorthand{dutch}{""}{\hskip\z@skip} +\declare@shorthand{dutch}{"y}{\textormath{\ij{}}{\ddot y}} +\declare@shorthand{dutch}{"Y}{\textormath{\IJ{}}{\ddot Y}} +% \end{macrocode} +% To enable hyphenation in two words, written together but +% separated by a slash, as in `uitdrukking/opmerking' we define the +% command |"/|. +% \changes{dutch-3.8e}{1997/10/03}{Added a shorthand with the slash +% character} +% \changes{dutch-3.8i}{2003/09/15}{\texttt{"/} should use +% \cs{bbl@allowhyphens}} +% \begin{macrocode} +\declare@shorthand{dutch}{"/}{\textormath + {\bbl@allowhyphens\discretionary{/}{}{/}\bbl@allowhyphens}{}} +% \end{macrocode} +% +% \begin{macro}{\-} +% +% All that is left now is the redefinition of |\-|. The new version +% of |\-| should indicate an extra hyphenation position, while +% allowing other hyphenation positions to be generated +% automatically. The standard behaviour of \TeX\ in this respect is +% very unfortunate for languages such as Dutch and German, where +% long compound words are quite normal and all one needs is a means +% to indicate an extra hyphenation position on top of the ones that +% \TeX\ can generate from the hyphenation patterns. +% \changes{dutch-3.8i}{2003/09/15}{\cs{-} should use +% \cs{bbl@allowhyphens}} +% \begin{macrocode} +\expandafter\addto\csname extras\CurrentOption\endcsname{% + \babel@save\-} +\expandafter\addto\csname extras\CurrentOption\endcsname{% + \def\-{\bbl@allowhyphens\discretionary{-}{}{}\bbl@allowhyphens}} +% \end{macrocode} +% \end{macro} +% +% The macro |\ldf@finish| takes care of looking for a +% configuration file, setting the main language to be switched on +% at |\begin{document}| and resetting the category code of +% \texttt{@} to its original value. +% \changes{dutch-3.8a}{1996/10/30}{Now use \cs{ldf@finish} to wrap up} +% \begin{macrocode} +\ldf@finish\CurrentOption +% +% \end{macrocode} +% +% \Finale +%% +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +%% +\endinput diff --git a/Master/texmf-dist/source/generic/babel/dutch.ins b/Master/texmf-dist/source/generic/babel/dutch.ins new file mode 100644 index 00000000000..1437c660a7e --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/dutch.ins @@ -0,0 +1,148 @@ +%% +%% This file will generate fast loadable files and documentation +%% driver files from the doc files in this package when run through +%% LaTeX or TeX. +%% +%% Copyright 1989-2005 Johannes L. Braams and any individual authors +%% listed elsewhere in this file. All rights reserved. +%% +%% This file is part of the Babel system. +%% -------------------------------------- +%% +%% It 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 +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% The Current Maintainer of this work is Johannes Braams. +%% +%% The list of all files belonging to the LaTeX base distribution is +%% given in the file `manifest.bbl. See also `legal.bbl' 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. +%% +%% --------------- start of docstrip commands ------------------ +%% +\def\filedate{1999/04/11} +\def\batchfile{dutch.ins} +\input docstrip.tex + +{\ifx\generate\undefined +\Msg{**********************************************} +\Msg{*} +\Msg{* This installation requires docstrip} +\Msg{* version 2.3c or later.} +\Msg{*} +\Msg{* An older version of docstrip has been input} +\Msg{*} +\Msg{**********************************************} +\errhelp{Move or rename old docstrip.tex.} +\errmessage{Old docstrip in input path} +\batchmode +\csname @@end\endcsname +\fi} + +\declarepreamble\mainpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl 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. +\endpreamble + +\declarepreamble\fdpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl for additional +information. + +In particular, permission is granted to customize the declarations in +this file to serve the needs of your installation. + +However, NO PERMISSION is granted to distribute a modified version +of this file under its original name. + +\endpreamble + +\keepsilent + +\usedir{tex/generic/babel} + +\usepreamble\mainpreamble +\generate{\file{dutch.ldf}{\from{dutch.dtx}{code}} + } +\usepreamble\fdpreamble + +\ifToplevel{ +\Msg{***********************************************************} +\Msg{*} +\Msg{* To finish the installation you have to move the following} +\Msg{* files into a directory searched by TeX:} +\Msg{*} +\Msg{* \space\space All *.def, *.fd, *.ldf, *.sty} +\Msg{*} +\Msg{* To produce the documentation run the files ending with} +\Msg{* '.dtx' and `.fdd' through LaTeX.} +\Msg{*} +\Msg{* Happy TeXing} +\Msg{***********************************************************} +} + +\endinput diff --git a/Master/texmf-dist/source/generic/babel/english.dtx b/Master/texmf-dist/source/generic/babel/english.dtx new file mode 100644 index 00000000000..9054cc2957b --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/english.dtx @@ -0,0 +1,451 @@ +% \iffalse meta-comment +% +% Copyright 1989-2005 Johannes L. Braams and any individual authors +% listed elsewhere in this file. All rights reserved. +% +% This file is part of the Babel system. +% -------------------------------------- +% +% It 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 +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2003/12/01 or later. +% +% This work has the LPPL maintenance status "maintained". +% +% The Current Maintainer of this work is Johannes Braams. +% +% The list of all files belonging to the Babel system is +% given in the file `manifest.bbl. See also `legal.bbl' 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 +% \CheckSum{360} +% \iffalse +% Tell the \LaTeX\ system who we are and write an entry on the +% transcript. +%<*dtx> +\ProvidesFile{english.dtx} +% +%\ProvidesLanguage{english} +%\fi +%\ProvidesFile{english.dtx} + [2005/03/30 v3.3o English support from the babel system] +%\iffalse +%% File 'english.dtx' +%% Babel package for LaTeX version 2e +%% Copyright (C) 1989 - 2005 +%% by Johannes Braams, TeXniek +% +%% Please report errors to: J.L. Braams +%% babel at braams.cistron.nl +% +% This file is part of the babel system, it provides the source +% code for the English language definition file. +%<*filedriver> +\documentclass{ltxdoc} +\newcommand*\TeXhax{\TeX hax} +\newcommand*\babel{\textsf{babel}} +\newcommand*\langvar{$\langle \mathit lang \rangle$} +\newcommand*\note[1]{} +\newcommand*\Lopt[1]{\textsf{#1}} +\newcommand*\file[1]{\texttt{#1}} +\begin{document} + \DocInput{english.dtx} +\end{document} +% +%\fi +% \GetFileInfo{english.dtx} +% +% \changes{english-2.0a}{1990/04/02}{Added checking of format} +% \changes{english-2.1}{1990/04/24}{Reflect changes in babel 2.1} +% \changes{english-2.1a}{1990/05/14}{Incorporated Nico's comments} +% \changes{english-2.1b}{1990/05/14}{merged \file{USenglish.sty} into +% this file} +% \changes{english-2.1c}{1990/05/22}{fixed typo in definition for +% american language found by Werenfried Spit (nspit@fys.ruu.nl)} +% \changes{english-2.1d}{1990/07/16}{Fixed some typos} +% \changes{english-3.0}{1991/04/23}{Modified for babel 3.0} +% \changes{english-3.0a}{1991/05/29}{Removed bug found by van der Meer} +% \changes{english-3.0c}{1991/07/15}{Renamed \file{babel.sty} in +% \file{babel.com}} +% \changes{english-3.1}{1991/11/05}{Rewrote parts of the code to use +% the new features of babel version 3.1} +% \changes{english-3.3}{1994/02/08}{Update or \LaTeXe} +% \changes{english-3.3c}{1994/06/26}{Removed the use of \cs{filedate} +% and moved the identification after the loading of +% \file{babel.def}} +% \changes{english-3.3g}{1996/07/10}{Replaced \cs{undefined} with +% \cs{@undefined} and \cs{empty} with \cs{@empty} for consistency +% with \LaTeX} +% \changes{english-3.3h}{1996/10/10}{Moved the definition of +% \cs{atcatcode} right to the beginning.} +% +% \section{The English language} +% +% The file \file{\filename}\footnote{The file described in this +% section has version number \fileversion\ and was last revised on +% \filedate.} defines all the language definition macros for the +% English language as well as for the American and Australian +% version of this language. For the Australian version the British +% hyphenation patterns will be used, if available, for the Canadian +% variant the American patterns are selected. +% +% For this language currently no special definitions are needed or +% available. +% +% \StopEventually{} +% +% The macro |\LdfInit| takes care of preventing that this file is +% loaded more than once, checking the category code of the +% \texttt{@} sign, etc. +% \changes{english-3.3h}{1996/11/02}{Now use \cs{LdfInit} to perform +% initial checks} +% \begin{macrocode} +%<*code> +\LdfInit\CurrentOption{date\CurrentOption} +% \end{macrocode} +% +% When this file is read as an option, i.e. by the |\usepackage| +% command, \texttt{english} could be an `unknown' language in which +% case we have to make it known. So we check for the existence of +% |\l@english| to see whether we have to do something here. +% +% \changes{english-3.0}{1991/04/23}{Now use \cs{adddialect} if +% language undefined} +% \changes{english-3.0d}{1991/10/22}{removed use of \cs{@ifundefined}} +% \changes{english-3.3c}{1994/06/26}{Now use \cs{@nopatterns} to +% produce the warning} +% \changes{english-3.3g}{1996/07/10}{Allow british as the name of the +% UK patterns} +% \changes{english-3.3j}{2000/01/21}{Also allow american english +% hyphenation patterns to be used for `english'} +% We allow for the british english patterns to be loaded as either +% `british', or `UKenglish'. When neither of those is +% known we try to define |\l@english| as an alias for |\l@american| +% or |\l@USenglish|. +% \changes{english-3.3k}{2001/02/07}{Added support for canadian} +% \changes{english-3.3n}{2004/06/12}{Added support for australian and +% newzealand} +% \begin{macrocode} +\ifx\l@english\@undefined + \ifx\l@UKenglish\@undefined + \ifx\l@british\@undefined + \ifx\l@american\@undefined + \ifx\l@USenglish\@undefined + \ifx\l@canadian\@undefined + \ifx\l@australian\@undefined + \ifx\l@newzealand\@undefined + \@nopatterns{English} + \adddialect\l@english0 + \else + \let\l@english\l@newzealand + \fi + \else + \let\l@english\l@australian + \fi + \else + \let\l@english\l@canadian + \fi + \else + \let\l@english\l@USenglish + \fi + \else + \let\l@english\l@american + \fi + \else + \let\l@english\l@british + \fi + \else + \let\l@english\l@UKenglish + \fi +\fi +% \end{macrocode} +% Because we allow `british' to be used as the babel option we need +% to make sure that it will be recognised by |\selectlanguage|. In +% the code above we have made sure that |\l@english| was defined. +% Now we want to make sure that |\l@british| and |\l@UKenglish| are +% defined as well. When either of them is we make them equal to +% each other, when neither is we fall back to the default, +% |\l@english|. +% \changes{english-3.3o}{2004/06/14}{Make sure that british patterns +% are used if they were loaded} +% \begin{macrocode} +\ifx\l@british\@undefined + \ifx\l@UKenglish\@undefined + \adddialect\l@british\l@english + \adddialect\l@UKenglish\l@english + \else + \let\l@british\l@UKenglish + \fi +\else + \let\l@UKenglish\l@british +\fi +% \end{macrocode} +% `American' is a version of `English' which can have its own +% hyphenation patterns. The default english patterns are in fact +% for american english. We allow for the patterns to be loaded as +% `english' `american' or `USenglish'. +% \changes{english-3.0}{1990/04/23}{Now use \cs{adddialect} for +% american} +% \changes{english-3.0b}{1991/06/06}{Removed \cs{global} definitions} +% \changes{english-3.3d}{1995/02/01}{Only define american as a +% dialect when no separate patterns have been loaded} +% \changes{english-3.3g}{1996/07/10}{Allow USenglish as the name of +% the american patterns} +% \begin{macrocode} +\ifx\l@american\@undefined + \ifx\l@USenglish\@undefined +% \end{macrocode} +% When the patterns are not know as `american' or `USenglish' we +% add a ``dialect''. +% \begin{macrocode} + \adddialect\l@american\l@english + \else + \let\l@american\l@USenglish + \fi +\else +% \end{macrocode} +% Make sure that USenglish is known, even if the patterns were +% loaded as `american'. +% \changes{english-3.3j}{2000/01/21}{Ensure that \cs{l@USenglish} is +% alway defined} +% \changes{english-3.3l}{2001/04/15}{Added missing backslash} +% \begin{macrocode} + \ifx\l@USenglish\@undefined + \let\l@USenglish\l@american + \fi +\fi +% \end{macrocode} +% + +% \changes{english-3.3k}{2001/02/07}{Added support for canadian} +% `Canadian' english spelling is a hybrid of British and American +% spelling. Although so far no special `translations' have been +% reported we allow this file to be loaded by the option +% \Lopt{candian} as well. +% \begin{macrocode} +\ifx\l@canadian\@undefined + \adddialect\l@canadian\l@american +\fi +% \end{macrocode} +% +% \changes{english-3.3n}{2004/06/12}{Added support for australian and +% newzealand} +% `Australian' and `New Zealand' english spelling seem to be the +% same as British spelling. Although so far no special +% `translations' have been reported we allow this file to be loaded +% by the options \Lopt{australian} and \Lopt{newzealand} as well. +% \begin{macrocode} +\ifx\l@australian\@undefined + \adddialect\l@australian\l@british +\fi +\ifx\l@newzealand\@undefined + \adddialect\l@newzealand\l@british +\fi +% \end{macrocode} +% + +% \begin{macro}{\englishhyphenmins} +% \changes{english-3.3m}{2003/11/17}{Added default for setting of +% hyphenmin parameters} +% This macro is used to store the correct values of the hyphenation +% parameters |\lefthyphenmin| and |\righthyphenmin|. +% \begin{macrocode} +\providehyphenmins{\CurrentOption}{\tw@\thr@@} +% \end{macrocode} +% \end{macro} +% +% The next step consists of defining commands to switch to (and +% from) the English language. +% \begin{macro}{\captionsenglish} +% The macro |\captionsenglish| defines all strings used +% in the four standard document classes provided with \LaTeX. +% \changes{english-3.0b}{1991/06/06}{Removed \cs{global} definitions} +% \changes{english-3.0b}{1991/06/06}{\cs{pagename} should be +% \cs{headpagename}} +% \changes{english-3.1a}{1991/11/11}{added \cs{seename} and +% \cs{alsoname}} +% \changes{english-3.1b}{1992/01/26}{added \cs{prefacename}} +% \changes{english-3.2}{1993/07/15}{\cs{headpagename} should be +% \cs{pagename}} +% \changes{english-3.3e}{1995/07/04}{Added \cs{proofname} for +% AMS-\LaTeX} +% \changes{english-3.3g}{1996/07/10}{Construct control sequence on the +% fly} +% \changes{english-3.3j}{2000/09/19}{Added \cs{glossaryname}} +% \begin{macrocode} +\@namedef{captions\CurrentOption}{% + \def\prefacename{Preface}% + \def\refname{References}% + \def\abstractname{Abstract}% + \def\bibname{Bibliography}% + \def\chaptername{Chapter}% + \def\appendixname{Appendix}% + \def\contentsname{Contents}% + \def\listfigurename{List of Figures}% + \def\listtablename{List of Tables}% + \def\indexname{Index}% + \def\figurename{Figure}% + \def\tablename{Table}% + \def\partname{Part}% + \def\enclname{encl}% + \def\ccname{cc}% + \def\headtoname{To}% + \def\pagename{Page}% + \def\seename{see}% + \def\alsoname{see also}% + \def\proofname{Proof}% + \def\glossaryname{Glossary}% + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\dateenglish} +% In order to define |\today| correctly we need to know whether it +% should be `english', `australian', or `american'. We can find +% this out by checking the value of |\CurrentOption|. +% \changes{english-3.3j}{2000/01/21}{Make sure that the value of +% \cs{today} is correct for both options `american' and +% `USenglish'} +% \changes{english-3.3n}{2004/06/12}{Added support for `Australian' +% and `Newzealand'} +% \changes{english-3.3o}{2004/06/14}{Explicitly choose the UK form of +% date} +% \begin{macrocode} +\def\bbl@tempa{british} +\ifx\CurrentOption\bbl@tempa\def\bbl@tempb{UK}\fi +\def\bbl@tempa{UKenglish} +\ifx\CurrentOption\bbl@tempa\def\bbl@tempb{UK}\fi +\def\bbl@tempa{american} +\ifx\CurrentOption\bbl@tempa\def\bbl@tempb{US}\fi +\def\bbl@tempa{USenglish} +\ifx\CurrentOption\bbl@tempa\def\bbl@tempb{US}\fi +\def\bbl@tempa{canadian} +\ifx\CurrentOption\bbl@tempa\def\bbl@tempb{US}\fi +\def\bbl@tempa{australian} +\ifx\CurrentOption\bbl@tempa\def\bbl@tempb{AU}\fi +\def\bbl@tempa{newzealand} +\ifx\CurrentOption\bbl@tempa\def\bbl@tempb{AU}\fi +% \end{macrocode} +% +% The macro |\dateenglish| redefines the command |\today| to +% produce English dates. +% \changes{english-3.0b}{1991/06/06}{Removed \cs{global} definitions} +% \changes{english-3.3g}{1996/07/10}{Construct control sequence on the +% fly} +% \changes{english-3.3i}{1997/10/01}{Use \cs{edef} to define \cs{today} +% to save memory} +% \changes{english-3.3i}{1998/03/28}{use \cs{def} instead of +% \cs{edef}} +% \begin{macrocode} +\def\bbl@tempa{UK} +\ifx\bbl@tempa\bbl@tempb + \@namedef{date\CurrentOption}{% + \def\today{\ifcase\day\or + 1st\or 2nd\or 3rd\or 4th\or 5th\or + 6th\or 7th\or 8th\or 9th\or 10th\or + 11th\or 12th\or 13th\or 14th\or 15th\or + 16th\or 17th\or 18th\or 19th\or 20th\or + 21st\or 22nd\or 23rd\or 24th\or 25th\or + 26th\or 27th\or 28th\or 29th\or 30th\or + 31st\fi~\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} +% +% \begin{macro}{\dateaustralian} +% Now, test for `australian' or `american'. +% \changes{english-3.3n}{2004/06/12}{Add australian date} +% \begin{macrocode} +\else +% \end{macrocode} +% +% The macro |\dateaustralian| redefines the command |\today| to +% produce Australian resp.\ New Zealand dates. +% \begin{macrocode} + \def\bbl@tempa{AU} + \ifx\bbl@tempa\bbl@tempb + \@namedef{date\CurrentOption}{% + \def\today{\number\day~\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} +% +% \begin{macro}{\dateamerican} +% The macro |\dateamerican| redefines the command |\today| to +% produce American dates. +% \changes{english-3.0b}{1991/06/06}{Removed \cs{global} definitions} +% \changes{english-3.3i}{1997/10/01}{Use \cs{edef} to define +% \cs{today} to save memory} +% \changes{english-3.3i}{1998/03/28}{use \cs{def} instead of +% \cs{edef}} +% \begin{macrocode} + \else + \@namedef{date\CurrentOption}{% + \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}} + \fi +\fi +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\extrasenglish} +% \begin{macro}{\noextrasenglish} +% The macro |\extrasenglish| will perform all the extra definitions +% needed for the English language. The macro |\noextrasenglish| is +% used to cancel the actions of |\extrasenglish|. For the moment +% these macros are empty but they are defined for compatibility +% with the other language definition files. +% +% \changes{english-3.3g}{1996/07/10}{Construct control sequences on +% the fly} +% \begin{macrocode} +\@namedef{extras\CurrentOption}{} +\@namedef{noextras\CurrentOption}{} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% The macro |\ldf@finish| takes care of looking for a +% configuration file, setting the main language to be switched on +% at |\begin{document}| and resetting the category code of +% \texttt{@} to its original value. +% \changes{english-3.3h}{1996/11/02}{Now use \cs{ldf@finish} to wrap +% up} +% \begin{macrocode} +\ldf@finish\CurrentOption +% +% \end{macrocode} +% +% \Finale +%% +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +%% +\endinput diff --git a/Master/texmf-dist/source/generic/babel/english.ins b/Master/texmf-dist/source/generic/babel/english.ins new file mode 100644 index 00000000000..67c897423da --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/english.ins @@ -0,0 +1,148 @@ +%% +%% This file will generate fast loadable files and documentation +%% driver files from the doc files in this package when run through +%% LaTeX or TeX. +%% +%% Copyright 1989-2005 Johannes L. Braams and any individual authors +%% listed elsewhere in this file. All rights reserved. +%% +%% This file is part of the Babel system. +%% -------------------------------------- +%% +%% It 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 +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% The Current Maintainer of this work is Johannes Braams. +%% +%% The list of all files belonging to the LaTeX base distribution is +%% given in the file `manifest.bbl. See also `legal.bbl' 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. +%% +%% --------------- start of docstrip commands ------------------ +%% +\def\filedate{1999/04/11} +\def\batchfile{english.ins} +\input docstrip.tex + +{\ifx\generate\undefined +\Msg{**********************************************} +\Msg{*} +\Msg{* This installation requires docstrip} +\Msg{* version 2.3c or later.} +\Msg{*} +\Msg{* An older version of docstrip has been input} +\Msg{*} +\Msg{**********************************************} +\errhelp{Move or rename old docstrip.tex.} +\errmessage{Old docstrip in input path} +\batchmode +\csname @@end\endcsname +\fi} + +\declarepreamble\mainpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl 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. +\endpreamble + +\declarepreamble\fdpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl for additional +information. + +In particular, permission is granted to customize the declarations in +this file to serve the needs of your installation. + +However, NO PERMISSION is granted to distribute a modified version +of this file under its original name. + +\endpreamble + +\keepsilent + +\usedir{tex/generic/babel} + +\usepreamble\mainpreamble +\generate{\file{english.ldf}{\from{english.dtx}{code}} + } +\usepreamble\fdpreamble + +\ifToplevel{ +\Msg{***********************************************************} +\Msg{*} +\Msg{* To finish the installation you have to move the following} +\Msg{* files into a directory searched by TeX:} +\Msg{*} +\Msg{* \space\space All *.def, *.fd, *.ldf, *.sty} +\Msg{*} +\Msg{* To produce the documentation run the files ending with} +\Msg{* '.dtx' and `.fdd' through LaTeX.} +\Msg{*} +\Msg{* Happy TeXing} +\Msg{***********************************************************} +} + +\endinput diff --git a/Master/texmf-dist/source/generic/babel/esperanto.dtx b/Master/texmf-dist/source/generic/babel/esperanto.dtx new file mode 100644 index 00000000000..6a98c77ceb3 --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/esperanto.dtx @@ -0,0 +1,341 @@ +% \iffalse meta-comment +% +% Copyright 1989-2005 Johannes L. Braams and any individual authors +% listed elsewhere in this file. All rights reserved. +% +% This file is part of the Babel system. +% -------------------------------------- +% +% It 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 +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2003/12/01 or later. +% +% This work has the LPPL maintenance status "maintained". +% +% The Current Maintainer of this work is Johannes Braams. +% +% The list of all files belonging to the Babel system is +% given in the file `manifest.bbl. See also `legal.bbl' 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 +% \CheckSum{259} +%\iffalse +% Tell the \LaTeX\ system who we are and write an entry on the +% transcript. +%<*dtx> +\ProvidesFile{esperanto.dtx} +% +%\ProvidesLanguage{esperanto} +%\fi +%\ProvidesFile{esperant.dtx} + [2005/03/30 v1.4r Esperanto support from the babel system] +%\iffalse +%% File 'esperanto.dtx' +%% Babel package for LaTeX version 2e +%% Copyright (C) 1989 - 2005 +%% by Johannes Braams, TeXniek +% +%% Please report errors to: J.L. Braams +%% babel at braams.cistron.nl +% +% This file is part of the babel system, it provides the source +% code for the Esperanto language definition file. A contribution +% was made by Ruiz-Altaba Marti (ruizaltb@cernvm.cern.ch) Code from +% esperant.sty version 1.1 by Joerg Knappen +% (\texttt{knappen@vkpmzd.kph.uni-mainz.de}) was included in +% version 1.2. +%<*filedriver> +\documentclass{ltxdoc} +\newcommand*\TeXhax{\TeX hax} +\newcommand*\babel{\textsf{babel}} +\newcommand*\langvar{$\langle \it lang \rangle$} +\newcommand*\note[1]{} +\newcommand*\Lopt[1]{\textsf{#1}} +\newcommand*\file[1]{\texttt{#1}} +\begin{document} + \DocInput{esperanto.dtx} +\end{document} +% +%\fi +% \GetFileInfo{esperanto.dtx} +% +% \changes{esperanto-1.0a}{1991/07/15}{Renamed \file{babel.sty} in +% \file{babel.com}} +% \changes{esperanto-1.1}{1992/02/15}{Brought up-to-date with +% babel~3.2a} +% \changes{esperanto-1.2}{1992/02/18}{Included code from +% \texttt{esperant.sty}} +% \changes{esperanto-1.4a}{1994/02/04}{Updated for \LaTeXe} +% \changes{esperanto-1.4d}{1994/06/25}{Removed the use of +% \cs{filedate}, moved Identification after loading of +% \file{babel.def}} +% \changes{esperanto-1.4e}{1995/02/09}{Moved identification code to +% the top of the file} +% \changes{esperanto-1.4f}{1995/06/14}{Corrected typos (PR1652)} +% \changes{esperanto-1.4i}{1996/07/10}{Replaced \cs{undefined} with +% \cs{@undefined} and \cs{empty} with \cs{@empty} for consistency +% with \LaTeX} +% \changes{esperanto-1.4i}{1996/10/10}{Moved the definition of +% \cs{atcatcode} right to the beginning.} +% +% \section{The Esperanto language} +% +% The file \file{\filename}\footnote{The file described in this +% section has version number \fileversion\ and was last revised on +% \filedate. A contribution was made by Ruiz-Altaba Marti +% (\texttt{ruizaltb@cernvm.cern.ch}). Code from the file +% \texttt{esperant.sty} by J\"org Knappen +% (\texttt{knappen@vkpmzd.kph.uni-mainz.de}) was included.} defines +% all the language-specific macros for the Esperanto language. +% +% For this language the character |^| is made active. +% In table~\ref{tab:esp-act} an overview is given of its purpose. +% \changes{esperanto-1.4j}{1997/01/06}{fixed typo in table caption +% (funtion instead of function)} +% \begin{table}[htb] +% \centering +% \begin{tabular}{lp{8cm}} +% |^c| & gives \^c with hyphenation in the rest of the word +% allowed, this works for c, C, g, G, H, J, s, S, z, Z\\ +% |^h| & prevents h\llap{\^{}} from becoming too tall\\ +% |^j| & gives \^\j\\ +% |^u| & gives \u u, with hyphenation in the rest of the word +% allowed\\ +% |^U| & gives \u U, with hyphenation in the rest of the word +% allowed\\ +% \verb=^|= & inserts a |\discretionary{-}{}{}|\\ +% \end{tabular} +% \caption{The functions of the active character for Esperanto.} +% \label{tab:esp-act} +% \end{table} +% +% \StopEventually{} +% +% The macro |\LdfInit| takes care of preventing that this file is +% loaded more than once, checking the category code of the +% \texttt{@} sign, etc. +% \changes{esperanto-1.4i}{1996/11/02}{Now use \cs{LdfInit} to perform +% initial checks} +% \begin{macrocode} +%<*code> +\LdfInit{esperanto}\captionsesperanto +% \end{macrocode} +% +% When this file is read as an option, i.e. by the |\usepackage| +% command, \texttt{esperanto} will be an `unknown' language in +% which case we have to make it known. So we check for the +% existence of |\l@esperanto| to see whether we have to do +% something here. +% +% \changes{esperanto-1.0b}{1991/10/29}{Removed use of +% \cs{makeatletter}} +% \changes{esperanto-1.1}{1992/02/15}{Added a warning when no +% hyphenation patterns were loaded.} +% \changes{esperanto-1.4d}{1994/06/25}{Use \cs{@nopatterns} for the +% warning} +% \begin{macrocode} +\ifx\l@esperanto\@undefined + \@nopatterns{Esperanto} + \adddialect\l@esperanto0\fi +% \end{macrocode} +% +% The next step consists of defining commands to switch to the +% Esperanto language. The reason for this is that a user might want +% to switch back and forth between languages. +% +% \begin{macro}{\captionsesperanto} +% The macro |\captionsesperanto| defines all strings used +% in the four standard documentclasses provided with \LaTeX. +% \changes{esperanto-1.1}{1992/02/15}{Added \cs{seename}, +% \cs{alsoname} and \cs{prefacename}} +% \changes{esperanto-1.3}{1993/07/10}{Repaired a number of mistakes, +% indicated by D. Ederveen} +% \changes{esperanto-1.3}{1993/07/15}{\cs{headpagename} should be +% \cs{pagename}} +% \changes{esperanto-1.4a}{1994/02/04}{added missing closing brace} +% \changes{esperanto-1.4g}{1995/07/04}{Added \cs{proofname} for +% AMS-\LaTeX} +% \changes{esperanto-1.4i}{1996/07/06}{Replaced `Proof' by `Pruvo' +% PR 2207} +% \changes{esperanto-1.4p}{2000/09/19}{Added \cs{glossaryname}} +% \changes{esperanto-1.4q}{2002/01/07}{Added translation for Glossary} +% \begin{macrocode} +\addto\captionsesperanto{% + \def\prefacename{Anta\u{u}parolo}% + \def\refname{Cita\^\j{}oj}% + \def\abstractname{Resumo}% + \def\bibname{Bibliografio}% + \def\chaptername{{\^C}apitro}% + \def\appendixname{Apendico}% + \def\contentsname{Enhavo}% + \def\listfigurename{Listo de figuroj}% + \def\listtablename{Listo de tabeloj}% + \def\indexname{Indekso}% + \def\figurename{Figuro}% + \def\tablename{Tabelo}% + \def\partname{Parto}% + \def\enclname{Aldono(j)}% + \def\ccname{Kopie al}% + \def\headtoname{Al}% + \def\pagename{Pa\^go}% + \def\subjectname{Temo}% + \def\seename{vidu}% a^u: vd. + \def\alsoname{vidu anka\u{u}}% a^u vd. anka\u{u} + \def\proofname{Pruvo}% + \def\glossaryname{Glosaro}% + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\dateesperanto} +% The macro |\dateesperanto| redefines the command |\today| to +% produce Esperanto dates. +% \changes{esperanto-1.3}{1993/07/10}{Removed the capitals from +% \cs{today}} +% \changes{esperanto-1.4k}{1997/10/01}{Use \cs{edef} to define +% \cs{today} to save memory} +% \changes{esperanto-1.4k}{1998/03/27}{Removed Rthe use of \cs{edef} +% again} +% \begin{macrocode} +\def\dateesperanto{% + \def\today{\number\day{--a}~de~\ifcase\month\or + januaro\or februaro\or marto\or aprilo\or majo\or junio\or + julio\or a\u{u}gusto\or septembro\or oktobro\or novembro\or + decembro\fi,\space \number\year}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\extrasesperanto} +% \begin{macro}{\noextrasesperanto} +% The macro |\extrasesperanto| performs all the extra definitions +% needed for the Esperanto language. The macro |\noextrasesperanto| +% is used to cancel the actions of |\extrasesperanto|. +% +% For Esperanto the |^| character is made active. This is done +% once, later on its definition may vary. +% +% \begin{macrocode} +\initiate@active@char{^} +% \end{macrocode} +% Because the character |^| is used in math mode with quite a +% different purpose we need to add an extra level of evaluation to +% the definition of the active |^|. It checks whether math mode is +% active; if so the shorthand mechanism is bypassed by a direct +% call of |\normal@char^|. +% \changes{esperanto-1.4n}{1999/09/30}{Added a check for math mode to +% the definition of the shorthand character} +% \changes{esperant0-1.4o}{1999/12/18}{Moved the check for math to +% babel.def} +% \begin{macrocode} +\addto\extrasesperanto{\languageshorthands{esperanto}} +\addto\extrasesperanto{\bbl@activate{^}} +\addto\noextrasesperanto{\bbl@deactivate{^}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% In order to prevent problems with the active |^| we add a +% shorthand on system level which expands to a `normal |^|. +% \changes{esperanto-1.4l}{1999/04/11}{Added a shorthand definition on +% system level} +% \begin{macrocode} +\declare@shorthand{system}{^}{\csname normal@char\string^\endcsname} +% \end{macrocode} +% And here are the uses of the active |^|: +% \changes{esperanto-1.4h}{1995/07/27}{Added a few shorthands} +% \begin{macrocode} +\declare@shorthand{esperanto}{^c}{\^{c}\allowhyphens} +\declare@shorthand{esperanto}{^C}{\^{C}\allowhyphens} +\declare@shorthand{esperanto}{^g}{\^{g}\allowhyphens} +\declare@shorthand{esperanto}{^G}{\^{G}\allowhyphens} +\declare@shorthand{esperanto}{^h}{h\llap{\^{}}\allowhyphens} +\declare@shorthand{esperanto}{^H}{\^{H}\allowhyphens} +\declare@shorthand{esperanto}{^j}{\^{\j}\allowhyphens} +\declare@shorthand{esperanto}{^J}{\^{J}\allowhyphens} +\declare@shorthand{esperanto}{^s}{\^{s}\allowhyphens} +\declare@shorthand{esperanto}{^S}{\^{S}\allowhyphens} +\declare@shorthand{esperanto}{^u}{\u u\allowhyphens} +\declare@shorthand{esperanto}{^U}{\u U\allowhyphens} +\declare@shorthand{esperanto}{^|}{\discretionary{-}{}{}\allowhyphens} +% \end{macrocode} +% +% \begin{macro}{\Esper} +% \begin{macro}{\esper} +% In \file{esperant.sty} J\"org Knappen provides the macros +% |\esper| and |\Esper| that can be used instead of |\alph| and +% |\Alph|. These macros are available in this file as well. +% +% Their definition takes place in two steps. First the toplevel. +% \begin{macrocode} +\def\esper#1{\@esper{\@nameuse{c@#1}}} +\def\Esper#1{\@Esper{\@nameuse{c@#1}}} +% \end{macrocode} +% Then the second level. +% \changes{esperanto-1.4q}{2002/01/08}{Removed the extra level of +% expansion for more than five items, as was done in \LaTeX} +% \begin{macrocode} +\def\@esper#1{% + \ifcase#1\or a\or b\or c\or \^c\or d\or e\or f\or g\or \^g\or + h\or h\llap{\^{}}\or i\or j\or \^\j\or k\or l\or m\or n\or o\or + p\or s\or \^s\or t\or u\or \u{u}\or v\or z\else\@ctrerr\fi} +\def\@Esper#1{% + \ifcase#1\or A\or B\or C\or \^C\or D\or E\or F\or G\or \^G\or + H\or \^H\or I\or J\or \^J\or K\or L\or M\or N\or O\or + P\or S\or \^S\or T\or U\or \u{U}\or V\or Z\else\@ctrerr\fi} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\hodiau} +% \begin{macro}{\hodiaun} +% In \file{esperant.sty} J\"org Knappen provides two alternative +% macros for |\today|, |\hodiau| and |\hodiaun|. The second macro +% produces an accusative version of the date in Esperanto. +% \begin{macrocode} +\addto\dateesperanto{\def\hodiau{la \today}} +\def\hodiaun{la \number\day --an~de~\ifcase\month\or + januaro\or februaro\or marto\or aprilo\or majo\or junio\or + julio\or a\u{u}gusto\or septembro\or oktobro\or novembro\or + decembro\fi, \space \number\year} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% The macro |\ldf@finish| takes care of looking for a +% configuration file, setting the main language to be switched on +% at |\begin{document}| and resetting the category code of +% \texttt{@} to its original value. +% \changes{esperanto-1.4i}{1996/11/02}{Now use \cs{ldf@finish} to wrap +% up} +% \begin{macrocode} +\ldf@finish{esperanto} +% +% \end{macrocode} +% +% \Finale +%% +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +%% +\endinput diff --git a/Master/texmf-dist/source/generic/babel/esperanto.ins b/Master/texmf-dist/source/generic/babel/esperanto.ins new file mode 100644 index 00000000000..25e39025572 --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/esperanto.ins @@ -0,0 +1,148 @@ +%% +%% This file will generate fast loadable files and documentation +%% driver files from the doc files in this package when run through +%% LaTeX or TeX. +%% +%% Copyright 1989-2005 Johannes L. Braams and any individual authors +%% listed elsewhere in this file. All rights reserved. +%% +%% This file is part of the Babel system. +%% -------------------------------------- +%% +%% It 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 +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% The Current Maintainer of this work is Johannes Braams. +%% +%% The list of all files belonging to the LaTeX base distribution is +%% given in the file `manifest.bbl. See also `legal.bbl' 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. +%% +%% --------------- start of docstrip commands ------------------ +%% +\def\filedate{2000/09/26} +\def\batchfile{esperanto.ins} +\input docstrip.tex + +{\ifx\generate\undefined +\Msg{**********************************************} +\Msg{*} +\Msg{* This installation requires docstrip} +\Msg{* version 2.3c or later.} +\Msg{*} +\Msg{* An older version of docstrip has been input} +\Msg{*} +\Msg{**********************************************} +\errhelp{Move or rename old docstrip.tex.} +\errmessage{Old docstrip in input path} +\batchmode +\csname @@end\endcsname +\fi} + +\declarepreamble\mainpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl 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. +\endpreamble + +\declarepreamble\fdpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl for additional +information. + +In particular, permission is granted to customize the declarations in +this file to serve the needs of your installation. + +However, NO PERMISSION is granted to distribute a modified version +of this file under its original name. + +\endpreamble + +\keepsilent + +\usedir{tex/generic/babel} + +\usepreamble\mainpreamble +\generate{\file{esperanto.ldf}{\from{esperanto.dtx}{code}} + } +\usepreamble\fdpreamble + +\ifToplevel{ +\Msg{***********************************************************} +\Msg{*} +\Msg{* To finish the installation you have to move the following} +\Msg{* files into a directory searched by TeX:} +\Msg{*} +\Msg{* \space\space All *.def, *.fd, *.ldf, *.sty} +\Msg{*} +\Msg{* To produce the documentation run the files ending with} +\Msg{* '.dtx' and `.fdd' through LaTeX.} +\Msg{*} +\Msg{* Happy TeXing} +\Msg{***********************************************************} +} + +\endinput diff --git a/Master/texmf-dist/source/generic/babel/estonian.dtx b/Master/texmf-dist/source/generic/babel/estonian.dtx new file mode 100644 index 00000000000..74bbb9a3384 --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/estonian.dtx @@ -0,0 +1,426 @@ +% \iffalse meta-comment +% +% Copyright 1989-2005 Johannes L. Braams and any individual authors +% listed elsewhere in this file. All rights reserved. +% +% This file is part of the Babel system. +% -------------------------------------- +% +% It 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 +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2003/12/01 or later. +% +% This work has the LPPL maintenance status "maintained". +% +% The Current Maintainer of this work is Johannes Braams. +% +% The list of all files belonging to the Babel system is +% given in the file `manifest.bbl. See also `legal.bbl' 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 +% \CheckSum{330} +% \iffalse +% Tell the \LaTeX\ system who we are and write an entry on the +% transcript. +%<*dtx> +\ProvidesFile{estonian.dtx} +% +%\ProvidesLanguage{estonian} +%\fi +%\ProvidesFile{estonian.dtx} + [2005/03/30 v1.0h Estonian support from the babel system] +%\iffalse +%% File `estonian.dtx' +%% Babel package for LaTeX version 2e +%% Copyright (C) 1989 - 2005 +%% by Johannes Braams, TeXniek +% +%% Estonian language Definition File +%% Copyright (C) 1991 - 2005 +%% by Enn Saar, Tartu Astrophysical Observatory +% Tartu Astrophysical Observatory +% EE-2444 T\~oravere +% Estonia +% tel: +372 7 410 267 +% fax: +372 7 410 205 +% saar@aai.ee +% +% Johannes Braams, TeXniek +% +%% Please report errors to: Enn Saar saar at aai.ee +%% (or J.L. Braams babel atbraams.cistron.nl +% +% This file is part of the babel system, it provides the source +% code for the Estonian language definition file. The original +% version of this file was written by Enn Saar, +% (saar@aai.ee). +%<*filedriver> +\documentclass{ltxdoc} +\newcommand*\TeXhax{\TeX hax} +\newcommand*\babel{\textsf{babel}} +\newcommand*\langvar{$\langle \it lang \rangle$} +\newcommand*\note[1]{} +\newcommand*\Lopt[1]{\textsf{#1}} +\newcommand*\file[1]{\texttt{#1}} +\begin{document} + \DocInput{estonian.dtx} +\end{document} +% +%\fi +% +% \changes{estonian-1.0b}{1995/06/16}{corrected typos} +% \changes{estonian-1.0e}{1996/10/10}{Replaced \cs{undefined} with +% \cs{@undefined} and \cs{empty} with \cs{@empty} for consistency +% with \LaTeX, moved the definition of \cs{atcatcode} right to the +% beginning.} +% +% \GetFileInfo{estonian.dtx} +% +% \section{The Estonian language} +% +% The file \file{\filename}\footnote{The file described in this +% section has version number \fileversion\ and was last revised on +% \filedate. The original author is Enn Saar, +% (\texttt{saar@aai.ee}).} defines the language definition macro's +% for the Estonian language. +% +% This file was written as part of the TWGML project, and borrows +% heavily from the \babel\ German and Spanish language files +% \file{germanb.ldf} and \file{spanish.ldf}. +% +% Estonian has the same umlauts as German (\"a, \"o, \"u), but in +% addition to this, we have also \~o, and two recent characters +% \v s and \v z, so we need at least two active characters. +% We shall use |"| and |~| to type Estonian accents on ASCII +% keyboards (in the 7-bit character world). Their use is given in +% table~\ref{tab:estonian-quote}. +% \begin{table}[htb] +% \begin{center} +% \begin{tabular}{lp{8cm}} +% |~o| & |\~o|, (and uppercase); \\ +% |"a| & |\"a|, (and uppercase); \\ +% |"o| & |\"o|, (and uppercase); \\ +% |"u| & |\"u|, (and uppercase); \\ +% |~s| & |\v s|, (and uppercase); \\ +% |~z| & |\v z|, (and uppercase); \\ +% \verb="|= & disable ligature at this position;\\ +% |"-| & an explicit hyphen sign, allowing hyphenation +% in the rest of the word;\\ +% |\-| & like the old |\-|, but allowing hyphenation +% in the rest of the word; \\ +% |"`| & for Estonian low left double quotes (same as German);\\ +% |"'| & for Estonian right double quotes;\\ +% |"<| & for French left double quotes (also rather popular)\\ +% |">| & for French right double quotes.\\ +% \end{tabular} +% \caption{The extra definitions made +% by \file{estonian.ldf}}\label{tab:estonian-quote} +% \end{center} +% \end{table} +% These active accent characters behave according to their original +% definitions if not followed by one of the characters indicated in +% that table; the original quote character can be typed using the +% macro |\dq|. +% +% We support also the T1 output encoding (and Cork-encoded text +% input). You can choose the T1 encoding by the command +% |\usepackage[T1]{fontenc}|. This package must be loaded before +% \babel. As the standard Estonian hyphenation file +% \file{eehyph.tex} is in the Cork encoding, choosing this encoding +% will give you better hyphenation. +% +% As mentioned in the Spanish style file, it may happen that some +% packages fail (usually in a \cs{message}). In this case you +% should change the order of the \cs{usepackage} declarations +% or the order of the style options in \cs{documentclass}. +% +% \StopEventually{} +% +% \subsection{Implementation} +% +% The macro |\LdfInit| takes care of preventing that this file is +% loaded more than once, checking the category code of the +% \texttt{@} sign, etc. +% \changes{estonian-1.0e}{1996/10/30}{Now use \cs{LdfInit} to perform +% initial checks} +% \begin{macrocode} +%<*code> +\LdfInit{estonian}\captionsestonian +% \end{macrocode} +% +% If Estonian is not included in the format file (does not have +% hyphenation patterns), we shall use English hyphenation. +% +% \begin{macrocode} +\ifx\l@estonian\@undefined + \@nopatterns{Estonian} + \adddialect\l@estonian0 +\fi +% \end{macrocode} +% +% Now come the commands to switch to (and from) Estonian. +% +% \begin{macro}{\captionsestonian} +% The macro |\captionsestonian| defines all strings used in the +% four standard documentclasses provided with \LaTeX. +% +% \changes{estonian-1.0c}{1995/07/04}{Added \cs{proofname} for +% AMS-\LaTeX} +% \changes{estonian-1.0d}{1995/07/27}{Added translation of `Proof'} +% \changes{estonian-1.0h}{2000/09/20}{Added \cs{glossaryname}} +% \begin{macrocode} +\addto\captionsestonian{% + \def\prefacename{Sissejuhatus}% + \def\refname{Viited}% + \def\bibname{Kirjandus}% + \def\appendixname{Lisa}% + \def\contentsname{Sisukord}% + \def\listfigurename{Joonised}% + \def\listtablename{Tabelid}% + \def\indexname{Indeks}% + \def\figurename{Joonis}% + \def\tablename{Tabel}% + \def\partname{Osa}% + \def\enclname{Lisa(d)}% + \def\ccname{Koopia(d)}% + \def\headtoname{}% + \def\pagename{Lk.}% + \def\seename{vt.}% + \def\alsoname{vt. ka}% + \def\proofname{Korrektuur}% + \def\glossaryname{Glossary}% <-- Needs translation + } +% \end{macrocode} +% +% These captions contain accented characters. +% +% \begin{macrocode} +\begingroup \catcode`\"\active +\def\x{\endgroup +\addto\captionsestonian{% + \def\abstractname{Kokkuv~ote}% + \def\chaptername{Peat"ukk}}} +\x +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\dateestonian} +% The macro |\dateestonian| redefines the command |\today| to +% produce Estonian dates. +% \changes{estonian-1.0f}{1997/10/01}{Use \cs{edef} to define +% \cs{today} to save memory} +% \changes{estonian-1.0f}{1998/03/28}{use \cs{def} instead of +% \cs{edef}} +% \begin{macrocode} +\begingroup \catcode`\"\active +\def\x{\endgroup + \def\month@estonian{\ifcase\month\or + jaanuar\or veebruar\or m"arts\or aprill\or mai\or juuni\or + juuli\or august\or september\or oktoober\or november\or + detsember\fi}} +\x +\def\dateestonian{% + \def\today{\number\day.\space\month@estonian + \space\number\year.\space a.}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\extrasestonian} +% \begin{macro}{\noextrasestonian} +% The macro |\extrasestonian| will perform all the extra +% definitions needed for Estonian. The macro |\noextrasestonian| is +% used to cancel the actions of |\extrasestonian|. For Estonian, +% |"| is made active and has to be treated as `special' (|~| is +% active already). +% +% \begin{macrocode} +\initiate@active@char{"} +\initiate@active@char{~} +\addto\extrasestonian{\languageshorthands{estonian}} +\addto\extrasestonian{\bbl@activate{"}\bbl@activate{~}} +% \end{macrocode} +% Store the original macros, and redefine accents. +% +% \begin{macrocode} +\addto\extrasestonian{\babel@save\"\umlautlow\babel@save\~\tildelow} +% \end{macrocode} +% +% \changes{estonian-1.0d}{1995/07/27}{Removed the code that changes +% category, lower case, uper case and space factor codes } +% +% Estonian does not use extra spaces after sentences. +% +% \begin{macrocode} +\addto\extrasestonian{\bbl@frenchspacing} +\addto\noextrasestonian{\bbl@nonfrenchspacing} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\estonianhyphenmins} +% For Estonian, |\lefthyphenmin| and |\righthyphenmin| are +% both~2. +% \changes{estonian-1.0h}{2000/09/22}{Now use \cs{providehyphenmins} to +% provide a default value} +% \begin{macrocode} +\providehyphenmins{\CurrentOption}{\tw@\tw@} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\tildelow} +% \begin{macro}{\gentilde} +% \begin{macro}{\newtilde} +% \begin{macro}{\newcheck} +% The standard \TeX\ accents are too high for Estonian typography, +% we have to lower them (following the \babel\ German style). For +% a detailed explanation see the file \file{glyphs.dtx}. +% +% \begin{macrocode} +\def\tildelow{\def\~{\protect\gentilde}} +\def\gentilde#1{\if#1o\newtilde{#1}\else\if#1O\newtilde{#1}% + \else\newcheck{#1}% + \fi\fi} +\def\newtilde#1{\leavevmode\allowhyphens + {\U@D 1ex% + {\setbox\z@\hbox{\char126}\dimen@ -.45ex\advance\dimen@\ht\z@ + \ifdim 1ex<\dimen@ \fontdimen5\font\dimen@ \fi}% + \accent126\fontdimen5\font\U@D #1}\allowhyphens} +\def\newcheck#1{\leavevmode\allowhyphens + {\U@D 1ex% + {\setbox\z@\hbox{\char20}\dimen@ -.45ex\advance\dimen@\ht\z@ + \ifdim 1ex<\dimen@ \fontdimen5\font\dimen@ \fi}% + \accent20\fontdimen5\font\U@D #1}\allowhyphens} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% We save the double quote character in |\dq|, and tilde in |\til|, +% and store the original definitions of |\"| and |\~| as |\dieresis| +% and |\texttilde|. +% +% \begin{macrocode} +\begingroup \catcode`\"12 +\edef\x{\endgroup + \def\noexpand\dq{"} + \def\noexpand\til{~}} +\x +\let\dieresis\" +\let\texttilde\~ +% \end{macrocode} +% +% This part follows closely \file{spanish.ldf}. We check the +% encoding and if it is T1, we have to tell \TeX\ about our +% redefined accents. +% +% \changes{estonian-1.0g}{1999/04/11}{use \cs{bbl@t@one} instead of +% \cs{bbl@next}} +% \begin{macrocode} +\ifx\f@encoding\bbl@t@one + \let\@umlaut\dieresis + \let\@tilde\texttilde + \DeclareTextComposite{\~}{T1}{s}{178} + \DeclareTextComposite{\~}{T1}{S}{146} + \DeclareTextComposite{\~}{T1}{z}{186} + \DeclareTextComposite{\~}{T1}{Z}{154} + \DeclareTextComposite{\"}{T1}{'}{17} + \DeclareTextComposite{\"}{T1}{`}{18} + \DeclareTextComposite{\"}{T1}{<}{19} + \DeclareTextComposite{\"}{T1}{>}{20} +% \end{macrocode} +% +% If the encoding differs from T1, we expand the accents, enabling +% hyphenation beyond the accent. In this case \TeX\ will not find +% all possible breaks, and we have to warn people. +% +% \begin{macrocode} +\else + \wlog{Warning: Hyphenation would work better for the T1 encoding.} + \let\@umlaut\newumlaut + \let\@tilde\gentilde +\fi +% \end{macrocode} +% +% Now we define the shorthands. +% +% \changes{estonian-1.0d}{1995/07/27}{The second argument was missing +% in the definition of some of the double-quote shorthands} +% \begin{macrocode} +\declare@shorthand{estonian}{"a}{\textormath{\"{a}}{\ddot a}} +\declare@shorthand{estonian}{"A}{\textormath{\"{A}}{\ddot A}} +\declare@shorthand{estonian}{"o}{\textormath{\"{o}}{\ddot o}} +\declare@shorthand{estonian}{"O}{\textormath{\"{O}}{\ddot O}} +\declare@shorthand{estonian}{"u}{\textormath{\"{u}}{\ddot u}} +\declare@shorthand{estonian}{"U}{\textormath{\"{U}}{\ddot U}} +% \end{macrocode} +% german and french quotes, +% \changes{estonian-1.0f}{1997/04/03}{Removed empty groups after +% double quote and guillemot characters} +% \begin{macrocode} +\declare@shorthand{estonian}{"`}{% + \textormath{\quotedblbase}{\mbox{\quotedblbase}}} +\declare@shorthand{estonian}{"'}{% + \textormath{\textquotedblleft}{\mbox{\textquotedblleft}}} +\declare@shorthand{estonian}{"<}{% + \textormath{\guillemotleft}{\mbox{\guillemotleft}}} +\declare@shorthand{estonian}{">}{% + \textormath{\guillemotright}{\mbox{\guillemotright}}} +% \end{macrocode} +% +% \begin{macrocode} +\declare@shorthand{estonian}{~o}{\textormath{\@tilde o}{\tilde o}} +\declare@shorthand{estonian}{~O}{\textormath{\@tilde O}{\tilde O}} +\declare@shorthand{estonian}{~s}{\textormath{\@tilde s}{\check s}} +\declare@shorthand{estonian}{~S}{\textormath{\@tilde S}{\check S}} +\declare@shorthand{estonian}{~z}{\textormath{\@tilde z}{\check z}} +\declare@shorthand{estonian}{~Z}{\textormath{\@tilde Z}{\check Z}} +% \end{macrocode} +% and some additional commands: +% \begin{macrocode} +\declare@shorthand{estonian}{"-}{\nobreak\-\bbl@allowhyphens} +\declare@shorthand{estonian}{"|}{% + \textormath{\nobreak\discretionary{-}{}{\kern.03em}% + \allowhyphens}{}} +\declare@shorthand{estonian}{""}{\dq} +\declare@shorthand{estonian}{~~}{\til} +% \end{macrocode} +% +% The macro |\ldf@finish| takes care of looking for a +% configuration file, setting the main language to be switched on +% at |\begin{document}| and resetting the category code of +% \texttt{@} to its original value. +% \changes{estonian-1.0e}{1996/11/02}{Now use \cs{ldf@finish} to wrap +% up} +% \begin{macrocode} +\ldf@finish{estonian} +% +% \end{macrocode} +% +% \Finale +%% +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +%% +\endinput diff --git a/Master/texmf-dist/source/generic/babel/estonian.ins b/Master/texmf-dist/source/generic/babel/estonian.ins new file mode 100644 index 00000000000..ed51cbad940 --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/estonian.ins @@ -0,0 +1,148 @@ +%% +%% This file will generate fast loadable files and documentation +%% driver files from the doc files in this package when run through +%% LaTeX or TeX. +%% +%% Copyright 1989-2005 Johannes L. Braams and any individual authors +%% listed elsewhere in this file. All rights reserved. +%% +%% This file is part of the Babel system. +%% -------------------------------------- +%% +%% It 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 +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% The Current Maintainer of this work is Johannes Braams. +%% +%% The list of all files belonging to the LaTeX base distribution is +%% given in the file `manifest.bbl. See also `legal.bbl' 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. +%% +%% --------------- start of docstrip commands ------------------ +%% +\def\filedate{1999/04/11} +\def\batchfile{estonian.ins} +\input docstrip.tex + +{\ifx\generate\undefined +\Msg{**********************************************} +\Msg{*} +\Msg{* This installation requires docstrip} +\Msg{* version 2.3c or later.} +\Msg{*} +\Msg{* An older version of docstrip has been input} +\Msg{*} +\Msg{**********************************************} +\errhelp{Move or rename old docstrip.tex.} +\errmessage{Old docstrip in input path} +\batchmode +\csname @@end\endcsname +\fi} + +\declarepreamble\mainpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl 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. +\endpreamble + +\declarepreamble\fdpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl for additional +information. + +In particular, permission is granted to customize the declarations in +this file to serve the needs of your installation. + +However, NO PERMISSION is granted to distribute a modified version +of this file under its original name. + +\endpreamble + +\keepsilent + +\usedir{tex/generic/babel} + +\usepreamble\mainpreamble +\generate{\file{estonian.ldf}{\from{estonian.dtx}{code}} + } +\usepreamble\fdpreamble + +\ifToplevel{ +\Msg{***********************************************************} +\Msg{*} +\Msg{* To finish the installation you have to move the following} +\Msg{* files into a directory searched by TeX:} +\Msg{*} +\Msg{* \space\space All *.def, *.fd, *.ldf, *.sty} +\Msg{*} +\Msg{* To produce the documentation run the files ending with} +\Msg{* '.dtx' and `.fdd' through LaTeX.} +\Msg{*} +\Msg{* Happy TeXing} +\Msg{***********************************************************} +} + +\endinput diff --git a/Master/texmf-dist/source/generic/babel/finnish.dtx b/Master/texmf-dist/source/generic/babel/finnish.dtx new file mode 100644 index 00000000000..ccd3b9e62e4 --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/finnish.dtx @@ -0,0 +1,362 @@ +% \iffalse meta-comment +% +% Copyright 1989-2005 Johannes L. Braams and any individual authors +% listed elsewhere in this file. All rights reserved. +% +% This file is part of the Babel system. +% -------------------------------------- +% +% It 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 +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2003/12/01 or later. +% +% This work has the LPPL maintenance status "maintained". +% +% The Current Maintainer of this work is Johannes Braams. +% +% The list of all files belonging to the Babel system is +% given in the file `manifest.bbl. See also `legal.bbl' 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 +% \CheckSum{172} +% \iffalse +% Tell the \LaTeX\ system who we are and write an entry on the +% transcript. +%<*dtx> +\ProvidesFile{finnish.dtx} +% +%\ProvidesLanguage{finnish} +%\fi +%\ProvidesFile{finnish.dtx} + [2005/03/30 v1.3p Finnish support from the babel system] +%\iffalse +%% File `finnish.dtx' +%% Babel package for LaTeX version 2e +%% Copyright (C) 1989 - 2005 +%% by Johannes Braams, TeXniek +% +%% Please report errors to: J.L. Braams +%% babel at braams.cistron.nl +% +% This file is part of the babel system, it provides the source +% code for the Finnish language definition file. A contribution +% was made by Mikko KANERVA (KANERVA@CERNVM) and Keranen Reino +% (KERANEN@CERNVM). +%<*filedriver> +\documentclass{ltxdoc} +\newcommand*\TeXhax{\TeX hax} +\newcommand*\babel{\textsf{babel}} +\newcommand*\langvar{$\langle \it lang \rangle$} +\newcommand*\note[1]{} +\newcommand*\Lopt[1]{\textsf{#1}} +\newcommand*\file[1]{\texttt{#1}} +\begin{document} + \DocInput{finnish.dtx} +\end{document} +% +%\fi +% +% \GetFileInfo{finnish.dtx} +% +% \changes{finnish-1.0a}{1991/07/15}{Renamed \file{babel.sty} in +% \file{babel.com}} +% \changes{finnish-1.1}{1991/02/15}{Brought up-to-date with babel 3.2a} +% \changes{finnish-1.2}{1994/02/27}{Update for \LaTeXe} +% \changes{finnish-1.3c}{1994/06/26}{Removed the use of \cs{filedate} +% and moved identification after the loading of \file{babel.def}} +% \changes{finnish-1.3d}{1994/06/30}{Removed a few references to +% \file{babel.com}} +% \changes{finnish-1.3i}{1996/10/10}{Replaced \cs{undefined} with +% \cs{@undefined} and \cs{empty} with \cs{@empty} for consistency +% with \LaTeX, moved the definition of \cs{atcatcode} right to the +% beginning.} +% +% \section{The Finnish language} +% +% The file \file{\filename}\footnote{The file described in this +% section has version number \fileversion\ and was last revised on +% \filedate. A contribution was made by Mikko KANERVA +% (\texttt{KANERVA@CERNVM}) and Keranen Reino +% (\texttt{KERANEN@CERNVM}).} defines all the language definition +% macros for the Finnish language. +% +% For this language the character |"| is made active. In +% table~\ref{tab:finnish-quote} an overview is given of its purpose. +% +% \begin{table}[htb] +% \centering +% \begin{tabular}{lp{8cm}} +% \verb="|= & disable ligature at this position.\\ +% |"-| & an explicit hyphen sign, allowing hyphenation +% in the rest of the word.\\ +% |"=| & an explicit hyphen sign for expressions such as +% ``pakastekaapit ja -arkut''.\\ +% |""| & like \verb="-=, but producing no hyphen sign (for +% words that should break at some sign such as +% ``entrada/salida.''\\ +% |"`| & lowered double left quotes (looks like ,,)\\ +% |"'| & normal double right quotes\\ +% |"<| & for French left double quotes (similar to $<<$).\\ +% |">| & for French right double quotes (similar to $>>$).\\ +% |\-| & like the old |\-|, but allowing hyphenation +% in the rest of the word. +% \end{tabular} +% \caption{The extra definitions made by \file{finnish.ldf}} +% \label{tab:finnish-quote} +% \end{table} +% +% \StopEventually{} +% +% The macro |\LdfInit| takes care of preventing that this file is +% loaded more than once, checking the category code of the +% \texttt{@} sign, etc. +% \changes{finnish-1.3i}{1996/11/02}{Now use \cs{LdfInit} to perform +% initial checks} +% \begin{macrocode} +%<*code> +\LdfInit{finnish}\captionsfinnish +% \end{macrocode} +% +% When this file is read as an option, i.e. by the |\usepackage| +% command, \texttt{finnish} will be an `unknown' language in which +% case we have to make it known. So we check for the existence of +% |\l@finnish| to see whether we have to do something here. +% +% \changes{finnish-1.0b}{1991/10/29}{Removed use of \cs{@ifundefined}} +% \changes{finnish-1.1}{1992/02/15}{Added a warning when no hyphenation +% patterns were loaded.} +% \changes{finnish-1.3c}{1994/06/26}{Now use \cs{@nopatterns} to +% produce the warning} +% \begin{macrocode} +\ifx\l@finnish\@undefined + \@nopatterns{Finnish} + \adddialect\l@finnish0\fi +% \end{macrocode} +% +% The next step consists of defining commands to switch to the +% Finnish language. The reason for this is that a user might want +% to switch back and forth between languages. +% +% \begin{macro}{\captionsfinnish} +% The macro |\captionsfinnish| defines all strings used in the four +% standard documentclasses provided with \LaTeX. +% \changes{finnish-1.1}{1992/02/15}{Added \cs{seename}, \cs{alsoname} +% and \cs{prefacename}} +% \changes{finnish-1.1}{1993/07/15}{\cs{headpagename} should be +% \cs{pagename}} +% \changes{finnish-1.1.2}{1993/09/16}{Added translations} +% \changes{finnish-1.3g}{1995/07/02}{Added \cs{proofname} for +% AMS-\LaTeX} +% \changes{finnish-1.3h}{1995/07/25}{Added finnish word for `Proof'} +% \changes{finnish-1.3n}{2000/09/19}{Added \cs{glossaryname}} +% \changes{finnish-1.3o}{2001/03/12}{Provided translation for +% Glossary} +% \begin{macrocode} +\addto\captionsfinnish{% + \def\prefacename{Esipuhe}% + \def\refname{Viitteet}% + \def\abstractname{Tiivistelm\"a} + \def\bibname{Kirjallisuutta}% + \def\chaptername{Luku}% + \def\appendixname{Liite}% + \def\contentsname{Sis\"alt\"o}% /* Could be "Sis\"allys" as well */ + \def\listfigurename{Kuvat}% + \def\listtablename{Taulukot}% + \def\indexname{Hakemisto}% + \def\figurename{Kuva}% + \def\tablename{Taulukko}% + \def\partname{Osa}% + \def\enclname{Liitteet}% + \def\ccname{Jakelu}% + \def\headtoname{Vastaanottaja}% + \def\pagename{Sivu}% + \def\seename{katso}% + \def\alsoname{katso my\"os}% + \def\proofname{Todistus}% + \def\glossaryname{Sanasto}% + }% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\datefinnish} +% The macro |\datefinnish| redefines the command |\today| to +% produce Finnish dates. +% \changes{finnish-1.3e}{1994/07/12}{Added a`.' after the number of +% the day} +% \changes{finnish-1.3k}{1997/10/01}{Use \cs{edef} to define \cs{today} +% to save memory} +% \changes{finnish-1.3k}{1998/03/28}{use \cs{def} instead of \cs{edef}} +% \begin{macrocode} +\def\datefinnish{% + \def\today{\number\day.~\ifcase\month\or + tammikuuta\or helmikuuta\or maaliskuuta\or huhtikuuta\or + toukokuuta\or kes\"akuuta\or hein\"akuuta\or elokuuta\or + syyskuuta\or lokakuuta\or marraskuuta\or joulukuuta\fi + \space\number\year}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\extrasfinnish} +% \begin{macro}{\noextrasfinnish} +% Finnish has many long words (some of them compound, some not). +% For this reason hyphenation is very often the only solution in +% line breaking. For this reason the values of |\hyphenpenalty|, +% |\exhyphenpenalty| and |\doublehyphendemerits| should be +% decreased. (In one of the manuals of style Matti Rintala noticed +% a paragraph with ten lines, eight of which ended in a hyphen!) +% +% Matti Rintala noticed that with these changes \TeX\ handles +% Finnish very well, although sometimes the values of |\tolerance| +% and |\emergencystretch| must be increased. However, I don't think +% changing these values in \file{finnish.ldf} is appropriate, as +% the looseness of the font (and the line width) affect the correct +% choice of these parameters. +% \changes{finnish-1.3f}{1995/05/13}{Added the setting of more +% hyphenation parameters, according to PR1027} +% \begin{macrocode} +\addto\extrasfinnish{% + \babel@savevariable\hyphenpenalty\hyphenpenalty=30% + \babel@savevariable\exhyphenpenalty\exhyphenpenalty=30% + \babel@savevariable\doublehyphendemerits\doublehyphendemerits=5000% + \babel@savevariable\finalhyphendemerits\finalhyphendemerits=5000% + } +\addto\noextrasfinnish{} +% \end{macrocode} +% +% Another thing |\extrasfinnish| needs to do is to ensure that +% |\frenchspacing| is in effect. If this is not the case the +% execution of |\noextrasfinnish| will switch it of again. +% \changes{finnish-1.3f}{1995/05/15}{Added the setting of +% \cs{frenchspacing}} +% \begin{macrocode} +\addto\extrasfinnish{\bbl@frenchspacing} +\addto\noextrasfinnish{\bbl@nonfrenchspacing} +% \end{macrocode} +% +% For Finnish the \texttt{"} character is made active. This is +% done once, later on its definition may vary. Other languages in +% the same document may also use the \texttt{"} character for +% shorthands; we specify that the finnish group of shorthands +% should be used. +% \changes{finnish-1.3g}{1995/07/02}{Added the active double quote} +% \begin{macrocode} +\initiate@active@char{"} +\addto\extrasfinnish{\languageshorthands{finnish}} +% \end{macrocode} +% Don't forget to turn the shorthands off again. +% \changes{finnish-1.3n}{1999/12/16}{Deactive shorthands ouside of Finnish} +% \begin{macrocode} +\addto\extrasfinnish{\bbl@activate{"}} +\addto\noextrasfinnish{\bbl@deactivate{"}} +% \end{macrocode} +% +% +% The `umlaut' character should be positioned lower on \emph{all} +% vowels in Finnish texts. +% \begin{macrocode} +\addto\extrasfinnish{\umlautlow\umlautelow} +\addto\noextrasfinnish{\umlauthigh} +% \end{macrocode} +% +% First we define access to the low opening double quote and +% guillemets for quotations, +% \changes{finnish-1.3k}{1997/04/03}{Removed empty groups after +% double quote and guillemot characters} +% \changes{finnish-1.3m}{1999/04/13}{Added misisng closing brace} +% \begin{macrocode} +\declare@shorthand{finnish}{"`}{% + \textormath{\quotedblbase}{\mbox{\quotedblbase}}} +\declare@shorthand{finnish}{"'}{% + \textormath{\textquotedblright}{\mbox{\textquotedblright}}} +\declare@shorthand{finnish}{"<}{% + \textormath{\guillemotleft}{\mbox{\guillemotleft}}} +\declare@shorthand{finnish}{">}{% + \textormath{\guillemotright}{\mbox{\guillemotright}}} +% \end{macrocode} +% then we define two shorthands to be able to specify hyphenation +% breakpoints that behave a little different from |\-|. +% \changes{finnish-1.3p}{2001/11/13}{\texttt{"=} should also use +% \cs{bbl@allowhyphens}} +% \begin{macrocode} +\declare@shorthand{finnish}{"-}{\nobreak-\bbl@allowhyphens} +\declare@shorthand{finnish}{""}{\hskip\z@skip} +\declare@shorthand{finnish}{"=}{\hbox{-}\bbl@allowhyphens} +% \end{macrocode} +% And we want to have a shorthand for disabling a ligature. +% \begin{macrocode} +\declare@shorthand{finnish}{"|}{% + \textormath{\discretionary{-}{}{\kern.03em}}{}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\-} +% +% All that is left now is the redefinition of |\-|. The new version +% of |\-| should indicate an extra hyphenation position, while +% allowing other hyphenation positions to be generated +% automatically. The standard behaviour of \TeX\ in this respect is +% very unfortunate for languages such as Dutch, Finnish and German, +% where long compound words are quite normal and all one needs is a +% means to indicate an extra hyphenation position on top of the +% ones that \TeX\ can generate from the hyphenation patterns. +% \changes{finnish-1.3g}{1995/07/02}{Added change of \cs{-}} +% \changes{finnish-1.3n}{2000/09/19}{\cs{allowhyphens} should have +% been \cs{bbl@allowhyphens}} +% \begin{macrocode} +\addto\extrasfinnish{\babel@save\-} +\addto\extrasfinnish{\def\-{\bbl@allowhyphens + \discretionary{-}{}{}\bbl@allowhyphens}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\finishhyphenmins} +% The finnish hyphenation patterns can be used with |\lefthyphenmin| +% set to~2 and |\righthyphenmin| set to~2. +% \changes{finnish-1.3f}{1995/05/13}{use \cs{finnishhyphenmins} to +% store the correct values} +% \changes{finnish-1.3n}{2000/09/22}{Now use \cs{providehyphenmins} to +% provide a default value} +% \begin{macrocode} +\providehyphenmins{\CurrentOption}{\tw@\tw@} +% \end{macrocode} +% \end{macro} +% +% The macro |\ldf@finish| takes care of looking for a +% configuration file, setting the main language to be switched on +% at |\begin{document}| and resetting the category code of +% \texttt{@} to its original value. +% \changes{finnish-1.3i}{1996/11/02}{Now use \cs{ldf@finish} to wrap up} +% \begin{macrocode} +\ldf@finish{finnish} +% +% \end{macrocode} +% +% \Finale +%% +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +%% +\endinput + diff --git a/Master/texmf-dist/source/generic/babel/finnish.ins b/Master/texmf-dist/source/generic/babel/finnish.ins new file mode 100644 index 00000000000..370fbf37b29 --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/finnish.ins @@ -0,0 +1,148 @@ +%% +%% This file will generate fast loadable files and documentation +%% driver files from the doc files in this package when run through +%% LaTeX or TeX. +%% +%% Copyright 1989-2005 Johannes L. Braams and any individual authors +%% listed elsewhere in this file. All rights reserved. +%% +%% This file is part of the Babel system. +%% -------------------------------------- +%% +%% It 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 +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% The Current Maintainer of this work is Johannes Braams. +%% +%% The list of all files belonging to the LaTeX base distribution is +%% given in the file `manifest.bbl. See also `legal.bbl' 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. +%% +%% --------------- start of docstrip commands ------------------ +%% +\def\filedate{1999/04/11} +\def\batchfile{finnish.ins} +\input docstrip.tex + +{\ifx\generate\undefined +\Msg{**********************************************} +\Msg{*} +\Msg{* This installation requires docstrip} +\Msg{* version 2.3c or later.} +\Msg{*} +\Msg{* An older version of docstrip has been input} +\Msg{*} +\Msg{**********************************************} +\errhelp{Move or rename old docstrip.tex.} +\errmessage{Old docstrip in input path} +\batchmode +\csname @@end\endcsname +\fi} + +\declarepreamble\mainpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl 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. +\endpreamble + +\declarepreamble\fdpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl for additional +information. + +In particular, permission is granted to customize the declarations in +this file to serve the needs of your installation. + +However, NO PERMISSION is granted to distribute a modified version +of this file under its original name. + +\endpreamble + +\keepsilent + +\usedir{tex/generic/babel} + +\usepreamble\mainpreamble +\generate{\file{finnish.ldf}{\from{finnish.dtx}{code}} + } +\usepreamble\fdpreamble + +\ifToplevel{ +\Msg{***********************************************************} +\Msg{*} +\Msg{* To finish the installation you have to move the following} +\Msg{* files into a directory searched by TeX:} +\Msg{*} +\Msg{* \space\space All *.def, *.fd, *.ldf, *.sty} +\Msg{*} +\Msg{* To produce the documentation run the files ending with} +\Msg{* '.dtx' and `.fdd' through LaTeX.} +\Msg{*} +\Msg{* Happy TeXing} +\Msg{***********************************************************} +} + +\endinput diff --git a/Master/texmf-dist/source/generic/babel/frenchb.dtx b/Master/texmf-dist/source/generic/babel/frenchb.dtx new file mode 100644 index 00000000000..279ee712f9b --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/frenchb.dtx @@ -0,0 +1,2477 @@ +% \iffalse meta-comment +% +% Copyright 1989-2005 Johannes L. Braams and any individual authors +% listed elsewhere in this file. All rights reserved. +% +% This file is part of the Babel system. +% -------------------------------------- +% +% It 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 +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2003/12/01 or later. +% +% This work has the LPPL maintenance status "maintained". +% +% The Current Maintainer of this work is Johannes Braams. +% +% The list of all files belonging to the Babel system is +% given in the file `manifest.bbl. See also `legal.bbl' 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 +% \CheckSum{1985} +% +% \iffalse +% Tell the \LaTeX\ system who we are and write an entry on the +% transcript. Nothing to write to the .cfg file, if generated. +%<*dtx> +\ProvidesFile{frenchb.dtx} +% +%\ProvidesLanguage{french} +%\ProvidesFile{frenchb.dtx} +%<*!cfg> + [2005/02/06 v1.6g French support from the babel system] +% +%<*cfg> +%% frenchb.cfg: configuration file for frenchb.ldf +%% Daniel Flipo Daniel.Flipo at univ-lille1.fr +% +%% File `frenchb.dtx' +%% Babel package for LaTeX version 2e +%% Copyright (C) 1989 - 2005 +%% by Johannes Braams, TeXniek +% +%<*!cfg> +%% Frenchb language Definition File +%% Copyright (C) 1989 - 2005 +%% by Johannes Braams, TeXniek +%% Daniel Flipo, GUTenberg +% +%% Please report errors to: Daniel Flipo, GUTenberg +%% Daniel.Flipo at univ-lille1.fr +% +% +% This file is part of the babel system, it provides the source +% code for the French language definition file. +% For differences with francais.sty (author J. Braams) and with +% french.sty (author B. Gaulle), see documentation printed by +% |latex frenchb.dtx|. +% +%<*filedriver> +\documentclass[a4paper]{ltxdoc} +\newcommand*\TeXhax{\TeX hax} +\newcommand*\babel{\textsf{babel}} +\newcommand*\langvar{$\langle \mathit lang \rangle$} +\newcommand*\note[1]{} +\newcommand*\Lopt[1]{\textsf{#1}} +\newcommand*\file[1]{\texttt{#1}} +\begin{document} +\parindent = 0pt +\begin{center} + \textbf{\Large A Babel language definition file for French}\\[3mm]^^A\] + Daniel \textsc{Flipo}\\ + \texttt{Daniel.Flipo@univ-lille1.fr} +\end{center} + \DocInput{frenchb.dtx} +\end{document} +% +%\fi +% \GetFileInfo{frenchb.dtx} +% +% \changes{frenchb-1.1}{1995/12/23}{Added a hook to insert space or +% not before `double punctuation'.} +% +% \changes{frenchb-1.1b}{1996/08/07}{Replaced \cs{undefined} with +% \cs{@undefined} and \cs{empty} with \cs{@empty} for consistency +% with \LaTeX} +% +% \changes{frenchb-1.1b}{1996/10/10}{Moved the definition of +% \cs{atcatcode} right to the beginning.} +% +% \changes{frenchb-1.3f}{1999/04/11}{Deleted sectioning command +% \cs{section}\{About French Typography\}.} +% +% \section{The French language} +% +% The file \file{\filename}\footnote{The file described in this +% section has version number \fileversion\ and was last revised on +% \filedate.}, derived from \file{frenchy.sty}, defines all +% the language definition macros for the French language. +% +% Customization for the French language is achieved following the +% book ``Lexique des r\`egles typographiques en usage \`a +% l'Imprimerie nationale'' troisi\`eme \'edition (1994), +% ISBN-2-11-081075-0. +% +% This file has been designed to be used with \LaTeXe, \LaTeX-2.09 +% and Plain\TeX{} formats. If you are still using \LaTeX-2.09, you +% \emph{should} consider switching to \LaTeXe! +% +% The command |\selectlanguage{french}| switches to the French +% language% +% \footnote{\texttt{\textbackslash selectlanguage\{francais\}} +% and \texttt{\textbackslash selectlanguage\{frenchb\}} are kept +% for backward compatibility but should no longer be used.}, +% with the following effects: +% \begin{enumerate} +% \item French hyphenation patterns are made active; +% \item `double punctuation' is made active for correct spacing +% in French; +% \item |\today| prints the date in French; +% \item the caption names are translated into French +% (\LaTeX{} only); +% \item the default items in itemize environment are set to `--' +% instead of \textbullet, and all vertical spacing and glue +% is deleted, a hook to reset standard \LaTeX{} spacing +% is provided (|\FrenchItemizeSpacingfalse|); +% it is possible to change `--' to something else (`---' +% for instance) by redefining |\FrenchLabelItem|; +% apart from the global hook |\FrenchLabelItem|, it is +% also possible to change the `labelitems' at any level +% (1 to 4) in French, using the standard \LaTeX{} syntax, +% for instance: |\renewcommand{\labelitemii}{\textbullet}|; +% in order to be effective in French, the redefinitions +% have to be made when French is the current language +% (i.e.\ \emph{after} the |\begin{document}|), the changes are +% saved when switching to another language and will be +% remembered of, when switching back to French; +% \item vertical spacing in general \LaTeX{} lists is +% shortened, a hook to reset standard \LaTeX{} settings +% is provided (|\FrenchListSpacingfalse|) ; +% \item the first paragraph of each section is indented +% (\LaTeX{} only); +% \item the space after |\dots| is removed in French. +% \end{enumerate} +% +% Some commands are provided in |frenchb| to make typesetting +% easier: +% \begin{enumerate} +% \item French quotation marks can be entered using the commands +% |\og| and |\fg| which work in \LaTeXe, \LaTeX-2.09 and +% Plain\TeX{}, their appearance depending on what is +% available to draw them; if you use \LaTeXe{} \emph{and} +% |T1|-encoding you can also enter them as +% |<<~French quotation marks~>>| but then +% \emph{don't forget} the unbreakable spaces, (|\og| and +% |\fg| provide for correct line breaks and better +% horizontal spacing). +% |\og| and |\fg| can be used outside French, they provide +% then English quotes `` and ''. +% \item A command |\up| is provided to typeset superscripts like +% |M\up{me}| (abbreviation for ``Madame''), |1\up{er}| (for +% ``premier''). +% \item Family names should be typeset in small capitals and never +% be hyphenated, the macro |\bsc| (boxed small caps) does +% this, e.g., |Leslie~\bsc{Lamport}| will produce +% Leslie~\mbox{\textsc{Lamport}}. +% \item Commands |\primo|, |\secundo|, |\tertio| and |\quarto| +% may be used to enumerate in lists. +% \item Abbreviations for ``Num\'ero'' and ``num\'ero'' are +% obtained via the commands |\No|, |\no|. +% \item Two commands are provided to typeset the symbol for +% ``degr\'e'': |\degre| prints the raw character and +% |\degres| should be used to typeset temperatures (e.g., +% ``|20~\degres C|'' with an unbreakable space), or for +% alcohols' strengths (e.g., ``|45\degres|'' with \emph{no} +% space in French). +% \item In math mode the comma has to be surrounded with +% braces to avoid a spurious space being inserted after it, +% in decimal numbers for instance (see the \TeX{}book p.~134). +% The command |\DecimalMathComma| makes the comma be an +% ordinary character \emph{in French only} (no space added); +% as a counterpart, if |\DecimalMathComma| is active, an +% explicit space has to be added in lists and intervals: +% |$[0,\ 1]$|, |$(x,\ y)$|. |\StandardMathComma| switches back +% to the standard behaviour of the comma. +% \item A command |\nombre| is provided to easily typeset numbers: +% it works both in text and in math mode: inputting +% |\nombre{3141,592653}| will format this number properly +% according to the current language (French or non-French): +% each slice of three digits will be separated either with +% a comma in English or with a space in French (if you prefer +% a thin space instead of a normal space, just add the command +% |\ThinSpaceInFrenchNumbers| to the preamble of your document, +% or to |frenchb.cfg|). +% The command |\nombre| is a contribution of Vincent Jalby +% using ideas of David Carlisle in comma.sty. +% \item |frenchb| has been designed to take advantage of the |xspace| +% package if present: adding |\usepackage{xspace}| in the +% preamble will force macros like |\fg|, |\ier|, |\ieme|, +% |\dots|, \dots, to respect the spaces you type after them, +% for instance typing `|1\ier juin|' will print +% `1\textsuperscript{er} juin' (no need for a forced space +% after |1\ier|). +% \item Two commands, |\FrenchLayout| and |\StandardLayout| (to be +% used \emph{only in the preamble}) are provided to unify the +% layout of multilingual documents (it mainly concerns lists) +% regardless the current language (see section~\ref{sec-global} +% for details). +% \item Two commands |\AddThinSpaceBeforeFootnotes| and +% |\FrenchFootnotes| enable to customize the layout of +% footnotes following the French IN's specifications; +% the first one, which can only be used \emph{before} the +% |\begin{document}|, adds a thinspace in the running text +% before the number or symbol calling the footnote; the +% second one modifies the footnote's layout: it typesets +% leading numbers as `1.\hspace{.5em}' instead of +% `$\hbox{}^1$'. |\FrenchFootnotes| has no effect on footnotes +% numbered with symbols (as in the |\thanks| command). +% +% None of these commands are active by default, both can +% be best added to |frenchb.cfg| or to the preamble of the +% document. |\FrenchFootnotes| and |\StandardFootnotes|, +% which cancels the effect of |\FrenchFootnotes| for the +% text coming next, can be used anywhere in the document. +% The command |\StandardFootnotes| may be useful when +% some footnotes are numbered with letters (inside minipages +% for instance). +% +% |\AddThinSpaceBeforeFootnotes| and |\FrenchFootnotes| act +% on \emph{all} footnotes whatever the current language is. +% \end{enumerate} +% +% \vspace{\baselineskip} +% All commands previously available in |francais.ldf| have been +% included in |frenchb.ldf| for compatibility, sometimes with +% updated definitions. +% +% The |french| package, by Bernard~\textsc{Gaulle}, was not +% designed to run with \babel\ (although the latest versions claim +% to be \babel\ compatible), but rather as a stand-alone package +% for the French language. +% It provides many more functionalities (like |\lettrine|, +% |\sommaire|\dots) not available in |frenchb|, +% at the cost of a much greater complexity and possible +% incompatibilities with other languages. +% +% As |french| is known to produce the best layout available for +% French typography, I have borrowed many ideas from Bernard's file. +% I did my best to help users of both packages (|french| and +% |frenchb|) to exchange their sources files easily (see the example +% configuration file below in section~\ref{sec-cfg}), with one +% exception which affects the way French quotation marks are +% entered: |frenchb| uses \emph{macros} (|\og| and |\fg|) while +% |french| uses active characters (|<<| and |>>|). +% +% \vspace{\baselineskip} +% French typographic rules specify that some white space should be +% present before `double punctuation' characters. These characters +% are |;| |!| |?| and |:|. +% In order to get this white space automatically, the category code +% of these characters is made |\active|. In French, the user +% \emph{should} input these four characters preceded with a space, +% but as many people forget about it (even among native French +% writers!), the default behaviour of |frenchb| is to automatically +% add a |\thinspace| before `|;|' `|!|' `|?|' and a normal +% (unbreakable) space before~`|:|' (this is the rule in French +% typography). It's up to the user to add or not a space +% \emph{after} `double punctuation' characters: usually a space is +% necessary, but not always (before a full point or a closing brace +% for instance), so this cannot done automatically. +% +% In (rare) cases where no space should be added before a `double +% punctuation', either use |\string;| |\string:| |\string!| +% |\string?| instead of |;| |:| |!| |?|, or switch locally to +% English. For instance you can type |C\string:TEX| or +% |\begin{otherlanguage}{english}{C:TEX}\end{otherlanguage}| to +% avoid the space before~|:| in a MS-DOS path. +% +% Some users dislike this automatic insertion of a space before +% `double punctuation', and prefer to decide themselves whether a +% space should be added or not; so a hook |\NoAutoSpaceBeforeFDP| +% is provided: if this command is added (in file |frenchb.cfg|, or +% anywhere in a document) |frenchb| will respect your typing, and +% introduce a suitable space before `double punctuation' \emph{if +% and only if} a space is typed in the source file before those +% signs. +% +% The command |\AutoSpaceBeforeFDP| switches back to the +% default behaviour of |frenchb|. +% +% \vspace{\baselineskip} +% Once you have built your format, a good precaution would be to +% perform some basic tests about hyphenation in French. For +% \LaTeXe{} I suggest this: +% \begin{itemize} +% \item run the following file, with the encoding suitable for +% your machine (\textit{my-encoding} will be |latin1| for +% \textsc{unix} machines and PCs running~Windows, |applemac| +% for Macintoshs, or |cp850| for PCs running~DOS). \\[3mm]^^A\] +% |%%% Test file for French hyphenation.|\\ +% |\documentclass{article}|\\ +% |\usepackage[|\textit{my-encoding}|]{inputenc}|\\ +% |\usepackage[T1]{fontenc} % Use EC fonts for French|\\ +% |%\usepackage{aeguill} % Uncomment this line and|\\ +% | % comment out the preceeding one|\\ +% | % to use AE virtual fonts.|\\ +% |\usepackage[francais]{babel}|\\ +% |\begin{document}|\\ +% |\showhyphens{signal container \'ev\'enement alg\`ebre}|\\ +% |\showhyphens{|\texttt{signal container \'ev\'enement +% alg\`ebre}|}|\\ +% |\end{document}| +% \item check the hyphenations proposed by \TeX{} in your log-file; +% in French you should get with both 7-bit and 8-bit encodings\\ +% \texttt{si-gnal contai-ner \'ev\'e-ne-ment al-g\`ebre}.\\ +% Do not care about how accented characters are displayed in the +% log-file, what matters is the position of the `|-|' hyphen +% signs \emph{only}. +% \end{itemize} +% If they are all correct, your installation (probably) works fine, +% if one (or more) is (are) wrong, ask a local wizard to see what's +% going wrong and perform the test again (or e-mail me about what +% happens).\\ +% Frequent mismatches: +% \begin{itemize} +% \item you get |sig-nal con-tainer|, this probably means that the +% hyphenation patterns you are using are for US-English, not for +% French; +% \item you get no hyphen at all in \texttt{\'ev\'e-ne-ment}, this +% probably means that you are using CM fonts and the macro +% |\accent| to produce accented characters. +% Using EC fonts with built-in accented characters or Ml\TeX{} +% with CM fonts avoids this type of mismatch. +% \end{itemize} +% +% \vspace{\baselineskip} +% |frenchb| has been improved using helpful suggestions from many +% people, the main contributions came from Vincent~Jalby. +% Thanks to all of them! +% +% \subsection*{Changes} +% +% First version released: 1.1 as of 1996/05/31 part of +% \babel-3.6beta. +% +% \textbf{Changes in version 1.1b}: update for \babel-3.6. +% +% \textbf{Changes in version 1.2}: new command |\nombre| to +% format numbers; removed command |\fup| borrowed from the +% |french| package (|\up| does a better job in \LaTeXe); +% also removed aliases |\french| and |\english| (frenchb.cfg +% is a better place for these). +% +% \textbf{Changes in version 1.3}: +% \begin{itemize} +% \item The `xspace' package, when present, now controls +% spacing after all (sensible) macros, formerly `xspace' +% worked on |\fg| (suggested by Vincent~Jalby); +% \item spacing after opening and before closing guillemets +% improved as suggested by Thierry~Bouche; +% \item a replacement for poor looking guillemets in OT1 encoding +% (\emph{math} fonts are used to emulate them) is provided +% if the file |ot2wncyr.fd| is found: this file defines an +% OT2 encoding using AMS Cyrillic fonts; these +% have built-in guillemets, they are \emph{text} fonts, +% are free, and are distributed as METAFONT and Type1 fonts +% (good for pdftex!), the replacement was suggested by +% G\'erard~Degrez; if the files |ot2wncyr.fd|, |wncy*.mf|, +% |wncy*.tfm|, and |wncy*.pfb| aren't available on your +% system, you \emph{should} get them from \mbox{CTAN}; +% if your system complains about missing |wncy*.tfm| fonts, +% it means your \TeX{} system is \emph{incomplete}, as a +% quick fix, you can either remove |ot2wncyr.fd| or add the +% command |\LasyGuillemets| to the preamble of your document +% or to |frenchb.cfg|, then |frenchb| will behave as it did +% in the previous versions.\\ +% In case Cyrillic guillemets do not fit, it is possible +% to pick French guillemets from any font using the +% command |\FrenchGuillemetsFrom| which requires 4 arguments +% |\FrenchGuillemetsFrom{|{\it coding}|}{|{\it font}\relax +% |}{|{\it char-left}|}{|{\it char-right}|}|, for instance, +% add |\FrenchGuillemetsFrom{T1}{ppl}{19}{20}| to the +% preamble of your document or to |frenchb.cfg|, to pick +% French guillemets from Palatino (fontname=ppl, char 19 +% and 20 are left and right guillemets in T1-encoding). +% This was suggested by Michel~Bovani. +% \item the environment `itemize' has been redesigned in French +% according to specifications from Jacques~Andr\'e +% and Thierry~Bouche; it is possible to switch back to the +% settings of version~1.2: add |\FrenchItemizeSpacingfalse| +% \emph{after} loading |frenchb| in the preamble (this can +% be useful to process old documents); +% \item two switches have been added to go back to standard +% \LaTeX{} list spacing |\FrenchItemizeSpacingfalse| +% and |\FrenchListSpacingfalse|; +% \item |\nombre| now properly handles signs in \LaTeXe; +% \item definition of |\dots| changed in French; +% \item in French, with the standard \LaTeX{} classes, captions +% in figures and tables are printed with an endash instead +% of a colon. +% \end{itemize} +% +% \textbf{Changes in version 1.4}: +% \begin{itemize} +% \item the redefinition of|\@makecaption| is changed not to +% overwrite the changes made by some classes (koma-script, +% amsart, ua-thesis\dots) as pointed out by Werner~Lemberg; +% \item a hook, |\FrenchGuillemetsFrom|, is provided to pick +% French guillemets from any font (suggested by +% Michel~Bovani, works \emph{only} in OT1-encoding); +% \item a hook, |\FrenchLabelItem|, is provided to enable marks +% other than `--' (|\textendash|) in French lists +% (also suggested by Michel~Bovani); +% \item |\DecimalMathComma|, |\StandardMathComma|, +% |\ThinSpaceInFrenchNumbers| added; +% \item |\FrenchLayout| and |\StandardLayout| added; +% \item an example of customization file |frenchb.cfg| is +% included in |frenchb.dtx|. +% \end{itemize} +% +% \textbf{Changes in version 1.5}: +% \begin{itemize} +% \item The settings for spacing in French lists are no longer +% tuned at the |\@trivlist| level but within |\list|; this +% enables the users to provide their own settings for the +% lists they define with |\list| (suggested by P. Pichaureau). +% Although the layout of the standard lists +% \emph{has not changed}, some lists, based directly on +% |\@trivlist| or |\trivlist|, could possibly be typeset +% differently when upgrading from version 1.4 to 1.5. +% The command |\FrenchOldTrivlisttrue| could then, be useful +% to process older documents. +% \item Apart from the global hook |\FrenchLabelItem|, it is +% now also possible to change the `labelitems' at any level +% (1 to 4) in French, using the standard \LaTeX{} syntax, +% for instance: |\renewcommand{\labelitemii}{\textbullet}|. +% \item The internal name for the French language has been +% changed from |frenchb| to |french|, it means that +% |\captionsfrench|, |\datefrench|, |\extrasfrench|, +% |\noextrasfrench|, are to be used now instead of +% |\captionsfrenchb|, |\datefrenchb|, |\extrasfrenchb|, +% |\noextrasfrenchb|. +% \item From version 1.5f on, it is possible to customize +% the space inserted before a colon in French; its default +% value is |\space| (as in previous versions of |frenchb|), +% but it can now be changed to |\thinspace| by redefining +% |\Fcolonspace|. +% \end{itemize} +% +% \textbf{Changes in version 1.6}: +% \begin{itemize} +% \item Two new commands are provided: +% |\AddThinSpaceBeforeFootnotes| and |\FrenchFootnotes|; +% they enable to typeset footnotes according to the +% French IN's specifications (suggested by Jacques~Andr\'e). +% \item |frenchb| will make use of |\textdegree| (TS1 encoding) +% to typeset degrees whenever possible. +% \item Default guillemets have been changed \emph{in OT1 +% encoding only} in version~1.6c: the former ones were picked +% up in the wncyr fonts, which forced the cyrillic encoding to +% OT2 when \babel{} was loaded with option |frenchb| before a +% cyrillic language (|russian|, |ukrainian| or |bulgarian|). +% Now, LM fonts for T1-encoding are available, we pick up the +% guillemets from them, for OT1-encoding. +% \item The config file |frenchb.cfg| is now loaded only when +% \LaTeXe{} is used (from version~1.6g). +% \item The command |\degres| now works also in math mode (from +% version~1.6g), but not in bold versions (it is a text +% character basically). +% \end{itemize} +% +% \StopEventually{} +% +% \subsection*{Customizing frenchb: an example of configuration file} +% \label{sec-cfg} +% +% \changes{frenchb-1.4d}{1999/12/19}{Do NOT set catcodes of French +% quotes to 12 before launching \cs{initiate@active@char} in +% frenchb.cfg, (problem on Mac reported by M.Bovani).} +% +% \begin{macrocode} +%<*cfg> +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% If you want to customize frenchb, please DO NOT hack into the code, +%% copy this file into a directory searched by TeX, preferably a +%% personal one on multi-user systems, and customize it as you like. +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% WARNING: If you exchange your documents with colleagues using +%% a different TeX installation, it is best NOT TO HAVE a frenchb.cfg +%% file, and add instead the customization commands to the preamble +%% of your documents after babel and frenchb have been loaded. +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% +%% Uncomment the following line if you dislike frenchb automatically +%% adding a space before French double punctuation (see frenchb.dtx +%% for more information). +%% +%%\NoAutoSpaceBeforeFDP +%% +%% frenchb inserts a normal space before a colon in French (following +%% I.N. specifications), but some people prefer a thinspace instead; +%% uncomment the following line if you prefer a thinspace. +%% +%%\renewcommand{\Fcolonspace}{\thinspace} +%% +%% Uncomment the following line to force lasy font emulation for +%% French guillemets in OT1 encoding; Polish guillemets are +%% FAR BETTER LOOKING, you should normally leave this line commented out. +%% +%%\LasyGuillemets +%% +%% The following option is for backward compatibility ONLY +%% (it might conflict with the russian option of babel). +%% Uncomment the following line if you want to get back to +%% the default guillemets used in versions $<$ 1.6b for OT1-encoding +%% (no effect in T1-encoding). +%% +%%\CyrillicGuillemets +%% +%% If you dislike Polish guillemets in OT1-encoding, you can easily +%% pick up yours from other fonts, examples below: Palatino or +%% cyrillic CMR T2A encoded font. +%% The four arguments are: encoding, font name, character codes of +%% the opening and closing guillemets in the selected font. +%% +%%\FrenchGuillemetsFrom{T1}{ppl}{19}{20} +%%\FrenchGuillemetsFrom{T2A}{cmr}{190}{191} +%% +%% Uncomment the following line if you don't want frenchb to change +%% LaTeX standard settings for vertical spacing in 'itemize' lists. +%% LaTeX standard settings were used by frenchb in versions < 1.3, +%% so you may want to uncomment the following line to process older +%% documents. +%% +%%\FrenchItemizeSpacingfalse +%% +%% frenchb tunes vertical spaces in all lists (at \list level), +%% uncomment the following line if you prefer LaTeX standard settings +%% (this flag is new in version 1.3). When \ifFrenchItemizeSpacing is +%% `true' (default setting), this flag has no effect on itemize lists. +%% +%%\FrenchListSpacingfalse +%% +%% The command \FrenchLabelItem can be used to set the `labelitems' +%% for all levels in French. For instance, to get long dashes, use: +%% +%%\renewcommand{\FrenchLabelItem}{\textemdash} +%% +%% You can also have different `labelitems' for each level in French: +%% +%%\renewcommand{\Frlabelitemi}{\textemdash} +%%\renewcommand{\Frlabelitemii}{\bfseries\textendash} +%%\renewcommand{\Frlabelitemiii}{\textbullet} +%%\renewcommand{\Frlabelitemiv}{} +%% +%% Uncomment the following line if you want a thinspace to be added +%% in the running text before the footnote number or symbol. +%% +%%\AddThinSpaceBeforeFootnotes +%% +%% Uncomment the following line if you want footnotes to be typeset +%% according the specifications of the French `Imprimerie Nationale'. +%% +%%\FrenchFootnotes +%% +%% Uncomment the following line if you want the command \nombre to +%% insert thin spaces (1/6em) instead of normal spaces (0.3em) +%% between slices of 3 digits when typesetting numbers in French. +%% +%%\ThinSpaceInFrenchNumbers +%% +%% If you are bored to type {,} every time you want a decimal comma in +%% math mode, uncomment the following line (and don't forget to add a +%% forced space after the comma in lists and intervals: $(x,\ y)$ and +%% $[0,\ 1]$). I suggest NOT TO UNCOMMENT the following line, +%% and to switch between the decimal comma and the standard comma +%% using \DecimalMathComma and \StandardMathComma inside the document. +%% +%%\DecimalMathComma +%% +%% If you do not want the appearance of lists to depend on the current +%% language, add ONE of these two commands: \FrenchLayout (for a +%% document mainly in French) or \StandardLayout (for a document +%% mainly in English). +%% +%%\FrenchLayout +%%\StandardLayout +%% +%% With the standard LaTeX classes (article.cls, report.cls, book.cls) +%% you can change the separator used in figure and table captions in +%% French with \CaptionSeparator, for instance (the default value of +%% \CaptionSeparator in French is '\space\textendash\space'): +%% +%%\addto\captionsfrench{\def\CaptionSeparator{\space\textemdash\space}} +%% +%% You might want to change some of the translations of caption names, +%% you can do it this way, for instance: +%% +%%\addto\captionsfrench{\def\figurename{{\scshape Figure}}} +%%\addto\captionsfrench{\def\tablename{{\scshape Table}}} +%%\addto\captionsfrench{\def\proofname{Preuve}} +%% +%% If French guillemets are available on your keyboard, you can use +%% them instead of the commands \og and \fg: REPLACE << and >> in +%% the following code by your ready-made guillemets (2 occurrences +%% for each) AND uncomment the resulting code. +%% WARNINGS: +%% 1) This will reduce the portability of your source files! +%% 2) This adds two active characters. +%% 3) If you add this stuff to the preamble of a document, you'll +%% need to wrap it in \makeatletter ... \makeatother. +%% +%% \ifx\mule@def\undefined +%% \initiate@active@char{<<} +%% \initiate@active@char{>>} +%% \AtBeginDocument{% +%% \def<<{\og\ignorespaces}% +%% \def>>{{\fg}}% +%% }% +%% \else %%% For the CJK package, see MULEenc.sty. +%% \mule@def{11}{\og\ignorespaces} +%% \mule@def{27}{{\fg}} +%% \fi +%% +%% The rest is for compatibility with Bernard Gaulle's french.sty: +%% if you want to typeset with babel/frenchb files originally written +%% for french.sty, you will probably want to uncomment these lines. +%% +%% Uncomment these lines if you want the aliases \numero and \Numero +%% (as in french.sty) for \no and \No. +%% +%%\let\numero=\no +%%\let\Numero=\No +%% +%% Uncomment the following lines if you want to substitute `\bsc' to +%% either (or both) of french.sty macros `\fsc' and `\lsc'. +%% +%%\let\fsc=\bsc +%%\let\lsc=\bsc +%% +%% Uncomment the following line if you want to substitute `\up' to +%% french.sty macro `\fup'. +%% +%%\let\fup=\up +%% +%% Uncomment the following lines if you intend to use commands \french +%% and \english to switch between languages, as in french.sty. +%% +%%\def\french{\leavevmode\selectlanguage{french}} +%%\def\english{\leavevmode\selectlanguage{english}} +%% +%% Uncomment the following lines if you intend to use the command +%% \AllTeX to refer to all flavours of TeX, (this command has been +%% made popular by french.sty). +%% +%%\newcommand*{\AllTeX}{% +%% (L\kern-.36em\raise.3ex\hbox{\sc a}\kern-.15em)% +%% T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX} +% +% \end{macrocode} +% +% \section{\TeX{}nical details} +% +% \subsection{Initial setup} +% +% The macro |\LdfInit| takes care of preventing that this file is +% loaded more than once, checking the category code of the +% \texttt{@} sign, etc. +% +% \changes{frenchb-1.1b}{1996/11/02}{Now use \cs{LdfInit} to perform +% initial checks} +% +% \changes{frenchb-1.5g}{2001/09/09}{Let \cs{LdfInit} check for +% \cs{datefrench} instead of \cs{NoAutoSpaceBeforeFDP}, +% as the later is also defined by russianb.ldf!} +% +% \begin{macrocode} +%<*code> +%% +\LdfInit\CurrentOption\datefrench +% \end{macrocode} +% +% \begin{macro}{\ifLaTeX} +% \begin{macro}{\ifLaTeXe} +% \changes{frenchb-1.1}{1996/02/12}{Use \cs{fmtname} to check +% the format instead of \cs{newcommand}; define \cs{PlainFmtName} +% and \cs{LaTeXeFmtName}.} +% +% \changes{frenchb-1.3f}{1999/04/11}{Use \cs{magnification} to check +% if the format is plain (i.e \emph{not} \LaTeX). Checking the +% format's name was not reliable: plain-like formats may not be +% called just `plain' but `babel-plain'.} +% +% To check the format in use (plain, \LaTeX{} or \LaTeXe), +% we'll need two new `if'. +% \begin{macrocode} +\newif\ifLaTeX +\ifx\magnification\@undefined\LaTeXtrue\fi +\newif\ifLaTeXe +\ifx\@compatibilitytrue\@undefined\else\LaTeXetrue\fi +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\if@Two@E} +% \changes{frenchb-1.1}{1996/03/01}{New test \cs{if@Two@E}.} +% +% We will need another `if' : |\if@Two@E| is true if and only if +% \LaTeXe{} is running \emph{not} in compatibility mode. It is +% used in the definitions of the command |\nombre| and |\up|. +% The definition is somewhat complicated, due to the fact that +% |\if@compatibility| is not recognized as a |\if| in +% \LaTeX-2.09 based formats. +% \begin{macrocode} +\newif\if@Two@E \@Two@Etrue +\def\@FI@{\fi} +\ifx\@compatibilitytrue\@undefined + \@Two@Efalse \def\@FI@{\relax} +\else + \if@compatibility \@Two@Efalse \fi +\@FI@ +% \end{macrocode} +% \end{macro} +% +% \changes{frenchb-1.1b}{1996/11/07}{Removed test for \cs{l@english}} +% +% \changes{frenchb-1.2}{1997/01/05}{Check for hyphenation patterns} +% +% Check if hyphenation patterns for the French language have been +% loaded in language.dat; we allow for the names `french', +% `francais', `canadien' or `acadian'. The latter two are both +% names used in Canada for variants of French that are in use in +% that country. +% +% \changes{frenchb-1.5b}{2001/02/09}{Added support for canadien and +% acadian} +% +% \begin{macrocode} +\ifx\l@french\@undefined + \ifx\l@francais\@undefined + \ifx\l@canadien\@undefined + \ifx\l@acadian\@undefined + \@nopatterns{French} + \adddialect\l@french0 + \else + \let\l@french\l@acadian + \fi + \else + \let\l@french\l@canadien + \fi + \else + \let\l@french\l@francais + \fi +\fi +% \end{macrocode} +% After the statement above |\l@french| is sure to always be +% defined. +% +% \changes{frenchb-1.2}{1997/01/05}{`french' `frenchb' and +% `francais' are synonymous regardless of \cs{CurrentOption}.} +% The internal name for the French language will be `french'; +% `francais' and `frenchb' will be synonymous for `french': +% first let both names use the same hyphenation patterns. +% Later we will have to set aliases for |\captionsfrench|, +% |\datefrench|, |\extrasfrench| and |\noextrasfrench|. +% As French uses the standard values of |\lefthyphenmin| (2) +% and |\righthyphenmin| (3), no special setting is required here. +% +% \changes{frenchb-1.5d}{2001/02/16}{The internal name for the +% French language is changed from `frenchb' to `french'.} +% +% \begin{macrocode} +\def\CurrentOption{french} +\ifx\l@francais\@undefined + \let\l@francais\l@french +\fi +\ifx\l@frenchb\@undefined + \let\l@frenchb\l@french +\fi +% \end{macrocode} +% When this language definition file was loaded for one of the +% Canadian versions of French we need to make sure that a suitable +% hyphenation pattern register will be found by \TeX. +% +% \changes{babel-1.5b}{2001/02/09}{Added support for canadien and +% acadian} +% +% \begin{macrocode} +\ifx\l@canadien\@undefined + \let\l@canadien\l@french +\fi +\ifx\l@acadian\@undefined + \let\l@acadian\l@french +\fi +% \end{macrocode} +% +% \changes{frenchb-1.5g}{2001/09/09}{Instead of issuing a warning when +% \cs{captionsfrancais} or \cs{captionsfrenchb} are customized in +% the preamble, we merge the changes into \cs{captionsfrench}.} +% +% This language definition can be loaded for different variants of +% the French language. The `key' \babel\ macros are only defined +% once, using `french' as the language name, but |frenchb| and +% |francais| are synonymous. As some users who choose |frenchb| +% or |francais| as option of \babel, might customize +% |\captionsfrenchb| or |\captionsfrancais| in the preamble, +% we merge their changes at the |\begin{document}| when they do so +% (only possible in \LaTeXe). +% The other three commands for |\date|, |\extras|, and |\noextras| +% are not likely to be modified by end-users. +% The other variants of languages are defined by checking if the +% relevant option was used and then adding one extra level of +% expansion. +% +% \changes{frenchb-1.6c}{2003/06/30}{Bug correction: it is necessary +% to re-execute \cs{captionsfrench} after merging +% \cs{captionsfrenchb} and \cs{captionsfrancais}.} +% +% \begin{macrocode} +\def\datefrancais{\datefrench} +\def\extrasfrancais{\extrasfrench} +\def\noextrasfrancais{\noextrasfrench} +\def\datefrenchb{\datefrench} +\def\extrasfrenchb{\extrasfrench} +\def\noextrasfrenchb{\noextrasfrench} +\ifLaTeXe + \AtBeginDocument{\let\captions@French\captionsfrench + \ifx\captionsfrenchb\@undefined + \let\captions@Frenchb\relax + \else + \let\captions@Frenchb\captionsfrenchb + \fi + \ifx\captionsfrancais\@undefined + \let\captions@Francais\relax + \else + \let\captions@Francais\captionsfrancais + \fi + \def\captionsfrench{\captions@French + \captions@Francais\captions@Frenchb}% + \def\captionsfrancais{\captionsfrench}% + \def\captionsfrenchb{\captionsfrench}% + \iflanguage{french}{\captionsfrench}{}% + } +\else + \def\captionsfrancais{\captionsfrench} + \def\captionsfrenchb{\captionsfrench} +\fi +\@ifpackagewith{babel}{canadien}{% + \def\captionscanadien{\captionsfrench}% + \def\datecanadien{\datefrench}% + \def\extrascanadien{\extrasfrench}% + \def\noextrascanadien{\noextrasfrench}% + }{} +\@ifpackagewith{babel}{acadian}{% + \def\captionsacadian{\captionsfrench}% + \def\dateacadian{\datefrench}% + \def\extrasacadian{\extrasfrench}% + \def\noextrasacadian{\noextrasfrench}% + }{} +% \end{macrocode} +% +% \begin{macro}{\extrasfrench} +% \begin{macro}{\noextrasfrench} +% The macro |\extrasfrench| will perform all the extra +% definitions needed for the French language. +% The macro |\noextrasfrench| is used to cancel the actions of +% |\extrasfrench|.\\ +% In French ``apostrophe'' is used in hyphenation in expressions +% like |l'ambulance| (French patterns provide entries for this kind +% of words). This means that the |\lccode| of ``apostrophe'' has +% to be non null in French for proper hyphenation of those +% expressions, and to be reset to null when exiting French. +% +% \changes{frenchb-1.2}{1997/01/05}{`french' `frenchb' and +% `francais' are synonymous regardless of \cs{CurrentOption}.} +% +% \begin{macrocode} +\@namedef{extras\CurrentOption}{\lccode`\'=`\'} +\@namedef{noextras\CurrentOption}{\lccode`\'=0} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \changes{frenchb-1.1}{1996/01/29}{Add some font changing +% definitions.} +% +% It is best to use \LaTeXe{}'s font changing commands, and to +% emulated those we need when they are not available, as in +% Plain\TeX{} or \LaTeX-2.09. Be aware that old commands |\sc|, +% |\it|, \textit{etc.} exist in \LaTeXe{}, but they behave like +% they did in \LaTeX-2.09 (i.\,e., they switch back to +% |\normalfont| instead of keeping the other font attributes +% unchanged). +% \begin{macrocode} +\ifx\scshape\@undefined + \ifx\sc\@undefined + \let\scshape\relax + \else + \let\scshape\sc + \fi +\fi +\ifx\emph\@undefined + \ifx\em\@undefined + \let\emph\relax + \else + \def\emph#1{\em #1} + \fi +\fi +% \end{macrocode} +% +% \subsection{Caption names} +% +% The next step consists of defining the French equivalents for +% the \LaTeX{} caption names. +% +% \changes{frenchb-1.3c}{1997/10/08}{changed \cs{@makecaption} +% definition to add a hook \cs{CaptionSeparator}.} +% +% In French, captions in figures and tables should be printed with +% endash (`--') instead of the standard `:'. If another separator +% is preferred, see in the example configuration file above +% (section~\ref{sec-cfg}) how to change the default value of +% |\CaptionSeparator|. +% +% \changes{frenchb-1.4a}{1999/10/23}{frenchb-1.3 silently redefined +% \cs{@makecaption}, overwriting changes made by some classes +% like koma-script, ua-thesis\dots (pointed out by Werner~Lemberg). +% New implementation suggested by Vincent~Jalby.} +% +% \changes{frenchb-1.4e}{2000/03/12}{Captions print twice with AMS +% classes (amsart, amsbook). Bug reported by Jean-Fran\c cois +% Mertens. Revert to implementation of version 1.4, which is +% safer as \@makecaption can be changed unpredictably.} +% +% We first store the standard definition of |\@makecaption| +% (e.g., the one provided in article.cls, report.cls, book.cls +% which is frozen for \LaTeXe{} according to Frank Mittelbach), +% in |\STD@makecaption|. `ATBeginDocument' we compare it to its +% current definition (some classes like koma-script classes, +% AMS classes, ua-thesis.cls\dots change it). +% If they are identical, frenchb just adds a hook called +% |\CaptionSeparator| to |\@makecaption|, |\CaptionSeparator| +% defaults to ': ' as in the standard |\@makecaption|, and will be +% changed to ' -- ' in French. +% If the definitions differ, frenchb doesn't overwrite the changes, +% but prints a message in the .log file. +% +% \changes{frenchb-1.4f}{2000/04/07}{Only issue a warning if +% \cs{@makecaption} exists} +% +% \begin{macrocode} +\ifLaTeXe + \long\def\STD@makecaption#1#2{% + \vskip\abovecaptionskip + \sbox\@tempboxa{#1: #2}% + \ifdim \wd\@tempboxa >\hsize + #1: #2\par + \else + \global \@minipagefalse + \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}% + \fi + \vskip\belowcaptionskip} + \def\CaptionSeparator{\string:\space} + \long\def\FB@makecaption#1#2{% + \vskip\abovecaptionskip + \sbox\@tempboxa{#1\CaptionSeparator #2}% + \ifdim \wd\@tempboxa >\hsize + #1\CaptionSeparator #2\par + \else + \global \@minipagefalse + \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}% + \fi + \vskip\belowcaptionskip} + \AtBeginDocument{% + \ifx\@makecaption\STD@makecaption + \let\@makecaption\FB@makecaption + \else + \ifx\@makecaption\@undefined\else + \PackageWarning{frenchb.ldf}% + {The definition of \protect\@makecaption\space + has been changed,\MessageBreak + frenchb will NOT customize it;\MessageBreak reported}% + \fi + \fi + \let\FB@makecaption\relax + \let\STD@makecaption\relax} + \expandafter\addto\csname noextras\CurrentOption\endcsname{% + \def\CaptionSeparator{\string:\space}} +\fi +% \end{macrocode} +% +% \begin{macro}{\captionsfrench} +% The macro |\captionsfrench| defines all strings used in the four +% standard document classes provided with \LaTeX. Some authors do +% not like some of these names; it is easy to change them in the +% preamble \emph{after} loading |frenchb| (or in your file +% |frenchb.cfg|), e.g +% |\addto\captionsfrench{\def\figurename{Figure}}| will print +% `Figure' in Roman instead of `\textsc{Fig.}'. +% +% \changes{frenchb-1.1}{1996/01/30}{This code is useless in Plain\TeX, +% check the format before loading it.} +% +% \changes{frenchb-1.2}{1997/01/05}{Added aliases \cs{captionsfrenchb} +% and \cs{captionsfrancais}.} +% +% \changes{frenchb-1.3c}{1997/10/08}{Added \cs{CaptionSeparator}.} +% +% \changes{frenchb-1.4a}{1999/10/23}{Changed `--' to +% \cs{textendash} in \cs{CaptionSeparator} in case the ligature +% doesn't exist (tt-fonts).} +% +% \changes{frenchb-1.4f}{2000/04/06}{Added \cs{glossaryname}} +% +% \begin{macrocode} +\ifLaTeX +\@namedef{captions\CurrentOption}{% + \def\refname{R\'ef\'erences}% + \def\abstractname{R\'esum\'e}% + \def\bibname{Bibliographie}% + \def\prefacename{Pr\'eface}% + \def\chaptername{Chapitre}% + \def\appendixname{Annexe}% + \def\contentsname{Table des mati\`eres}% + \def\listfigurename{Table des figures}% + \def\listtablename{Liste des tableaux}% + \def\indexname{Index}% + \def\figurename{{\scshape Fig.}}% + \def\tablename{{\scshape Tab.}}% + \def\CaptionSeparator{\space\textendash\space}% +% \end{macrocode} +% ``Premi\`ere partie'' instead of ``Part I'' +% \begin{macrocode} + \def\partname{\protect\@Fpt partie}% + \def\@Fpt{{\ifcase\value{part}\or Premi\`ere\or Deuxi\`eme\or + Troisi\`eme\or Quatri\`eme\or Cinqui\`eme\or Sixi\`eme\or + Septi\`eme\or Huiti\`eme\or Neuvi\`eme\or Dixi\`eme\or Onzi\`eme\or + Douzi\`eme\or Treizi\`eme\or Quatorzi\`eme\or Quinzi\`eme\or + Seizi\`eme\or Dix-septi\`eme\or Dix-huiti\`eme\or Dix-neuvi\`eme\or + Vingti\`eme\fi}\space\def\thepart{}}% + \def\pagename{page}% + \def\seename{{\emph{voir}}}% + \def\alsoname{{\emph{voir aussi}}}% + \def\enclname{P.~J. }% + \def\ccname{Copie \`a }% + \def\headtoname{}% + \def\proofname{D\'emonstration}% for AMS-\LaTeX + \def\glossaryname{Glossaire}% + } +\fi +% \end{macrocode} +% \end{macro} +% +% \subsection{Punctuation} +% +% The `double punctuation' characters (|;| |!| |?| and |:|) have to +% be made |\active| for an automatic control of the amount of space +% to insert before them. +% \begin{macrocode} +\initiate@active@char{:} +\initiate@active@char{;} +\initiate@active@char{!} +\initiate@active@char{?} +% \end{macrocode} +% We specify that the French group of shorthands should be used. +% \begin{macrocode} +\expandafter\addto\csname extras\CurrentOption\endcsname{% + \languageshorthands{french}} +% \end{macrocode} +% These characters are `turned on' once, later their definition may +% vary. +% \begin{macrocode} +\expandafter\addto\csname extras\CurrentOption\endcsname{% + \bbl@activate{:}\bbl@activate{;}% + \bbl@activate{!}\bbl@activate{?}} +\expandafter\addto\csname noextras\CurrentOption\endcsname{% + \bbl@deactivate{:}\bbl@deactivate{;}% + \bbl@deactivate{!}\bbl@deactivate{?}} +% \end{macrocode} +% +% One more thing |\extrasfrench| needs to do is to make sure that +% |\frenchspacing| is in effect. If this is not the case the +% execution of |\noextrasfrench| will switch it off again. +% \begin{macrocode} +\expandafter\addto\csname extras\CurrentOption\endcsname{% + \bbl@frenchspacing} +\expandafter\addto\csname noextras\CurrentOption\endcsname{% + \bbl@nonfrenchspacing} +% \end{macrocode} +% +% \begin{macro}{\french@sh@;@} +% We have to tune the amount of white space before \texttt{;} +% \texttt{!} \texttt{?} and \texttt{:}. This should only happen +% in horizontal mode, hence the test |\ifhmode|. +% +% \changes{frenchb-1.1}{1995/12/23}{Added a hook to insert space +% or not before `double punctuation'.} +% +% In horizontal mode, if a space has been typed before `;' we +% remove it and put an unbreakable |\thinspace| instead. If no +% space has been typed, we add |\FDP@thinspace| which will be +% defined, up to the user's wishes, as an automatic added +% thin space, or as |\@empty|. +% +% \begin{macrocode} +\declare@shorthand{french}{;}{% + \ifhmode + \ifdim\lastskip>\z@ + \unskip\penalty\@M\thinspace + \else + \FDP@thinspace + \fi + \fi +% \end{macrocode} +% Now we can insert a |;| character. +% \begin{macrocode} + \string;} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\french@sh@!@} +% \begin{macro}{\french@sh@?@} +% +% Because these definitions are very similar only one is displayed +% in a way that the definition can be easily checked. +% +% \begin{macrocode} +\declare@shorthand{french}{!}{% + \ifhmode + \ifdim\lastskip>\z@ + \unskip\penalty\@M\thinspace + \else + \FDP@thinspace + \fi + \fi + \string!} +% \end{macrocode} +% +% \begin{macrocode} +\declare@shorthand{french}{?}{% + \ifhmode + \ifdim\lastskip>\z@ + \unskip\penalty\@M\thinspace + \else + \FDP@thinspace + \fi + \fi + \string?} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\french@sh@:@} +% +% The `:' requires a normal space before it, instead of +% a |\thinspace|. +% +% \begin{macrocode} +\declare@shorthand{french}{:}{% + \ifhmode + \ifdim\lastskip>\z@ + \unskip\penalty\@M\Fcolonspace + \else + \FDP@colonspace + \fi + \fi + \string:} +% \end{macrocode} +% \end{macro} +% +% \changes{frenchb-1.1}{1995/12/23}{Added a hook to insert space +% or not before `double punctuation'.} +% +% \changes{frenchb-1.5f}{2001/06/02}{Added a hook to customize +% the space before the colon in French (thin or normal).} +% +% \begin{macro}{\Fcolonspace} +% \begin{macro}{\AutoSpaceBeforeFDP} +% \begin{macro}{\NoAutoSpaceBeforeFDP} +% |\FDP@thinspace| and |\FDP@space| are defined as unbreakable +% spaces by\\ |\AutoSpaceBeforeFDP| or as |\@empty| by +% |\NoAutoSpaceBeforeFDP|.\\ +% Default is |\AutoSpaceBeforeFDP|. +% \begin{macrocode} +\newcommand{\Fcolonspace}{\space} +\def\AutoSpaceBeforeFDP{% + \def\FDP@thinspace{\penalty\@M\thinspace}% + \def\FDP@colonspace{\penalty\@M\Fcolonspace}} +\def\NoAutoSpaceBeforeFDP{\let\FDP@thinspace\@empty + \let\FDP@colonspace\@empty} +\AutoSpaceBeforeFDP +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\system@sh@:@} +% \begin{macro}{\system@sh@!@} +% \begin{macro}{\system@sh@?@} +% \begin{macro}{\system@sh@;@} +% +% When the active characters appear in an environment where their +% French behaviour is not wanted they should give an `expected' +% result. Therefore we define shorthands at system level as well. +% +% \begin{macrocode} +\declare@shorthand{system}{:}{\string:} +\declare@shorthand{system}{!}{\string!} +\declare@shorthand{system}{?}{\string?} +\declare@shorthand{system}{;}{\string;} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \subsection{French quotation marks} +% +% \changes{frenchb-1.3}{1997/04/24}{New implementation of guillemets.} +% +% \changes{frenchb-1.4}{1999/07/08}{Add a hook to pick French +% guillemets from any font (suggested by Michel Bovani).} +% +% \changes{frenchb-1.3e}{1999/01/02}{Try to use AMS Cyrillic fonts +% to provide better looking guillemets in OT1 encoding.} +% +% \changes{frenchb-1.6b}{2003/04/05}{Default OT1 guillemets are +% now borrowed from Polish fonts, rather than from wncyr.} +% +% \changes{frenchb-1.6c}{2003/06/30}{OT1 `Polish' guillemets are +% now taken from the LM fonts which will be part of TL8.} +% +% EC/LM fonts and standard PostScript fonts have built-in +% guillemets, we of course use them. CM fonts have no French +% guillemets built-in, so we have to emulate them: +% \begin{itemize} +% \item if a file `t1lmr.fd' is found, we expect the LM fonts +% to be present on the system, so we pick up French guillemets +% from them; before version 1.6b, French guillemets were +% borrowed from the `wncyr' fonts, this has been changed because +% it resulted in a conflict with the russian option of \babel. +% Former Cyrillic guillemets are still available through the +% command |\CyrillicGuillemets| (for backward compatibility). +% \item otherwise we use math symbols, either \LaTeX's `lasy' font +% if available, or \TeX{}~symbols |\ll| and |\gg| otherwise; +% \end{itemize} +% +% The standard names for French quotation marks are |\guillemotleft| +% and |\guillemotright|, these commands are defined in |t1enc.def| +% for T1-encoding. +% In \LaTeXe{} formats, we first define these commands for +% OT1-encoding (for CM fonts), using either the Polish `pl*' fonts +% or \LaTeX{}'s `lasy' fonts. +% Other local text encodings \emph{should} define them too, +% but if they don't, the OT1 definitions will be used. +% The standard PostScript fonts should \emph{always} be used together +% with T1-encoding (\emph{not} OT1), for proper hyphenation and +% built-in (better looking) French quotation marks. +% +% \changes{frenchb-1.2b}{1997/04/24}{Spacing after opening and before +% closing guillemets slightly enlarged and some glue added, +% as suggested by Th.~Bouche. Unlike \cs{kern}, \cs{hskip} doesn't +% inhibit hyphenation, nothing like \cs{allowhyphens} is required.} +% +% The next step is to provide correct spacing after |\guillemotleft| +% and before |\guillemotright| : a space precedes and follows +% quotation marks but no line break is allowed neither \emph{after} +% the opening one, nor \emph{before} the closing one. +% |\guill@spacing| which does the spacing, has been fine tuned by +% Thierry Bouche. +% +% \changes{frenchb-1.3d}{1998/04/20}{Spacing after opening and before +% closing guillemets changed again: normal space with little glue +% (suggested by Th. Bouche).} +% +% The top macros for quotation marks will be called |\og| +% (``\underline{o}uvrez \underline{g}uillemets'') and |\fg| +% (``\underline{f}ermez \underline{g}uillemets'').\\ +% The top level definitions for French quotation marks are switched +% on and off through the |\extrasfrench| |\noextrasfrench| +% mechanism. Outside French, |\og| and |\fg| will typeset standard +% English opening and closing double quotes.\\ +% As |\DeclareTextCommand| cannot be used after the +% |\begin{document}| we introduce internal definitions +% |\begin@guill| and |\end@guill|.\\ +% We'll try to be smart to users of D.~\textsc{Carlisle}'s |xspace| +% package: if this package is loaded there will be no need for |{}| +% or |\ | to get a space after |\fg|. +% +% \begin{macro}{\guillemotleft} +% \begin{macro}{\guillemotright} +% \begin{macro}{\og} +% \begin{macro}{\fg} +% \changes{frenchb-1.1}{1996/01/20}{A warning is now issued if \cs{og} +% or \cs{fg} have been defined elsewhere in a \LaTeXe{} document +% (suggested by Vincent Jalby).} +% In \LaTeXe{} we provide a dummy definition for |\og| and |\fg|, +% just to display an error message in case |\og| or |\fg| have been +% defined elsewhere. +% +% \changes{frenchb-1.2b}{1997/04/24}{Define \cs{xspace} as \relax if +% it is not defined by D. Carlisle `xspace.sty'. Will be used in +% \cs{fg}, and \cs{ieme} ... \cs{ieres} (new for this release).} +% +% \changes{frenchb-1.5f}{2001/04/21}{\cs{og} and \cs{fg} should not +% be expanded when written to a file; use \cs{renewcommand} (in +% \cs{LaTeX}) to redefine them instead of \cs{let} or \cs{def}.} +% +% \begin{macrocode} +\newcommand{\og}{\@empty} +\newcommand{\fg}{\@empty} +% \end{macrocode} +% \begin{macro}{\FrenchGuillemetsFrom} +% \begin{macrocode} +\ifLaTeXe + \def\FrenchGuillemetsFrom#1#2#3#4{% + \DeclareFontEncoding{#1}{}{}% + \DeclareFontSubstitution{#1}{#2}{m}{n}% + \DeclareTextCommand{\guillemotleft}{OT1}{% + {\fontencoding{#1}\fontfamily{#2}\selectfont\char#3}}% + \DeclareTextCommand{\guillemotright}{OT1}{% + {\fontencoding{#1}\fontfamily{#2}\selectfont\char#4}}} +% \end{macrocode} +% \begin{macro}{\CyrillicGuillemets} +% \begin{macro}{\PolishGuillemets} +% \begin{macro}{\LasyGuillemets} +% \begin{macro}{\bbl@frenchguillemets} +% \begin{macro}{\bbl@nonfrenchguillemets} +% \begin{macrocode} + \def\CyrillicGuillemets{\FrenchGuillemetsFrom{OT2}{wncyr}{60}{62}} + \def\PolishGuillemets{\FrenchGuillemetsFrom{T1}{lmr}{19}{20}} + \def\LasyGuillemets{% + \DeclareTextCommand{\guillemotleft}{OT1}{\hbox{% + \fontencoding{U}\fontfamily{lasy}\selectfont(\kern-0.20em(}}% + \DeclareTextCommand{\guillemotright}{OT1}{\hbox{% + \fontencoding{U}\fontfamily{lasy}\selectfont)\kern-0.20em)}}} + \IfFileExists{t1lmr.fd}{\PolishGuillemets}{\LasyGuillemets} + \DeclareTextSymbolDefault{\guillemotleft}{OT1} + \DeclareTextSymbolDefault{\guillemotright}{OT1} + \def\guill@spacing{\penalty\@M\hskip.8\fontdimen2\font + plus.3\fontdimen3\font + minus.8\fontdimen4\font} + \DeclareRobustCommand*{\begin@guill}{\leavevmode + \guillemotleft\penalty\@M\guill@spacing} + \DeclareRobustCommand*{\end@guill}{\ifdim\lastskip>\z@\unskip\fi + \penalty\@M\guill@spacing\guillemotright\xspace} + \AtBeginDocument{\ifx\xspace\@undefined\let\xspace\relax\fi} + \def\bbl@frenchguillemets{\renewcommand{\og}{\begin@guill}% + \renewcommand{\fg}{\end@guill}} + \def\bbl@nonfrenchguillemets{\renewcommand{\og}{``}% + \renewcommand{\fg}{\ifdim\lastskip>\z@\unskip\fi ''}} +% \end{macrocode} +% For \emph{Plain}\TeX, and \LaTeX-2.09 we define |\begin@guill| +% and |\end@guill| using math symbols |\ll| and |\gg|. +% \begin{macrocode} +\else + \def\begin@guill{\leavevmode\raise0.25ex + \hbox{$\scriptscriptstyle\ll$}% + \penalty\@M\hskip.8\fontdimen2\font + plus.3\fontdimen3\font + minus.3\fontdimen4\font} + \def\end@guill{\ifdim\lastskip>\z@\unskip\penalty\@M\fi + \penalty\@M\hskip.8\fontdimen2\font + plus.3\fontdimen3\font minus.3\fontdimen4\font + \raise0.25ex\hbox{$\scriptscriptstyle\gg$}} + \let\xspace\relax + \def\bbl@frenchguillemets{\let\og\begin@guill + \let\fg\end@guill} + \def\bbl@nonfrenchguillemets{\def\og{``}% + \def\fg{\ifdim\lastskip>\z@\unskip\fi ''}} +\fi +\expandafter\addto\csname extras\CurrentOption\endcsname{% + \bbl@frenchguillemets} +\expandafter\addto\csname noextras\CurrentOption\endcsname{% + \bbl@nonfrenchguillemets} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \subsection{French lists} +% \label{sec-lists} +% +% \begin{macro}{\bbl@frenchlistspacing} +% \begin{macro}{\bbl@nonfrenchlistspacing} +% Vertical spacing in general lists should be shorter in French +% texts than the defaults provided by \LaTeX. +% Note that the easy way, just changing values of vertical spacing +% parameters when entering French and restoring them to their +% defaults on exit would not work; as most lists are based on +% |\list| we will redefine |\list| (up to version~1.4, the more +% internal command |\@trivlist| was redefined, this ensured that +% all lists would have common settings, but didn't allow the users +% to provide their own settings, as pointed out by P.~Pichaureau). +% If standard LaTeX{} settings are preferred, it is easy to issue +% the command |\FrenchListSpacingfalse| in the preamble or in +% |frenchb.cfg|. Please note that changing the flag +% |\FrenchListSpacing| will \emph{not} take effect immediately, +% but next time language French is switched on. +% +% The amount of vertical space before and after a list is given by +% |\topsep| + |\parskip| (+ |\partopsep| if the list starts a new +% paragraph). IMHO, |\parskip| should be added \emph{only} when +% the list starts a new paragraph, so I subtract |\parskip| from +% |\topsep| and add it back to |\partopsep|; this will normally +% make no difference because |\parskip|'s default value is 0pt, but +% will be noticeable when |\parskip| is \emph{not} null.\\ +% Of course, this code is only for \LaTeX. +% +% \changes{frenchb-1.3}{1997/05/30}{Add a switch to allow \cs{LaTeXe} +% standard settings.} +% +% \changes{frenchb-1.5a}{2001/01/02}{Redefine \cs{list} instead of +% \cs{@trivlist} to provide more freedom to the user, but still +% allow the former way with \cs{ifFrenchOldTrivlist}.} +% +% \changes{frenchb-1.5g}{2001/09/09}{\cs{parskip} is of type `skip', +% its mean value only (not the glue) should be moved from +% \cs{topsep} to \cs{partopsep}: substracting glue can lead to +% weird results. Bug pointed out by Michel Bovani.} +% +% \begin{macrocode} +\newif\ifFrenchListSpacing \FrenchListSpacingtrue +\newif\ifFrenchOldTrivlist +\ifLaTeX + \let\listORI\list +% \end{macrocode} +% |\endlist| is not redefined, but |\endlistORI| is provided for +% the users who prefer to define their own lists from the original +% command, they can code: |\begin{listORI}{}{} \end{listORI}|. +% \begin{macrocode} + \let\endlistORI\endlist + \def\FR@listsettings{% + \setlength{\itemsep}{0.4ex plus 0.2ex minus 0.2ex}% + \setlength{\parsep}{0.4ex plus 0.2ex minus 0.2ex}% + \setlength{\topsep}{0.8ex plus 0.4ex minus 0.4ex}% + \setlength{\partopsep}{0.4ex plus 0.2ex minus 0.2ex}% +% \end{macrocode} +% |\parskip| is of type `skip', its mean value only (\emph{not +% the glue}) should be substracted from |\topsep| and added to +% |\partopsep|, so convert |\parskip| to a `dimen' using +% |\@tempdima|. +% \begin{macrocode} + \@tempdima=\parskip + \addtolength{\topsep}{-\@tempdima}% + \addtolength{\partopsep}{\@tempdima}}% + \def\listFR#1#2{\listORI{#1}{\FR@listsettings #2}}% +% \end{macrocode} +% Keep the |\@trivlist| redefinition from version 1.4 (only +% for compatibility reasons). The flag |\ifFrenchOldTrivlist| +% could happen to be useful to process older documents. +% \begin{macrocode} + \let\@trivlistORI\@trivlist + \def\@trivlistFR{\FR@listsettings\@trivlistORI} + \def\bbl@frenchlistspacing{\ifFrenchListSpacing\let\list\listFR\fi + \ifFrenchOldTrivlist\let\@trivlist\@trivlistFR + \let\list\listORI\fi} + \def\bbl@nonfrenchlistspacing{\let\list\listORI + \let\@trivlist\@trivlistORI} + \expandafter\addto\csname extras\CurrentOption\endcsname{% + \bbl@frenchlistspacing} + \expandafter\addto\csname noextras\CurrentOption\endcsname{% + \bbl@nonfrenchlistspacing} +\fi +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\bbl@frenchitemize} +% \begin{macro}{\bbl@nonfrenchitemize} +% The layout of French itemize-lists has changed between version~1.2 +% and~1.3. Jacques Andr\'e and Thierry Bouche pointed out to me +% that vertical spacing between items, before and after the list, +% should \emph{null} with \emph{no glue} added. Moreover +% horizontal spacing was not correct either: the item labels of a +% first level list should be vertically aligned on the paragraph's +% first character (at |\parindent| from the left margin). +% Checking the book ``Lexique des r\`egles typographiques en usage +% \`a l'Imprimerie nationale'' confirmed their points, so the itemize +% environment has been totally redefined for French in version~1.3. +% +% Several people pointed out to me that the layout of lists can +% either be set by the current language or be tuned independently of +% the language as part of the layout of the document. So hooks should +% be provided to switch off the special settings made in |frenchb|. +% Setting |\FrenchItemizeSpacingfalse| \emph{after} loading |frenchb| +% in the preamble switches back to settings of version~1.2 (this can +% be useful to process old documents). If you want all list spacings +% to be exactly what they are in standard \LaTeXe{}, then add also +% |\FrenchListSpacingfalse| in the preamble \emph{after} loading +% |frenchb|. Both switches can also be set in |frenchb.cfg|. +% Please note that changing the flags |\FrenchItemizeSpacing| and +% |\FrenchListSpacing| will \emph{not} take effect immediately, +% but next time language French is switched on. +% +% The \textbullet{} is never used in French itemize-lists, +% a long dash `--' is preferred for all levels. The item label used +% in French is stored in |\FrenchLabelItem}|, it defaults to '--' and +% can be changed using |\renewcommand| (see the example +% configuration file above). +% +% \changes{frenchb-1.1}{1996/01/25}{Save original definitions of label +% items, instead of hard coding them in \cs{bbl@nonfrenchitems} +% (suggested by Vincent Jalby).} +% +% \changes{frenchb-1.1}{1996/01/26}{Tune vertical spacing in +% French lists.} +% +% \changes{frenchb-1.3}{1997/05/30}{Change -{}- to \cs{textendash}, +% completely redesign the itemize environment in French and add +% a hook to switch back to \cs{LaTeXe} standard itemize lists.} +% +% \changes{frenchb-1.4}{1999/07/08}{\cs{newif} only in LaTeX.} +% +% \changes{frenchb-1.4}{1999/07/08}{Add a hook \cs{FrenchLabelItem} +% which defaults to \cs{textendash}, this was suggested by +% Michel Bovani to allow some customization of label items.} +% +% \changes{frenchb-1.5a}{2001/01/02}{Redesign \cs{itemize} to allow +% users to change the markers of any level in itemize lists.} +% +% \changes{frenchb-1.5g}{2001/09/09}{\cs{parskip} is of type `skip', +% its mean value only (not the glue) should be moved from +% \cs{topsep} to \cs{partopsep}: substracting glue can lead to +% weird results. Bug pointed out by Michel Bovani.} +% +% \begin{macrocode} +\newif\ifFrenchItemizeSpacing \FrenchItemizeSpacingtrue +\ifLaTeX + \newcommand{\FrenchLabelItem}{\textendash} + \newcommand{\Frlabelitemi}{\FrenchLabelItem} + \newcommand{\Frlabelitemii}{\FrenchLabelItem} + \newcommand{\Frlabelitemiii}{\FrenchLabelItem} + \newcommand{\Frlabelitemiv}{\FrenchLabelItem} + \def\bbl@frenchitemize{% + \let\@ltiORI\labelitemi + \let\@ltiiORI\labelitemii + \let\@ltiiiORI\labelitemiii + \let\@ltivORI\labelitemiv + \let\itemizeORI\itemize + \let\labelitemi\Frlabelitemi + \let\labelitemii\Frlabelitemii + \let\labelitemiii\Frlabelitemiii + \let\labelitemiv\Frlabelitemiv + \ifFrenchItemizeSpacing +% \end{macrocode} +% Make sure |\itemize| uses |\@trivlistORI| even with +% |\FrenchOldTrivlisttrue|. +% \begin{macrocode} + \def\itemize{\let\@trivlist\@trivlistORI + \ifnum \@itemdepth >\thr@@\@toodeep\else + \advance\@itemdepth\@ne + \edef\@itemitem{labelitem\romannumeral\the\@itemdepth}% + \expandafter + \listORI + \csname\@itemitem\endcsname + {\settowidth{\labelwidth}{\csname\@itemitem\endcsname}% + \setlength{\leftmargin}{\labelwidth}% + \addtolength{\leftmargin}{\labelsep}% + \ifnum\@listdepth=0 + \setlength{\itemindent}{\parindent}% + \else + \addtolength{\leftmargin}{\parindent}% + \fi + \setlength{\itemsep}{\z@}% + \setlength{\parsep}{\z@}% + \setlength{\topsep}{\z@}% + \setlength{\partopsep}{\z@}% +% \end{macrocode} +% |\parskip| is of type `skip', its mean value only (\emph{not +% the glue}) should be substracted from |\topsep| and added to +% |\partopsep|, so convert |\parskip| to a `dimen' using +% |\@tempdima|. +% \begin{macrocode} + \@tempdima=\parskip + \addtolength{\topsep}{-\@tempdima}% + \addtolength{\partopsep}{\@tempdima}}% + \fi}% + \fi} +% \end{macrocode} +% The user's changes in labelitems are saved when leaving French +% for further use when switching back to French. +% \begin{macrocode} + \def\bbl@nonfrenchitemize{\let\Frlabelitemi\labelitemi + \let\Frlabelitemii\labelitemii + \let\Frlabelitemiii\labelitemiii + \let\Frlabelitemiv\labelitemiv + \let\labelitemi\@ltiORI + \let\labelitemii\@ltiiORI + \let\labelitemiii\@ltiiiORI + \let\labelitemiv\@ltivORI + \let\itemize\itemizeORI} + \expandafter\addto\csname extras\CurrentOption\endcsname{% + \bbl@frenchitemize} + \expandafter\addto\csname noextras\CurrentOption\endcsname{% + \bbl@nonfrenchitemize} +\fi +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \subsection{French indentation of sections} +% \label{sec-indent} +% +% \begin{macro}{\bbl@frenchindent} +% \begin{macro}{\bbl@nonfrenchindent} +% In French the first paragraph of each section should be indented, +% this is another difference with US-English. +% Add this code only in \LaTeX. +% +% \changes{frenchb-1.2}{1996/12/27}{Corrected typo +% \cs{bbl@nonfrenchident}.} +% +% \begin{macrocode} +\ifLaTeX + \let\@aifORI\@afterindentfalse + \def\bbl@frenchindent{\let\@afterindentfalse\@afterindenttrue + \@afterindenttrue} + \def\bbl@nonfrenchindent{\let\@afterindentfalse\@aifORI + \@afterindentfalse} + \expandafter\addto\csname extras\CurrentOption\endcsname{% + \bbl@frenchindent} + \expandafter\addto\csname noextras\CurrentOption\endcsname{% + \bbl@nonfrenchindent} +\fi +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \subsection{Formatting footnotes} +% +% \changes{frenchb-1.6a}{2003/02/02}{Add two hooks to customize +% footnotes: \cs{AddThinSpaceBeforeFootnotes} and +% \cs{FrenchFootnotes} (suggested by Jacques Andr\'e).} +% +% \begin{macro}{\AddThinSpaceBeforeFootnotes} +% \begin{macro}{\FrenchFootnotes} +% \begin{macro}{\StandardFootnotes} +% |\AddThinSpaceBeforeFootnotes| redefines |\@footnotemark| (whose +% definition is saved at the |\begin{document}| in order to include +% any customization that packages might have done) to add a thinspace +% before the number or symbol calling a footnote (any space typed +% in is removed first). |\AddThinSpaceBeforeFootnotes| has no effect +% on the layout of the footnote itself. Note that |\thanks| in +% |\maketitle| also relies on |\@footnotemark|, so the thinspace +% is added there too. +% +% \changes{frenchb-1.6f}{2003/04/02}{Move \cs{newif} and +% \cs{newdimen} commands outside \cs{ifLaTeXe} ... \cs{fi} +% for compatibility with the plain format.} +% +% \begin{macrocode} +\newif\ifthinspace@FN +\newif\ifFR@fntlayout +\newdimen\parindentFFN +\ifLaTeXe + \newcommand{\AddThinSpaceBeforeFootnotes}{\thinspace@FNtrue} + \AtBeginDocument{\let\@footnotemarkORI\@footnotemark + \def\@footnotemarkFR{\leavevmode\unskip\unkern + \,\@footnotemarkORI}% + \ifthinspace@FN + \let\@footnotemark\@footnotemarkFR + \fi} +% \end{macrocode} +% +% We then define |\@makefntextFR|, a variant of |\@makefntext| +% which is responsible for the layout of footnotes, to match the +% specifications of the French `Imprimerie Nationale': Footnotes +% will be indented by |\parindentFFN|, numbers (if any) typeset on +% the baseline (instead of textsuperscripts) and followed by a dot +% and an half quad space. Whenever symbols are used to number +% footnotes (as in |\thanks| for instance), we switch back to the +% standard layout (the French layout of footnotes is meant for +% footnotes numbered by arabic or roman digits). +% The value of |\parindentFFN| will be defined at the +% |\begin{document}|, as the maximum of |\parindent| and 1.5em. +% +% \begin{macrocode} + \def\ftnISsymbol{\@fnsymbol\c@footnote} + \long\def\@makefntextFR#1{\ifx\thefootnote\ftnISsymbol + \@makefntextORI{#1}% + \else + \parindent=\parindentFFN + \rule\z@\footnotesep + \setbox\@tempboxa\hbox{\@thefnmark}% + \ifdim\wd\@tempboxa>\z@ + \llap{\@thefnmark}.\kern.5em + \fi #1 + \fi}% +% \end{macrocode} +% We now define two commands |\FrenchFootnotes| and +% |\StandardFootnotes| which select French or Standard layout +% for footnotes; we have to save the standard definition of +% |\@makefntext| at the |\begin{document}|, and then redefine +% |\@makefntext| according to the value of an internal flag set +% by |\FrenchFootnotes| and reset by |\StandardFootnotes|. +% \begin{macrocode} + \AtBeginDocument{\parindentFFN=\parindent + \ifdim\parindentFFN<1.5em\parindentFFN=1.5em\fi + \let\@makefntextORI\@makefntext + \long\def\@makefntext#1{% + \ifFR@fntlayout + \@makefntextFR{#1}% + \else + \@makefntextORI{#1}% + \fi + }% + } + \newcommand{\FrenchFootnotes}{\FR@fntlayouttrue} + \newcommand{\StandardFootnotes}{\FR@fntlayoutfalse} +\fi +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \subsection{Formatting numbers} +% \label{sec-numbers} +% +% \changes{frenchb-1.4}{1999/10/02}{Add a hook to let the comma +% be in math mode of type \cs{mathord} in French, as a decimal +% separator should be.} +% +% \changes{frenchb-1.6e}{2003/11/09}{The change from \cs{mathpunct} +% to \cs{mathord} should be encoding independent (suggested by +% Michel Bovani): just strip the highest hexadecimal digit to +% switch from type \cs{mathpunct} to type \cs{mathord}.} +% +% \begin{macro}{\DecimalMathComma} +% \begin{macro}{\StandardMathComma} +% As mentioned in the \TeX{}book p.~134, the comma is of type +% |\mathpunct| in math mode: it is automatically followed by a +% space. This is convenient in lists and intervals but +% unpleasant when the comma is used as a decimal separator +% in French: it has to be entered as |{,}|. +% |\DecimalMathComma| makes the comma be an ordinary character +% (of type |\mathord|) in French \emph{only} (no space added); +% |\StandardMathComma| switches back to the standard behaviour +% of the comma. +% \begin{macrocode} +\newcount\std@mcc +\newcount\dec@mcc +\std@mcc=\mathcode`\, +\dec@mcc=\std@mcc +\@tempcnta=\std@mcc +\divide\@tempcnta by "1000 +\multiply\@tempcnta by "1000 +\advance\dec@mcc by -\@tempcnta +\newcommand{\DecimalMathComma}{\iflanguage{french}% + {\mathcode`\,=\dec@mcc}{}% + \addto\extrasfrench{\mathcode`\,=\dec@mcc}} +\newcommand{\StandardMathComma}{\mathcode`\,=\std@mcc + \addto\extrasfrench{\mathcode`\,=\std@mcc}} +\expandafter\addto\csname noextras\CurrentOption\endcsname{% + \mathcode`\,=\std@mcc} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \changes{frenchb-1.2}{1996/12/27}{New macros \cs{nombre} +% \cs{decimalsep} and \cs{thousandsep} added to format numbers.} +% +% In English the decimal part starts with a point and thousands +% should be separated by a comma: an approximation of $1000\pi$ +% should be inputed as |$3{,}141.592{,}653$| in math mode and +% as |3,141.592,653| in text.\\ +% In French the decimal part starts with a comma and thousands +% should be separated by a space; the same approximation of +% $1000\pi$ should be inputed as |$3\;141{,}592\;653$| in math mode +% and as something like |3~141,592~653| in text: in math mode, the +% comma is of type |\mathpunct| (thus normally followed by a space) +% while the point is of type |\mathord| (no space added). +% +% Thierry Bouche suggested that a second type of comma, of type +% |\mathord| would be useful in math mode, and proposed to +% introduce a command (named |\decimalsep| in this package), +% the expansion of which would depend on the current language. +% +% Vincent Jalby suggested a command |\nombre| to conveniently +% typeset numbers: inputting |\nombre{3141,592653}| either in +% text or in math mode will format this number properly according +% to the current language (French or non-French). +% +% |\nombre| accepts an optional argument which happens to be +% useful with the package `dcolumn', it specifies the decimal +% separator used in the \emph{source code}: +% |\newcolumntype{d}{D{,}{\decimalsep}{-1}}| \\ +% |\begin{tabular}{|d|}\hline | \\ +% | 3,14 \\ | \\ +% | \nombre[,]{123,4567} \\ | \\ +% | \nombre[,]{9876,543}\\\hline| \\ +% |\end{tabular} | \\ +% will print a column of numbers aligned on the decimal point +% (comma or point depending on the current language), each slice +% of 3 digits being separated by a space or a comma according to +% the current language. +% +% \begin{macro}{\decimalsep} +% \begin{macro}{\thousandsep} +% We need a internal definition, valid in both text and math mode, +% for the comma (|\@comma@|) and another one for the unbreakable +% fixed length space (no glue) used in French (|\f@thousandsep|). +% +% The commands |\decimalsep| and |\thousandsep| get default +% definitions (for the English language) when |frenchb| is loaded; +% these definitions will be updated when the current language is +% switched to or from French. +% +% \changes{frenchb-1.2b}{1997/04/24}{Extra care taken to handle +% signs properly inside \cs{nombre} in \LaTeXe.} +% +% \changes{frenchb-1.2b}{1997/04/24}{Definition of \cs{nombre} changed +% to correct a bug with moving arguments in \LaTeX-2.09.} +% +% \changes{frenchb-1.4g}{2000/10/07}{Added a new hook +% \cs{ThinSpaceInFrenchNumbers} to have thin spaces instead of +% normal spaces (the default) when formatting French numbers.} +% +% \begin{macrocode} +\mathchardef\m@comma=\dec@mcc +\def\@comma@{\ifmmode\m@comma\else,\fi} +\def\f@thousandsep{\ifmmode\mskip5.5mu\else\penalty\@M\kern.3em\fi} +\def\ThinSpaceInFrenchNumbers{\def\f@thousandsep{% + \ifmmode\mskip3mu\else\penalty\@M\kern.16667em\fi}} +\newcommand{\decimalsep}{.} +\newcommand{\thousandsep}{\@comma@} +\expandafter\addto\csname extras\CurrentOption\endcsname{% + \def\decimalsep{\@comma@}% + \def\thousandsep{\f@thousandsep}} +\expandafter\addto\csname noextras\CurrentOption\endcsname{% + \def\decimalsep{.}% + \def\thousandsep{\@comma@}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \changes{frenchb-1.3}{1997/05/24}{Avoid mixing text and math mode +% whenever possible: check if \cs{textminus} and co. are available.} +% Signs can now be entered inside |\nombre|. When |\nombre| is +% used in text-mode, signs should be text symbols to get the +% series, shape... from the current text-font. When signs are not +% available in text-mode, we provide some defaults. +% +% \begin{macrocode} +\providecommand{\textminus}{\textendash} +\providecommand{\textplusminus}{\ensuremath{\pm}} +\providecommand{\textminusplus}{\ensuremath{\mp}} +\def\fb@minus{\ifmmode-\else\textminus\fi} +\def\fb@plusminus{\ifmmode\pm\else\textplusminus\fi} +\def\fb@minusplus{\ifmmode\mp\else\textminusplus\fi} +% \end{macrocode} +% +% \begin{macro}{\nombre} +% The decimal separator used when \emph{inputing} a number +% with |\nombre| \emph{has to be a comma}. +% |\nombre| splits the inputed number into two parts: what +% comes before the first comma will be formatted by +% \cs{@integerpart} while the rest (if not empty) will be +% formatted by \cs{@decimalpart}. Both parts, once formatted +% separately will be merged together with between them, either +% the decimal separator \cs{decimalsep} or (in \LaTeXe{} +% \emph{only}) the optional argument of |\nombre|. +% +% \changes{frenchb-1.3}{1997/05/24}{Added \cs{@empty} to the +% definitions of \cs{nb@first} and \cs{nb@suite}, as suggested +% by V. Jalby, to cope with possibly empty integer part as in +% \cs{nombre{,123}}.} +% +% \begin{macrocode} +\if@Two@E + \newcommand{\nombre}[2][\decimalsep]{\def\@decimalsep{#1}% + \@@nombre#2\@empty,\@empty,\@nil} +\else + \def\@decimalsep{\decimalsep} + \newcommand{\nombre}[1]{\@nombre#1\@empty,\@empty,\@nil} +\fi +\def\@firstofmany#1#2,{#1} +\def\@@nombre#1,#2,#3\@nil{% + \def\nb@sign{}% + \edef\nb@first{\@firstofmany #1\@empty,}% + \edef\nb@suite{\@secondoftwo #1\@empty,}% + \if+\nb@first \def\nb@sign{+}\fi + \if-\nb@first \def\nb@sign{\fb@minus}\fi + \expandafter\ifx\nb@first\pm \def\nb@sign{\fb@plusminus}\fi + \expandafter\ifx\nb@first\mp \def\nb@sign{\fb@minusplus}\fi + \ifx\@empty\nb@sign + \let\@tmp\nb@suite\edef\nb@suite{\nb@first\@tmp}% + \fi + \nb@sign\expandafter\@nombre\nb@suite#2,#3\@nil} +\def\@nombre#1,#2,#3\@nil{% + \ifx\@empty#2% + \@integerpart{#1}% + \else + \@integerpart{#1}\@decimalsep\@decimalpart{#2}% + \fi} +% \end{macrocode} +% The easiest bit is the decimal part: +% We attempt to read the first four digits of the decimal part, if +% it has less than 4 digits, we just have to print them, otherwise +% |\thousandsep| has to be appended after the third digit, and the +% algorithm is applied recursively to the rest of the decimal part. +% \begin{macrocode} +\def\@decimalpart#1{\@@decimalpart#1\@empty\@empty\@empty} +\def\@@decimalpart#1#2#3#4{#1#2#3% + \ifx\@empty#4% + \else + \thousandsep\expandafter\@@decimalpart\expandafter#4% + \fi} +% \end{macrocode} +% Formatting the integer part is more difficult because the slices +% of 3 digits start from the \emph{bottom} while the number is +% read from the top! +% This (tricky) code is borrowed from David Carlisle's comma.sty. +% \begin{macrocode} +\def\@integerpart#1{\@@integerpart{}#1\@empty\@empty\@empty} +\def\@@integerpart#1#2#3#4{% + \ifx\@empty#2% + \@addthousandsep#1\relax + \else + \ifx\@empty#3% + \@addthousandsep\@empty\@empty#1#2\relax + \else + \ifx\@empty#4% + \@addthousandsep\@empty#1#2#3\relax + \else + \@@integerpartafterfi{#1#2#3#4}% + \fi + \fi + \fi} +\def\@@integerpartafterfi#1\fi\fi\fi{\fi\fi\fi\@@integerpart{#1}} +\def\@addthousandsep#1#2#3#4{#1#2#3% + \if#4\relax + \else + \thousandsep\expandafter\@addthousandsep\expandafter#4% + \fi} +% \end{macrocode} +% \end{macro} +% +% \subsection{Dots\dots} +% \label{sec-dots} +% +% \changes{frenchb-1.3}{1997/06/03}{Added this section.} +% \LaTeXe's standard definition of |\dots| in text-mode is +% |\textellipsis| which includes a |\kern| at the end; +% this space is not wanted in some cases (before a closing brace +% for instance) and |\kern| breaks hyphenation of the next word. +% We define |\Frtextellipsis| for French (in \LaTeXe{} only). +% +% \changes{frenchb-1.4c}{1999/11/17}{Bug correction: \cs{xspace} +% didn't work in \cs{dots} without amsmath.sty.} +% The |\if| construction in the \LaTeXe{} definition of |\dots| +% doesn't allow the use of |xspace| (|xspace| is always followed +% by a |\fi|), so we use the AMS-\LaTeX{} construction of |\dots|; +% this has to be done `AtBeginDocument' not to be overwritten +% when \file{amsmath.sty} is loaded after \babel. +% +% \changes{frenchb-1.4d}{2000/02/01}{AMS-LaTeX 2.0 provides a much +% better spacing for \cs{dots} than 1.2, so let's take advantage +% of it when amsmath (up to 1.2 or newer) is loaded.} +% +% \begin{macro}{\Frtextellipsis} +% \begin{macrocode} +\ifLaTeXe + \DeclareTextCommandDefault{\Frtextellipsis}{% + .\kern\fontdimen3\font.\kern\fontdimen3\font.\xspace} +% \end{macrocode} +% |\Mdots@| and |\Tdots@ORI| hold the definitions of |\dots| in +% Math and Text mode. They default to those of amsmath-2.0, and +% will revert to standard \LaTeX{} definitions `AtBeginDocument', +% if amsmath has not been loaded. |\Mdots@| doesn't change when +% switching from/to French, while |\Tdots@| is |\Frtextellipsis| +% in French and |\Tdots@ORI| otherwise. +% \begin{macrocode} + \newcommand{\Tdots@ORI}{\@xp\textellipsis} + \newcommand{\Tdots@}{\Tdots@ORI} + \newcommand{\Mdots@}{\@xp\mdots@} + \AtBeginDocument{\DeclareRobustCommand{\dots}{\relax + \csname\ifmmode M\else T\fi dots@\endcsname}% + \ifx\@xp\@undefined\let\@xp\relax\fi + \ifx\mdots@\@undefined\let\Tdots@ORI\textellipsis + \let\Mdots@\mathellipsis\fi} + \def\bbl@frenchdots{\let\Tdots@\Frtextellipsis} + \def\bbl@nonfrenchdots{\let\Tdots@\Tdots@ORI} + \expandafter\addto\csname extras\CurrentOption\endcsname{% + \bbl@frenchdots} + \expandafter\addto\csname noextras\CurrentOption\endcsname{% + \bbl@nonfrenchdots} +\fi +% \end{macrocode} +% \end{macro} +% +% \subsection{Global layout} +% \label{sec-global} +% +% \changes{frenchb-1.4}{1999/10/03}{Added this section.} +% +% In multilingual documents, some typographic rules must depend +% on the current language (e.g., hyphenation, typesetting of +% numbers, spacing before double punctuation\dots), +% others should, IMHO, be kept global to the document: +% especially the layout of lists (see~\ref{sec-lists}) +% and the indentation of the first paragraph of sections +% (see~\ref{sec-indent}). +% +% \begin{macro}{\FrenchLayout} +% \begin{macro}{\StandardLayout} +% In a multilingual document, a unified look, either the French +% one or the standard one, can be assigned to the whole document: +% adding |\FrenchLayout| will give a global ``French look'' to +% the document (e.g., lists, regardless the current language, will +% be typeset as in French) and |\StandardLayout| forces a global +% ``US-English'' look. +% Both of these commands can only be used \emph{before} the +% |\begin{document}|. +% |\StandardLayout| can also be of interest for class designers +% who do not want |frenchb| to interfere with their global layout +% choices. +% +% As of version~1.4, |\FrenchLayout| and |\StandardLayout| only +% affect: +% \begin{itemize} +% \item the layout of lists (see~\ref{sec-lists}), +% \item the indentation of the first paragraph of sections +% (see~\ref{sec-indent}). +% \end{itemize} +% +% \changes{frenchb-1.6c}{2003/06/30}{Bug correction: the definitions +% of \cs{labelitemi} ... \cs{itemize} need to be saved in +% \cs{StandardLayout}.} +% +% \begin{macrocode} +\ifLaTeXe + \newcommand{\FrenchLayout}{% + \renewcommand{\StandardLayout}{% + \PackageWarning{frenchb.ldf}% + {\protect\StandardLayout\space makes no change\MessageBreak + (\protect\FrenchLayout\space has been selected before + \MessageBreak for the whole document)}% + }% + \AtBeginDocument{\bbl@frenchitemize\bbl@frenchlistspacing + \bbl@frenchindent}% + \let\bbl@nonfrenchitemize\relax + \let\bbl@nonfrenchlistspacing\relax + \let\bbl@nonfrenchindent\relax} + \newcommand{\StandardLayout}{% + \renewcommand{\FrenchLayout}{% + \PackageWarning{frenchb.ldf}% + {\protect\FrenchLayout\space makes no change\MessageBreak + (\protect\StandardLayout\space has been selected before + \MessageBreak for the whole document)}% + }% + \let\@ltiORI\labelitemi + \let\@ltiiORI\labelitemii + \let\@ltiiiORI\labelitemiii + \let\@ltivORI\labelitemiv + \let\itemizeORI\itemize + \let\bbl@frenchitemize\relax + \let\bbl@frenchlistspacing\relax + \let\bbl@frenchindent\relax} + \@onlypreamble\FrenchLayout + \@onlypreamble\StandardLayout +\fi +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \subsection{Extra utilities} +% +% All that is left to do now is to provide the French user +% with some extra utilities. +% +% \begin{macro}{\up} +% \begin{macro}{\ieme} +% |\up| eases the typesetting of superscripts like +% `1\raise0.55ex\hbox{\small er}'. |\up| relies on +% |\textsuperscript| when available (i.\,e., in \LaTeXe). +% +% \changes{frenchb-1.1}{1996/01/20}{Use \cs{textsuperscript} in \LaTeXe, +% as suggested by Vincent Jalby.} +% +% \changes{frenchb-1.1}{1996/01/26}{Internal macro \cs{up@size} +% introduced by Johannes Braams to replace \cs{small}, +% too fragile in 2.09).} +% +% \changes{frenchb-1.1}{1996/05/03}{\cs{@ptsize} may not be undefined, +% i.\,e. in slides.cls.} +% +% \begin{macro}{\up@size} +% The internal macro |\up@size| holds the size at which the +% superscript will be typeset. The reason for this is that we have +% to specify it differently for different formats. +% \begin{macrocode} +\ifx\sevenrm\@undefined + \ifx\@ptsize\@undefined + \let\up@size\small + \else + \ifx\selectfont\@undefined +% \end{macrocode} +% In this case the format is the original \LaTeX-2.09: +% \begin{macrocode} + \ifcase\@ptsize + \let\up@size\ixpt\or + \let\up@size\xpt\or + \let\up@size\xipt + \fi +% \end{macrocode} +% When |\selectfont| is defined we probably have NFSS available: +% \begin{macrocode} + \else + \ifcase\@ptsize + \def\up@size{\fontsize\@ixpt{10pt}\selectfont}\or + \def\up@size{\fontsize\@xpt{11pt}\selectfont}\or + \def\up@size{\fontsize\@xipt{12pt}\selectfont} + \fi + \fi + \fi +\else +% \end{macrocode} +% If we end up here it must be a plain based \TeX{} format, so: +% \begin{macrocode} + \let\up@size\sevenrm +\fi +% \end{macrocode} +% \end{macro} +% Now we can define |\up|. When \LaTeXe{} runs in +% compatibility mode (\LaTeX-2.09 emulation), |\textsuperscript| is +% also defined, but does no good job, so we give two different +% definitions for |\up| using |\if@Two@E|. +% \begin{macrocode} +\if@Two@E + \DeclareRobustCommand*{\up}[1]{\textsuperscript{#1}} +\else + \DeclareRobustCommand*{\up}[1]{\leavevmode\raise1ex\hbox{\up@size#1}} +\fi +% \end{macrocode} +% +% \changes{frenchb-1.1}{1996/05/31}{Added 5 macros from french.sty and +% missing \cs{lowercase}.} +% +% \changes{frenchb-1.2b}{1997/04/24}{Use \cs{xspace} to control spacing +% after \cs{ieme} ... \cs{ieres}.} +% +% |\ieme| is provided for compatibility with |francais.sty|, +% the other 5 for compatibility with |french.sty|: +% \begin{macrocode} +\def\ieme{\up{\lowercase{e}}\xspace} +\def\iemes{\up{\lowercase{es}}\xspace} +\def\ier{\up{\lowercase{er}}\xspace} +\def\iers{\up{\lowercase{ers}}\xspace} +\def\iere{\up{\lowercase{re}}\xspace} +\def\ieres{\up{\lowercase{res}}\xspace} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\No} +% \begin{macro}{\no} +% \begin{macro}{\primo} +% \begin{macro}{\fprimo)} +% And some more macros for numbering, first two support macros. +% +% \changes{frenchb-1.1}{1996/01/25}{Avoid using math superscripts +% in text mode (suggested by V.~Jalby), use \cs{up} instead. +% The symbol `degree' has nothing to do in +% \cs{FrenchPopularEnumerate}, replace it by a small `o'.} +% +% \begin{macrocode} +\DeclareRobustCommand*{\FrenchEnumerate}[1]{% + #1\up{\lowercase{o}}\kern+.3em} +\DeclareRobustCommand*{\FrenchPopularEnumerate}[1]{% + #1\up{\lowercase{o}})\kern+.3em} +% \end{macrocode} +% +% \changes{frenchb-1.3c}{1997/10/08}{Typos corrected: quatro, fquatro} +% +% Typing |\primo| should result in `$1^{\rm o}$\kern+.3em', +% \begin{macrocode} +\def\primo{\FrenchEnumerate1} +\def\secundo{\FrenchEnumerate2} +\def\tertio{\FrenchEnumerate3} +\def\quarto{\FrenchEnumerate4} +% \end{macrocode} +% while typing |\fprimo)| gives `1$^{\rm o}$)\kern+.3em. +% \begin{macrocode} +\def\fprimo){\FrenchPopularEnumerate1} +\def\fsecundo){\FrenchPopularEnumerate2} +\def\ftertio){\FrenchPopularEnumerate3} +\def\fquarto){\FrenchPopularEnumerate4} +% \end{macrocode} +% +% Let's provide two macros for the common abbreviations +% of ``Num\'ero''. +% \begin{macrocode} +\DeclareRobustCommand*{\No}{N\up{\lowercase{o}}\kern+.2em} +\DeclareRobustCommand*{\no}{n\up{\lowercase{o}}\kern+.2em} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \changes{frenchb-1.1}{1996/01/29}{Added command \cs{bsc}.} +% +% \changes{frenchb-1.1}{1996/05/31}{Added \cs{leavevmode} in \cs{bsc}} +% +% \begin{macro}{\bsc} +% As family names should be written in small capitals and never be +% hyphenated, we provide a command (its name comes from Boxed Small +% Caps) to input them easily; this is a simpler implementation of +% commands |\fsc| and |\lsc| from |french.sty| : no automatic +% uppercase/lowercase conversion is performed. +% Usage: |Jean~\bsc{Duchemin}|. +% \begin{macrocode} +\DeclareRobustCommand*{\bsc}[1]{\leavevmode\hbox{\scshape #1}} +% \end{macrocode} +% \end{macro} +% +% \changes{frenchb-1.1}{1996/05/31}{Added \cs{AllTeX}.} +% +% \changes{frenchb-1.2}{1997/01/08}{Removed \cs{AllTeX}.} +% +% \changes{frenchb-1.1}{1996/02/12}{Added T1-encodings for \oe, \OE, +% \ae, \AE. \emph{Do not} re-define these symbols outside \LaTeXe.} +% +% \changes{frenchb-1.1}{1996/02/14}{Corrected definitions of +% \cs{boi}.} +% +% \changes{frenchb-1.3}{1997/05/24}{Use \cs{textbackslash} to define +% \cs{boi}.} +% +% Some definitions for special characters. The first eight are +% mandatory for |\oe| etc. to work properly in moving arguments, +% the others just for convenience. We won't define |\tilde| as a +% Text Symbol not to conflict with the macro |\tilde| for math mode +% and use the name |\tild| instead. Note that |\boi| may \emph{not} +% be used in math mode, its name in math mode is |\backslash|. +% +% \changes{frenchb-1.3}{1997/05/24}{Use \cs{r{}} to access the +% character `degree', as suggested by V. Jalby.} +% +% |\degre| needs a special treatment: it is |\char6| +% in T1-encoding and |\char23| in OT1-encoding, both can be +% accessed by the command |\r{}| for ring accent. +% +% \changes{frenchb-1.1}{1996/03/03}{Do not use commands related to +% encodings outside \LaTeXe.} +% +% \changes{frenchb-1.4}{1999/10/03}{Add definitions for \cs{at}, +% \cs{circonflexe} and \cs{tild} in other encodings (mlTeX's LO1).} +% +% \begin{macrocode} +\ifLaTeXe + \DeclareTextSymbol{\ae}{T1}{230} + \DeclareTextSymbol{\ae}{OT1}{26} + \DeclareTextSymbol{\oe}{T1}{247} + \DeclareTextSymbol{\oe}{OT1}{27} + \DeclareTextSymbol{\AE}{T1}{198} + \DeclareTextSymbol{\AE}{OT1}{29} + \DeclareTextSymbol{\OE}{T1}{215} + \DeclareTextSymbol{\OE}{OT1}{30} + \DeclareTextSymbol{\at}{T1}{64} + \DeclareTextSymbol{\at}{OT1}{64} + \DeclareTextSymbol{\circonflexe}{T1}{94} + \DeclareTextSymbol{\circonflexe}{OT1}{94} + \DeclareTextSymbol{\tild}{T1}{126} + \DeclareTextSymbol{\tild}{OT1}{126} + \DeclareTextSymbolDefault{\at}{OT1} + \DeclareTextSymbolDefault{\circonflexe}{OT1} + \DeclareTextSymbolDefault{\tild}{OT1} + \DeclareRobustCommand*{\boi}{\textbackslash} + \DeclareRobustCommand*{\degre}{\r{}} +\else + \def\T@one{T1} + \ifx\f@encoding\T@one + \newcommand{\degre}{\char6} + \else + \newcommand{\degre}{\char23} + \fi + \newcommand{\at}{\char64} + \newcommand{\circonflexe}{\char94} + \newcommand{\tild}{\char126} + \newcommand{\boi}{{$\backslash$}} +\fi +% \end{macrocode} +% +% \begin{macro}{\degres} +% We now define a macro |\degres| for typesetting the abbreviation +% for `degrees' (as in `degrees Celsius'). As the bounding box of +% the character `degree' has \emph{very} different widths in CM/EC +% and PostScript fonts, we fix the width of the bounding box of +% |\degres| to 0.3\,em, this lets the symbol `degree' stick to the +% preceding (e.g., |45\degres|) or following character +% (e.g., |20~\degres C|). +% +% If the \TeX{} Companion fonts are available (\file{textcomp.sty}), +% we pick up |\textdegree| from them instead of using emulating +% `degrees' from the |\r{}| accent. Otherwise we overwrite the +% (poor) definition of |\textdegree| given in \file{latin1.def}, +% \file{applemac.def} etc. (called by \file{inputenc.sty}) by +% our definition of |\degres|. We also advice the user (once only) +% to use TS1-encoding. +% +% \changes{frenchb-1.1}{1996/01/25}{Fixed width bounding box for +% correct spacing with both CM, EC and PostScript fonts} +% +% \changes{frenchb-1.1}{1996/05/31}{Added \cs{leavevmode} in the +% \cs{degres}'s definition} +% +% \changes{frenchb-1.6a}{2003/02/02}{Replace \cs{degres} by +% \cs{textdegree} from textcomp.sty when possible (suggested +% by Michel Bovani).} +% +% \changes{frenchb-1.6g}{2005/02/06}{Add \cs{hbox} in the definition +% of \cs{degres} when textcomp.sty is loaded, so that \cs{degres} +% can be used in math mode.} +% +% \begin{macrocode} +\ifLaTeXe + \def\Warning@degree@TSone{% + \PackageWarning{frenchb.ldf}{% + Degrees would look better in TS1-encoding: + \MessageBreak add \protect + \usepackage{textcomp} to the preamble. + \MessageBreak Degrees used}} + \AtBeginDocument{\expandafter\ifx\csname M@TS1\endcsname\relax + \DeclareRobustCommand*{\degres}{% + \leavevmode\hbox to 0.3em{\hss\degre\hss}% + \Warning@degree@TSone + \global\let\Warning@degree@TSone\relax}% + \let\textdegree\degres + \else + \DeclareRobustCommand*{\degres}{% + \hbox{\UseTextSymbol{TS1}{\textdegree}}}% + \fi} +\else + \DeclareRobustCommand*{\degres}{% + \leavevmode\hbox to 0.3em{\hss\degre\hss}} +\fi +% \end{macrocode} +% \end{macro} +% +% \changes{frenchb-1.1}{1996/01/16}{Special care has to be taken +% with Ml\TeX.} +% +% The following macros are used in the redefinition of |\^| and +% |\"| to handle the letter~i: they allow users to type simply +% |\^i| and |\"i| instead of |\^{\i}| and |\"{\i}|.\\ +% Ml\TeX{}'s macros dealing with accents conflict with those of +% \LaTeXe{}, so we check whether |\csubinverse| is defined or not. +% If |\csubinverse| is \emph{defined}, we are in Ml\TeX. +% +% \changes{frenchb-1.1}{1996/03/02}{Do this only in \LaTeXe.} +% +% \changes{frenchb-1.1}{1996/03/12}{Do not redefine \cs{\char94} and +% \cs{"} in Ml\TeX, because it would break hyphenation. The correct +% place to redefine \cs{\char94i} and \cs{"i} is in the format +% itself, see MLTeX.cfg.} +% +% \begin{macrocode} +\ifLaTeXe + \AtBeginDocument{% + \ifx\csubinverse\@undefined + \DeclareTextCompositeCommand{\^}{OT1}{i}{\^\i}% + \DeclareTextCompositeCommand{\"}{OT1}{i}{\"\i}% + \fi} +\fi +% \end{macrocode} +% +% \subsection{Date and clean up} +% +% \begin{macro}{\datefrench} +% The macro |\datefrench| redefines the command |\today| to +% produce French dates. +% +% \changes{frenchb-1.2}{1997/01/05}{Added aliases \cs{datefrenchb} +% and \cs{datefrancais}. Use \cs{ier} instead of \cs{up}.} +% +% \changes{frenchb-1.3b}{1997/10/01}{Use \cs{edef} to define +% \cs{today} to save memory} +% +% \changes{frenchb-1.3d}{1998/07/04}{Move this code to the end +% of file, until \cs{ier} is defined (due to use of \cs{edef}); +% expansion of \cs{ier} has to be stopped anyway.} +% +% \changes{frenchb-1.3g}{1999/08/18}{Replaced \cs{edef} with \cs{def} +% to prevent problems with unexpandable accent commands} +% +% \changes{frenchb-1.4d}{2000/02/01}{Changed \cs{noexpand}\cs{ier} +% to \cs{ier}, as a result of the replacement of \cs{edef} by +% \cs{def}, see previous change. Also add braces around \cs{ier} +% for xspace.sty.} +% +% \begin{macrocode} +\@namedef{date\CurrentOption}{% + \def\today{\number\day + \ifnum1=\day {\ier}\fi + \space \ifcase\month + \or janvier\or f\'evrier\or mars\or avril\or mai\or juin\or + juillet\or ao\^ut\or septembre\or octobre\or novembre\or + d\'ecembre\fi + \space \number\year}} +% \end{macrocode} +% \end{macro} +% +% The macro |\ldf@quit| takes care for setting the main language +% to be switched on at |\begin{document}| and resetting the +% category code of \texttt{@} to its original value. +% The config file searched for has to be `frenchb.cfg', and +% |\CurrentOption| has been set to `french', so +% |\ldf@finish\CurrentOption| cannot be used: we first load +% `frenchb.cfg' (in LaTeX2e only), then call +% |\ldf@quit\CurrentOption|. +% The macro-space used by some control sequences we do not +% need any longer, is freed. +% +% \changes{frenchb-1.1b}{1996/11/02}{Now use \cs{ldf@finish} to wrap +% up.} +% +% \changes{frenchb-1.2}{1997/01/05}{The config file searched for is +% `frenchb.cfg' regardless \cs{CurrentOption}.} +% +% \changes{frenchb-1.5d}{2001/02/16}{Load frenchb.cfg first and +% change \cs{ldf@finish} to \cs{ldf@quit}.} +% +% \changes{frenchb-1.6g}{2005/02/06}{frenchb.cfg is now loaded only +% with LaTeX2e, as the customization makes sense only in LaTeX2e. +% Suggested by J.F. Burnol.} +% +% \begin{macrocode} +\ifLaTeXe + \loadlocalcfg{frenchb} +\fi +\let\T@one\relax +\let\@FI@\relax +\let\ifLaTeX\@undefined +\let\LaTeXtrue\@undefined +\let\LaTeXfalse\@undefined +\let\ifLaTeXe\@undefined +\let\LaTeXetrue\@undefined +\let\LaTeXefalse\@undefined +\ldf@quit\CurrentOption +% +% \end{macrocode} +% +% \Finale +%% +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +%% +\endinput diff --git a/Master/texmf-dist/source/generic/babel/frenchb.ins b/Master/texmf-dist/source/generic/babel/frenchb.ins new file mode 100644 index 00000000000..8e5f7507769 --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/frenchb.ins @@ -0,0 +1,155 @@ +%% +%% This file will generate fast loadable files and documentation +%% driver files from the doc files in this package when run through +%% LaTeX or TeX. +%% +%% Copyright 1989-2005 Johannes L. Braams and any individual authors +%% listed elsewhere in this file. All rights reserved. +%% +%% This file is part of the Babel system. +%% -------------------------------------- +%% +%% It 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 +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% The Current Maintainer of this work is Johannes Braams. +%% +%% The list of all files belonging to the LaTeX base distribution is +%% given in the file `manifest.bbl. See also `legal.bbl' 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. +%% +%% --------------- start of docstrip commands ------------------ +%% +\def\filedate{1999/10/30} +\def\batchfile{frenchb.ins} +\input docstrip.tex + +{\ifx\generate\undefined +\Msg{**********************************************} +\Msg{*} +\Msg{* This installation requires docstrip} +\Msg{* version 2.3c or later.} +\Msg{*} +\Msg{* An older version of docstrip has been input} +\Msg{*} +\Msg{**********************************************} +\errhelp{Move or rename old docstrip.tex.} +\errmessage{Old docstrip in input path} +\batchmode +\csname @@end\endcsname +\fi} + +\declarepreamble\mainpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl 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. +\endpreamble + +\declarepreamble\fdpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl for additional +information. + +In particular, permission is granted to customize the declarations in +this file to serve the needs of your installation. + +However, NO PERMISSION is granted to distribute a modified version +of this file under its original name. + +\endpreamble + +\keepsilent + +\usedir{tex/generic/babel} + +\usepreamble\mainpreamble +\generate{\file{frenchb.ldf}{\from{frenchb.dtx}{code}} + } +\nopreamble +\nopostamble +\generate{\file{frenchb.cfg}{\from{frenchb.dtx}{cfg}} + } + +\ifToplevel{ +\Msg{***********************************************************} +\Msg{*} +\Msg{* To finish the installation you have to move the following} +\Msg{* files into a directory searched by TeX:} +\Msg{*} +\Msg{* \space\space All *.def, *.fd, *.ldf, *.sty} +\Msg{*} +\Msg{* To produce the documentation run the files ending with} +\Msg{* '.dtx' and `.fdd' through LaTeX.} +\Msg{*} +\Msg{* Happy TeXing} +\Msg{***********************************************************} +} + +\endinput + + + + diff --git a/Master/texmf-dist/source/generic/babel/galician.dtx b/Master/texmf-dist/source/generic/babel/galician.dtx new file mode 100644 index 00000000000..89b8c59e296 --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/galician.dtx @@ -0,0 +1,476 @@ +% \iffalse meta-comment +% +% Copyright 1989-2005 Johannes L. Braams and any individual authors +% listed elsewhere in this file. All rights reserved. +% +% This file is part of the Babel system. +% -------------------------------------- +% +% It 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 +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2003/12/01 or later. +% +% This work has the LPPL maintenance status "maintained". +% +% The Current Maintainer of this work is Johannes Braams. +% +% The list of all files belonging to the Babel system is +% given in the file `manifest.bbl. See also `legal.bbl' 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 +% \CheckSum{263} +% \iffalse +% Tell the \LaTeX\ system who we are and write an entry on the +% transcript. +%<*dtx> +\ProvidesFile{galician.dtx} +% +%\ProvidesLanguage{galician} +%\fi +%\ProvidesFile{galician.dtx} + [2005/03/30 v1.2l Galician support from the babel system] +%\iffalse +%% File `galician.dtx' +%% Babel package for LaTeX version 2e +%% Copyright (C) 1989 - 2005 +%% by Johannes Braams, TeXniek +% +%% Galician Language Definition File +%% Copyright (C) 1989 - 2005 +%% by Manuel Carriba mcarriba at eunetcom.net +%% Johannes Braams, TeXniek +% +%% Please report errors to: J.L. Braams +%% babel at braams.cistron.nl +% +% This file is part of the babel system, it provides the source +% code for the Galician language definition file. +% +% The 'galician' style was originally adopted from the 'spanish' +% style. +% +% All the macrocodes have been translated from the spanish language +% into the galician language, using the spanish-galician +% dictionary: +% +% X.L. Franco Grande +% Diccionario Galego-Castelan e Vocabulario Castelan-Galego +% Editorial Galaixa, Vigo 1968 +% +% The hyphenation patterns for the galician language should be the +% same as the spanish language. I've inspected some galician essays +% and nothing strange seems to point out that both languages might +% use different hyphenation patterns. This still has to been +% proved. I will check it anyway, and hope to report more as soon +% as possible. +% +% A small note to the months in the galician language: +% +% 'outono' will be used sometimes instead of 'outubro', but this +% word will be used more to assign the season. +% +% 'nadal' will be used sometimes instead of 'decembro', but this +% word will be used more for the event on Christmas. +% +% Manuel Carriba (mcarriba at eunetcom.net) +% +% The file spanish.sty was written by Julio Sanchez, +% (jsanchez at gmv.es) +%<*filedriver> +\documentclass{ltxdoc} +\newcommand*\TeXhax{\TeX hax} +\newcommand*\babel{\textsf{babel}} +\newcommand*\langvar{$\langle \it lang \rangle$} +\newcommand*\note[1]{} +\newcommand*\Lopt[1]{\textsf{#1}} +\newcommand*\file[1]{\texttt{#1}} +\begin{document} + \DocInput{galician.dtx} +\end{document} +% +%\fi +% \GetFileInfo{galician.dtx} +% +% \changes{galician-1.1}{1994/02/27}{Update for \LaTeXe} +% \changes{galician-1.1c}{1994/06/26}{Removed the use of \cs{filedate} +% and moved identification after the loading of \file{babel.def}} +% \changes{galician-1.2e}{1996/10/10}{Replaced \cs{undefined} with +% \cs{@undefined} and \cs{empty} with \cs{@empty} for consistency +% with \LaTeX, moved the definition of \cs{atcatcode} right to the +% beginning.} +% +% \section{The Galician language} +% +% The file \file{\filename}\footnote{The file described in this +% section has version number \fileversion\ and was last revised on +% \filedate.} defines all the language definition macros for the +% Galician language. +% +% For this language the characters |'| |~| and |"| are made +% active. In table~\ref{tab:galician-quote} an overview is given of +% their purpose. +% \begin{table}[htb] +% \centering +% \begin{tabular}{lp{8cm}} +% \verb="|= & disable ligature at this position.\\ +% |"-| & an explicit hyphen sign, allowing hyphenation +% in the rest of the word.\\ +% |\-| & like the old |\-|, but allowing hyphenation +% in the rest of the word. \\ +% |'a| & an accent that allows hyphenation. Valid for all +% vowels uppercase and lowercase.\\ +% |'n| & a n with a tilde. This is included to +% improve compatibility with FTC. Works for uppercase too.\\ +% |"u| & a u with dieresis allowing hyphenation.\\ +% |"a| & feminine ordinal as in +% 1{\raise1ex\hbox{\underbar{\scriptsize a}}}.\\ +% |"o| & masculine ordinal as in +% 1{\raise1ex\hbox{\underbar{\scriptsize o}}}.\\ +% |~n| & a n with tilde. Works for uppercase too. +% \end{tabular} +% \caption{The extra definitions made by \texttt{galician.ldf}} +% \label{tab:galician-quote} +% \end{table} +% These active accents character behave according to their original +% definitions if not followed by one of the characters indicated in +% that table. +% +% \StopEventually{} +% +% The macro |\LdfInit| takes care of preventing that this file is +% loaded more than once, checking the category code of the +% \texttt{@} sign, etc. +% \changes{galician-1.2e}{1996/11/02}{Now use \cs{LdfInit} to perform +% initial checks} +% \begin{macrocode} +%<*code> +\LdfInit{galician}\captionsgalician +% \end{macrocode} +% +% When this file is read as an option, i.e. by the |\usepackage| +% command, \texttt{galician} could be an `unknown' language in which +% case we have to make it known. So we check for the existence of +% |\l@galician| to see whether we have to do something here. +% +% \changes{galician-1.1c}{1994/06/26}{Now use \cs{@nopatterns} to +% produce the warning} +% \begin{macrocode} +\ifx\l@galician\@undefined + \@nopatterns{Galician} + \adddialect\l@galician0\fi +% \end{macrocode} +% +% The next step consists of defining commands to switch to (and +% from) the Galician language. +% +% \begin{macro}{\captionsgalician} +% The macro |\captionsgalician| defines all strings used +% in the four standard documentclasses provided with \LaTeX. +% \changes{galician-1.1d}{1994/11/09}{Added a few missing +% translations} +% \changes{galician-1.2b}{1995/07/02}{Added \cs{proofname} for +% AMS-\LaTeX} +% \changes{galician-1.2j}{2000/09/20}{Added \cs{glossaryname}} +% \changes{galician-1.2k}{2001/02/20}{Translated Proof} +% \changes{galician-1.2l}{2003/05/23}{Translated Gloassary} +% \begin{macrocode} +\addto\captionsgalician{% + \def\prefacename{Prefacio}% + \def\refname{Referencias}% + \def\abstractname{Resumo}% + \def\bibname{Bibliograf\'{\i}a}% + \def\chaptername{Cap\'{\i}tulo}% + \def\appendixname{Ap\'endice}% + \def\contentsname{\'Indice Xeral}% + \def\listfigurename{\'Indice de Figuras}% + \def\listtablename{\'Indice de T\'aboas}% + \def\indexname{\'Indice de Materias}% + \def\figurename{Figura}% + \def\tablename{T\'aboa}% + \def\partname{Parte}% + \def\enclname{Adxunto}% + \def\ccname{Copia a}% + \def\headtoname{A}% + \def\pagename{P\'axina}% + \def\seename{v\'exase}% + \def\alsoname{v\'exase tam\'en}% + \def\proofname{Demostraci\'on}% + \def\glossaryname{Glosario}% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\dategalician} +% The macro |\dategalician| redefines the command |\today| to +% produce Galician dates. +% \changes{galician-1.1d}{1994/11/09}{Corrected the name of the month +% marzo from marzal} +% \changes{galician-1.2h}{1997/10/01}{Use \cs{edef} to define +% \cs{today} to save memory} +% \changes{galician-1.2h}{1998/03/28}{use \cs{def} instead of \cs{edef}} +% \begin{macrocode} +\def\dategalician{% + \def\today{\number\day~de\space\ifcase\month\or + xaneiro\or febreiro\or marzo\or abril\or maio\or xu\~no\or + xullo\or agosto\or setembro\or outubro\or novembro\or decembro\fi + \space de~\number\year}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\extrasgalician} +% \changes{galician-1.2a}{1995/03/14}{Handling of active characters +% completely rewritten} +% \begin{macro}{\noextrasgalician} +% +% The macro |\extrasgalician| will perform all the extra +% definitions needed for the Galician language. The macro +% |\noextrasgalician| is used to cancel the actions of +% |\extrasgalician|. +% +% For Galician, some characters are made active or are +% redefined. In particular, the \texttt{"} character and the |~| +% character receive new meanings this can also happen for the +% \texttt{'} character when the option \Lopt{activeacute} is +% specified. +% +% \changes{galician-1.2c}{1995/07/08}{Make active accent optional} +% \changes{galician-1.2d}{1995/08/17}{Need to split up the +% \cs{@ifpackagewith} statement} +% \begin{macrocode} +\addto\extrasgalician{\languageshorthands{galician}} +\initiate@active@char{"} +\initiate@active@char{~} +\addto\extrasgalician{% + \bbl@activate{"}\bbl@activate{~}} +\@ifpackagewith{babel}{activeacute}{% + \initiate@active@char{'}}{} +\@ifpackagewith{babel}{activeacute}{% + \addto\extrasgalician{\bbl@activate{'}}}{} +% \end{macrocode} +% Now make sure that the characters that have been turned into +% shorthanfd characters expand to `normal' characters outside the +% catalan environment. +% \changes{galician-1.2i}{1999/12/16}{Don't forget do deactivate the +% shorthands} +% \begin{macrocode} +\addto\noextrasgalician{% + \bbl@deactivate{"}\bbl@deactivate{~}} +\@ifpackagewith{babel}{activeacute}{% + \addto\noextrascatalan{\bbl@deactivate{'}}}{} +% \end{macrocode} +% +% \changes{galician-1.2a}{1995/03/14}{All the code for handling active +% characters is now moved to \file{babel.def}} +% +% Apart from the active characters some other macros get a new +% definition. Therefore we store the current one to be able to +% restore them later. +% +% \changes{galician-1.2f}{1997/01/08}{Added some comment signs to +% prevent unwanted spaces in the output} +% \begin{macrocode} +\addto\extrasgalician{% + \babel@save\"\babel@save\~% + \def\"{\protect\@umlaut}% + \def\~{\protect\@tilde}} +\@ifpackagewith{babel}{activeacute}{% + \babel@save\'% + \addto\extrasgalician{\def\'{\protect\@acute}} + }{} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% All the code above is necessary because we need a few extra +% active characters. These characters are then used as indicated in +% table~\ref{tab:galician-quote}. +% +% This option includes some support for working with extended, +% 8-bit fonts, if available. This assumes that the user has some +% macros predefined. For instance, if the user has a |\@ac@a| macro +% defined, the sequence |\'a| or |'a| will both expand to whatever +% |\@ac@a| is defined to expand, presumably \texttt{\'a}. The +% names of these macros are the same as those in Ferguson's +% ML-\TeX{} compatibility package on purpose. Using this method, +% and provided that adequate hyphenation patterns exist, it is +% possible to get better hyphenation for Galician than before. If +% the user has a terminal able to produce these codes directly, it +% is possible to do so. If the need arises to send the document to +% someone who does not have such support, it is possible to +% mechanically translate the document so that the receiver can make +% use of it. +% +% To be able to define the function of the new accents, we first +% define a couple of `support' macros. +% +% \begin{macro}{\dieresis} +% \begin{macro}{\textacute} +% \changes{galician-1.1c}{1994/06/26}{Renamed from \cs{acute} as that +% is a \cs{mathaccent}} +% \begin{macro}{\texttilde} +% \changes{galician-1.1c}{1994/06/26}{Renamed from \cs{tilde} as that +% is a \cs{mathaccent}} +% +% The original definition of |\"| is stored as |\dieresis|, because +% the definition of |\"| might not be the default plain \TeX\ +% one. If the user uses \textsc{PostScript} fonts with the Adobe +% font encoding the \texttt{"} character is not in the same +% position as in Knuth's font encoding. In this case |\"| will not +% be defined as |\accent"7F #1|, but as |\accent'310 #1|. Something +% similar happens when using fonts that follow the Cork +% encoding. For this reason we save the definition of |\"| and use +% that in the definition of other macros. We do likewise for |\'| +% and |\~|. +% \begin{macrocode} +\let\dieresis\" +\let\texttilde\~ +\@ifpackagewith{babel}{activeacute}{\let\textacute\'}{} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\@umlaut} +% \begin{macro}{\@acute} +% \begin{macro}{\@tilde} +% If the user setup has extended fonts, the Ferguson macros are +% required to be defined. We check for their existance and, if +% defined, expand to whatever they are defined to. For instance, +% |\'a| would check for the existance of a |\@ac@a| macro. It is +% assumed to expand to the code of the accented letter. If it is +% not defined, we assume that no extended codes are available and +% expand to the original definition but enabling hyphenation beyond +% the accent. This is as best as we can do. It is better if you +% have extended fonts or ML-\TeX{} because the hyphenation +% algorithm can work on the whole word. The following macros are +% directly derived from ML-\TeX{}.\footnote{A problem is perceived +% here with these macros when used in a multilingual environment +% where extended hyphenation patterns are available for some but +% not all languages. Assume that no extended patterns exist at some +% site for French and that \file{french.sty} would adopt this +% scheme too. In that case, \texttt{'e} in French would +% produce the combined accented letter, but hyphenation around it +% would be suppressed. Both language options would need an +% independent method to know whether they have extended patterns +% available. The precise impact of this problem and the possible +% solutions are under study.} +% +% \begin{macrocode} +\def\@umlaut#1{\allowhyphens\dieresis{#1}\allowhyphens} +\def\@tilde#1{\allowhyphens\texttilde{#1}\allowhyphens} +\@ifpackagewith{babel}{activeacute}{% + \def\@acute#1{\allowhyphens\textacute{#1}\allowhyphens}}{} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% Now we can define our shorthands: the umlauts, +% \begin{macrocode} +\declare@shorthand{galician}{"-}{\nobreak-\bbl@allowhyphens} +\declare@shorthand{galician}{"|}{\discretionary{-}{}{\kern.03em}} +\declare@shorthand{galician}{"u}{\@umlaut{u}} +\declare@shorthand{galician}{"U}{\@umlaut{U}} +% \end{macrocode} +% ordinals\footnote{The code for the ordinals was taken from the +% answer provided by Raymond Chen +% {\texttt(raymond@math.berkeley.edu}) to a question by Joseph Gil +% (\texttt{yogi@cs.ubc.ca}) in \texttt{comp.text.tex}.}, +% \changes{galician-1.2f}{1997/01/08}{Added \cs{leavevmode} to +% definitions of \texttt{"a} and \texttt{"o}} +% \begin{macrocode} +\declare@shorthand{galician}{"o}{% + \leavevmode\raise1ex\hbox{\underbar{\scriptsize o}}} +\declare@shorthand{galician}{"a}{% + \leavevmode\raise1ex\hbox{\underbar{\scriptsize a}}} +% \end{macrocode} +% acute accents, +% \changes{galician-1.2b}{1995/07/03}{Changed mathmode definition of +% acute shorthands to expand to a single prime followed by the next +% character in the input} +% \begin{macrocode} +\@ifpackagewith{babel}{activeacute}{% + \declare@shorthand{galician}{'a}{\textormath{\@acute a}{^{\prime} a}} + \declare@shorthand{galician}{'e}{\textormath{\@acute e}{^{\prime} e}} + \declare@shorthand{galician}{'i}{\textormath{\@acute\i{}}{^{\prime}i}} + \declare@shorthand{galician}{'o}{\textormath{\@acute o}{^{\prime} o}} + \declare@shorthand{galician}{'u}{\textormath{\@acute u}{^{\prime} u}} + \declare@shorthand{galician}{'A}{\textormath{\@acute A}{^{\prime} A}} + \declare@shorthand{galician}{'E}{\textormath{\@acute E}{^{\prime} E}} + \declare@shorthand{galician}{'I}{\textormath{\@acute I}{^{\prime} I}} + \declare@shorthand{galician}{'O}{\textormath{\@acute O}{^{\prime} O}} + \declare@shorthand{galician}{'U}{\textormath{\@acute U}{^{\prime} U}} +% \end{macrocode} +% tildes, +% \begin{macrocode} + \declare@shorthand{galician}{'n}{\textormath{\~n}{^{\prime} n}} + \declare@shorthand{galician}{'N}{\textormath{\~N}{^{\prime} N}} +% \end{macrocode} +% the acute accent, +% \changes{galician-1.2d}{1995/11/11}{Added '{}' as an axtra shorthand} +% \begin{macrocode} + \declare@shorthand{galician}{''}{% + \textormath{\textquotedblright}{\sp\bgroup\prim@s'}} + }{} +\declare@shorthand{galician}{~n}{\textormath{\~n}{\@tilde n}} +\declare@shorthand{galician}{~N}{\textormath{\~N}{\@tilde N}} +% \end{macrocode} +% +% \begin{macro}{\-} +% +% All that is left now is the redefinition of |\-|. The new version +% of |\-| should indicate an extra hyphenation position, while +% allowing other hyphenation positions to be generated +% automatically. The standard behaviour of \TeX\ in this respect is +% unfortunate for Galician but not as much as for Dutch or German, +% where long compound words are quite normal and all one needs is a +% means to indicate an extra hyphenation position on top of the +% ones that \TeX\ can generate from the hyphenation +% patterns. However, the average length of words in Galician makes +% this desirable and so it is kept here. +% +% \begin{macrocode} +\addto\extrasgalician{% + \babel@save{\-}% + \def\-{\bbl@allowhyphens\discretionary{-}{}{}\bbl@allowhyphens}} +% \end{macrocode} +% \end{macro} +% +% The macro |\ldf@finish| takes care of looking for a +% configuration file, setting the main language to be switched on +% at |\begin{document}| and resetting the category code of +% \texttt{@} to its original value. +% \changes{galician-1.2e}{1996/11/02}{Now use \cs{ldf@finish} to wrap +% up} +% \begin{macrocode} +\ldf@finish{galician} +% +% \end{macrocode} +% +% \Finale +% +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +%% +\endinput diff --git a/Master/texmf-dist/source/generic/babel/galician.ins b/Master/texmf-dist/source/generic/babel/galician.ins new file mode 100644 index 00000000000..a50810d8f2c --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/galician.ins @@ -0,0 +1,148 @@ +%% +%% This file will generate fast loadable files and documentation +%% driver files from the doc files in this package when run through +%% LaTeX or TeX. +%% +%% Copyright 1989-2005 Johannes L. Braams and any individual authors +%% listed elsewhere in this file. All rights reserved. +%% +%% This file is part of the Babel system. +%% -------------------------------------- +%% +%% It 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 +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% The Current Maintainer of this work is Johannes Braams. +%% +%% The list of all files belonging to the LaTeX base distribution is +%% given in the file `manifest.bbl. See also `legal.bbl' 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. +%% +%% --------------- start of docstrip commands ------------------ +%% +\def\filedate{1999/04/11} +\def\batchfile{galician.ins} +\input docstrip.tex + +{\ifx\generate\undefined +\Msg{**********************************************} +\Msg{*} +\Msg{* This installation requires docstrip} +\Msg{* version 2.3c or later.} +\Msg{*} +\Msg{* An older version of docstrip has been input} +\Msg{*} +\Msg{**********************************************} +\errhelp{Move or rename old docstrip.tex.} +\errmessage{Old docstrip in input path} +\batchmode +\csname @@end\endcsname +\fi} + +\declarepreamble\mainpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl 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. +\endpreamble + +\declarepreamble\fdpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl for additional +information. + +In particular, permission is granted to customize the declarations in +this file to serve the needs of your installation. + +However, NO PERMISSION is granted to distribute a modified version +of this file under its original name. + +\endpreamble + +\keepsilent + +\usedir{tex/generic/babel} + +\usepreamble\mainpreamble +\generate{\file{galician.ldf}{\from{galician.dtx}{code}} + } +\usepreamble\fdpreamble + +\ifToplevel{ +\Msg{***********************************************************} +\Msg{*} +\Msg{* To finish the installation you have to move the following} +\Msg{* files into a directory searched by TeX:} +\Msg{*} +\Msg{* \space\space All *.def, *.fd, *.ldf, *.sty} +\Msg{*} +\Msg{* To produce the documentation run the files ending with} +\Msg{* '.dtx' and `.fdd' through LaTeX.} +\Msg{*} +\Msg{* Happy TeXing} +\Msg{***********************************************************} +} + +\endinput diff --git a/Master/texmf-dist/source/generic/babel/german.ins b/Master/texmf-dist/source/generic/babel/german.ins new file mode 100644 index 00000000000..987f600bf78 --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/german.ins @@ -0,0 +1,149 @@ +%% +%% This file will generate fast loadable files and documentation +%% driver files from the doc files in this package when run through +%% LaTeX or TeX. +%% +%% Copyright 1989-2005 Johannes L. Braams and any individual authors +%% listed elsewhere in this file. All rights reserved. +%% +%% This file is part of the Babel system. +%% -------------------------------------- +%% +%% It 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 +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% The Current Maintainer of this work is Johannes Braams. +%% +%% The list of all files belonging to the LaTeX base distribution is +%% given in the file `manifest.bbl. See also `legal.bbl' 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. +%% +%% --------------- start of docstrip commands ------------------ +%% +\def\filedate{1999/04/11} +\def\batchfile{german.ins} +\input docstrip.tex + +{\ifx\generate\undefined +\Msg{**********************************************} +\Msg{*} +\Msg{* This installation requires docstrip} +\Msg{* version 2.3c or later.} +\Msg{*} +\Msg{* An older version of docstrip has been input} +\Msg{*} +\Msg{**********************************************} +\errhelp{Move or rename old docstrip.tex.} +\errmessage{Old docstrip in input path} +\batchmode +\csname @@end\endcsname +\fi} + +\declarepreamble\mainpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl 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. +\endpreamble + +\declarepreamble\fdpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl for additional +information. + +In particular, permission is granted to customize the declarations in +this file to serve the needs of your installation. + +However, NO PERMISSION is granted to distribute a modified version +of this file under its original name. + +\endpreamble + +\keepsilent + +\usedir{tex/generic/babel} + +\usepreamble\mainpreamble +\generate{\file{germanb.ldf}{\from{germanb.dtx}{code}} + \file{ngermanb.ldf}{\from{ngermanb.dtx}{code}} + } +\usepreamble\fdpreamble + +\ifToplevel{ +\Msg{***********************************************************} +\Msg{*} +\Msg{* To finish the installation you have to move the following} +\Msg{* files into a directory searched by TeX:} +\Msg{*} +\Msg{* \space\space All *.def, *.fd, *.ldf, *.sty} +\Msg{*} +\Msg{* To produce the documentation run the files ending with} +\Msg{* '.dtx' and `.fdd' through LaTeX.} +\Msg{*} +\Msg{* Happy TeXing} +\Msg{***********************************************************} +} + +\endinput diff --git a/Master/texmf-dist/source/generic/babel/germanb.dtx b/Master/texmf-dist/source/generic/babel/germanb.dtx new file mode 100644 index 00000000000..4e2491b2ecd --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/germanb.dtx @@ -0,0 +1,543 @@ +% \iffalse meta-comment +% +% Copyright 1989-2005 Johannes L. Braams and any individual authors +% listed elsewhere in this file. All rights reserved. +% +% This file is part of the Babel system. +% -------------------------------------- +% +% It 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 +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2003/12/01 or later. +% +% This work has the LPPL maintenance status "maintained". +% +% The Current Maintainer of this work is Johannes Braams. +% +% The list of all files belonging to the Babel system is +% given in the file `manifest.bbl. See also `legal.bbl' 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 +% \CheckSum{343} +% +% \iffalse +% Tell the \LaTeX\ system who we are and write an entry on the +% transcript. +%<*dtx> +\ProvidesFile{germanb.dtx} +% +%\ProvidesLanguage{germanb} +%\fi +%\ProvidesFile{germanb.dtx} + [2004/02/19 v2.6k German support from the babel system] +%\iffalse +%% File `germanb.dtx' +%% Babel package for LaTeX version 2e +%% Copyright (C) 1989 - 2004 +%% by Johannes Braams, TeXniek +% +%% Germanb Language Definition File +%% Copyright (C) 1989 - 2004 +%% by Bernd Raichle raichle at azu.Informatik.Uni-Stuttgart.de +%% Johannes Braams, TeXniek +% This file is based on german.tex version 2.5d, +% by Bernd Raichle, Hubert Partl et.al. +% +%% Please report errors to: J.L. Braams +%% babel at braams.cistron.nl +% +%<*filedriver> +\documentclass{ltxdoc} +\font\manual=logo10 % font used for the METAFONT logo, etc. +\newcommand*\MF{{\manual META}\-{\manual FONT}} +\newcommand*\TeXhax{\TeX hax} +\newcommand*\babel{\textsf{babel}} +\newcommand*\langvar{$\langle \it lang \rangle$} +\newcommand*\note[1]{} +\newcommand*\Lopt[1]{\textsf{#1}} +\newcommand*\file[1]{\texttt{#1}} +\begin{document} + \DocInput{germanb.dtx} +\end{document} +% +%\fi +% \GetFileInfo{germanb.dtx} +% +% \changes{germanb-1.0a}{1990/05/14}{Incorporated Nico's comments} +% \changes{germanb-1.0b}{1990/05/22}{fixed typo in definition for +% austrian language found by Werenfried Spit +% \texttt{nspit@fys.ruu.nl}} +% \changes{germanb-1.0c}{1990/07/16}{Fixed some typos} +% \changes{germanb-1.1}{1990/07/30}{When using PostScript fonts with +% the Adobe fontencoding, the dieresis-accent is located elsewhere, +% modified code} +% \changes{germanb-1.1a}{1990/08/27}{Modified the documentation +% somewhat} +% \changes{germanb-2.0}{1991/04/23}{Modified for babel 3.0} +% \changes{germanb-2.0a}{1991/05/25}{Removed some problems in change +% log} +% \changes{germanb-2.1}{1991/05/29}{Removed bug found by van der Meer} +% \changes{germanb-2.2}{1991/06/11}{Removed global assignments, +% brought uptodate with \file{german.tex} v2.3d} +% \changes{germanb-2.2a}{1991/07/15}{Renamed \file{babel.sty} in +% \file{babel.com}} +% \changes{germanb-2.3}{1991/11/05}{Rewritten parts of the code to use +% the new features of babel version 3.1} +% \changes{germanb-2.3e}{1991/11/10}{Brought up-to-date with +% \file{german.tex} v2.3e (plus some bug fixes) [br]} +% \changes{germanb-2.5}{1994/02/08}{Update or \LaTeXe} +% \changes{germanb-2.5c}{1994/06/26}{Removed the use of \cs{filedate} +% and moved the identification after the loading of +% \file{babel.def}} +% \changes{germanb-2.6a}{1995/02/15}{Moved the identification to the +% top of the file} +% \changes{germanb-2.6a}{1995/02/15}{Rewrote the code that handles the +% active double quote character} +% \changes{germanb-2.6d}{1996/07/10}{Replaced \cs{undefined} with +% \cs{@undefined} and \cs{empty} with \cs{@empty} for consistency +% with \LaTeX} +% \changes{germanb-2.6d}{1996/10/10}{Moved the definition of +% \cs{atcatcode} right to the beginning.} +% +% \section{The German language} +% +% The file \file{\filename}\footnote{The file described in this +% section has version number \fileversion\ and was last revised on +% \filedate.} defines all the language definition macros for the +% German language as well as for the Austrian dialect of this +% language\footnote{This file is a re-implementation of Hubert +% Partl's \file{german.sty} version 2.5b, see~\cite{HP}.}. +% +% For this language the character |"| is made active. In +% table~\ref{tab:german-quote} an overview is given of its +% purpose. One of the reasons for this is that in the German +% language some character combinations change when a word is broken +% between the combination. Also the vertical placement of the +% umlaut can be controlled this way. +% \begin{table}[htb] +% \begin{center} +% \begin{tabular}{lp{8cm}} +% |"a| & |\"a|, also implemented for the other +% lowercase and uppercase vowels. \\ +% |"s| & to produce the German \ss{} (like |\ss{}|). \\ +% |"z| & to produce the German \ss{} (like |\ss{}|). \\ +% |"ck|& for |ck| to be hyphenated as |k-k|. \\ +% |"ff|& for |ff| to be hyphenated as |ff-f|, +% this is also implemented for l, m, n, p, r and t\\ +% |"S| & for |SS| to be |\uppercase{"s}|. \\ +% |"Z| & for |SZ| to be |\uppercase{"z}|. \\ +% \verb="|= & disable ligature at this position. \\ +% |"-| & an explicit hyphen sign, allowing hyphenation +% in the rest of the word. \\ +% |""| & like |"-|, but producing no hyphen sign +% (for compund words with hyphen, e.g.\ |x-""y|). \\ +% |"~| & for a compound word mark without a breakpoint. \\ +% |"=| & for a compound word mark with a breakpoint, allowing +% hyphenation in the composing words. \\ +% |"`| & for German left double quotes (looks like ,,). \\ +% |"'| & for German right double quotes. \\ +% |"<| & for French left double quotes (similar to $<<$). \\ +% |">| & for French right double quotes (similar to $>>$). \\ +% \end{tabular} +% \caption{The extra definitions made +% by \file{german.ldf}}\label{tab:german-quote} +% \end{center} +% \end{table} +% The quotes in table~\ref{tab:german-quote} can also be typeset by +% using the commands in table~\ref{tab:more-quote}. +% \begin{table}[htb] +% \begin{center} +% \begin{tabular}{lp{8cm}} +% |\glqq| & for German left double quotes (looks like ,,). \\ +% |\grqq| & for German right double quotes (looks like ``). \\ +% |\glq| & for German left single quotes (looks like ,). \\ +% |\grq| & for German right single quotes (looks like `). \\ +% |\flqq| & for French left double quotes (similar to $<<$). \\ +% |\frqq| & for French right double quotes (similar to $>>$).\\ +% |\flq| & for (French) left single quotes (similar to $<$). \\ +% |\frq| & for (French) right single quotes (similar to $>$). \\ +% |\dq| & the original quotes character (|"|). \\ +% \end{tabular} +% \caption{More commands which produce quotes, defined +% by \file{german.ldf}}\label{tab:more-quote} +% \end{center} +% \end{table} +% +% \StopEventually{} +% +% When this file was read through the option \Lopt{germanb} we make +% it behave as if \Lopt{german} was specified. +% \begin{macrocode} +\def\bbl@tempa{germanb} +\ifx\CurrentOption\bbl@tempa + \def\CurrentOption{german} +\fi +% \end{macrocode} +% +% The macro |\LdfInit| takes care of preventing that this file is +% loaded more than once, checking the category code of the +% \texttt{@} sign, etc. +% \changes{germanb-2.6d}{1996/11/02}{Now use \cs{LdfInit} to perform +% initial checks} +% \begin{macrocode} +%<*code> +\LdfInit\CurrentOption{captions\CurrentOption} +% \end{macrocode} +% +% When this file is read as an option, i.e., by the |\usepackage| +% command, \texttt{german} will be an `unknown' language, so we +% have to make it known. So we check for the existence of +% |\l@german| to see whether we have to do something here. +% +% \changes{germanb-2.0}{1991/04/23}{Now use \cs{adddialect} if +% language undefined} +% \changes{germanb-2.2d}{1991/10/27}{Removed use of \cs{@ifundefined}} +% \changes{germanb-2.3e}{1991/11/10}{Added warning, if no german +% patterns loaded} +% \changes{germanb-2.5c}{1994/06/26}{Now use \cs{@nopatterns} to +% produce the warning} +% \begin{macrocode} +\ifx\l@german\@undefined + \@nopatterns{German} + \adddialect\l@german0 +\fi +% \end{macrocode} +% +% For the Austrian version of these definitions we just add another +% language. +% \changes{germanb-2.0}{1991/04/23}{Now use \cs{adddialect} for +% austrian} +% \begin{macrocode} +\adddialect\l@austrian\l@german +% \end{macrocode} +% +% The next step consists of defining commands to switch to (and +% from) the German language. +% +% \begin{macro}{\captionsgerman} +% \begin{macro}{\captionsaustrian} +% Either the macro |\captionsgerman| or the macro +% |\captionsaustrian| will define all strings used in the four +% standard document classes provided with \LaTeX. +% +% \changes{germanb-2.2}{1991/06/06}{Removed \cs{global} definitions} +% \changes{germanb-2.2}{1991/06/06}{\cs{pagename} should be +% \cs{headpagename}} +% \changes{germanb-2.3e}{1991/11/10}{Added \cs{prefacename}, +% \cs{seename} and \cs{alsoname}} +% \changes{germanb-2.4}{1993/07/15}{\cs{headpagename} should be +% \cs{pagename}} +% \changes{germanb-2.6b}{1995/07/04}{Added \cs{proofname} for +% AMS-\LaTeX} +% \changes{germanb-2.6d}{1996/07/10}{Construct control sequence on the +% fly} +% \changes{germanb-2.6j}{2000/09/20}{Added \cs{glossaryname}} +% \begin{macrocode} +\@namedef{captions\CurrentOption}{% + \def\prefacename{Vorwort}% + \def\refname{Literatur}% + \def\abstractname{Zusammenfassung}% + \def\bibname{Literaturverzeichnis}% + \def\chaptername{Kapitel}% + \def\appendixname{Anhang}% + \def\contentsname{Inhaltsverzeichnis}% % oder nur: Inhalt + \def\listfigurename{Abbildungsverzeichnis}% + \def\listtablename{Tabellenverzeichnis}% + \def\indexname{Index}% + \def\figurename{Abbildung}% + \def\tablename{Tabelle}% % oder: Tafel + \def\partname{Teil}% + \def\enclname{Anlage(n)}% % oder: Beilage(n) + \def\ccname{Verteiler}% % oder: Kopien an + \def\headtoname{An}% + \def\pagename{Seite}% + \def\seename{siehe}% + \def\alsoname{siehe auch}% + \def\proofname{Beweis}% + \def\glossaryname{Glossar}% + } +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\dategerman} +% The macro |\dategerman| redefines the command +% |\today| to produce German dates. +% \changes{germanb-2.3e}{1991/11/10}{Added \cs{month@german}} +% \changes{germanb-2.6f}{1997/10/01}{Use \cs{edef} to define +% \cs{today} to save memory} +% \changes{germanb-2.6f}{1998/03/28}{use \cs{def} instead of +% \cs{edef}} +% \begin{macrocode} +\def\month@german{\ifcase\month\or + Januar\or Februar\or M\"arz\or April\or Mai\or Juni\or + Juli\or August\or September\or Oktober\or November\or Dezember\fi} +\def\dategerman{\def\today{\number\day.~\month@german + \space\number\year}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\dateaustrian} +% The macro |\dateaustrian| redefines the command +% |\today| to produce Austrian version of the German dates. +% \changes{germanb-2.6f}{1997/10/01}{Use \cs{edef} to define +% \cs{today} to save memory} +% \changes{germanb-2.6f}{1998/03/28}{use \cs{def} instead of +% \cs{edef}} +% \begin{macrocode} +\def\dateaustrian{\def\today{\number\day.~\ifnum1=\month + J\"anner\else \month@german\fi \space\number\year}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\extrasgerman} +% \begin{macro}{\extrasaustrian} +% \changes{germanb-2.0b}{1991/05/29}{added some comment chars to +% prevent white space} +% \changes{germanb-2.2}{1991/06/11}{Save all redefined macros} +% \begin{macro}{\noextrasgerman} +% \begin{macro}{\noextrasaustrian} +% \changes{germanb-1.1}{1990/07/30}{Added \cs{dieresis}} +% \changes{germanb-2.0b}{1991/05/29}{added some comment chars to +% prevent white space} +% \changes{germanb-2.2}{1991/06/11}{Try to restore everything to its +% former state} +% \changes{germanb-2.6d}{1996/07/10}{Construct control sequence +% \cs{extrasgerman} or \cs{extrasaustrian} on the fly} +% +% Either the macro |\extrasgerman| or the macros |\extrasaustrian| +% will perform all the extra definitions needed for the German +% language. The macro |\noextrasgerman| is used to cancel the +% actions of |\extrasgerman|. +% +% For German (as well as for Dutch) the \texttt{"} character is +% made active. This is done once, later on its definition may vary. +% \begin{macrocode} +\initiate@active@char{"} +\@namedef{extras\CurrentOption}{% + \languageshorthands{german}} +\expandafter\addto\csname extras\CurrentOption\endcsname{% + \bbl@activate{"}} +% \end{macrocode} +% Don't forget to turn the shorthands off again. +% \changes{germanb-2.6i}{1999/12/16}{Deactivate shorthands ouside of +% German} +% \begin{macrocode} +\addto\noextrasgerman{\bbl@deactivate{"}} +% \end{macrocode} +% +% \changes{germanb-2.6a}{1995/02/15}{All the code to handle the active +% double quote has been moved to \file{babel.def}} +% +% In order for \TeX\ to be able to hyphenate German words which +% contain `\ss' (in the \texttt{OT1} position |^^Y|) we have to +% give the character a nonzero |\lccode| (see Appendix H, the \TeX +% book). +% \changes{germanb-2.6c}{1996/04/08}{Use decimal number instead of +% hat-notation as the hat may be activated} +% \begin{macrocode} +\expandafter\addto\csname extras\CurrentOption\endcsname{% + \babel@savevariable{\lccode25}% + \lccode25=25} +% \end{macrocode} +% \changes{germanb-2.6a}{1995/02/15}{Removeed \cs{3} as it is no +% longer in \file{german.ldf}} +% +% The umlaut accent macro |\"| is changed to lower the umlaut dots. +% The redefinition is done with the help of |\umlautlow|. +% \begin{macrocode} +\expandafter\addto\csname extras\CurrentOption\endcsname{% + \babel@save\"\umlautlow} +\@namedef{noextras\CurrentOption}{\umlauthigh} +% \end{macrocode} +% The german hyphenation patterns can be used with |\lefthyphenmin| +% and |\righthyphenmin| set to~2. +% \changes{germanb-2.6a}{1995/05/13}{use \cs{germanhyphenmins} to store +% the correct values} +% \changes{germanb-2.6j}{2000/09/22}{Now use \cs{providehyphenmins} to +% provide a default value} +% \begin{macrocode} +\providehyphenmins{\CurrentOption}{\tw@\tw@} +% \end{macrocode} +% For German texts we need to make sure that |\frenchspacing| is +% turned on. +% \changes{germanb-2.6k}{2001/01/26}{Turn frenchspacing on, as in +% \texttt{german.sty}} +% \begin{macrocode} +\expandafter\addto\csname extras\CurrentOption\endcsname{% + \bbl@frenchspacing} +\expandafter\addto\csname noextras\CurrentOption\endcsname{% + \bbl@nonfrenchspacing} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \changes{germanb-2.6a}{1995/02/15}{\cs{umlautlow} and +% \cs{umlauthigh} moved to \file{glyphs.dtx}, as well as +% \cs{newumlaut} (now \cs{lower@umlaut}} +% +% The code above is necessary because we need an extra active +% character. This character is then used as indicated in +% table~\ref{tab:german-quote}. +% +% To be able to define the function of |"|, we first define a +% couple of `support' macros. +% +% \changes{germanb-2.3e}{1991/11/10}{Added \cs{save@sf@q} macro and +% rewrote all quote macros to use it} +% \changes{germanb-2.3h}{1991/02/16}{moved definition of +% \cs{allowhyphens}, \cs{set@low@box} and \cs{save@sf@q} to +% \file{babel.com}} +% \changes{germanb-2.6a}{1995/02/15}{Moved all quotation characters to +% \file{glyphs.dtx}} +% +% \begin{macro}{\dq} +% We save the original double quote character in |\dq| to keep +% it available, the math accent |\"| can now be typed as |"|. +% \begin{macrocode} +\begingroup \catcode`\"12 +\def\x{\endgroup + \def\@SS{\mathchar"7019 } + \def\dq{"}} +\x +% \end{macrocode} +% \end{macro} +% \changes{germanb-2.6c}{1996/01/24}{Moved \cs{german@dq@disc} to +% babel.def, calling it \cs{bbl@disc}} +% +% \changes{germanb-2.6a}{1995/02/15}{Use \cs{ddot} instead of +% \cs{@MATHUMLAUT}} +% +% Now we can define the doublequote macros: the umlauts, +% \changes{germanb-2.6c}{1996/05/30}{added the \cs{allowhyphens}} +% \begin{macrocode} +\declare@shorthand{german}{"a}{\textormath{\"{a}\allowhyphens}{\ddot a}} +\declare@shorthand{german}{"o}{\textormath{\"{o}\allowhyphens}{\ddot o}} +\declare@shorthand{german}{"u}{\textormath{\"{u}\allowhyphens}{\ddot u}} +\declare@shorthand{german}{"A}{\textormath{\"{A}\allowhyphens}{\ddot A}} +\declare@shorthand{german}{"O}{\textormath{\"{O}\allowhyphens}{\ddot O}} +\declare@shorthand{german}{"U}{\textormath{\"{U}\allowhyphens}{\ddot U}} +% \end{macrocode} +% tremas, +% \begin{macrocode} +\declare@shorthand{german}{"e}{\textormath{\"{e}}{\ddot e}} +\declare@shorthand{german}{"E}{\textormath{\"{E}}{\ddot E}} +\declare@shorthand{german}{"i}{\textormath{\"{\i}}% + {\ddot\imath}} +\declare@shorthand{german}{"I}{\textormath{\"{I}}{\ddot I}} +% \end{macrocode} +% german es-zet (sharp s), +% \changes{germanb-2.6f}{1997/05/08}{use \cs{SS} instead of +% \texttt{SS}, removed braces after \cs{ss}} +% \begin{macrocode} +\declare@shorthand{german}{"s}{\textormath{\ss}{\@SS{}}} +\declare@shorthand{german}{"S}{\SS} +\declare@shorthand{german}{"z}{\textormath{\ss}{\@SS{}}} +\declare@shorthand{german}{"Z}{SZ} +% \end{macrocode} +% german and french quotes, +% \begin{macrocode} +\declare@shorthand{german}{"`}{\glqq} +\declare@shorthand{german}{"'}{\grqq} +\declare@shorthand{german}{"<}{\flqq} +\declare@shorthand{german}{">}{\frqq} +% \end{macrocode} +% discretionary commands +% \begin{macrocode} +\declare@shorthand{german}{"c}{\textormath{\bbl@disc ck}{c}} +\declare@shorthand{german}{"C}{\textormath{\bbl@disc CK}{C}} +\declare@shorthand{german}{"F}{\textormath{\bbl@disc F{FF}}{F}} +\declare@shorthand{german}{"l}{\textormath{\bbl@disc l{ll}}{l}} +\declare@shorthand{german}{"L}{\textormath{\bbl@disc L{LL}}{L}} +\declare@shorthand{german}{"m}{\textormath{\bbl@disc m{mm}}{m}} +\declare@shorthand{german}{"M}{\textormath{\bbl@disc M{MM}}{M}} +\declare@shorthand{german}{"n}{\textormath{\bbl@disc n{nn}}{n}} +\declare@shorthand{german}{"N}{\textormath{\bbl@disc N{NN}}{N}} +\declare@shorthand{german}{"p}{\textormath{\bbl@disc p{pp}}{p}} +\declare@shorthand{german}{"P}{\textormath{\bbl@disc P{PP}}{P}} +\declare@shorthand{german}{"r}{\textormath{\bbl@disc r{rr}}{r}} +\declare@shorthand{german}{"R}{\textormath{\bbl@disc R{RR}}{R}} +\declare@shorthand{german}{"t}{\textormath{\bbl@disc t{tt}}{t}} +\declare@shorthand{german}{"T}{\textormath{\bbl@disc T{TT}}{T}} +% \end{macrocode} +% We need to treat |"f| a bit differently in order to preserve the +% ff-ligature. +% \changes{germanb-2.6f}{1998/06/15}{Copied the coding for \texttt{"f} +% from german.dtx version 2.5d} +% \begin{macrocode} +\declare@shorthand{german}{"f}{\textormath{\bbl@discff}{f}} +\def\bbl@discff{\penalty\@M + \afterassignment\bbl@insertff \let\bbl@nextff= } +\def\bbl@insertff{% + \if f\bbl@nextff + \expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi + {\relax\discretionary{ff-}{f}{ff}\allowhyphens}{f\bbl@nextff}} +\let\bbl@nextff=f +% \end{macrocode} +% and some additional commands: +% \begin{macrocode} +\declare@shorthand{german}{"-}{\nobreak\-\bbl@allowhyphens} +\declare@shorthand{german}{"|}{% + \textormath{\penalty\@M\discretionary{-}{}{\kern.03em}% + \allowhyphens}{}} +\declare@shorthand{german}{""}{\hskip\z@skip} +\declare@shorthand{german}{"~}{\textormath{\leavevmode\hbox{-}}{-}} +\declare@shorthand{german}{"=}{\penalty\@M-\hskip\z@skip} +% \end{macrocode} +% +% \begin{macro}{\mdqon} +% \begin{macro}{\mdqoff} +% \begin{macro}{\ck} +% All that's left to do now is to define a couple of commands +% for reasons of compatibility with \file{german.sty}. +% \changes{germanb-2.6f}{1998/06/07}{Now use \cs{shorthandon} and +% \cs{shorthandoff}} +% \begin{macrocode} +\def\mdqon{\shorthandon{"}} +\def\mdqoff{\shorthandoff{"}} +\def\ck{\allowhyphens\discretionary{k-}{k}{ck}\allowhyphens} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% The macro |\ldf@finish| takes care of looking for a +% configuration file, setting the main language to be switched on +% at |\begin{document}| and resetting the category code of +% \texttt{@} to its original value. +% \changes{germanb-2.6d}{1996/11/02}{Now use \cs{ldf@finish} to wrap +% up} +% \begin{macrocode} +\ldf@finish\CurrentOption +% +% \end{macrocode} +% +% \Finale +%% +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +%% +\endinput diff --git a/Master/texmf-dist/source/generic/babel/greek.dtx b/Master/texmf-dist/source/generic/babel/greek.dtx new file mode 100644 index 00000000000..4f198cdee56 --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/greek.dtx @@ -0,0 +1,864 @@ +% \iffalse meta-comment +% +% Copyright 1989-2005 Johannes L. Braams and any individual authors +% listed elsewhere in this file. All rights reserved. +% +% This file is part of the Babel system. +% -------------------------------------- +% +% It 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 +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2003/12/01 or later. +% +% This work has the LPPL maintenance status "maintained". +% +% The Current Maintainer of this work is Johannes Braams. +% +% The list of all files belonging to the Babel system is +% given in the file `manifest.bbl. See also `legal.bbl' 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 +% \CheckSum{636} +% +% \iffalse +% Tell the \LaTeX\ system who we are and write an entry on the +% transcript. +%<*dtx> +\ProvidesFile{greek.dtx} +% +%\ProvidesLanguage{greek} +%\fi +%\ProvidesFile{greek.dtx} + [2005/03/30 v1.3l Greek support from the babel system] +%\iffalse +%% File `greek.dtx' +%% Babel package for LaTeX version 2e +%% Copyright (C) 1989 -- 2005 +%% by Johannes Braams, TeXniek +% +%% Greek language Definition File +%% Copyright (C) 1997, 2005 +%% by Apostolos Syropoulos +%% Johannes Braams, TeXniek +% +%% Please report errors to: Apostolos Syropoulos +%% apostolo at platon.ee.duth.gr or +%% apostolo at obelix.ee.duth.gr +%% (or J.L. Braams with his +% consent. +%<*filedriver> +\documentclass{ltxdoc} +\newcommand*{\TeXhax}{\TeX hax} +\newcommand*{\babel}{\textsf{babel}} +\newcommand*{\langvar}{$\langle \mathit lang \rangle$} +\newcommand*{\note}[1]{} +\newcommand*{\Lopt}[1]{\textsf{#1}} +\newcommand*{\file}[1]{\texttt{#1}} +\newcommand*{\pkg}[1]{\texttt{#1}} +\begin{document} + \DocInput{greek.dtx} +\end{document} +% +%\fi +% \GetFileInfo{greek.dtx} +% +% \changes{greek-1.0b}{1996/07/10}{Replaced \cs{undefined} with +% \cs{@undefined} and \cs{empty} with \cs{@empty} for consistency +% with \LaTeX} +% \changes{greek-1.0b}{1996/10/10}{Moved the definition of +% \cs{atcatcode} right to the beginning} +% \changes{greek-1.2}{1997/10/28}{Classical Greek is now a dialect} +% \changes{greek-1.2b}{1997/11/01}{Classical Greek is now called +% ``Polutoniko'' Greek. The previous name was at least misleading} +% \changes{greek-1.2c}{1998/06/26}{This version conforms to version +% 2.0 of the CB fonts and consequently we added a few new +% symbol-producing commands} +% \changes{greek-1.3a}{1998/07/04}{polutoniko is now an attribute to +% Greek, no longer a `dialect'} +% +% \section{The Greek language} +% +% The file \file{\filename}\footnote{The file described in this +% section has version number \fileversion\ and was last revised on +% \filedate. The original author is Apostolos Syropoulos +% (\texttt{apostolo@platon.ee.duth.gr}), code from +% \file{kdgreek.sty} by David Kastrup +% \texttt{dak@neuroinformatik.ruhr-uni-bochum.de} was used to +% enhance the support for typesetting greek texts.} defines all the +% language definition macros for the Greek language, i.e., +% as it used today with only one accent, and the attribute +% $\pi o\lambda\upsilon\tau o\nu\kappa\acute{o}$ (``Polutoniko'') +% for typesetting greek text with all accents. This separation +% arose out of the need to simplify things, for only very few +% people will be really interested to typeset polytonic Greek +% text. +% +% \DescribeMacro\greektext +% \DescribeMacro\latintext +% The commands |\greektext| and |\latintext| can be used to switch +% to greek or latin fonts. These are declarations. +% +% \DescribeMacro\textgreek +% \DescribeMacro\textlatin +% The commands |\textgreek| and |\textlatin| both take one argument +% which is then typeset using the requested font encoding. +% \DescribeMacro\textol +% The command |\greekol| switches to the greek outline font family, +% while the command |\textol| typests a short text in outline font. +% A number of extra greek characters are made available through the +% added text commands |\stigma|, |\qoppa|, |\sampi|, |\ddigamma|, +% |\Digamma|, |\euro|, |\permill|, and |\vardigamma|. +% +% \subsection{Typing conventions} +% +% Entering greek text can be quite difficult because of the many +% diacritical signs that need to be added for various purposes. +% The fonts that are used to typeset Greek make this a lot +% easier by offering a lot of ligatures. But in order for this to +% work, some characters need to be considered as letters. These +% characters are |<|, |>|, |~|, |`|, |'|, |"| and +% \verb=|=. Therefore their |\lccode| is changed when Greek is in +% effect. In order to let |\uppercase| give correct results, the +% |\uccode| of these characters is set to a non-existing character +% to make them disappear. Of course not all characters are needed +% when typesetting ``modern'' $\mu o\nu o\tau o\nu +% \iota\kappa\acute{o}$. In that case we only need the |'| and |"| +% symbols which are treated in the proper way. +% +% \subsection{Greek numbering} +% +% The Greek alphabetical numbering system, like the Roman one, is +% still used in everyday life for short enumerations. Unfortunately +% most Greeks don't know how to write Greek numbers bigger than 20 or +% 30. Nevertheless, in official editions of the last century and +% beginning of this century this numbering system was also used for +% dates and numbers in the range of several thousands. Nowadays +% this numbering system is primary used by the Eastern Orthodox +% Church and by certain scholars. It is hence necessary to be able +% to typeset any Greek numeral up to \hbox{999\,999}. Here are the +% conventions: +% \begin{itemize} +% \item There is no Greek numeral for any number less than or equal +% to $0$. +% \item Numbers from $1$ to $9$ are denoted by letters alpha, beta, +% gamma, delta, epsilon, stigma, zeta, eta, theta, followed by a +% mark similar to the mathematical symbol ``prime''. (Nowadays +% instead of letter stigma the digraph sigma tau is used for number +% $6$. Mainly because the letter stigma is not always available, so +% people opt to write down the first two letters of its name as an +% alternative. In our implementation we produce the letter stigma, +% not the digraph sigma tau.) +% \item Decades from $10$ to $90$ are denoted by letters iota, +% kappa, lambda, mu, nu, xi, omikron, pi, qoppa, again followed by +% the numeric mark. The qoppa used for this purpose has a special +% zig-zag form, which doesn't resemble at all the original +% `q'-like qoppa. +% \item Hundreds from $100$ to $900$ are denoted by letters rho, +% sigma, tau, upsilon, phi, chi, psi, omega, sampi, followed by the +% numeric mark. +% \item Any number between $1$ and $999$ is obtained by a group of +% letters denoting the hundreds decades and units, followed by a +% numeric mark. +% \item To denote thousands one uses the same method, but this time +% the mark is placed in front of the letter, and under the baseline +% (it is inverted by 180 degrees). When a group of letters denoting +% thousands is followed by a group of letters denoting a number +% under $1000$, then both marks are used. +% \end{itemize} +% +% Using these conventions one obtains numbers up to \hbox{999\,999}. +% \DescribeMacro{\greeknumeral} +% The command |\greeknumeral| makes it possible to typeset Greek +% numerals. There is also an +% \DescribeMacro{\Greeknumeral} +% ``uppercase'' version of this macro: |\Greeknumeral|. +% +% Another system which was in wide use only in Athens, could +% express any positive number. This system is implemented in +% package |athnum|. +% +% \StopEventually{} +% +% The macro |\LdfInit| takes care of preventing that this file is +% loaded more than once, checking the category code of the +% \texttt{@} sign, etc. +% \changes{greek-1.0b}{1996/11/02}{Now use \cs{LdfInit} to perform +% initial checks} +% \begin{macrocode} +%<*code> +\LdfInit\CurrentOption{captions\CurrentOption} +% \end{macrocode} +% When the option \Lopt{polutonikogreek} was used, redefine +% |\CurrentOption| to prevent problems later on. +% \begin{macrocode} +\gdef\CurrentOption{greek}% +% \end{macrocode} +% +% When this file is read as an option, i.e. by the |\usepackage| +% command, \texttt{greek} could be an `unknown' language in +% which case we have to make it known. So we check for the +% existence of |\l@greek| to see whether we have to do +% something here. +% +% \begin{macrocode} +\ifx\l@greek\@undefined + \@nopatterns{greek} + \adddialect\l@greek0\fi +% \end{macrocode} +% +% Now we declare the |polutoniko| language attribute. +% \begin{macrocode} +\bbl@declare@ttribute{greek}{polutoniko}{% +% \end{macrocode} +% This code adds the expansion of |\extraspolutonikogreek| to +% |\extrasgreek| and changes the definition of |\today| for Greek +% to produce polytonic month names. +% \begin{macrocode} + \expandafter\addto\expandafter\extrasgreek + \expandafter{\extraspolutonikogreek}% + \let\captionsgreek\captionspolutonikogreek + \let\gr@month\gr@c@month +% \end{macrocode} +% We need to take some extra precautions in order not to break +% older documents which still use the old \Lopt{polutonikogreek} +% option. +% \changes{greek-1.3f}{1999/09/29}{Added some code to make older +% documents work} +% \changes{greek-1.3g}{2000/02/04}{\cs{noextraspolutonikogreek} was +% missing} +% \begin{macrocode} + \let\l@polutonikogreek\l@greek + \let\datepolutonikogreek\dategreek + \let\extraspolutonikogreek\extrasgreek + \let\noextraspolutonikogreek\noextrasgreek + } +% \end{macrocode} +% +% Typesetting Greek texts implies that a special set of fonts needs +% to be used. The current support for greek uses the |cb| fonts +% created by Claudio Beccari\footnote{Apostolos Syropoulos wishes +% to thank him for his patience, collaboration, cooments and +% suggestions.}. The |cb| fonts provide all sorts of \textit{font +% combinations}. In order to use these fonts we define the Local +% GReek encoding (LGR, see the file \file{greek.fdd}). We make sure +% that this encoding is known to \LaTeX, and if it isn't we abort. +% \changes{greek-1.2a}{1997/10/31}{filename \file{lgrenc.def} now +% lowercase} +% \begin{macrocode} +\InputIfFileExists{lgrenc.def}{% + \message{Loading the definitions for the Greek font encoding}}{% + \errhelp{I can't find the lgrenc.def file for the Greek fonts}% + \errmessage{Since I do not know what the LGR encoding means^^J + I can't typeset Greek.^^J + I stop here, while you get a suitable lgrenc.def file}\@@end + } +% \end{macrocode} +% +% Now we define two commands that offer the possibility to switch +% between Greek and Roman encodings. +% +% \begin{macro}{\greektext} +% The command |\greektext| will switch from Latin font encoding to +% the Greek font encoding. This assumes that the `normal' font +% encoding is a Latin one. This command is a \emph{declaration}, +% for shorter pieces of text the command |\textgreek| should be +% used. +% \begin{macrocode} +\DeclareRobustCommand{\greektext}{% + \fontencoding{LGR}\selectfont + \def\encodingdefault{LGR}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\textgreek} +% This command takes an argument which is then typeset using the +% requested font encoding. In order to avoid many encoding switches +% it operates in a local scope. +% \changes{greek-1.0b}{1996/09/23}{Added a level of braces to keep +% encoding change local} +% \changes{greek-1.3k}{2003/03/19}{Added \cs{leavevmode} as was done +% with \cs{latintext}} +% \begin{macrocode} +\DeclareRobustCommand{\textgreek}[1]{\leavevmode{\greektext #1}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\textol} +% A last aspect of the set of fonts provided with this version of +% support for typesetting Greek texts is that it contains an +% outline family. In order to make it available we define the command +% |\textol|. +% \begin{macrocode} +\def\outlfamily{\usefont{LGR}{cmro}{m}{n}} +\DeclareTextFontCommand{\textol}{\outlfamily} +% \end{macrocode} +% \end{macro} +% +% The next step consists in defining commands to switch to (and +% from) the Greek language. +% +% \begin{macro}{\greekhyphenmins} +% This macro is used to store the correct values of the hyphenation +% parameters |\lefthyphenmin| and |\righthyphenmin|. +% \changes{greek-1.3h}{2000/09/22}{Now use \cs{providehyphenmins} to +% provide a default value} +% \begin{macrocode} +% Yannis Haralambous has suggested this value +\providehyphenmins{\CurrentOption}{\@ne\@ne} +% \end{macrocode} +% \end{macro} +% +% \changes{greek-1.1e}{1997/10/12}{Added caption name for proof} +% \changes{greek-1.3d}{1999/08/28}{Fixed typo, \texttt{bl'epe ep'ishc} +% instead of \texttt{bl'pe ep'ishc}} +% +% \begin{macro}{\captionsgreek} +% The macro |\captionsgreek| defines all strings used in the +% four standard document classes provided with \LaTeX. +% \changes{greek-1.3h}{2000/09/20}{Added \cs{glossaryname}} +% \changes{greek-1.3i}{2000/10/02}{The final sigma in all names appears +% as `s' instead of `c'.} +% \begin{macrocode} +\addto\captionsgreek{% + \def\prefacename{Pr'ologos}% + \def\refname{Anafor'es}% + \def\abstractname{Per'ilhyh}% + \def\bibname{Bibliograf'ia}% + \def\chaptername{Kef'alaio}% + \def\appendixname{Par'arthma}% + \def\contentsname{Perieq'omena}% + \def\listfigurename{Kat'alogos Sqhm'atwn}% + \def\listtablename{Kat'alogos Pin'akwn}% + \def\indexname{Euret'hrio}% + \def\figurename{Sq'hma}% + \def\tablename{P'inakas}% + \def\partname{M'eros}% + \def\enclname{Sunhmm'ena}% + \def\ccname{Koinopo'ihsh}% + \def\headtoname{Pros}% + \def\pagename{Sel'ida}% + \def\seename{bl'epe}% + \def\alsoname{bl'epe ep'ishs}% + \def\proofname{Ap'odeixh}% + \def\glossaryname{Glwss'ari}% + } +% \end{macrocode} +% \end{macro} +% \changes{greek-1.2}{1997/10/28}{Added caption names for +% \cs{polutonikogreek}} +% \changes{greek-1.3d}{1999/08/28}{Fixed typo, \texttt{bl'epe >ep'ishc} +% instead of \texttt{bl'pe >ep'ishc}} +% +% \begin{macro}{\captionspolutonikogreek} +% For texts written in the $\pi o\lambda\upsilon\tau +% o\nu\kappa\acute{o}$ (polytonic greek) the translations are +% the same as above, but some words are spelled differently. For +% now we just add extra definitions to |\captionsgreek| in order to +% override the earlier definitions. +% \begin{macrocode} +\let\captionspolutonikogreek\captionsgreek +\addto\captionspolutonikogreek{% + \def\refname{>Anafor`es}% + \def\indexname{Eep'ishs}% + \def\proofname{>Ap'odeixh}% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\gr@month} +% \changes{greek-1.1e}{1997/10/12}{Macro added} +% \begin{macro}{\dategreek} +% The macro |\dategreek| redefines the command |\today| to +% produce greek dates. The name of the month is now produced +% by the macro |\gr@month| since it is needed in the definition +% of the macro |\Grtoday|. +% \changes{greek-1.1a}{1997/03/03}{Fixed typo, \texttt{Oktwbr'iou} +% instead of \texttt{Oktobr'iou}} +% \changes{greek-1.1d}{1997/10/12}{Macro \cs{gr@month} now produces +% the name of the month} +% \changes{greek-1.2a}{1997/10/31}{Use \cs{edef} to define \cs{today}} +% \changes{greek-1.2b}{1998/03/28}{use \cs{def} instead of \cs{edef}} +% \begin{macrocode} +\def\gr@month{% + \ifcase\month\or + Ianouar'iou\or Febrouar'iou\or Mart'iou\or April'iou\or + Ma'"iou\or Ioun'iou\or Ioul'iou\or Augo'ustou\or + Septembr'iou\or Oktwbr'iou\or Noembr'iou\or Dekembr'iou\fi} +\def\dategreek{% + \def\today{\number\day \space \gr@month\space \number\year}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\gr@c@greek} +% \changes{greek-1.2}{1997/10/28}{Added macro \cs{gr@cl@month}} +% \changes{greek-1.2}{1997/10/28}{Added macro +% \cs{datepolutonikogreek}} +% \changes{greek-1.3a}{1997/10/28}{removed macro +% \cs{datepolutonikogreek}} +% \begin{macrocode} +\def\gr@c@month{% + \ifcase\month\or >Ianouar'iou\or + Febrouar'iou\or Mart'iou\or >April'iou\or Ma"'iou\or + >Ioun'iou\or >Ioul'iou\or A>ugo'ustou\or Septembr'iou\or + >Oktwbr'iou\or Noembr'iou\or Dekembr'iou\fi} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\Grtoday} +% \changes{greek-1.1}{1996/10/28}{Added macro \cs{Grtoday}} +% The macro |\Grtoday| produces the current date, only that the +% month and the day are shown as greek numerals instead of arabic +% as it is usually the case. +% \begin{macrocode} +\def\Grtoday{% + \expandafter\Greeknumeral\expandafter{\the\day}\space + \gr@c@month \space + \expandafter\Greeknumeral\expandafter{\the\year}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\extrasgreek} +% \begin{macro}{\noextrasgreek} +% The macro |\extrasgreek| will perform all the extra definitions +% needed for the Greek language. The macro |\noextrasgreek| is used +% to cancel the actions of |\extrasgreek|. For the moment these +% macros switch the fontencoding used and the definition of the +% internal macros |\@alph| and |\@Alph| because in Greek we do use +% the Greek numerals. +% +% \begin{macrocode} +\addto\extrasgreek{\greektext} +\addto\noextrasgreek{\latintext} +% \end{macrocode} +% +% \begin{macro}{\gr@ill@value} +% When the argument of |\greeknumeral| has a value outside of the +% acceptable bounds ($0 < x < 999999$) a warning will be issued +% (and nothing will be printed). +% \begin{macrocode} +\def\gr@ill@value#1{% + \PackageWarning{babel}{Illegal value (#1) for greeknumeral}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\anw@true} +% \begin{macro}{\anw@false} +% \begin{macro}{\anw@print} +% When a a large number with three \emph{trailing} zero's is to be +% printed those zeros \emph{and} the numeric mark need to be +% discarded. As each `digit' is processed by a separate macro +% \emph{and} because the processing needs to be expandable we need +% some helper macros that help remember to \emph{not} print the +% numeric mark (|\anwtonos|). +% +% The command |\anw@false| switches the printing of the numeric +% mark off by making |\anw@print| expand to nothing. The command +% |\anw@true| (re)enables the printing of the numeric marc. These +% macro's need to be robust in order to prevent improper expansion +% during writing to files or during |\uppercase|. +% \begin{macrocode} +\DeclareRobustCommand\anw@false{% + \DeclareRobustCommand\anw@print{}} +\DeclareRobustCommand\anw@true{% + \DeclareRobustCommand\anw@print{\anwtonos}} +\anw@true +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\greeknumeral} +% The command |\greeknumeral| needs to be \emph{fully} expandable +% in order to get the right information in auxiliary +% files. Therefore we use a big |\if|-construction to check the +% value of the argument and start the parsing at the right level. +% \begin{macrocode} +\def\greeknumeral#1{% +% \end{macrocode} +% If the value is negative or zero nothing is printed and a warning +% is issued. +% \changes{greek-1.3b}{1999/04/03}{Added \cs{expandafter} and +% \cs{number} (PR3000) in order to make a counter an acceptable +% argument} +% \begin{macrocode} + \ifnum#1<\@ne\space\gr@ill@value{#1}% + \else + \ifnum#1<10\expandafter\gr@num@i\number#1% + \else + \ifnum#1<100\expandafter\gr@num@ii\number#1% + \else +% \end{macrocode} +% We use the available shorthands for 1.000 (|\@m|) and 10.000 +% (|\@M|) to save a few tokens. +% \begin{macrocode} + \ifnum#1<\@m\expandafter\gr@num@iii\number#1% + \else + \ifnum#1<\@M\expandafter\gr@num@iv\number#1% + \else + \ifnum#1<100000\expandafter\gr@num@v\number#1% + \else + \ifnum#1<1000000\expandafter\gr@num@vi\number#1% + \else +% \end{macrocode} +% If the value is too large, nothing is printed and a warning +% is issued. +% \begin{macrocode} + \space\gr@ill@value{#1}% + \fi + \fi + \fi + \fi + \fi + \fi + \fi +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\Greeknumeral} +% The command |\Greeknumeral| prints uppercase greek numerals. +% The parsing is performed by the macro |\greeknumeral|. +% \begin{macrocode} +\def\Greeknumeral#1{% + \expandafter\MakeUppercase\expandafter{\greeknumeral{#1}}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\greek@alph} +% \begin{macro}{\greek@Alph} +% In the previous release of this language definition the +% commands |\greek@aplh| and |\greek@Alph| were kept just for +% reasons of compatibility. Here again they become meaningful macros. +% They are definited in a way that even page numbering with greek +% numerals is possible. Since the macros |\@alph| and |\@Alph| will +% lose their original meaning while the Greek option is active, we +% must save their original value. +% macros |\@alph| +% \begin{macrocode} +\let\latin@alph\@alph +\let\latin@Alph\@Alph +% \end{macrocode} +% Then we define the Greek versions; the additional |\expandafter|s +% are needed in order to make sure the table of contents will be +% correct, e.g., when we have appendixes. +% \begin{macrocode} +\def\greek@alph#1{\expandafter\greeknumeral\expandafter{\the#1}} +\def\greek@Alph#1{\expandafter\Greeknumeral\expandafter{\the#1}} +% \end{macrocode} +% +% Now we can set up the switching. +% \changes{greek-1.1a}{1997/03/03}{removed two superfluous @'s which +% made \cs{@alph} undefined} +% \begin{macrocode} +\addto\extrasgreek{% + \let\@alph\greek@alph + \let\@Alph\greek@Alph} +\addto\noextrasgreek{% + \let\@alph\latin@alph + \let\@Alph\latin@Alph} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\greek@roman} +% \begin{macro}{\greek@Roman} +% \changes{greek-1.2e}{1999/04/16}{Moved redefinition of \cs{@roman} +% back to the language specific file} +% \changes{greek-1.3d}{1999/08/27}{\cs{@roman} and \cs{@Roman} need to +% be added to \cs{extraspolutonikogreek}} +% \changes{greek-1.3e}{1999/09/24}{\cs{@roman} and \cs{@Roman} need +% \emph{not} be in \cs{extraspolutonikogreek} when they are already +% in \cs{extrasgreek}} +% +% To prevent roman numerals being typeset in greek letters we need +% to adopt the internal \LaTeX\ commands |\@roman| and +% |\@Roman|. \textbf{Note that this may cause errors where +% |\@roman| ends up in a situation where it needs to be expanded; +% problems are known to exist with the AMS document classes.} +% \begin{macrocode} +\let\latin@roman\@roman +\let\latin@Roman\@Roman +\def\greek@roman#1{\textlatin{\latin@roman{#1}}} +\def\greek@Roman#1{\textlatin{\latin@Roman{#1}}} +\addto\extrasgreek{% + \let\@roman\greek@roman + \let\@Roman\greek@Roman} +\addto\noextrasgreek{% + \let\@roman\latin@roman + \let\@Roman\latin@Roman} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\greek@amp} +% \begin{macro}{\ltx@amp} +% The greek fonts do not contain an ampersand, so the \LaTeX\ +% command |\&| dosn't give the expected result if we do not do +% something about it. +% \changes{greek-1.2f}{1999/04/25}{Now switch the definition of +% \cs{\&} from \cs{extrasgreek}} +% \changes{greek-1.3c}{1999/05/17}{Added a missing opening brace} +% \begin{macrocode} +\let\ltx@amp\& +\def\greek@amp{\textlatin{\ltx@amp}} +\addto\extrasgreek{\let\&\greek@amp} +\addto\noextrasgreek{\let\&\ltx@amp} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% What is left now is the definition of a set of macros to produce +% the various digits. +% \begin{macro}{\gr@num@i} +% \begin{macro}{\gr@num@ii} +% \begin{macro}{\gr@num@iii} +% \changes{greek-1.2b}{1997/11/13}{No longer use \cs{\let} in the +% expansion of the \cs{gr@num@x} macros as they ned to be +% expandable} +% As there is no representation for $0$ in this system the zeros +% are simply discarded. When we have a large number with three +% \emph{trailing} zero's also the numeric mark is discarded. +% Therefore these macros need to pass the information to each other +% about the (non-)translation of a zero. +% \begin{macrocode} +\def\gr@num@i#1{% + \ifcase#1\or a\or b\or g\or d\or e\or \stigma\or z\or h\or j\fi + \ifnum#1=\z@\else\anw@true\fi\anw@print} +\def\gr@num@ii#1{% + \ifcase#1\or i\or k\or l\or m\or n\or x\or o\or p\or \qoppa\fi + \ifnum#1=\z@\else\anw@true\fi\gr@num@i} +\def\gr@num@iii#1{% + \ifcase#1\or r\or sv\or t\or u\or f\or q\or y\or w\or \sampi\fi + \ifnum#1=\z@\anw@false\else\anw@true\fi\gr@num@ii} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\gr@num@iv} +% \begin{macro}{\gr@num@v} +% \begin{macro}{\gr@num@vi} +% The first three `digits' always have the numeric mark, except +% when one is discarded because it's value is zero. +% \begin{macrocode} +\def\gr@num@iv#1{% + \ifnum#1=\z@\else\katwtonos\fi + \ifcase#1\or a\or b\or g\or d\or e\or \stigma\or z\or h\or j\fi + \gr@num@iii} +\def\gr@num@v#1{% + \ifnum#1=\z@\else\katwtonos\fi + \ifcase#1\or i\or k\or l\or m\or n\or x\or o\or p\or \qoppa\fi + \gr@num@iv} +\def\gr@num@vi#1{% + \katwtonos + \ifcase#1\or r\or sv\or t\or u\or f\or q\or y\or w\or \sampi\fi + \gr@num@v} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\greek@tilde} +% \changes{greek-1.0c}{1997/02/19}{Added command} +% In greek typesetting we need a number of characters with more +% than one accent. In the underlying family of fonts (the +% |cb| fonts) this is solved using Knuth's ligature +% mechanism. +% Characters we need to have ligatures with are the tilde, the +% acute and grave accent characters, the rough and smooth breathings, +% the subscript, and the double quote character. +% In text input the |~| is normaly used to produce an +% unbreakable space. The command |\~| normally produces a tilde +% accent. For polytonic Greek we change the definition of |\~| +% to produce the tilde character itself, making sure it has category +% code 12. +% \changes{greek-1.3k}{2003/04/10}{Make sure the character `!' is not +% active during the definition of \cs{greek@tilde}} +% \begin{macrocode} +\begingroup + \@ifundefined{active@char\string!}{}{\catcode`!=12\relax} + \catcode`\~=12 + \lccode`\!=`\~ + \lowercase{\def\x{\endgroup + \def\greek@tilde{!}}\x} +\addto\extraspolutonikogreek{% + \babel@save\~\let\~\greek@tilde} +% \end{macrocode} +% \end{macro} +% In order to get correct hyphenation we need to set the lower case +% code of a number of characters. The `v' character has a special +% usage for the |cb| fonts: in fact this ligature mechanism detects +% the end of a word and assures that a final sigma is typeset with +% the proper sign wich is different from that of an initial or +% medial sigma; the `v 'after an \textit{isolated} sigma fools +% the ligature mechanism in order to typeset $\sigma$ in place of +% $\varsigma$. Because of this we make sure its lowercase code is +% not changed. For ``modern'' greek we have to deal only with |'| +% and |"| and so things are easy. +% \changes{greek-1.1c}{1997/04/30}{fixed two typos} +% \changes{greek-1.1e}{1997/10/12}{Added lowercase code for v} +% \changes{greek-1.2}{1997/10/28}{Definitions for ``modern'' Greek are +% now the definitions of ``Polutoniko'' Greek} +% \changes{greek-1.2}{1997/10/28}{Added lowercase codes for ``modern'' +% greek} +% \changes{greek-1.3e}{1999/09/24}{\cs{extrasgreek} and +% \cs{extraspolutonikogreek} should be complementary} +% \begin{macrocode} +\addto\extrasgreek{% + \babel@savevariable{\lccode`v}\lccode`v=`v% + \babel@savevariable{\lccode`\'}\lccode`\'=`\'% + \babel@savevariable{\lccode`\"}\lccode`\"=`\"} +\addto\extraspolutonikogreek{% + \babel@savevariable{\lccode`\<}\lccode`\<=`\<% + \babel@savevariable{\lccode`\>}\lccode`\>=`\>% + \babel@savevariable{\lccode`\~}\lccode`\~=`\~% + \babel@savevariable{\lccode`\|}\lccode`\|=`\|% + \babel@savevariable{\lccode`\`}\lccode`\`=`\`} +% \end{macrocode} +% And in order to get rid of all accents and breathings when a +% string is |\uppercase|d we also change a number of uppercase +% codes. +% \changes{greek-1.1b}{1997/03/06}{Added setting of \cs{uccode}s +% (after \file{kdgreek.sty})} +% \changes{greek-1.1e}{1997/10/12}{Added uppercase code for special +% letter ``v''. Uppercase code for accents is now \texttt{9f}, +% instead of \texttt{ff}} +% \changes{greek-1.2}{1997/10/28}{Added uppercase codes for ``modern'' +% Greek. The old codes are now for ``Polutoniko'' Greek} +% \changes{greek-1.3e}{1999/09/24}{\cs{extrasgreek} and +% \cs{extraspolutonikogreek} should be complementary} +% {\catcode`|=12\relax\gdef\indexbar{\cs{|}}} +% \changes{greek-1.3g}{1999/11/17}{uc code of \indexbar{} is now just +% \indexbar{} to reflect recent changes in the cb fonts} +% \changes{greek-1.3i}{2000/10/02}{uc code of `v' is switched to V +% so that mixed text appears correctly in headers.} +% \changes{greek-1.3j}{2001/02/03}{Because other languages might +% make the caret active, we can't use the double caret notation +% here} +% \begin{macrocode} +\addto\extrasgreek{% + \babel@savevariable{\uccode`\"}\uccode`\"=`\"% + \babel@savevariable{\uccode`\'}\uccode`\'=159} %% 159 == ^^9f +\addto\extraspolutonikogreek{% + \babel@savevariable{\uccode`\~}\uccode`\~=159% + \babel@savevariable{\uccode`\>}\uccode`\>=159% + \babel@savevariable{\uccode`\<}\uccode`\<=159% + \babel@savevariable{\uccode`\|}\uccode`\|=`\|% + \babel@savevariable{\uccode`\`}\uccode`\`=159} +% \end{macrocode} +% For this to work we make the character |^^9f| a shorthand that +% expands to nothing. In order for this to work we need to make a +% character look like |^^9f| in \TeX's eyes. The trick is to have +% another character and assign it a different lowercase code. The +% execute the macros needed in a |\lowercase| environment. Usually +% the tile |~| character is used for such purposes. Before we do +% this we save it's original lowercase code to restore it once +% we're done. +% \changes{greek-1.1b}{1997/03/06}{Added shorthand for \cs{char255}} +% \changes{greek-1.1e}{1997/10/12}{Shorthand is changed. Active +% character is now \cs{char159}} +% \changes{greek-1.2a}{1997/10/31}{Need shorthand to exist for +% ``monotoniko'' Greek, not ``polutoniko'' Greek} +% \changes{greek-1.3j}{2001/02/03}{Ues the tilde as an alias for +% character 159} +% \begin{macrocode} +\@tempcnta=\lccode`\~ +\lccode`\~=159 +\lowercase{% + \initiate@active@char{~}% + \declare@shorthand{greek}{~}{}} +\lccode`\~=\@tempcnta +% \end{macrocode} +% We can also make the tilde character itself expand to a tilde with +% category code 12 to make the typing of texts easier. +% \changes{greek-1.1b}{1997/03/06}{Made tilde expand to a tilde with +% \cs{catcode 12}} +% \begin{macrocode} +\addto\extraspolutonikogreek{\languageshorthands{greek}}% +\declare@shorthand{greek}{~}{\greek@tilde} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% +% +% \changes{greek-1.1c}{1997/03/10}{Added a couple of symbols, needed +% for \cs{greeknumeral}} +% \changes{greek-1.1e}{1997/10/12}{Most symbols are removed and are +% now defined in package grsymb} +% \changes{greek-1.2c}{1998/06/26}{Package grsymb has been eliminated +% because the CB fonts v2.0 do not inlcude certain symbols and so +% the remaining symbol definitions have been moved here} +% We now define a few symbols which are used in the typesetting of +% greek numerals, as well as some other symbols which are usefull, +% such as the $\epsilon\upsilon\rho\omega$ symbol, etc. +% \begin{macrocode} +\DeclareTextCommand{\anwtonos}{LGR}{\char"FE\relax} +\DeclareTextCommand{\katwtonos}{LGR}{\char"FF\relax} +\DeclareTextCommand{\qoppa}{LGR}{\char"12\relax} +\DeclareTextCommand{\stigma}{LGR}{\char"06\relax} +\DeclareTextCommand{\sampi}{LGR}{\char"1B\relax} +\DeclareTextCommand{\Digamma}{LGR}{\char"C3\relax} +\DeclareTextCommand{\ddigamma}{LGR}{\char"93\relax} +\DeclareTextCommand{\vardigamma}{LGR}{\char"07\relax} +\DeclareTextCommand{\euro}{LGR}{\char"18\relax} +\DeclareTextCommand{\permill}{LGR}{\char"19\relax} +% \end{macrocode} +% +% Since the |~| cannot be used to produce an unbreakable white +% space we must redefine at least the commands |\fnum@figure| and +% |\fnum@table| so they do not produce a |~| instead of white +% space. +% \changes{greek-1.3l}{2004/02/19}{Commented these lines out as this +% change has made it into \LaTeX{} itself.} +% \begin{macrocode} +%\def\fnum@figure{\figurename\nobreakspace\thefigure} +%\def\fnum@table{\tablename\nobreakspace\thetable} +% \end{macrocode} +% +% The macro |\ldf@finish| takes care of looking for a +% configuration file, setting the main language to be switched on +% at |\begin{document}| and resetting the category code of +% \texttt{@} to its original value. +% \changes{greek-1.0b}{1996/11/02}{Now use \cs{ldf@finish} to wrap up} +% \begin{macrocode} +\ldf@finish{\CurrentOption} +% +% \end{macrocode} +% +% \Finale +%\endinput +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +%% diff --git a/Master/texmf-dist/source/generic/babel/greek.fdd b/Master/texmf-dist/source/generic/babel/greek.fdd new file mode 100644 index 00000000000..c567aa5d52c --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/greek.fdd @@ -0,0 +1,349 @@ +% \iffalse meta-comment +% +% Copyright 1989-2005 Johannes L. Braams and any individual authors +% listed elsewhere in this file. All rights reserved. +% +% This file is part of the Babel system. +% -------------------------------------- +% +% It 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 +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2003/12/01 or later. +% +% This work has the LPPL maintenance status "maintained". +% +% The Current Maintainer of this work is Johannes Braams. +% +% The list of all files belonging to the Babel system is +% given in the file `manifest.bbl. See also `legal.bbl' 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 +% \CheckSum{105} +% +% \iffalse This is a META comment +% +%<*fdd> +\ProvidesFile{greek.fdd} +% +% +%\ProvidesFile{lgrenc.def} +%\ProvidesFile{lgrcmr.fd} +%\ProvidesFile{lgrcmro.fd} +%\ProvidesFile{lgrcmtt.fd} +%\ProvidesFile{lgrcmss.fd} +%\ProvidesFile{lgrlcmss.fd} +%\ProvidesFile{lgrlcmtt.fd} + [2001/01/30 v2.2e % +% Greek Encoding] +% Greek Computer Modern] +% Greek Computer Modern Outline] +% Greek Computer Modern Typewriter] +% Greek Computer Modern Sans Serif] +% Greek Computer Modern Sans Serif slide sizes] +% Greek Computer Modern Typewriter slide sizes] +%<*fdd> +] +% +% +%<*driver> +\documentclass{ltxdoc} +\GetFileInfo{greek.fdd} +\providecommand\dsc{\expandafter{\normalfont\scshape docstrip}} +\title{The file \texttt{greek.fdd} for use with + \LaTeXe.\thanks{This file has version + number \fileversion, dated \filedate.}} +\date{\filedate} +\author{Claudio Beccari, Apostolos Syropoulos and Johannes Braams} +\newcommand*\Lopt[1]{\textsf{#1}} +\begin{document} +\maketitle +\DocInput{greek.fdd} +\end{document} +% +% +%\fi +% +% \changes{greekfdd-2.0}{1997/10/12}{Changed to use Claudio Beccari's +% fonts} +% \changes{greekfdd-2.1}{1997/10/31}{Produce files with lowercase +% names} +% \changes{greekfdd-2.2}{1998/05/16}{Added support for CB fonts v2.xx} +% +% \section{Introduction} +% +% The file `greek.fdd' provides font definitions for typesetting +% greek texts. This version of the file has been updated, since +% now the official fonts for the \Lopt{greek} option of the +% \textsf{babel} package are the |cb| fonts. +% +% \StopEventually{} +% +% \section{The \texttt{docstrip} modules} +% The following modules are used to direct \texttt{docstrip} in +% generating external files: +% \begin{center} +% \begin{tabular}{ll} +% driver & produce a documentation driver file \\ +% LGRenc & The encoding definition file\\ +% LGRcmr & The Roman font shapes\\ +% LGRcmro & The Outline Roman font shapes\\ +% LGRcmss & The Sans Serif font shapes\\ +% LGRcmtt & The typewriter font shapes\\ +% LGRlcmss & The slide size Sans Serif font shapes\\ +% LGRlcmtt & The slide size typewriter fonts\\ +% \end{tabular} +% \end{center} +% A typical \dsc\ command file would then have entries like: +%\begin{verbatim} +%\generateFile{lgrcmr.fd}{t}{\from{greek.fdd}{fd,LGRcmr}} +%\end{verbatim} +% +% \section{The encoding definition file} +% +% This file defines the fontencoding \texttt{LGR} for greek +% text. Moreover, it provides the |\EC@family| macro, since the +% Greek fonts have the same naming conventions as the Latin +% ones produced by J\"{o}rg Knappen that are now the official +% fonts of \LaTeXe. It also makes some definitions to ensure +% that commands such as |\TeX|, |\copyright| give ``expected +% results'' (\TeX, \copyright). +% +% \changes{greekfdd-2.1}{1997/10/31}{Removed some unwanted spaces} +% \changes{greekfdd-2.2e}{2000/10/26}{Added more font sizes to make +% the CB fonts compatible with the EC fonts} +% \begin{macrocode} +%<*fd> +\providecommand{\EC@family}[5]{% + \DeclareFontShape{#1}{#2}{#3}{#4} + {<5><6><7><8><9><10><10.95><12><14.4>% + <17.28><20.74><24.88><29.86><35.83>genb*#5}{}} +% +%<*LGRenc> +\DeclareFontEncoding{LGR}{}{} +\DeclareFontSubstitution{LGR}{cmr}{m}{n} +\DeclareErrorFont{LGR}{cmr}{m}{n}{10} +% \end{macrocode} +% First we define a few commands in the \texttt{LGR} encoding. +% \changes{greekfdd-2.2c}{1999/04/05}{Fixed typos, \cs{textrademark} +% misses a `t', \cs{copyright} should be \cs{textcopyright}} +% \changes{greekfdd-2.2d}{1999/04/25}{removed redefinition of \cs{\&}} +% \begin{macrocode} +\ProvideTextCommand{\textcopyright}{LGR}{% + \textcircled{\textlatin{c}}} +\ProvideTextCommand{\textregistered}{LGR}{% + \textcircled{\textlatin{\textsc r}}} +\ProvideTextCommand{\texttrademark}{LGR}{% + \textsuperscript{\textlatin{TM}}} +\ProvideTextCommand{\SS}{LGR}{% + \textlatin{SS}} +% +% \end{macrocode} +% +% \section{The font definition files} +% +% In the previous release of the greek option we used +% the \texttt{kd} family of fonts, which were made by +% K.J.~Dryllerakis. Now, we have switched to the |cb| fonts by +% Claudio Beccari, mainly because these fonts are complete, in any +% sense of the word, and moreover fit nicely with the Computer +% Modern font family. +% +% We begin with the definitions for the Greek Computer Modern fonts. +% +% \begin{macrocode} +%<*LGRcmr> +\DeclareFontFamily{LGR}{cmr}{} +\EC@family{LGR}{cmr}{m}{n} {grmn} +\EC@family{LGR}{cmr}{m}{sl} {grmo} +\EC@family{LGR}{cmr}{m}{it} {grmi} +\EC@family{LGR}{cmr}{m}{sc} {grmc} +\EC@family{LGR}{cmr}{m}{ui} {grmu} +\EC@family{LGR}{cmr}{bx}{sc} {grxc} +\EC@family{LGR}{cmr}{bx}{n} {grxn} +\EC@family{LGR}{cmr}{bx}{sl} {grxo} +\EC@family{LGR}{cmr}{bx}{it} {grxi} +\EC@family{LGR}{cmr}{bx}{ui} {grxu} +\DeclareFontShape{LGR}{cmr}{b}{n} + {<->ssub*cmr/bx/n}{} +\DeclareFontShape{LGR}{cmr}{b}{sc} + {<->ssub*cmr/bx/sc}{} +% +% \end{macrocode} +% +% The greek outline family is now complete with the same five +% shapes and the two series as the roman family. +% \changes{greekfdd-2.2b}{1999/04/03}{grmu should be gomu here...} +% \begin{macrocode} +%<*LGRcmro> +\DeclareFontFamily{LGR}{cmro}{} +\EC@family{LGR}{cmro}{m}{n} {gomn} +\EC@family{LGR}{cmro}{m}{sl} {gomo} +\EC@family{LGR}{cmro}{m}{it} {gomi} +\EC@family{LGR}{cmro}{m}{sc} {gomc} +\EC@family{LGR}{cmro}{m}{ui} {gomu} +\EC@family{LGR}{cmro}{bx}{sc} {goxc} +\EC@family{LGR}{cmro}{bx}{n} {goxn} +\EC@family{LGR}{cmro}{bx}{sl} {goxo} +\EC@family{LGR}{cmro}{bx}{it} {goxi} +\EC@family{LGR}{cmro}{bx}{ui} {goxu} +\DeclareFontShape{LGR}{cmro}{b}{n} + {<->ssub*cmro/bx/n}{} +\DeclareFontShape{LGR}{cmro}{b}{sc} + {<->ssub*cmro/bx/sc}{} +% +% \end{macrocode} +% +% Then we have the \texttt{typewriter} fonts... +% +% \changes{greekfdd-2.1}{1997/10/31}{Set the \cs{hyphenchar} of the tt +% font to $-1$} +% \begin{macrocode} +%<*LGRcmtt> +\DeclareFontFamily{LGR}{cmtt}{\hyphenchar\font\m@ne}% \hyphenchar = -1 +\EC@family{LGR}{cmtt}{m}{n} {gttn} +\EC@family{LGR}{cmtt}{m}{sl} {gtto} +\EC@family{LGR}{cmtt}{m}{sc} {gttc} +\EC@family{LGR}{cmtt}{m}{it} {gtti} +\EC@family{LGR}{cmtt}{m}{ui} {gttu} +\DeclareFontShape{LGR}{cmtt}{bx}{n} + {<->ssub*cmtt/m/n}{} +\DeclareFontShape{LGR}{cmtt}{bx}{sl} + {<->ssub*cmtt/m/sl}{} +\DeclareFontShape{LGR}{cmtt}{bx}{it} + {<->ssub*cmtt/m/it}{} +\DeclareFontShape{LGR}{cmtt}{bx}{sc} + {<->ssub*cmtt/m/sc}{} +\DeclareFontShape{LGR}{cmtt}{bx}{ui} + {<->ssub*cmtt/m/ui}{} +% +% \end{macrocode} +% +% Now we come to the Sans Serif font to be used in greek +% texts. +% \changes{greekfdd-2.2b}{1999/04/03}{the last two lines had m instead +% of x in the fontname} +% \begin{macrocode} +%<*LGRcmss> +\DeclareFontFamily{LGR}{cmss}{} +\EC@family{LGR}{cmss}{m}{n} {gsmn} +\EC@family{LGR}{cmss}{m}{sl} {gsmo} +\EC@family{LGR}{cmss}{m}{sc} {gsmc} +\EC@family{LGR}{cmss}{m}{it} {gsmi} +\EC@family{LGR}{cmss}{m}{ui} {gsmu} +\EC@family{LGR}{cmss}{bx}{n} {gsxn} +\EC@family{LGR}{cmss}{bx}{sl} {gsxo} +\EC@family{LGR}{cmss}{bx}{sc} {gsxc} +\EC@family{LGR}{cmss}{bx}{it} {gsmi} +\EC@family{LGR}{cmss}{bx}{ui} {gsmu} +% +% \end{macrocode} +% +% We have finished with the ``regular'' fonts. We now provide the fonts +% definition files for the fonts used only in slides. First comes the +% typewriter font. +% \begin{macrocode} +%<*LGRlcmtt> +\DeclareFontFamily{LGR}{lcmtt}{\hyphenchar\font\m@ne} +\DeclareFontShape{LGR}{lcmtt}{m}{n}{% + <7><8><10><12><13.82><16.59><19.91><23.89><28.66><34.4><41.28> + genb * gltn}{} +\DeclareFontShape{LGR}{lcmtt}{m}{In}{% + <7><8><10><12><13.82><16.59><19.91><23.89><28.66><34.4><41.28> + genb * gljn}{} +\DeclareFontShape{LGR}{lcmtt}{m}{it}{% + <7><8><10><12><13.82><16.59><19.91><23.89><28.66><34.4><41.28> + genb * glto}{} +\DeclareFontShape{LGR}{lcmtt}{m}{Iit}{% + <7><8><10><12><13.82><16.59><19.91><23.89><28.66><34.4><41.28> + genb * gljo}{} +\DeclareFontShape{LGR}{lcmtt}{m}{sl}{% + <7><8><10><12><13.82><16.59><19.91><23.89><28.66><34.4><41.28> + ssub * lcmtt/m/it}{} +\DeclareFontShape{LGR}{lcmtt}{m}{Isl}{% + <7><8><10><12><13.82><16.59><19.91><23.89><28.66><34.4><41.28> + ssub * lcmtt/m/Iit}{} +\DeclareFontShape{LGR}{lcmtt}{m}{sc}{% + <7><8><10><12><13.82><16.59><19.91><23.89><28.66><34.4><41.28> + genb * gltc}{} +\DeclareFontShape{LGR}{lcmtt}{m}{Isc}{% + <7><8><10><12><13.82><16.59><19.91><23.89><28.66><34.4><41.28> + genb * gljc}{} +% +% \end{macrocode} +% +% And then the Sans Serif font. +% \begin{macrocode} +%<*LGRlcmss> +\DeclareFontFamily{LGR}{lcmss}{} +\DeclareFontShape{LGR}{lcmss}{m}{n}{% + <7><8><10><12><13.82><16.59><19.91><23.89><28.66><34.4><41.28> + genb * glmn}{} +\DeclareFontShape{LGR}{lcmss}{m}{In}{% + <7><8><10><12><13.82><16.59><19.91><23.89><28.66><34.4><41.28> + genb * glin}{} +\DeclareFontShape{LGR}{lcmss}{m}{sl}{% + <7><8><10><12><13.82><16.59><19.91><23.89><28.66><34.4><41.28> + genb * glmo}{} +\DeclareFontShape{LGR}{lcmss}{m}{Isl}{% + <7><8><10><12><13.82><16.59><19.91><23.89><28.66><34.4><41.28> + genb * glio}{} +\DeclareFontShape{LGR}{lcmss}{m}{it}{% + <7><8><10><12><13.82><16.59><19.91><23.89><28.66><34.4><41.28> + genb * glmi}{} +\DeclareFontShape{LGR}{lcmss}{m}{Iit}{% + <7><8><10><12><13.82><16.59><19.91><23.89><28.66><34.4><41.28> + genb * glii}{} +\DeclareFontShape{LGR}{lcmss}{m}{ui}{% + <7><8><10><12><13.82><16.59><19.91><23.89><28.66><34.4><41.28> + genb * glmu}{} +\DeclareFontShape{LGR}{lcmss}{bx}{n}{% + <7><8><10><12><13.82><16.59><19.91><23.89><28.66><34.4><41.28> + genb * glxn}{} +\DeclareFontShape{LGR}{lcmss}{bx}{In}{% + <7><8><10><12><13.82><16.59><19.91><23.89><28.66><34.4><41.28> + genb * glwn}{} +\DeclareFontShape{LGR}{lcmss}{bx}{sl}{% + <7><8><10><12><13.82><16.59><19.91><23.89><28.66><34.4><41.28> + genb * glxo}{} +\DeclareFontShape{LGR}{lcmss}{bx}{Isl}{% + <7><8><10><12><13.82><16.59><19.91><23.89><28.66><34.4><41.28> + genb * glwo}{} +\DeclareFontShape{LGR}{lcmss}{bx}{it}{% + <7><8><10><12><13.82><16.59><19.91><23.89><28.66><34.4><41.28> + genb * glxi}{} +\DeclareFontShape{LGR}{lcmss}{bx}{Iit}{% + <7><8><10><12><13.82><16.59><19.91><23.89><28.66><34.4><41.28> + genb * glwi}{} +\DeclareFontShape{LGR}{lcmss}{m}{sc}{% + <7><8><10><12><13.82><16.59><19.91><23.89><28.66><34.4><41.28> + genb * glmc}{} +\DeclareFontShape{LGR}{lcmss}{m}{Isc}{% + <7><8><10><12><13.82><16.59><19.91><23.89><28.66><34.4><41.28> + genb * glic}{} +\DeclareFontShape{LGR}{lcmss}{bx}{sc}{% + <7><8><10><12><13.82><16.59><19.91><23.89><28.66><34.4><41.28> + genb * glxc}{} +\DeclareFontShape{LGR}{lcmss}{bx}{Isc}{% + <7><8><10><12><13.82><16.59><19.91><23.89><28.66><34.4><41.28> + genb * glwc}{} +% +% \end{macrocode} +% +% The next line goes into all files and in addition prevents \dsc{} +% from adding any further code from the main source file (such as a +% character table. +% \begin{macrocode} +\endinput +% \end{macrocode} +% +% \Finale + + diff --git a/Master/texmf-dist/source/generic/babel/greek.ins b/Master/texmf-dist/source/generic/babel/greek.ins new file mode 100644 index 00000000000..a641719f93a --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/greek.ins @@ -0,0 +1,158 @@ +%% +%% This file will generate fast loadable files and documentation +%% driver files from the doc files in this package when run through +%% LaTeX or TeX. +%% +%% Copyright 1989-2005 Johannes L. Braams and any individual authors +%% listed elsewhere in this file. All rights reserved. +%% +%% This file is part of the Babel system. +%% -------------------------------------- +%% +%% It 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 +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% The Current Maintainer of this work is Johannes Braams. +%% +%% The list of all files belonging to the LaTeX base distribution is +%% given in the file `manifest.bbl. See also `legal.bbl' 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. +%% +%% --------------- start of docstrip commands ------------------ +%% +\def\filedate{1999/03/15} +\def\batchfile{greek.ins} +\input docstrip.tex + +{\ifx\generate\undefined +\Msg{**********************************************} +\Msg{*} +\Msg{* This installation requires docstrip} +\Msg{* version 2.3c or later.} +\Msg{*} +\Msg{* An older version of docstrip has been input} +\Msg{*} +\Msg{**********************************************} +\errhelp{Move or rename old docstrip.tex.} +\errmessage{Old docstrip in input path} +\batchmode +\csname @@end\endcsname +\fi} + +\declarepreamble\mainpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl 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. +\endpreamble + +\declarepreamble\fdpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl for additional +information. + +In particular, permission is granted to customize the declarations in +this file to serve the needs of your installation. + +However, NO PERMISSION is granted to distribute a modified version +of this file under its original name. + +\endpreamble + +\keepsilent + +\usedir{tex/generic/babel} + +\usepreamble\mainpreamble +\generate{\file{greek.ldf}{\from{greek.dtx}{code}} + \file{athnum.sty}{\from{athnum.dtx}{package}} + \file{grmath.sty}{\from{grmath.dtx}{package}} + } +\usepreamble\fdpreamble +\generate{\file{lgrenc.def}{\from{greek.fdd}{LGRenc}} + \file{lgrcmr.fd}{\from{greek.fdd}{fd,LGRcmr}} + \file{lgrcmro.fd}{\from{greek.fdd}{fd,LGRcmro}} + \file{lgrcmtt.fd}{\from{greek.fdd}{fd,LGRcmtt}} + \file{lgrcmss.fd}{\from{greek.fdd}{fd,LGRcmss}} + \file{lgrlcmtt.fd}{\from{greek.fdd}{fd,LGRlcmtt}} + \file{lgrlcmss.fd}{\from{greek.fdd}{fd,LGRlcmss}} + } + +\ifToplevel{ +\Msg{***********************************************************} +\Msg{*} +\Msg{* To finish the installation you have to move the following} +\Msg{* files into a directory searched by TeX:} +\Msg{*} +\Msg{* \space\space All *.def, *.fd, *.ldf, *.sty} +\Msg{*} +\Msg{* To produce the documentation run the files ending with} +\Msg{* '.dtx' and `.fdd' through LaTeX.} +\Msg{*} +\Msg{* Happy TeXing} +\Msg{***********************************************************} +} + +\endinput diff --git a/Master/texmf-dist/source/generic/babel/grmath.dtx b/Master/texmf-dist/source/generic/babel/grmath.dtx new file mode 100644 index 00000000000..be42c48545a --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/grmath.dtx @@ -0,0 +1,168 @@ +% \iffalse meta-comment +% +% Copyright 1989-2005 Johannes L. Braams and any individual authors +% listed elsewhere in this file. All rights reserved. +% +% This file is part of the Babel system. +% -------------------------------------- +% +% It 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 +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2003/12/01 or later. +% +% This work has the LPPL maintenance status "maintained". +% +% The Current Maintainer of this work is Johannes Braams. +% +% The list of all files belonging to the Babel system is +% given in the file `manifest.bbl. See also `legal.bbl' 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 +%% \CheckSum{126} +% +%\iffalse +% +%% This is file `grmath.sty' +%% (c) 1997-2005 Apostolos Syropoulos. +%% All rights reserved. +% You are allowed to modify this file as long the initial copyright notice +% appears in the modified file. +% +% Please report errors or suggestions for improvement to +% +% Apostolos Syropoulos +% 366, 28th October Str. +% GR-671 00 Xanthi, GREECE +% +% apostolo at platon.ee.duth.gr or apostolo at obelix.ee.duth.gr +% +%\fi +%\iffalse +% \begin{macrocode} +%<*driver> +\documentclass{ltxdoc} +\GetFileInfo{grmath.drv} +\begin{document} + \DocInput{grmath.dtx} +\end{document} +% +% \end{macrocode} +%\fi +% +% \changes{grmath-1.2}{2001/02/12}{Package provides options ``grlog'' +% (default) and ``enlog'' that create Greek and Latin names +% log functions} +% +% \title{Greek log-like Operators} +% \author{Apostolos Syropoulos\\ +% 366, 28th October Str.\\ +% GR-671 00 Xanthi, HELLAS\\ +% E-mail: \texttt{apostolo@platon.ee.duth.gr}} +% \date{2001/02/12} +% \maketitle +% +% \MakeShortVerb{|} +% \section{What is this all about?} +% +% In Greece, until recently, it was common practice to write down most +% log-like functions as abbreviations of their Greek names. Consequently, +% high school students and even university freshmen were not familiar with +% the Latin names employed in international literature. However, this practice +% is fading away in universities but it is still in wide use in books for +% high schools, mainly because the Latin names would produce nothing but +% confusion. The package |grmath| redefines most log-like definitions +% so that they produce the Greek name, instead of the Latin one. The package +% can be used only in conjunction with the |greek| option of the |babel| +% package. The new option |enlog| allows one to keep the Latin names for +% the log functions. +% \StopEventually +% +% \section{The Implementation} +% +% As usual we must first identify ourselves. +% +% \begin{macrocode} +%<*package> +\ProvidesPackage{grmath}[2001/02/12\space v1.2] +\typeout{Package: `grmath' v1.2\space <2001/02/12> (A. Syropoulos)} +% \end{macrocode} +% +% The next thing we do is to process the options. The default option +% ``grlog'' generates Greek names for log functions and the ``enlog'' +% option generates Latin names for log functions. +% \begin{macrocode} +\DeclareOption{grlog}{% + \def\log{\mathop{\mathgroup\symgroperators log_{10}}\nolimits} + \def\ln{\mathop{\mathgroup\symgroperators log_% + {\mathgroup\symoperators e}}\nolimits} +} +\DeclareOption{enlog}{% + \def\log{\mathop{\operator@font log}\nolimits} + \def\ln{\mathop{\operator@font ln}\nolimits} +} +\ExecuteOptions{grlog} +\ProcessOptions +% \end{macrocode} +% +% Now we check to see if the |babel| package is loaded with at least +% the |greek| option. In case it isn't, we opt to produce an error message. +% \begin{macrocode} +\@ifpackagewith{babel}{greek}{}{% + \@ifpackagewith{babel}{polutonikogreek}{}{% + \PackageError{grmath}{% + `greek' option of the `babel'\MessageBreak + package hasn't been loaded}{% + The commands provided by this package\MessageBreak + are specially designed for greek language\MessageBreak + typesetting with the `babel' package. Load\MessageBreak + it with at least the `greek' option.}\relax + }} +% \end{macrocode} +% +% We define the mathematical font which will be used to typeset +% the log-like functions. +% \begin{macrocode} +\DeclareSymbolFont{groperators}{LGR}{cmr}{m}{n} +\SetSymbolFont{groperators}{bold}{LGR}{cmr}{bx}{n} +% \end{macrocode} +% +% We are now ready to proceed with the redefinitions of the log-like +% operator names. +% \begin{macrocode} +\def\sin{\mathop{\mathgroup\symgroperators hm}\nolimits} +\def\cos{\mathop{\mathgroup\symgroperators sun}\nolimits} +\def\tan{\mathop{\mathgroup\symgroperators ef}\nolimits} +\def\arcsin{\mathop{\mathgroup\symgroperators toxhm}\nolimits} +\def\arccos{\mathop{\mathgroup\symgroperators toxsun}\nolimits} +\def\arctan{\mathop{\mathgroup\symgroperators toxef}\nolimits} +\def\cot{\mathop{\mathgroup\symgroperators sf}\nolimits} +\def\sec{\mathop{\mathgroup\symgroperators tem}\nolimits} +\def\csc{\mathop{\mathgroup\symgroperators stem}\nolimits} +\def\gcd{\mathop{\mathgroup\symgroperators MKD}\nolimits} +% \end{macrocode} +% In the standard \LaTeX\ distribution there is no provision for a +% Least Common Multiple (lcm) log-like operator. Since, this operator +% appears quite often in greek literature we opt to include it. Moreover, +% we include three more log-like functions: |\arccot|, |\arcsec| and +% |\arccsc|. +% \begin{macrocode} +\def\lcm{\mathop{\mathgroup\symgroperators EKP}\nolimits} +\def\arccot{\mathop{\mathgroup\symgroperators toxsf}\nolimits} +\def\arcsec{\mathop{\mathgroup\symgroperators toxtem}\nolimits} +\def\arccsc{\mathop{\mathgroup\symgroperators toxstem}\nolimits} +% +% \end{macrocode} +% +% \section*{Dedication} +% I would like to dedicate this piece of work to my son +% \begin{center}Demetrios-Georgios.\end{center} +% \Finale +\endinput diff --git a/Master/texmf-dist/source/generic/babel/grsymb.dtx b/Master/texmf-dist/source/generic/babel/grsymb.dtx new file mode 100644 index 00000000000..ef783fbd48d --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/grsymb.dtx @@ -0,0 +1,131 @@ +% \iffalse meta-comment +% +% Copyright 1989-2005 Johannes L. Braams and any individual authors +% listed elsewhere in this file. All rights reserved. +% +% This file is part of the Babel system. +% -------------------------------------- +% +% It 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 +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2003/12/01 or later. +% +% This work has the LPPL maintenance status "maintained". +% +% The Current Maintainer of this work is Johannes Braams. +% +% The list of all files belonging to the Babel system is +% given in the file `manifest.bbl. See also `legal.bbl' 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 +%% \CheckSum{55} +% +%\iffalse +% +%% This is file `grsymb.sty' +%% (c) 1997-2005 Apostolos Syropoulos. +%% All rights reserved. +% You are allowed to modify this file as long the initial copyright notice +% appears in the modified file. +% +% Please report errors or suggestions for improvement to +% +% Apostolos Syropoulos +% 366, 28th October Str. +% GR-671 00 Xanthi, GREECE +% +% apostolo at platon.ee.duth.gr or apostolo at obelix.ee.duth.gr +% +%\fi +%\iffalse +% \begin{macrocode} +%<*driver> +\documentclass{ltxdoc} +\GetFileInfo{grsymb.drv} +\begin{document} + \DocInput{grsymb.dtx} +\end{document} +% +% \end{macrocode} +%\fi +% +% \title{Greek Symbols} +% \author{Apostolos Syropoulos\\ +% 366, 28th October Str.\\ +% GR-671 00 Xanthi, HELLAS\\ +% E-mail: \texttt{apostolo@platon.ee.duth.gr}} +% \date{1997/09/21} +% \maketitle +% +% \MakeShortVerb{|} +% \section{Introduction} +% +% There are certain symbols which were in use in ancient Greece and which +% are of use to scholars even today. These symbols are various forms of +% qoppa and stigma, and the letter digamma. These special symbols are +% provided by the \texttt{cb} fonts which are now the official fonts for +% the \texttt{greek} option of the \texttt{babel} package. Moreover, these +% fonts provide a few more symbols such as a symbol for Euro, etc. The `tao' +% symbol although is not a greek symbol, survives mainly for reasons of +% compatibility. This little package provides access commands for these +% symbols. The package can be used only in conjunction with the |greek| +% option of the |babel| package. +% +% \StopEventually +% +% \section{The Implementation} +% +% First comes the identification part. +% +% \begin{macrocode} +%<*package> +\ProvidesPackage{grsymb}[1997/09/21\space v1.0] +\typeout{Package: `grsymb' v1.0\space <1997/09/21> (A. Syropoulos)} +% \end{macrocode} +% +% Next we check to see if the |babel| package is loaded with at least +% the |greek| option. In case it isn't, we opt to produce an error message. +% \begin{macrocode} +\@ifpackagewith{babel}{greek}{}{% + \PackageError{grsymb}{% + `greek' option of the `babel'\MessageBreak + package hasn't been loaded}{% + The commands provided by this package\MessageBreak + are specially designed for greek language\MessageBreak + typesetting with the `babel' package. Load\MessageBreak + it with at least the `greek' option.}\relax + } +% \end{macrocode} +% Now, we proceed with the definitions of the various symbols. Please note +% that |\ddigamma| is intensionally spelled erroneously, in order to avoid +% conflicts with the command |\digamma| that is defined by the package +% |amssymb|. Although the tao symbol is not a greek symbol, it is included +% mainly for reasons of compatibility. +% \begin{macrocode} +\DeclareTextCommand{\Digamma}{LGR}{\char"C3\relax} +\DeclareTextCommand{\ddigamma}{LGR}{\char"93\relax} +\DeclareTextCommand{\tao}{LGR}{\char"01\relax} +\DeclareTextCommand{\Qoppa}{LGR}{\char"14\relax} +\DeclareTextCommand{\varqoppa}{LGR}{\char"13\relax} +\DeclareTextCommand{\Sampi}{LGR}{\char"1A\relax} +\DeclareTextCommand{\vardigamma}{LGR}{\char"07\relax} +\DeclareTextCommand{\Stigma}{LGR}{\char"08\relax} +\DeclareTextCommand{\VarQoppa}{LGR}{\char"15\relax} +\DeclareTextCommand{\euro}{LGR}{\char"18\relax} +\DeclareTextCommand{\permill}{LGR}{\char"19\relax} +% +% \end{macrocode} +% +% \section*{Dedication} +% I would like to dedicate this piece of work to my son +% \begin{center}Demetrios-Georgios.\end{center} +% \Finale +\endinput \ No newline at end of file diff --git a/Master/texmf-dist/source/generic/babel/heb209.dtx b/Master/texmf-dist/source/generic/babel/heb209.dtx new file mode 100644 index 00000000000..69101ca7660 --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/heb209.dtx @@ -0,0 +1,165 @@ +% \iffalse meta-comment +% +% Copyright 1989-2005 Johannes L. Braams and any individual authors +% listed elsewhere in this file. All rights reserved. +% +% This file is part of the Babel system. +% -------------------------------------- +% +% It 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 +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2003/12/01 or later. +% +% This work has the LPPL maintenance status "maintained". +% +% The Current Maintainer of this work is Johannes Braams. +% +% The list of all files belonging to the Babel system is +% given in the file `manifest.bbl. See also `legal.bbl' 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 +% \CheckSum{8} +% +% \iffalse meta-comment +%% File `heb209.dtx' - obsolete LaTeX 2.09 compatible style files. +%% Copyright (C) 1997 -- 2004 Boris Lavva. +% +%% Babel package for LaTeX version 2e +%% Copyright (C) 1989 -- 2004 by Johannes Braams, +%% TeXniek +%% All rights reserved. +%\fi +% \providecommand\dst{\textsc{docstrip}} +% \providecommand\babel{\textsf{babel}} +% \GetFileInfo{heb209.dtx} +% +% \changes{heb209~1.0a}{1998/01/06}{% +% Initial version. Provides hebrew\_newcode, hebrew\_oldcode and +% hebrew\_p style files for \LaTeX~2.09 (by Boris Lavva)} +% +% \section{Hebrew in \LaTeX~2.09 compatibility mode}\label{sec:heb209} +% +% |\documentstyle| command in the preamble of \LaTeX\ document +% indicates that it is a \LaTeX~2.09 document, and should be processed +% in \emph{compatibility mode}. In such documents, one of the following +% three Hebrew style options can be included: +% \begin{enumerate} +% \item \texttt{hebrew\_newcode} indicates that document will use UNIX +% ISO 8859-8 or Windows cp1255 input encoding, i.e.\ \emph{Alef} +% letter will be represented as 224. +% \item \texttt{hebrew\_p} indicates that document is encoded with IBM +% PC cp862 encoding, i.e.\ \emph{Alef} letter will be represented as +% 128. +% \item \texttt{hebrew\_oldcode} indicates that document uses old 7-bit +% encoding, as defined in Israeli Standard 960, i.e.\ \emph{Alef} is +% character number 96. +% \end{enumerate} +% Note, that other hebrew-related styles, such as \texttt{hebcal} can +% be included \emph{after} the abovenamed Hebrew style option, for +% example: +% \begin{quote} +% |\documentstyle[12pt,hebrew_p,hebcal]{report}|. +% \end{quote} +% +% Any Hebrew document which compiled under \LaTeX~2.09 should compile +% under compatibility mode, unless it uses low-level commands such as +% |\tenrm|. +% +% \subsection{The {\normalfont\dst{}} modules} +% +% The following modules are used in the implementation to direct +% \dst{} in generating the external files: +% \begin{center} +% \begin{tabular}{ll} +% newcode & produce \texttt{hebrew\_newcode.sty} \\ +% pccode & produce \texttt{hebrew\_p.sty} \\ +% oldcode & produce \texttt{hebrew\_oldcode.sty} +% \end{tabular} +% \end{center} +% +% \StopEventually{} +% +% \iffalse +% \subsection{A driver for this document} +% +% The next bit of code contains the documentation driver file for +% \TeX{}, i.e., the file that will produce the documentation you +% are currently reading. It will be extracted from this file by +% the \dst{} program. +% +% \begin{macrocode} +%<*driver> +\documentclass{ltxdoc} +\title{Hebrew \LaTeX~2.09 compatibility style files} +\author{Boris Lavva} +\date{Printed \today} +\begin{document} + \maketitle + \DocInput{heb209.dtx} +\end{document} +% +% \end{macrocode} +% \fi +% +% \subsection{Obsolete style files} +% +% For each of the Hebrew \LaTeX~2.09 Hebrew styles, we produce a +% file which uses correct input encoding and calls \babel\ with +% Hebrew and English language options. +% This means that any styles which say |\input hebrew_newcode.sty| +% or |\documentstyle[|\ldots|hebrew_newcode|\ldots|]{|\ldots|}| +% should still work. +% +% \begin{macrocode} +%<*newcode|pccode|oldcode> +\NeedsTeXFormat{LaTeX2e} +% +% \end{macrocode} +% +% \begin{macrocode} +%<*newcode> +\@obsoletefile{hebrew.sty}{hebrew_newcode.sty} +\RequirePackage[8859-8]{inputenc} +% +%<*pccode> +\@obsoletefile{hebrew.sty}{hebrew_p.sty} +\RequirePackage[cp862]{inputenc} +% +%<*oldcode> +\@obsoletefile{hebrew.sty}{hebrew_oldcode.sty} +\RequirePackage[si960]{inputenc} +% +% \end{macrocode} +% +% \begin{macrocode} +%<*newcode|pccode|oldcode> +\RequirePackage[english,hebrew]{babel} +% +% \end{macrocode} +% +% \Finale +%% +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +\endinput diff --git a/Master/texmf-dist/source/generic/babel/hebinp.dtx b/Master/texmf-dist/source/generic/babel/hebinp.dtx new file mode 100644 index 00000000000..a6a9d60c394 --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/hebinp.dtx @@ -0,0 +1,550 @@ +% \iffalse meta-comment +% +% Copyright 1989-2005 Johannes L. Braams and any individual authors +% listed elsewhere in this file. All rights reserved. +% +% This file is part of the Babel system. +% -------------------------------------- +% +% It 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 +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2003/12/01 or later. +% +% This work has the LPPL maintenance status "maintained". +% +% The Current Maintainer of this work is Johannes Braams. +% +% The list of all files belonging to the Babel system is +% given in the file `manifest.bbl. See also `legal.bbl' 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 +% \CheckSum{446} +% +% \iffalse +% \ProvidesFile{si960.def} +%<8859-8> \ProvidesFile{8859-8.def} +% \ProvidesFile{cp862.def} +% \ProvidesFile{cp1255.def} +%<*driver> +\ProvidesFile{hebinp.drv} +% +% \fi +% \ProvidesFile{hebinp.dtx} + [2004/02/20 v1.1b Hebrew input encoding file] +% \iffalse meta-comment +%% File `hebinp.dtx' for installing the input hebrew encodings. +%% Copyright (C) 1997 -- 2005 Boris Lavva. +% +%% Babel package for LaTeX version 2e +%% Copyright (C) 1989 -- 2005 by Johannes Braams, +%% TeXniek +%% All rights reserved. +% \fi +% +% \providecommand\dst{\textsc{docstrip}} +% \GetFileInfo{hebinp.dtx} +% +% \changes{hebinp~1.0a}{1997/12/07}{% +% Initial version. Provides 8859-8, cp862, cp1255, and old 7-bit +% input encodings (by Boris Lavva)} +% \changes{hebinp~1.1}{2001/02/27}{% +% Renamed hebrew letters: \cs{alef} to \cs{hebalef} etc. +% (by Tzafrir Cohen)} +% \changes{hebinp~1.1a}{2001/07/22}{% +% Renamed CP1255 nikud \cs{patah} to \cs{hebpatah etc}. +% Added the macro \cs{DisableNikud} - may not be a good idea +% (by Tzafrir Cohen)} +% +% \section{Hebrew input encodings}\label{sec:hebinp} +% +% Hebrew input encodings defined in file |hebinp.dtx|\footnote{The +% files described in this section have version number \fileversion\ +% and were last revised on \filedate.} should be used with |inputenc| +% \LaTeXe{} package. This package allows the user +% to specify an input encoding from this file (for example, ISO +% Hebrew/Latin 8859-8, IBM Hebrew codepage 862 or MS Windows +% Hebrew codepage 1255) by saying: +% \begin{quote} +% |\usepackage[|\emph{encoding name}|]{inputenc}| +% \end{quote} +% The encoding can also be selected in the document with: +% \begin{quote} +% |\inputencoding{|\emph{encoding name}|}| +% \end{quote} +% The only practical use of this command within a document is when +% using text from several documents to build up a composite work such +% as a volume of journal articles. Therefore this command will be +% used only in vertical mode. +% +% The encodings provided by this package are: +% \begin{itemize} +% \item |si960| 7-bit Hebrew encoding for the range 32--127. This +% encoding also known as ``old-code'' and defined by Israeli +% Standard SI-960. +% \item |8859-8| ISO 8859-8 Hebrew/Latin encoding commonly used in +% UNIX systems. This encoding also known as ``new-code'' and +% includes hebrew letters in positions starting from 224. +% \item |cp862| IBM 862 code page commonly used by DOS on +% IBM-compatible personal computers. This encoding also known as +% ``pc-code'' and includes hebrew letters in positions starting +% from 128. +% \item |cp1255| MS Windows 1255 (hebrew) code page which is similar to +% 8859-8. In addition to hebrew letters, this encoding contains +% also hebrew vowels and dots (nikud). +% \end{itemize} +% Each encoding has an associated |.def| file, for example +% |8859-8.def| which defines the behaviour of each input character, +% using the commands: +% \begin{quote} +% |\DeclareInputText{|\emph{slot}|}{|\emph{text}|}| \\ +% |\DeclareInputMath{|\emph{slot}|}{|\emph{math}|}| +% \end{quote} +% This defines the input character \emph{slot} to be the +% \emph{text} material or \emph{math} material respectively. +% For example, |8859-8.def| defines slots |"EA| (letter hebalef) +% and |"B5| ($\mu$) by saying: +%\begin{verbatim} +% \DeclareInputText{224}{\hebalef} +% \DeclareInputMath{181}{\mu} +%\end{verbatim} +% Note that the \emph{commands} should be robust, and should not be +% dependent on the output encoding. The same \emph{slot} should not +% have both a text and a math declaration for it. (This restriction +% may be removed in future releases of inputenc). +% +% The |.def| file may also define commands using the declarations:\\ +% |\providecommand| or |\ProvideTextCommandDefault|. +% For example, |8859-8.def| defines: +%\begin{verbatim} +% \ProvideTextCommandDefault{\textonequarter}{\ensuremath{\frac14}} +% \DeclareInputText{188}{\textonequarter} +%\end{verbatim} +% The use of the `provide' forms here will ensure that a +% better definition will not be over-written; their use is +% recommended since, in general, the best defintion depends on the +% fonts available. +% +% See the documentation in |inputenc.dtx| for details of how to +% declare input definitions for various encodings. +% +% \StopEventually{} +% +% \iffalse +% \subsection{A driver for this document} +% +% The next bit of code contains the documentation driver file for +% \TeX{}, i.e., the file that will produce the documentation you +% are currently reading. It will be extracted from this file by +% the \dst{} program. +% +% \begin{macrocode} +%<*driver> +\documentclass{ltxdoc} +\title{Hebrew input encodings for use with \LaTeXe} +\author{Boris Lavva} +\date{Printed \today} +\begin{document} + \maketitle + \DocInput{hebinp.dtx} +\end{document} +% +% \end{macrocode} +% \fi +% +% \subsection{Default definitions for characters} +% +% First, we insert a |\makeatletter| at the beginning of all |.def| +% files to use |@| symbol in the macros' names. +% \begin{macrocode} +%<-driver>\makeatletter +% \end{macrocode} +% +% Some input characters map to internal functions which are not in +% either the |T1| or |OT1| font encoding. For this reason default +% definitions are provided in the encoding file: these will be +% used unless some other output encoding is used which supports +% those glyphs. In some cases this default defintion has to be +% simply an error message. +% +% Note that this works reasonably well only because the encoding +% files for both |OT1| and |T1| are loaded in the standard LaTeX +% format. +% +% \begin{macrocode} +%<*8859-8|cp862|cp1255> +\ProvideTextCommandDefault{\textdegree}{\ensuremath{{^\circ}}} +\ProvideTextCommandDefault{\textonehalf}{\ensuremath{\frac12}} +\ProvideTextCommandDefault{\textonequarter}{\ensuremath{\frac14}} +% +%<*8859-8|cp1255> +\ProvideTextCommandDefault{\textthreequarters}{\ensuremath{\frac34}} +% +%<*cp862|cp1255> +\ProvideTextCommandDefault{\textflorin}{\textit{f}} +% +%<*cp862> +\ProvideTextCommandDefault{\textpeseta}{Pt} +% +% \end{macrocode} +% +% The name |\textblacksquare| is derived from the AMS symbol name +% since Adobe seem not to want this symbol. The default +% definition, as a rule, makes no claim to being a good design. +% \begin{macrocode} +%<*cp862> +\ProvideTextCommandDefault{\textblacksquare} + {\vrule \@width .3em \@height .4em \@depth -.1em\relax} +% +% \end{macrocode} +% +% Some commands can't be faked, so we have them generate an error +% message. +% \begin{macrocode} +%<*8859-8|cp862|cp1255> +\ProvideTextCommandDefault{\textcent} + {\TextSymbolUnavailable\textcent} +\ProvideTextCommandDefault{\textyen} + {\TextSymbolUnavailable\textyen} +% +%<*8859-8> +\ProvideTextCommandDefault{\textcurrency} + {\TextSymbolUnavailable\textcurrency} +% +%<*cp1255> +\ProvideTextCommandDefault{\newsheqel} + {\TextSymbolUnavailable\newsheqel} +% +%<*8859-8|cp1255> +\ProvideTextCommandDefault{\textbrokenbar} + {\TextSymbolUnavailable\textbrokenbar} +% +%<*cp1255> +\ProvideTextCommandDefault{\textperthousand} + {\TextSymbolUnavailable\textperthousand} +% +% \end{macrocode} +% +% Characters that are supposed to be used only in math will be defined +% by |\providecommand| because \LaTeXe{} assumes that the font +% encoding for math fonts is static. +% \begin{macrocode} +%<*8859-8|cp1255> +\providecommand{\mathonesuperior}{{^1}} +\providecommand{\maththreesuperior}{{^3}} +% +%<*8859-8|cp862|cp1255> +\providecommand{\mathtwosuperior}{{^2}} +% +%<*cp862> +\providecommand{\mathordmasculine}{{^o}} +\providecommand{\mathordfeminine}{{^a}} +% +% \end{macrocode} +% +% \subsection{The SI-960 encoding} +% +%% The SI-960 or ``old-code'' encoding only allows characters in the +%% range 32--127, so we only need to provide an empty |si960.def| file. +% +% \subsection{The ISO 8859-8 encoding and the MS Windows cp1255 encoding} +% +% The |8859-8.def| encoding file defines the characters in the ISO +% 8859-8 encoding. +% +% The MS Windows Hebrew character set incorporates the Hebrew +% letter repertoire of ISO 8859-8, and uses the same code points +% (starting from 224). It has also some important additions in the +% 128--159 and 190--224 ranges. +% +% \begin{macrocode} +%<*cp1255> +\DeclareInputText{130}{\quotesinglbase} +\DeclareInputText{131}{\textflorin} +\DeclareInputText{132}{\quotedblbase} +\DeclareInputText{133}{\dots} +\DeclareInputText{134}{\dag} +\DeclareInputText{135}{\ddag} +\DeclareInputText{136}{\^{}} +\DeclareInputText{137}{\textperthousand} +\DeclareInputText{139}{\guilsinglleft} +\DeclareInputText{145}{\textquoteleft} +\DeclareInputText{146}{\textquoteright} +\DeclareInputText{147}{\textquotedblleft} +\DeclareInputText{148}{\textquotedblright} +\DeclareInputText{149}{\textbullet} +\DeclareInputText{150}{\textendash} +\DeclareInputText{151}{\textemdash} +\DeclareInputText{152}{\~{}} +\DeclareInputText{153}{\texttrademark} +\DeclareInputText{155}{\guilsinglright} +% +% \end{macrocode} +% +% \begin{macrocode} +%<*8859-8|cp1255> +\DeclareInputText{160}{\nobreakspace} +\DeclareInputText{162}{\textcent} +\DeclareInputText{163}{\pounds} +%<+8859-8>\DeclareInputText{164}{\textcurrency} +%<+cp1255>\DeclareInputText{164}{\newsheqel} +\DeclareInputText{165}{\textyen} +\DeclareInputText{166}{\textbrokenbar} +\DeclareInputText{167}{\S} +\DeclareInputText{168}{\"{}} +\DeclareInputText{169}{\textcopyright} +%<+8859-8>\DeclareInputMath{170}{\times} +\DeclareInputText{171}{\guillemotleft} +\DeclareInputMath{172}{\lnot} +\DeclareInputText{173}{\-} +\DeclareInputText{174}{\textregistered} +\DeclareInputText{175}{\@tabacckludge={}} +\DeclareInputText{176}{\textdegree} +\DeclareInputMath{177}{\pm} +\DeclareInputMath{178}{\mathtwosuperior} +\DeclareInputMath{179}{\maththreesuperior} +\DeclareInputText{180}{\@tabacckludge'{}} +\DeclareInputMath{181}{\mu} +\DeclareInputText{182}{\P} +\DeclareInputText{183}{\textperiodcentered} +%<+8859-8>\DeclareInputText{184}{\c\ } +\DeclareInputMath{185}{\mathonesuperior} +%<+8859-8>\DeclareInputMath{186}{\div} +\DeclareInputText{187}{\guillemotright} +\DeclareInputText{188}{\textonequarter} +\DeclareInputText{189}{\textonehalf} +\DeclareInputText{190}{\textthreequarters} +% +% \end{macrocode} +% +% Hebrew vowels and dots (nikud) are included only to MS Windows cp1255 +% page and start from the position 192. +% \begin{macrocode} +%<*cp1255> +\DeclareInputText{192}{\hebsheva} +\DeclareInputText{193}{\hebhatafsegol} +\DeclareInputText{194}{\hebhatafpatah} +\DeclareInputText{195}{\hebhatafqamats} +\DeclareInputText{196}{\hebhiriq} +\DeclareInputText{197}{\hebtsere} +\DeclareInputText{198}{\hebsegol} +\DeclareInputText{199}{\hebpatah} +\DeclareInputText{200}{\hebqamats} +\DeclareInputText{201}{\hebholam} +\DeclareInputText{203}{\hebqubuts} +\DeclareInputText{204}{\hebdagesh} +\DeclareInputText{205}{\hebmeteg} +\DeclareInputText{206}{\hebmaqaf} +\DeclareInputText{207}{\hebrafe} +\DeclareInputText{208}{\hebpaseq} +\DeclareInputText{209}{\hebshindot} +\DeclareInputText{210}{\hebsindot} +\DeclareInputText{211}{\hebsofpasuq} +\DeclareInputText{212}{\hebdoublevav} +\DeclareInputText{213}{\hebvavyod} +\DeclareInputText{214}{\hebdoubleyod} +% +% \end{macrocode} +% +% Hebrew letters start from the position 224 in both encodings. +% \begin{macrocode} +%<*8859-8|cp1255> +\DeclareInputText{224}{\hebalef} +\DeclareInputText{225}{\hebbet} +\DeclareInputText{226}{\hebgimel} +\DeclareInputText{227}{\hebdalet} +\DeclareInputText{228}{\hebhe} +\DeclareInputText{229}{\hebvav} +\DeclareInputText{230}{\hebzayin} +\DeclareInputText{231}{\hebhet} +\DeclareInputText{232}{\hebtet} +\DeclareInputText{233}{\hebyod} +\DeclareInputText{234}{\hebfinalkaf} +\DeclareInputText{235}{\hebkaf} +\DeclareInputText{236}{\heblamed} +\DeclareInputText{237}{\hebfinalmem} +\DeclareInputText{238}{\hebmem} +\DeclareInputText{239}{\hebfinalnun} +\DeclareInputText{240}{\hebnun} +\DeclareInputText{241}{\hebsamekh} +\DeclareInputText{242}{\hebayin} +\DeclareInputText{243}{\hebfinalpe} +\DeclareInputText{244}{\hebpe} +\DeclareInputText{245}{\hebfinaltsadi} +\DeclareInputText{246}{\hebtsadi} +\DeclareInputText{247}{\hebqof} +\DeclareInputText{248}{\hebresh} +\DeclareInputText{249}{\hebshin} +\DeclareInputText{250}{\hebtav} +% +% \end{macrocode} +% +% Special symbols which define the direction of symbols explicitly. +% Currently, they are not used in \LaTeX. +% \begin{macrocode} +%<*cp1255> +\DeclareInputText{253}{\lefttorightmark} +\DeclareInputText{254}{\righttoleftmark} +% +% \end{macrocode} +% +% \subsection{The IBM code page 862} +% +% The |cp862.def| encoding file defines the characters in the IBM +% codepage 862 encoding. The DOS graphics `letters' and a few +% other positions are ignored (left undefined). +% +% Hebrew letters start from the position 128. +% \begin{macrocode} +%<*cp862> +\DeclareInputText{128}{\hebalef} +\DeclareInputText{129}{\hebbet} +\DeclareInputText{130}{\hebgimel} +\DeclareInputText{131}{\hebdalet} +\DeclareInputText{132}{\hebhe} +\DeclareInputText{133}{\hebvav} +\DeclareInputText{134}{\hebzayin} +\DeclareInputText{135}{\hebhet} +\DeclareInputText{136}{\hebtet} +\DeclareInputText{137}{\hebyod} +\DeclareInputText{138}{\hebfinalkaf} +\DeclareInputText{139}{\hebkaf} +\DeclareInputText{140}{\heblamed} +\DeclareInputText{141}{\hebfinalmem} +\DeclareInputText{142}{\hebmem} +\DeclareInputText{143}{\hebfinalnun} +\DeclareInputText{144}{\hebnun} +\DeclareInputText{145}{\hebsamekh} +\DeclareInputText{146}{\hebayin} +\DeclareInputText{147}{\hebfinalpe} +\DeclareInputText{148}{\hebpe} +\DeclareInputText{149}{\hebfinaltsadi} +\DeclareInputText{150}{\hebtsadi} +\DeclareInputText{151}{\hebqof} +\DeclareInputText{152}{\hebresh} +\DeclareInputText{153}{\hebshin} +\DeclareInputText{154}{\hebtav} +% \end{macrocode} +% +% \begin{macrocode} +\DeclareInputText{155}{\textcent} +\DeclareInputText{156}{\pounds} +\DeclareInputText{157}{\textyen} +\DeclareInputText{158}{\textpeseta} +\DeclareInputText{159}{\textflorin} +\DeclareInputText{160}{\@tabacckludge'a} +\DeclareInputText{161}{\@tabacckludge'\i} +\DeclareInputText{162}{\@tabacckludge'o} +\DeclareInputText{163}{\@tabacckludge'u} +\DeclareInputText{164}{\~n} +\DeclareInputText{165}{\~N} +\DeclareInputMath{166}{\mathordfeminine} +\DeclareInputMath{167}{\mathordmasculine} +\DeclareInputText{168}{\textquestiondown} +\DeclareInputMath{170}{\lnot} +\DeclareInputText{171}{\textonehalf} +\DeclareInputText{172}{\textonequarter} +\DeclareInputText{173}{\textexclamdown} +\DeclareInputText{174}{\guillemotleft} +\DeclareInputText{175}{\guillemotright} +% \end{macrocode} +% +% \begin{macrocode} +\DeclareInputMath{224}{\alpha} +\DeclareInputText{225}{\ss} +\DeclareInputMath{226}{\Gamma} +\DeclareInputMath{227}{\pi} +\DeclareInputMath{228}{\Sigma} +\DeclareInputMath{229}{\sigma} +\DeclareInputMath{230}{\mu} +\DeclareInputMath{231}{\tau} +\DeclareInputMath{232}{\Phi} +\DeclareInputMath{233}{\Theta} +\DeclareInputMath{234}{\Omega} +\DeclareInputMath{235}{\delta} +\DeclareInputMath{236}{\infty} +\DeclareInputMath{237}{\phi} +\DeclareInputMath{238}{\varepsilon} +\DeclareInputMath{239}{\cap} +\DeclareInputMath{240}{\equiv} +\DeclareInputMath{241}{\pm} +\DeclareInputMath{242}{\ge} +\DeclareInputMath{243}{\le} +\DeclareInputMath{246}{\div} +\DeclareInputMath{247}{\approx} +\DeclareInputText{248}{\textdegree} +\DeclareInputText{249}{\textperiodcentered} +\DeclareInputText{250}{\textbullet} +\DeclareInputMath{251}{\surd} +\DeclareInputMath{252}{\mathnsuperior} +\DeclareInputMath{253}{\mathtwosuperior} +\DeclareInputText{254}{\textblacksquare} +\DeclareInputText{255}{\nobreakspace} +% +% \end{macrocode} +% +% \begin{macro}{\DisableNikud} +% A utility macro to ignore any nikud character that may appear in the +% input. This allows you to ignore cp1255 nikud characters that happened to +% appear in the input. +% \end{macro} +% \begin{macrocode} +%<*8859-8> +\newcommand{\DisableNikud}{% + \DeclareInputText{192}{}% + \DeclareInputText{193}{}% + \DeclareInputText{194}{}% + \DeclareInputText{195}{}% + \DeclareInputText{196}{}% + \DeclareInputText{197}{}% + \DeclareInputText{198}{}% + \DeclareInputText{199}{}% + \DeclareInputText{200}{}% + \DeclareInputText{201}{}% + \DeclareInputText{203}{}% + \DeclareInputText{204}{}% + \DeclareInputText{205}{}% + \DeclareInputText{206}{}% + \DeclareInputText{207}{}% + \DeclareInputText{208}{}% + \DeclareInputText{209}{}% + \DeclareInputText{210}{}% + \DeclareInputText{211}{}% + \DeclareInputText{212}{}% + \DeclareInputText{213}{}% + \DeclareInputText{214}{}% +} +% +% \end{macrocode} +% +% Finally, we reset the category code of the |@| sign at the end of +% all |.def| files. +% \begin{macrocode} +%<-driver>\makeatother +% \end{macrocode} +% +% \Finale +%% +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +\endinput diff --git a/Master/texmf-dist/source/generic/babel/hebrew.dtx b/Master/texmf-dist/source/generic/babel/hebrew.dtx new file mode 100644 index 00000000000..19f0fbf0fc8 --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/hebrew.dtx @@ -0,0 +1,3329 @@ +% \iffalse meta-comment +% +% Copyright 1989-2005 Johannes L. Braams and any individual authors +% listed elsewhere in this file. All rights reserved. +% +% This file is part of the Babel system. +% -------------------------------------- +% +% It 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 +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2003/12/01 or later. +% +% This work has the LPPL maintenance status "maintained". +% +% The Current Maintainer of this work is Johannes Braams. +% +% The list of all files belonging to the Babel system is +% given in the file `manifest.bbl. See also `legal.bbl' 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 +% \CheckSum{3345} +% +% \iffalse meta-comment +%% Hebrew language definition and additional packages. +%% Copyright (C) 1997 -- 2005 Boris Lavva. +% +%% Babel package for LaTeX version 2e +%% Copyright (C) 1989 -- 2005 by Johannes Braams, +%% TeXniek +%% All rights reserved. +%<*calendar> +%% TeX & LaTeX macros for computing Hebrew date from Gregorian one +%% Copyright (C) 1991 by Michail Rozman, misha@iop.tartu.ew.su +%% +% +% \fi +% +% +% \iffalse +%\ProvidesFile{hebrew.ldf} +%\ProvidesFile{rlbabel.def} +%\ProvidesPackage{hebcal} +%<*driver> +\ProvidesFile{hebrew.drv} +% +% \fi +% \ProvidesFile{hebrew.dtx} + [2005/03/30 v2.3h % +% \iffalse +% Hebrew language definition from the babel system +% Right-to-Left support from the babel system +% Hebrew calendar +% Driver file for hebrew support +% \fi + Hebrew language support from the babel system] +% +% \iffalse +% \subsection{A driver for this document} +% +% The next bit of code contains the documentation driver file for +% \TeX{}, i.e., the file that will produce the documentation you are +% currently reading. It will be extracted from this file by the \dst{} +% program. +% +% \begin{macrocode} +%<*driver> +\documentclass{ltxdoc} +\providecommand\babel{\textsf{babel}} +\providecommand\file[1]{\texttt{#1}} +\makeatletter +% \end{macrocode} +% +% The code lines are numbered within sections, +% \begin{macrocode} +\@addtoreset{CodelineNo}{section} +\renewcommand\theCodelineNo{% + \reset@font\scriptsize\thesection.\arabic{CodelineNo}} +% \end{macrocode} +% which should also be visible in the index; hence this +% redefinition of a macro from \file{doc.sty}. +% \begin{macrocode} +\renewcommand\codeline@wrindex[1]{\if@filesw + \immediate\write\@indexfile + {\string\indexentry{#1}% + {\number\c@section.\number\c@CodelineNo}}\fi} +% \end{macrocode} +% +% The glossary environment is used or the change log, but its +% definition needs changing for this document. +% \begin{macrocode} +\renewenvironment{theglossary}{% + \glossary@prologue% + \GlossaryParms \let\item\@idxitem \ignorespaces}% + {} +\makeatother +\DisableCrossrefs +\CodelineIndex +\RecordChanges +\title{Hebrew language support from the \babel\ system} +\author{Boris Lavva} +\date{Printed \today} +\begin{document} + \maketitle + \tableofcontents + \DocInput{hebrew.dtx} + \DocInput{hebinp.dtx} + \DocInput{hebrew.fdd} + \DocInput{heb209.dtx} + \clearpage + \def\filename{index} + \PrintIndex + \clearpage + \def\filename{changes} + \PrintChanges +\end{document} +% +% \end{macrocode} +% \fi +% +% \providecommand\babel{\textsf{babel}} +% \providecommand\dst{\textsc{docstrip}} +% \providecommand\file[1]{\texttt{#1}} +% \providecommand\pkg[1]{\texttt{#1}} +% \providecommand\XeT{X\kern-.125em\lower.5ex\hbox{E}\kern-.1667emT\@} +% \providecommand\scrunch{\setlength{\itemsep}{-.05in}} +% \GetFileInfo{hebrew.dtx} +% +% \changes{hebrew~0.1}{??/??/??}{% +% Preliminary \LaTeX\ Hebrew option (by Sergio Fogel)} +% \changes{hebrew~0.2}{??/??/??}{% +% Corrections and additions (by Rama Porrat)} +% \changes{hebrew~0.6}{??/??/??}{Additions (by Yael Dubinsky)} +% \changes{hebrew~1.2}{??/??/??}{% +% Bilingual tables, penalties, documentation and more changes +% (by Yaniv Bargury)} +% \changes{hebrew~1.30}{1992/05/15}{% +% Font selection, various (by Alon Ziv)} +% \changes{hebrew~1.31}{1993/02/22}{Bug fixes (by Alon Ziv)} +% \changes{hebrew~1.32}{1993/03/10}{Made font-change command +% for numbers `\cs{protect}'ed (by Alon Ziv)} +% \changes{hebrew~1.33}{1993/03/11}{% +% Made \cs{refstepcounter} work using \cs{@ltor} (by Alon Ziv)} +% \changes{hebrew~1.34}{1993/03/22}{% +% Moved font loading to another file. Added \cs{mainsec}. +% Made all text strings be produced by control codes (similar to +% \LaTeX 2.09 Mar '92). Fixed \cs{noindent} (by Alon Ziv)} +% \changes{hebrew~1.35}{1993/03/22}{% +% Moved the texts to a file selected by the current encoding +% (by Alon Ziv)} +% \changes{hebrew~1.36}{1993/03/24}{Use \TeX\ tricks to redefine +% \cs{theXXXX} without keeping old definitions. +% Use only \cs{@eng} for direction/font change (removed \cs{@ltor}). +% Switched from use of \cs{mainsec} to code taken from \babel\ +% system (by Alon Ziv)} +% \changes{hebrew~1.37}{1993/03/28}{% +% Use \cs{add@around} in defining font size commands. Small bug +% fixes (by Alon Ziv)} +% \changes{hebrew~1.38}{1993/04/20}{% +% \cs{everypar} changed so that \cs{noindent} works unmodified +% (by Alon Ziv, thanks to Chris Rowley)} +% \changes{hebrew~1.39}{1993/08/10}{% +% Redefined primitive sectioning commands. Changed \cs{include} so +% it finds \texttt{.h}, \texttt{.xet}, and \texttt{.ltx} files (no +% extension needed). Reinstated use of \cs{@ltor} (by Alon Ziv)} +% \changes{hebrew~1.40}{1993/09/01}{Added the \cs{@brackets} hack +% (by Alon Ziv)} +% \changes{hebrew~1.41}{1993/09/09}{% +% Reworked towards using NFSS2. Changed some macro names to be more +% logical: renamed \cs{@ltor} to \cs{@number}, \cs{@eng} to +% \cs{@latin}, and (in \texttt{hebrew.ldf}) \cs{@heb} to +% \cs{@hebrew} (by Alon Ziv)} +% \changes{hebrew~1.42}{1993/09/22}{% +% Made list environments work better. Fixed thebibliography +% environment (by Alon Ziv)} +% \changes{hebrew~2.0a}{1998/01/01}{% +% Completely rewritten for \LaTeXe\ and \babel\ support. Various +% input and font encodings (with NFSS2) are supported too. The +% original \pkg{hebrew.sty} is divided to a number of packages and +% definition files for better readability and extensibility. Added +% some user- and code-level documentation inside the \texttt{.dtx} +% and \texttt{.fdd} files, and \LaTeX -driven installation with +% \pkg{hebrew.ins} (by Boris Lavva)} +% \changes{hebrew~2.1}{2000/11/23}{% +% corrections from Sivan Toledo: sender name in letter, and section name in +% headings. (by Tzafrir Cohen)} +% \changes{hebrew~2.2}{2000/12/11}{% +% renamed hebrew letters to heb* (e.g.: alef renamed to hebalef) +% (by Tzafrir Cohen)} +% \changes{hebrew~2.3}{2001/02/27}{ +% added several \cs{@ifclassloaded}\{slides\} to allow the use of the +% slides class. (by Tzafrir Cohen)} +% \changes{hebrew~2.3a}{2001/07/09}{ +% The documentation should now be built fine (broken since at least +% 2.1, and probably 2.0) (by Tzafrir Cohen)} +% \changes{hebrew~2.3b}{2001/08/16}{ +% minor clean-ups. The documentation builds now with no warnings. +% Also removed \cs{R} from the caption macro (added in 2.1) +% Added internal \cs{@ensure@L} and \cs{@ensure@R} +% (Is there a real need for them? Maybe should they be exposed?) +% (by Tzafrir Cohen)} +% \changes{hebrew~2.3c}{2001/10/05}{ +% a temporary fix to the \cs{gim} macro. Should be replaced by stuff +% from hebcal. +% (by Tzafrir Cohen)} +% \changes{hebrew~2.3d}{2002/01/04}{ +% Initial support for the prosper class. Added \cs{arabicnorl} . +% (by Tzafrir Cohen)} +% \changes{hebrew~2.3e}{2002/08/09}{ +% Removing hebtech from this distriution (not relevant to babel), +% added \cs{HeblatexEncoding}. some docs cleanup +% (by Tzafrir Cohen)} +% \changes{hebrew~2.3f}{2002/12/26}{ +% redefined \cs{list} instead of redefining every environment +% that uses it. some pscolor handling, removed HeblatexEncoding +% (don't use 2.3e) (by Tzafrir Cohen)} +% \changes{hebrew~2.3g}{2003/06/05}{ +% Reimplemented the printing of Hebrew numerals and Hebrew +% counters; modified \pkg{hebcal.sty} to use this implementation +% when typesetting Hebrew dates; added option |full| to package +% \pkg{hebcal}; also removed some gratuitous +% spaces inserted by \pkg{hebcal.sty} by adding comment marks. +% CAUTION: the changes to \pkg{hebcal.sty} make it dependent on +% \pkg{babel} and not useable as a stand-alone package. Is this a +% problem? (by Ron Artstein)} +% +% \section{The Hebrew language}\label{sec:hebrew} +% +% The file \file{\filename}\footnote{The Hebrew language support +% files described in this section have version number \fileversion\ +% and were last revised on \filedate.} provides the following +% packages and files for Hebrew language support: +% \begin{description} +% \item[\file{hebrew.ldf}] file defines all the language-specific +% macros for the Hebrew language. +% \item[\file{rlbabel.def}] file is used by |hebrew.ldf| for +% bidirectional versions of the major \LaTeX{} commands and +% environments. It is designed to be used with other right-to-left +% languages, not only with Hebrew. +% \item[\pkg{hebcal.sty}] package defines a set of macros for +% computing Hebrew date from Gregorian one. +% \end{description} +% +% Additional Hebrew input and font encoding definition files that +% should be included and used with \file{hebrew.ldf} are: +% \begin{description} +% \item[\file{hebinp.dtx}] provides Hebrew input encodings, such as +% ISO 8859-8, MS Windows codepage 1255 or IBM PC codepage 862 +% (see Section~\ref{sec:hebinp} on page~\pageref{sec:hebinp}). +% \item[\file{hebrew.fdd}] contains Hebrew font encodings, related +% font definition files and \pkg{hebfont} package that +% provides Hebrew font switching commands (see +% Section~\ref{sec:hebfdd} on page~\pageref{sec:hebfdd} for +% further details). +% \end{description} +% +% \LaTeX~2.09 compatibility files are included with +% \file{heb209.dtx} and gives possibility to compile existing +% \LaTeX~2.09 Hebrew documents with small (if any) changes (see +% Section~\ref{sec:heb209} on page~\pageref{sec:heb209} for +% details). +% +% Finally, optional document class \pkg{hebtech} may be useful for +% writing theses and dissertations in both Hebrew and English (and +% any other languages included with \babel). It designed to meet +% requirements of the Graduate School of the Technion --- Israel +% Institute of Technology. +% +% \emph{As of version 2.3e hebtech is no longer distributed together +% with heblatex. It should be part of a new "hebclasses" package} +% +% \subsection{Acknowledgement} +% +% The following people have contributed to Hebrew package in one +% way or another, knowingly or unknowingly. In alphabetical order: +% Irina Abramovici, Yaniv Bargury, Yael Dubinsky, Sergio Fogel, +% Dan Haran, Rama Porrat, Michail Rozman, Alon Ziv. +% +% Tatiana Samoilov and Vitaly Surazhsky found a number of serious +% bugs in preliminary version of Hebrew package. +% +% A number of other people have contributed comments and +% information. Specific contributions are acknowledged within the +% document. +% +% I want to thank my wife, Vita, and son, Mishka, for their +% infinite love and patience. +% +% If you made a contribution and I haven't mentioned it, don't +% worry, it was an accident. I'm sorry. Just tell me and I will add +% you to the next version. +% +% \StopEventually{} +% +% \subsection{The {\normalfont\dst{}} modules} +% +% The following modules are used in the implementation to direct +% \dst{} in generating external files: +% \begin{center} +% \begin{tabular}{@{}ll} +% driver & produce a documentation driver file \\[4pt] +% hebrew & produce Hebrew language support file\\ +% rightleft & create right-to-left support file\\ +% calendar & create Hebrew calendar package +% \end{tabular} +% \end{center} +% A typical \dst{} command file would then have entries like: +% \begin{quote} +% |\generateFile{hebrew.ldf}{t}{\from{hebrew.dtx}{hebrew}}| +% \end{quote} +% +% \subsection{Hebrew language definitions} +% +% The macro |\LdfInit| takes care of preventing that this file is +% loaded more than once, checking the category code of the |@| +% sign, etc. +% \begin{macrocode} +%<*hebrew> +\LdfInit{hebrew}{captionshebrew} +% \end{macrocode} +% +% When this file is read as an option, i.e., by the |\usepackage| +% command, |hebrew| will be an `unknown' language, in which case we +% have to make it known. So we check for the existence of +% |\l@hebrew| to see whether we have to do something here. +% +% \begin{macrocode} +\ifx\l@hebrew\@undefined + \@nopatterns{Hebrew}% + \adddialect\l@hebrew0 +\fi +% \end{macrocode} +% +% \begin{macro}{\hebrewencoding} +% \emph{FIX DOCS REGARDING 8BIT} +% +% Typesetting Hebrew texts implies that a special input and output +% encoding needs to be used. Generally, the user may choose +% between different available Hebrew encodings provided. The +% current support for Hebrew uses all available fonts from the +% Hebrew University of Jerusalem encoded in `old-code' 7-bit +% encoding also known as Israeli Standard SI-960. We define for +% these fonts the Local Hebrew Encoding |LHE| (see the file +% |hebrew.fdd| for more details), and the |LHE| encoding definition +% file should be loaded by default. +% +% Other fonts are available in windows-cp1255 (a superset of ISO-8859-8 +% with nikud). For those, the encoding |HE8| should be used. Such fonts +% are, e.g., windows' TrueType fonts (once cnverted to Type1 or MetaFont) +% and IBM's Type1 fonts. +% +% However, if an user wants to use another font encoding, for +% example, cyrillic encoding T2 and extended latin encoding T1, --- +% he/she has to load the corresponding file \emph{before} the +% \pkg{hebrew} package. This may be done in the following way: +% \begin{quote} +% |\usepackage[LHE,T2,T1]{fontenc}|\\ +% |\usepackage[hebrew,russian,english]{babel}| +% \end{quote} +% We make sure that the |LHE| encoding is known to \LaTeX{} at end +% of this package. +% +% Also note that if you want to use the encoding |HE8| , you should define +% the following in your document, \emph{before loading babel}: +% \begin{quote} +% |\def\HeblatexEncoding{HE8}|\\ +% |\def\HeblatexEncodingFile{he8enc}| +% \end{quote} +% \changes{hebrew-2.3h}{2004/02/20}{Make LHE the default encoding for +% compatibility reasons} +% \begin{macrocode} +\providecommand{\HeblatexEncoding}{LHE}% +\providecommand{\HeblatexEncodingFile}{lheenc}% +\newcommand{\heblatex@set@encoding}[2]{ +} +\AtEndOfPackage{% + \@ifpackageloaded{fontenc}{% + \@ifl@aded{def}{% + \HeblatexEncodingFile}{\def\hebrewencoding{\HeblatexEncoding}}{}% + }{% + \input{\HeblatexEncodingFile.def}% + \def\hebrewencoding{\HeblatexEncoding}% + }} +% \end{macrocode} +% \end{macro} +% +% We also need to load inputenc package with one of the Hebrew +% input encodings. By default, we set up the |8859-8| codepage. +% If an user wants to use many input encodings in the same +% document, for example, the MS Windows Hebrew codepage |cp1255| +% and the standard IBM PC Russian codepage |cp866|, he/she has to +% load the corresponding file \emph{before} the hebrew package +% too. This may be done in the following way: +% \begin{quote} +% |\usepackage[cp1255,cp866]{inputenc}|\\ +% |\usepackage[hebrew,russian,english]{babel}| +% \end{quote} +% +% An user can switch input encodings in the document using the +% command |\inputencoding|, for example, to use the |cp1255|: +% \begin{quote} +% |\inputencoding{cp1255}| +% \end{quote} +% \begin{macrocode} +\AtEndOfPackage{% + \@ifpackageloaded{inputenc}{}{\RequirePackage[8859-8]{inputenc}}} +% \end{macrocode} +% +% The next step consists of defining commands to switch to (and +% from) the Hebrew language. +% +% \begin{macro}{\hebrewhyphenmins} +% This macro is used to store the correct values of the hyphenation +% parameters |\lefthyphenmin| and |\righthyphenmin|. They are set +% to~2. +% \changes{hebrew~2.0b}{2000/09/22}{Now use \cs{providehyphenmins} to +% provide a default value} +% \begin{macrocode} +\providehyphenmins{\CurrentOption}{\tw@\tw@} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\captionshebrew} +% The macro |\captionshebrew| replaces all captions used in the four +% standard document classes provided with \LaTeXe with their Hebrew +% equivalents. +% \changes{hebrew-2.0b}{2000/09/20}{Added \cs{glossaryname}} +% \begin{macrocode} +\addto\captionshebrew{% + \def\prefacename{\@ensure@R{\hebmem\hebbet\hebvav\hebalef}}% + \def\refname{\@ensure@R{\hebresh\hebshin\hebyod\hebmem\hebtav\ % + \hebmem\hebqof\hebvav\hebresh\hebvav\hebtav}}% + \def\abstractname{\@ensure@R{\hebtav\hebqof\hebtsadi\hebyod\hebresh}}% + \def\bibname{\@ensure@R{\hebbet\hebyod\hebbet\heblamed\hebyod\hebvav% + \hebgimel\hebresh\hebpe\hebyod\hebhe}}% + \def\chaptername{\@ensure@R{\hebpe\hebresh\hebqof}}% + \def\appendixname{\@ensure@R{\hebnun\hebsamekh\hebpe\hebhet}}% + \def\contentsname{\@ensure@R{% + \hebtav\hebvav\hebkaf\hebfinalnun\ % + \hebayin\hebnun\hebyod\hebyod\hebnun\hebyod\hebfinalmem}}% + \def\listfigurename{\@ensure@R{% + \hebresh\hebshin\hebyod\hebmem\hebtav\ % + \hebalef\hebyod\hebvav\hebresh\hebyod\hebfinalmem}}% + \def\listtablename{\@ensure@R{% + \hebresh\hebshin\hebyod\hebmem\hebtav\ + \hebtet\hebbet\heblamed\hebalef\hebvav\hebtav}}% + \def\indexname{\@ensure@R{\hebmem\hebpe\hebtav\hebhet}}% + \def\figurename{\@ensure@R{\hebalef\hebyod\hebvav\hebresh}}% + \def\tablename{\@ensure@R{\hebtet\hebbet\heblamed\hebhe}}% + \def\partname{\@ensure@R{\hebhet\heblamed\hebqof}}% + \def\enclname{\@ensure@R{\hebresh\hebtsadi"\hebbet}}% + \def\ccname{\@ensure@R{\hebhe\hebayin\hebtav\hebqof\hebyod% + \hebfinalmem}}% + \def\headtoname{\@ensure@R{\hebalef\heblamed}}% + \def\pagename{\@ensure@R{\hebayin\hebmem\hebvav\hebdalet}}% + \def\psname{\@ensure@R{\hebnun.\hebbet.}}% + \def\seename{\@ensure@R{\hebresh\hebalef\hebhe}}% + \def\alsoname{\@ensure@R{\hebresh\hebalef\hebhe \hebgimel% + \hebmemesof}}% + \def\proofname{\@ensure@R{\hebhe\hebvav\hebkaf\hebhet\hebhe}} + \def\glossaryname{\@ensure@L{Glossary}}% <-- Needs translation +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\slidelabel} +% Here we fix the macro |slidelabel| of the seminar package. Note +% that this still won't work well enough when overlays will be +% involved +% \begin{macrocode} +\@ifclassloaded{seminar}{% + \def\slidelabel{\bf \if@rl\R{\hebshin\hebqof\hebfinalpe{} \theslide}% + \else\L{Slide \theslide}% + \fi}% +}{} +% \end{macrocode} +% \end{macro} +% +% Here we provide an user with translation of Gregorian dates +% to Hebrew. In addition, the \pkg{hebcal} package can be used +% to create Hebrew calendar dates. +% +% \begin{macro}{\hebmonth} +% The macro |\hebmonth{|\emph{month}|}| produces month names in +% Hebrew. +% \begin{macrocode} +\def\hebmonth#1{% + \ifcase#1\or \hebyod\hebnun\hebvav\hebalef\hebresh\or % + \hebpe\hebbet\hebresh\hebvav\hebalef\hebresh\or % + \hebmem\hebresh\hebfinaltsadi\or % + \hebalef\hebpe\hebresh\hebyod\heblamed\or % + \hebmem\hebalef\hebyod\or \hebyod\hebvav\hebnun\hebyod\or % + \hebyod\hebvav\heblamed\hebyod\or % + \hebalef\hebvav\hebgimel\hebvav\hebsamekh\hebtet\or % + \hebsamekh\hebpe\hebtet\hebmem\hebbet\hebresh\or % + \hebalef\hebvav\hebqof\hebtet\hebvav\hebbet\hebresh\or % + \hebnun\hebvav\hebbet\hebmem\hebbet\hebresh\or % + \hebdalet\hebtsadi\hebmem\hebbet\hebresh\fi} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\hebdate} +% The macro |\hebdate{|\emph{day}|}{|\emph{month}|}{|\emph{year}|}| +% translates a given Gregorian date to Hebrew. +% \begin{macrocode} +\def\hebdate#1#2#3{% + \beginR\beginL\number#1\endL\ \hebbet\hebmonth{#2} + \beginL\number#3\endL\endR} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\hebday} +% The macro |\hebday| will replace |\today| command when in Hebrew +% mode. +% \begin{macrocode} +\def\hebday{\hebdate{\day}{\month}{\year}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\datehebrew} +% The macro |\datehebrew| redefines the command |\today| to produce +% Gregorian dates in Hebrew. It uses the macro |\hebday|. +% \begin{macrocode} +\def\datehebrew{\let\today=\hebday} +% \end{macrocode} +% \end{macro} +% +% The macro |\extrashebrew| will perform all the extra definitions +% needed for the Hebrew language. The macro |\noextrashebrew| +% is used to cancel the actions of |\extrashebrew|. +% +% \begin{macro}{\extrashebrew} +% We switch font encoding to Hebrew and direction to +% right-to-left. We cannot use the regular language switching +% commands (for example, |\sethebrew| and |\unsethebrew| or +% |\selectlanguage{hebrew}|), when in restricted horizontal mode, +% because it will result in \emph{unbalanced} |\beginR| or +% |\beginL| primitives. +% Instead, in \TeX 's restricted horizontal mode, the +% |\L{|\emph{latin text}|}| and |\R{|\emph{hebrew text}|}|, or +% |\embox{|\emph{latin text}|}| and |\hmbox{|\emph{hebrew text}|}| +% should be used. +% +% Hence, we use |\beginR| and |\beginL| switching commands only +% when not in restricted horizontal mode. +% \begin{macrocode} +\addto\extrashebrew{% + \tohebrew% + \ifhmode\ifinner\else\beginR\fi\fi} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\noextrashebrew} +% The macro |\noextrashebrew| is used to cancel the actions of +% |\extrashebrew|. We switch back to the previous font encoding and +% restore left-to-right direction. +% \begin{macrocode} +\addto\noextrashebrew{% + \fromhebrew% + \ifhmode\ifinner\else\beginL\fi\fi} +% \end{macrocode} +% \end{macro} +% +% Generally, we can switch to- and from- Hebrew by means of +% standard \babel -defined commands, for example, +% \begin{quote} +% |\selectlanguage{hebrew}| +% \end{quote} +% or +% \begin{quote} +% |\begin{otherlanguage}{hebrew}|\\ +% \hspace*{1.5em} some Hebrew text\\ +% |\end{otherlanguage}| +% \end{quote} +% Now we define two additional commands that offer the possibility +% to switch to and from Hebrew language. These commands are +% backward compatible with the previous versions of +% \pkg{hebrew.sty}. +% +% \begin{macro}{\sethebrew} +% \begin{macro}{\unsethebrew} +% The command |\sethebrew| will switch from the current font encoding +% to the hebrew font encoding, and from the current direction of +% text to the right-to-left mode. The command |\unsethebrew| switches +% back. +% +% Both commands use standard right-to-left switching macros +% |\setrllanguage{|\emph{ r2l language name}|}| and +% |\unsetrllanguage{|\emph{r2l language name}|}|, that +% defined in the \file{rlbabel.def} file. +% \begin{macrocode} +\def\sethebrew{\setrllanguage{hebrew}} +\def\unsethebrew{\unsetrllanguage{hebrew}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\hebrewtext} +% \begin{macro}{\nohebrewtext} +% The following two commands are \emph{obsolete} and work only +% in \LaTeX 2.09 compatibility mode. They are synonyms of +% |\sethebrew| and |\unsethebrew| defined above. +% \begin{macrocode} +\if@compatibility + \let\hebrewtext=\sethebrew + \let\nohebrewtext=\unsethebrew +\fi +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\tohebrew} +% \begin{macro}{\fromhebrew} +% These two commands change only the current font encoding to- and +% from- Hebrew encoding. Their implementation uses +% |\@torl{|\emph{language name}|}| and |\@fromrl| macros defined in +% \file{rlbabel.def} file. Both commands may be useful \emph{only} +% for package and class writers, not for regular users. +% \begin{macrocode} +\def\tohebrew{\@torl{hebrew}}% +\def\fromhebrew{\@fromrl} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\@hebrew} +% Sometimes we need to preserve Hebrew mode without knowing in +% which environment we are located now. For these cases, the +% |\@hebrew{|\emph{hebrew text}|}| macro will be useful. Not that +% this macro is similar to the |\@number| and |\@latin| macros +% defined in \file{rlbabel.def} file. +% \begin{macrocode} +\def\@@hebrew#1{\beginR{{\tohebrew#1}}\endR} +\def\@hebrew{\protect\@@hebrew} +% \end{macrocode} +% \end{macro} +% +% \subsubsection{Hebrew numerals} +% +% We provide commands to print numbers in the traditional +% notation using Hebrew letters. We need commands that print +% a Hebrew number from a decimal input, as well as commands +% to print the value of a counter as a Hebrew number. +% \begin{macro}{\if@gim@apost} +% \begin{macro}{\if@gim@final} +% Hebrew numbers can be written in various styles: with or without +% apostrophes, and with the letters kaf, mem, nun, pe, tsadi as either +% final or initial forms when they are the last letters in the +% sequence. We provide two flags to set the style options. +% \begin{macrocode} +\newif\if@gim@apost % whether we print apostrophes +\newif\if@gim@final % whether we use final or initial letters +% \end{macrocode} +% \end{macro} +% \end{macro} +% \begin{macro}{\hebrewnumeral} +% \begin{macro}{\Hebrewnumeral} +% \begin{macro}{\Hebrewnumeralfinal} +% The commands that print a Hebrew number +% must specify the style locally: relying on a global style +% option could cause a counter to +% print in an inconsistent manner---for instance, page numbers +% might appear in different styles if the global style option +% changed mid-way through a document. +% The commands only allow three of the four possible flag +% combinations (I do not know of a use that requires the +% combination of final letters and no apostrophes --RA). +% +% Each command sets the style flags and calls |\@hebrew@numeral|. +% Double braces are used in order to protect the values of +% |\@tempcnta| and |\@tempcntb|, which are changed by this call; +% they also keep the flag assignments local (this is not important +% because the global values are never used). +% \begin{macrocode} +\newcommand*{\hebrewnumeral}[1] % no apostrophe, no final letters + {{\@gim@finalfalse\@gim@apostfalse\@hebrew@numeral{#1}}} +\newcommand*{\Hebrewnumeral}[1] % apostrophe, no final letters + {{\@gim@finalfalse\@gim@aposttrue\@hebrew@numeral{#1}}} +\newcommand*{\Hebrewnumeralfinal}[1] % apostrophe, final letters + {{\@gim@finaltrue\@gim@aposttrue\@hebrew@numeral{#1}}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \begin{macro}{\alph} +% \begin{macro}{\@alph} +% \begin{macro}{\Alph} +% \begin{macro}{\@Alph} +% \begin{macro}{\Alphfinal} +% \begin{macro}{\@Alphfinal} +% Counter-printing commands are based on the above commands. The +% natural name for the counter-printing commands is |\alph|, because +% Hebrew numerals are the only way to represent numbers with +% Hebrew letters (kaf always means~20, never~11). Hebrew has no +% uppercase letters, hence no need for the familiar meaning of |\Alph|; +% we therefore define |\alph| to print counters as Hebrew numerals +% without apostrophes, and |\Alph| to print with apostrophes. A third +% form, |\Alphfinal|, is provided to print with apostrophes and final +% letters, as is required for Hebrew year designators. The commands +% |\alph| and |\Alph| are defined in \pkg{latex.ltx}, and we only +% need to redefine the internal commands |\@alph| and +% |\@Alph|; for |\Alphfinal| we need to provide both a wrapper and +% an internal command. +% The counter printing commands are made semi-robust: without the +% |\protect|, commands like |\theenumii| break (I'm not quite clear +% on why this happens, --RA); at the same time, we cannot make the +% commands too robust (e.g.~with |\DeclareRobustCommand|) because +% this would enter the command name rather than its value into +% files like |.aux|, |.toc| etc\@. +% The old meanings of meaning of |\@alph| and |\@Alph| are saved +% upon entering Hebrew mode and restored upon exiting it. +% \begin{macrocode} +\addto\extrashebrew{% + \let\saved@alph=\@alph% + \let\saved@Alph=\@Alph% + \renewcommand*{\@alph}[1]{\protect\hebrewnumeral{\number#1}}% + \renewcommand*{\@Alph}[1]{\protect\Hebrewnumeral{\number#1}}% + \def\Alphfinal#1{\expandafter\@Alphfinal\csname c@#1\endcsname}% + \providecommand*{\@Alphfinal}[1]{\protect\Hebrewnumeralfinal{\number#1}}} +\addto\noextrashebrew{% + \let\@alph=\saved@alph% + \let\@Alph=\saved@Alph} +% \end{macrocode} +% Note that |\alph| (without apostrophes) is already the +% appropriate choice for the second-level enumerate label, and +% |\Alph| (with apostrophes) is an appropriate choice for appendix; +% however, the default \LaTeX\ labels need to be redefined for +% appropriate cross-referencing, see below. +% \LaTeX\ default class files specify |\Alph| for +% the fourth-level enumerate level, this should probably be changed. +% Also, the way labels get flushed left by default looks inappropriate +% for Hebrew numerals, so we should redefine |\labelenumii| as well +% as |\labelenumiv| (presently not implemented). +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \begin{macro}{\theenumii} +% \begin{macro}{\theenumiv} +% \begin{macro}{\label} +% Cross-references to counter labels need to be printed according +% to the language environment in which a label was issued, not +% the environment in which it is called: for example, a label~(1b) +% issued in a Latin environment should be referred to as~(1b) in a +% Hebrew text, and label~(2dalet) issued in a Hebrew environment +% should be referred to as~(2dalet) in a Latin text. This was the +% unanimous opinion in a poll sent to the Ivri\TeX\ list. +% We therefore redefine |\theenumii| and |\theenumiv|, so that an +% explicit language instruction gets written to the |.aux| file. +% \begin{macrocode} +\renewcommand{\theenumii} + {\if@rl\protect\hebrewnumeral{\number\c@enumii}% + \else\protect\L{\protect\@@alph{\number\c@enumii}}\fi} +\renewcommand{\theenumiv} + {\if@rl\protect\Hebrewnumeral{\number\c@enumiv}% + \else\protect\L{\protect\@@Alph{\number\c@enumiv}}\fi} +% \end{macrocode} +% We also need to control for the font and direction in which a +% counter label is printed. Direction is straightforward: a Latin +% label like~(1b) should be written left-to-right when called in a +% Hebrew text, and a Hebrew label like~(2dalet) should be written +% right-to-left when called in a Latin text. The font question is +% more delicate, because we should decide whether the numerals +% should be typeset in the font of the language enviroment in which +% the label was issued, or that of the environment in which it is +% called. +% \begin{itemize} +% \item +% A purely numeric label like~(23) looks best if it is set in the +% font of the surrounding language. +% \item +% But a mixed alphanumeric label like~(1b) lookes weird if +% the~`1' is taken from the Hebrew font; likewise, (2dalet) looks +% weird if the~`2' is taken from a Latin font. +% \item +% Finally, mixing the two possibilities is worst, because a +% single Hebrew sentence referring to examples~(1b) and~(2) would +% take the~`1' from the Latin font and the~`2' from the Hebrew +% font, and this looks really awful. (It is also very hard to +% implement). +% \end{itemize} +% In light of the conflicting considerations it seems like there's +% no perfect solution. I have chosen to implement the top option, +% where numerals are taken from the font of the surrounding +% language, because it seems to me that reference to purely numeric +% labels is the most common, so this gives a good solution to the +% majority of cases and a mediocre solution to the minority. +% +% We redefine the |\label| command which writes to the +% |.aux| file. Depending on the language environment we issue +% appropriate |\beginR/L|$\cdots$|\endR/L| commands to control the +% direction without affecting the font. Since these commands do not +% affect the value of |\if@rl|, we cannot use the macro +% |\@brackets| to determine the correct brackets to be used with +% |\p@enumiii|; instead, we let the language environment determine an +% explicit definition. +% \begin{macrocode} +\def\label#1{\@bsphack + \if@rl + \def\p@enumiii{\p@enumii)\theenumii(}% + \protected@write\@auxout{}% + {\string\newlabel{#1}{{\beginR\@currentlabel\endR}{\thepage}}}% + \else + \def\p@enumiii{\p@enumii(\theenumii)}% + \protected@write\@auxout{}% + {\string\newlabel{#1}{{\beginL\@currentlabel\endL}{\thepage}}}% + \fi + \@esphack} +% \end{macrocode} +% NOTE: it appears that the definition of |\label| is +% language-independent and thus belongs in \pkg{rlbabel.def}, but +% this is not the case. The decision to typeset label numerals +% in the font of the surrounding language is reasonable for Hebrew, +% because mixed-font (1b) and (2dalet) are somewhat acceptable. The +% same may not be acceptable for Arabic, whose numeral glyphs are +% radically different from those in the Latin fonts. The decision +% about the direction may also be different for Arabic, which is +% more right-to-left oriented than Hebrew (two examples: dates like +% 15/6/2003 are written left-to-right in Hebrew but right-to-left +% in Arabic; equations like $1+2=3$ are written left-to-right in +% Hebrew but right-to-left in Arabic elementary school textbooks +% using Arabic numeral glyphs). My personal hunch is that a label +% like~(1b) in an Arabic text would be typeset left-to-right if +% the~`1' is a Western glyph, but right-to-left if the~`1' is an +% Arabic glyph. But this is just a guess, I'd have to ask Arab +% typesetters to find the correct answer. --RA. +% \end{macro} +% \end{macro} +% \end{macro} +% \begin{macro}{\appendix} +% The following code provides for the proper printing of appendix +% numbers in tables of contents. Section and chapter headings are +% normally bilingual: regardless of the text language, the author +% supplies each section/chapter with two headings---one for the +% Hebrew table of contents and one for the Latin table of contents. +% It makes sense that the label should be a Latin letter in the +% Latin table of contents and a Hebrew letter in the Hebrew table +% of contents. The definition is similar to that of |\theenumii| +% and |\theenumiv| above, but additional |\protect| commands ensure +% that the entire condition is written the |.aux| file. The +% appendix number will therefore be typeset according to the +% environment in which it is used rather than issued: a Hebrew +% number (with apostrophes) in a Hebrew environment and a Latin +% capital letter in a Latin environment (the command +% |\@@Alph| is set in \pkg{rlbabel.def} to hold the default meaning +% of \LaTeX\ [latin] |\@Alph|, regardless of the mode in which it is +% issued). The net result is that +% the second appendix will be marked with~`B' in the Latin table of +% contents and with `bet' in the Hebrew table of contents; the mark +% in the main text will depend on the language of the appendix itself. +% \begin{macrocode} +\@ifclassloaded{letter}{}{% +\@ifclassloaded{slides}{}{% + \let\@@appendix=\appendix% + \@ifclassloaded{article}{% + \renewcommand\appendix{\@@appendix% + \renewcommand\thesection + {\protect\if@rl\protect\Hebrewnumeral{\number\c@section}% + \protect\else\@@Alph\c@section\protect\fi}}} + {\renewcommand\appendix{\@@appendix% + \renewcommand\thechapter + {\protect\if@rl\protect\Hebrewnumeral{\number\c@chapter}% + \protect\else\@@Alph\c@chapter\protect\fi}}}}} +% \end{macrocode} +% QUESTION: is this also the appropriate way to refer to an +% appendix in the text, or should we retain the original label the +% same way we did with |enumerate| labels? +% ANOTHER QUESTION: are similar redefinitions needed for other +% counters that generate texts in bilingual lists like |.lof/.fol| +% and |.lot/.tol|? --RA. +% \end{macro} +% \begin{macro}{\@hebrew@numeral} +% The command |\@hebrew@numeral| prints a Hebrew number. The groups +% of thousands, millions, billions are separated by apostrophes and +% typeset without apostrophes or final letters; the remainder +% (under 1000) is typeset conventionally, with the selected styles +% for apostrophes and final letters. +% The function calls on |\gim@no@mil| to typeset each +% three-digit block. The algorithm +% is recursive, but the maximum recursion depth is~4 because \TeX\ +% only allows numbers up to $2^{31}-1 = 2{,}147{,}483{,}647$. +% The typesetting routine is wrapped in |\@hebrew| in order to +% ensure that numbers are always typeset in Hebrew mode. +% +% Initialize: |\@tempcnta| holds the value, |\@tempcntb| is used for +% calculations. +% \begin{macrocode} +\newcommand*{\@hebrew@numeral}[1] +{\@hebrew{\@tempcnta=#1\@tempcntb=#1\relax + \divide\@tempcntb by 1000 +% \end{macrocode} +% If we're under 1000, call |\gim@nomil| +% \begin{macrocode} + \ifnum\@tempcntb=0\gim@nomil\@tempcnta\relax +% \end{macrocode} +% If we're above 1000 then force no apostrophe and no final letter +% styles for the value above~1000, recur for the value above~1000, +% add an apostrophe, and call |\gim@nomil| for the remainder. +% \begin{macrocode} + \else{\@gim@apostfalse\@gim@finalfalse\@hebrew@numeral\@tempcntb}'% + \multiply\@tempcntb by 1000\relax + \advance\@tempcnta by -\@tempcntb\relax + \gim@nomil\@tempcnta\relax + \fi +}} +% \end{macrocode} +% NOTE: is it the case that 15,000 and 16,000 are written as +% yod-he and yod-vav, rather than tet-vav and tet-zayin? This +% vaguely rings a bell, but I'm not certain. If this is the case, +% then the current behavior is incorrect and should be changed. --RA. +% \end{macro} +% \begin{macro}{\gim@nomil} +% The command |\gim@nomil| typesets an integer between 0~and~999 +% (for~0 it typesets nothing). The code has been modified from the +% old |hebcal.sty| +% (appropriate credits---Boris Lavva and Michail Rozman ?). +% |\@tempcnta| holds the total value that remains to be typeset. +% At each stage we find the highest valued letter that is +% less than or equal to |\@tempcnta|, and call on |\gim@print| to +% subtract this value and print the letter. +% +% Initialize: |\@tempcnta| holds the value, there is no previous +% letter. +% \begin{macrocode} +\newcommand*{\gim@nomil}[1]{\@tempcnta=#1\@gim@prevfalse +% \end{macrocode} +% Find the hundreds digit. +% \begin{macrocode} + \@tempcntb=\@tempcnta\divide\@tempcntb by 100\relax % hundreds digit + \ifcase\@tempcntb % print nothing if no hundreds + \or\gim@print{100}{\hebqof}% + \or\gim@print{200}{\hebresh}% + \or\gim@print{300}{\hebshin}% + \or\gim@print{400}{\hebtav}% + \or\hebtav\@gim@prevtrue\gim@print{500}{\hebqof}% + \or\hebtav\@gim@prevtrue\gim@print{600}{\hebresh}% + \or\hebtav\@gim@prevtrue\gim@print{700}{\hebshin}% + \or\hebtav\@gim@prevtrue\gim@print{800}{\hebtav}% + \or\hebtav\@gim@prevtrue\hebtav\gim@print{900}{\hebqof}% + \fi +% \end{macrocode} +% Find the tens digit. The numbers 15 and 16 are traditionally +% printed as tet-vav ($9+6$) and tet-zayin ($9+7$) to avoid +% spelling the Lord's name. +% \begin{macrocode} + \@tempcntb=\@tempcnta\divide\@tempcntb by 10\relax % tens digit + \ifcase\@tempcntb % print nothing if no tens + \or % number between 10 and 19 + \ifnum\@tempcnta = 16 \gim@print {9}{\hebtet}% tet-zayin + \else\ifnum\@tempcnta = 15 \gim@print {9}{\hebtet}% tet-vav + \else \gim@print{10}{\hebyod}% + \fi % \@tempcnta = 15 + \fi % \@tempcnta = 16 +% \end{macrocode} +% Initial or final forms are selected according to the current +% style option; |\gim@print| will force a non-final letter in +% non-final position by means of a local style change. +% \begin{macrocode} + \or\gim@print{20}{\if@gim@final\hebfinalkaf\else\hebkaf\fi}% + \or\gim@print{30}{\heblamed}% + \or\gim@print{40}{\if@gim@final\hebfinalmem\else\hebmem\fi}% + \or\gim@print{50}{\if@gim@final\hebfinalnun\else\hebnun\fi}% + \or\gim@print{60}{\hebsamekh}% + \or\gim@print{70}{\hebayin}% + \or\gim@print{80}{\if@gim@final\hebfinalpe\else\hebpe\fi}% + \or\gim@print{90}{\if@gim@final\hebfinaltsadi\else\hebtsadi\fi}% + \fi +% \end{macrocode} +% Print the ones digit. +% \begin{macrocode} + \ifcase\@tempcnta % print nothing if no ones + \or\gim@print{1}{\hebalef}% + \or\gim@print{2}{\hebbet}% + \or\gim@print{3}{\hebgimel}% + \or\gim@print{4}{\hebdalet}% + \or\gim@print{5}{\hebhe}% + \or\gim@print{6}{\hebvav}% + \or\gim@print{7}{\hebzayin}% + \or\gim@print{8}{\hebhet}% + \or\gim@print{9}{\hebtet}% + \fi +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\gim@print} +% \begin{macro}{\if@gim@prev} +% The actual printing routine typesets a digit with the appropriate +% apostrophes: if a number sequence consists of a +% single letter then it is followed by a single apostrophe, and if +% it consists of more than one letter then a double +% apostrophe is inserted before the last letter. +% We typeset the letters one at a time, keeping a flag that tells +% us if any previous letters had been typeset. +% \begin{macrocode} +\newif\if@gim@prev % flag if a previous letter has been typeset +% \end{macrocode} +% For each letter, we +% first subtract its value from the total. Then, +% \begin{itemize} +% \item +% if the result is zero then this is the last letter; we check +% the flag to see if this is the only letter and print it with +% the appropriate apostrophe; +% \item +% if the result is not zero then there remain additional letters +% to be typeset; we print without an apostrophe and set the +% `previous letter' flag. +% \end{itemize} +% |\@tempcnta| holds the total value that remains to be typeset. +% We first deduct the letter's value from |\@tempcnta|, +% so |\@tempcnta| is zero if and only if this is the last letter. +% \begin{macrocode} +\newcommand*{\gim@print}[2]{% #2 is a letter, #1 is its value. + \advance\@tempcnta by -#1\relax% deduct the value from the remainder +% \end{macrocode} +% If this is the last letter, we print with the appropriate +% apostrophe (depending on the style option): +% if there is a preceding letter, print |"x| if the style calls for +% apostrophes, |x| if it doesn't; +% otherwise, this is the only letter: print |x'| if the style calls +% for apostrophes, |x| if it doesn't. +% \begin{macrocode} + \ifnum\@tempcnta=0% if this is the last letter + \if@gim@prev\if@gim@apost"\fi#2% + \else#2\if@gim@apost'\fi\fi% +% \end{macrocode} +% If this is not the last letter: print a non-final form (by +% forcing a local style option) and set the `previous letter' flag. +% \begin{macrocode} + \else{\@gim@finalfalse#2}\@gim@prevtrue\fi} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\hebr} +% \begin{macro}{\gim} +% The older Hebrew counter commands |\hebr| and |\gim| are retained +% in order to keep older documents from breaking. They are set to +% be equivalent to |\alph|, and their use is deprecated. Note that +% |\hebr| gives different results than it had in the past---it +% now typesets 11 as yod-alef rather than kaf. +% \begin{macrocode} +\let\hebr=\alph +\let\gim=\alph +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% For backward compatibility with `older' \pkg{hebrew.sty} +% packages, we define Hebrew equivalents of some useful \LaTeX\ +% commands. Note, however, that 8-bit macros defined in Hebrew +% are no longer supported. +% \begin{macrocode} +\def\hebcopy{\protect\R{\hebhe\hebayin\hebtav\hebqof}} +\def\hebincl{\protect\R{\hebresh\hebtsadi"\hebbet}} +\def\hebpage{\protect\R{\hebayin\hebmem\hebvav\hebdalet}} +\def\hebto{\protect\R{\hebayin\hebdalet}} +% \end{macrocode} +% |\hadgesh| produce ``poor man's bold'' (heavy printout), when +% used with normal font glyphs. It is advisable to use bold font +% (for example, \emph{Dead Sea}) instead of this macro. +% \begin{macrocode} +\def\hadgesh#1{\leavevmode\setbox0=\hbox{#1}% + \kern-.025em\copy0\kern-\wd0 + \kern.05em\copy0\kern-\wd0 + \kern-.025em\raise.0433em\box0 } +% \end{macrocode} +% |\piska| and |\piskapiska| sometimes used in `older' hebrew +% sources, and should not be used in \LaTeXe. +% \begin{macrocode} +\if@compatibility + \def\piska#1{\item{#1}\hangindent=-\hangindent} + \def\piskapiska#1{\itemitem{#1}\hangindent=-\hangindent} +\fi +% \end{macrocode} +% The following commands are simply synonyms for the standard ones, +% provided with \LaTeXe. +% \begin{macrocode} +\let\makafgadol=\textendash +\let\makafanak=\textemdash +\let\geresh=\textquoteright +\let\opengeresh=\textquoteright +\let\closegeresh=\textquoteleft +\let\openquote=\textquotedblright +\let\closequote=\textquotedblleft +\let\leftquotation=\textquotedblright +\let\rightquotation=\textquotedblleft +% \end{macrocode} +% +% We need to ensure that Hebrew is used as the default +% right-to-left language at |\begin{document}|. The mechanism of +% defining the |\@rllanguagename| is the same as in \babel 's +% |\languagename|: the last right-to-left language in the +% |\usepackage{babel}| line is set as the default right-to-left +% language at document beginning. +% +% For example, the following code: +% \begin{quote} +% |\usepackage[russian,hebrew,arabic,greek,english]{babel}| +% \end{quote} +% will set the Arabic language as the default right-to-left +% language and the English language as the default language. +% As a result, the commands |\L{}| and |\embox{}| will use English +% and |\R{}| and |\hmbox{}| will use Arabic by default. These +% defaults can be changed with the next |\sethebrew| or +% |\selectlanguage{|\emph{language name}|}| command. +% \begin{macrocode} +\AtBeginDocument{\def\@rllanguagename{hebrew}} +% \end{macrocode} +% +% The macro |\ldf@finish| takes care of looking for a configuration +% file, setting the main language to be switched on at +% |\begin{document}| and resetting the category code of |@| to its +% original value. +% \begin{macrocode} +\ldf@finish{hebrew} +% +% \end{macrocode} +% +% \subsection{Right to left support} +% +% This file \pkg{rlbabel.def} defines necessary bidirectional macro +% support for \LaTeXe. It is designed for use not only with Hebrew, +% but with any Right-to-Left languages, supported by \babel. The +% macros provided in this file are language and encoding +% independent. +% +% Right-to-left languages will use \TeX\ extensions, namely \TeX\ +% primitives |\beginL|, |\endL| and |\beginR|, |\endR|, currently +% implemented only in $\varepsilon$-\TeX\ and in \TeX{-}{-}\XeT. +% +% If $\varepsilon$-\TeX\ is used, we should switch it to the +% \emph{enhanced} mode: +% \begin{macrocode} +%<*rightleft> +\ifx\TeXXeTstate\undefined\else% + \TeXXeTstate=1 +\fi +% \end{macrocode} +% +% Note, that $\varepsilon$-\TeX 's format file should be created +% for \emph{extended} mode. Mode can be checked by running +% $\varepsilon$-\TeX\ on some \TeX{} file, for example: +% \begin{quote} +% |This is e-TeX, Version 3.14159-1.1 (Web2c 7.0)|\\ +% |entering extended mode| +% \end{quote} +% The second line should be \texttt{entering extended mode}. +% +% We check if user uses Right-to-Left enabled engine instead of +% regular Knuth's \TeX: +% \begin{macrocode} +\ifx\beginL\@undefined% + \newlinechar`\^^J + \typeout{^^JTo avoid this error message,^^J% + run TeX--XeT or e-TeX engine instead of regular TeX.^^J} + \errmessage{Right-to-Left Support Error: use TeX--XeT or e-TeX + engine}% +\fi +% \end{macrocode} +% +% \subsubsection{Switching from LR to RL mode and back} +% +% \cs{@torl} and \cs{@fromrl} are called each time the horizontal +% direction changes. They do all that is necessary besides changing +% the direction. Currently their task is to change the encoding +% information and mode (condition \cs{if@rl}). They should not +% normally be called by users: user-level macros, such as +% \cs{sethebrew} and \cs{unsethebrew}, as well as \babel 's +% \cs{selectlanguage} are defined in language-definition files and +% should be used to change default language (and direction). +% +% Local direction changing commands (for small pieces of text): +% |\L{}|, |\R{}|, |\embox{}| and |\hmbox{}| are defined below in +% this file in language-independent manner. +% +% \begin{macro}{\if@rl} +% \begin{description}\scrunch +% \item[|\@rltrue|] means that the main mode is currently +% Right-to-Left. +% \item[|\@rlfalse|] means that the main mode is currently +% Left-to-Right. +% \end{description} +% \begin{macrocode} +\newif\if@rl +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\if@rlmain} +% This is the main direction of the document. Unlike |\if@rl| +% it is set once and never changes. +% \begin{description}\scrunch +% \item[|\@rltrue|] means that the document is Right-to-Left. +% \item[|\@rlfalse|] means that the document is Left-to-Right. +% \end{description} +% Practically |\if@rlmain| is set according to the value of |\if@rl| +% in the beginning of the run. +% \begin{macrocode} +\AtBeginDocument{% Here we set the main document direction + \newif\if@rlmain% + \if@rl% e.g: if the options to babel were [english,hebrew] + \@rlmaintrue% + \else% e.g: if the options to babel were [hebrew,english] + \@rlmainfalse% + \fi% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@torl} +% Switches current direction to Right-to-Left: saves current +% Left-to-Right encoding in |\lr@encodingdefault|, sets required +% Right-to-Left language name in |\@rllanguagename| (similar to +% \babel 's |\languagename|) and changes derection. +% +% The Right-to-Left language encoding should be defined in |.ldf| +% file as special macro created by concatenation of the language +% name and string \texttt{encoding}, for example, for Hebrew it +% will be |\hebrewencoding|. +% \begin{macrocode} +\DeclareRobustCommand{\@torl}[1]{% + \if@rl\else% + \let\lr@encodingdefault=\encodingdefault% + \fi% + \def\@rllanguagename{#1}% + \def\encodingdefault{\csname#1encoding\endcsname}% + \fontencoding{\encodingdefault}% + \selectfont% + \@rltrue} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@fromrl} +% Opposite to |\@torl|, switches current direction to +% Left-to-Right: restores saved Left-to-Right encoding +% (|\lr@encodingdefault|) and changes direction. +% \begin{macrocode} +\DeclareRobustCommand{\@fromrl}{% + \if@rl% + \let\encodingdefault=\lr@encodingdefault% + \fi% + \fontencoding{\encodingdefault}% + \selectfont% + \@rlfalse} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\selectlanguage} +% This standard \babel 's macro should be redefined to support +% bidirectional tables. We divide |\selectlanguage| implementation +% to two parts, and the first part calls the second +% |\@@selectlanguage|. +% \begin{macrocode} +\expandafter\def\csname selectlanguage \endcsname#1{% + \edef\languagename{% + \ifnum\escapechar=\expandafter`\string#1\@empty + \else \string#1\@empty\fi}% + \@@selectlanguage{\languagename}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@@selectlanguage} +% This new internal macro redefines a final part of the standard +% \babel 's |\select|\-|language| implementation. +% +% Standard \LaTeX\ provides us with 3 tables: Table of Contents +% (|.toc|), List of Figures (|.lof|), and List of Tables +% (|.lot|). In multi-lingual texts mixing Left-to-Right languages +% with Right-to-Left ones, the use of various directions in one +% table results in very ugly output. Therefore, these 3 standard +% tables will be used now only for Left-to-Right languages, and we +% will add 3 Right-to-Left tables (their extensions are simply +% reversed ones): RL Table of Contents (|.cot|), RL List of Figures +% (|.fol|), and RL List of Tables (|.lof|). +% \begin{macrocode} +\def\@@selectlanguage#1{% + \select@language{#1}% + \if@filesw + \protected@write\@auxout{}{\string\select@language{#1}}% + \if@rl% + \addtocontents{cot}{\xstring\select@language{#1}}% + \addtocontents{fol}{\xstring\select@language{#1}}% + \addtocontents{tol}{\xstring\select@language{#1}}% + \else% + \addtocontents{toc}{\xstring\select@language{#1}}% + \addtocontents{lof}{\xstring\select@language{#1}}% + \addtocontents{lot}{\xstring\select@language{#1}}% + \fi% + \fi} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\setrllanguage} +% \begin{macro}{\unsetrllanguage} +% The |\setrllanguage| and |\unsetrllanguage| pair of macros is +% proved to very useful in bilingual texts, for example, in +% Hebrew-English texts. The language-specific commands, for example, +% |\sethebrew| and |\unsethebrew| use these macros as basis. +% +% Implementation saves and restores other language in +% |\other@languagename| variable, and uses internal macro +% |\@@selectlanguage|, defined above, to switch between languages. +% \begin{macrocode} +\let\other@languagename=\languagename +\DeclareRobustCommand{\setrllanguage}[1]{% + \if@rl\else% + \let\other@languagename=\languagename% + \fi% + \def\languagename{#1}% + \@@selectlanguage{\languagename}} +% \end{macrocode} +% +% \begin{macrocode} +\DeclareRobustCommand{\unsetrllanguage}[1]{% + \if@rl% + \let\languagename=\other@languagename% + \fi + \@@selectlanguage{\languagename}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\L} +% \begin{macro}{\R} +% \begin{macro}{\HeblatexRedefineL} +% Macros for changing direction, originally taken from TUGboat. +% Usage: |\L{|\emph{Left to Right text}|}| and |\R{|\emph{Right to +% Left text}|}|. Numbers should also be enclosed in |\L{}|, as in +% |\L{123}|. +% +% Note, that these macros do not receive language name as +% parameter. Instead, the saved |\@rllanguagename| will be +% used. We assume that each Right-to-Left language defines +% |\to|\emph{languagename} and |\from|\emph{languagename} macros in +% language definition file, for example, for Hebrew: |\tohebrew| +% and |\fromhebrew| macros in \pkg{hebrew.ldf} file. +% +% The macros \cs{L} and \cs{R} include `protect' to to make them robust and +% allow use, for example, in tables. +% +% Due to the fact that some packages have different definitions for \cs{L} +% the macro |\HeblatexRedefineL| is provided to overide them. This may +% be required with hyperref, for instance. +% \begin{macrocode} +\let\next=\ +\def\HeblatexRedefineL{% + \def\L{\protect\pL}% +} +\HeblatexRedefineL +\def\pL{\protect\afterassignment\moreL \let\next= } +\def\moreL{\bracetext \aftergroup\endL \beginL\csname + from\@rllanguagename\endcsname} +% \end{macrocode} +% +% \begin{macrocode} +\def\R{\protect\pR} +\def\pR{\protect\afterassignment\moreR \let\next= } +\def\moreR{\bracetext \aftergroup\endR \beginR\csname + to\@rllanguagename\endcsname} +\def\bracetext{\ifcat\next{\else\ifcat\next}\fi + \errmessage{Missing left brace has been substituted}\fi \bgroup} +\everydisplay{\if@rl\aftergroup\beginR\fi } +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\@ensure@R} +% \begin{macro}{\@ensure@L} +% Two small internal macros, a-la |\ensuremath| +% \begin{macrocode} +\def\@ensure@R#1{\if@rl#1\else\R{#1}\fi} +\def\@ensure@L#1{\if@rl\L{#1}\else#1\fi} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% Take care of Right-to-Left indentation in every paragraph. +% Originally, \cs{noindent} was redefined for right-to-left by +% Yaniv Bargury, then the implementation was rewritten by Alon Ziv +% using an idea by Chris Rowley: \cs{noindent} now works +% unmodified. +% \begin{macrocode} +\def\rl@everypar{\if@rl{\setbox\z@\lastbox\beginR\usebox\z@}\fi} +\let\o@everypar=\everypar +\def\everypar#1{\o@everypar{\rl@everypar#1}} +% \end{macrocode} +% +% \begin{macro}{\hmbox} +% \begin{macro}{\embox} +% Useful vbox commands. All text in math formulas is best enclosed +% in these: LR text in |\embox| and RL text in |\hmbox|. |\mbox{}| +% is useless for both cases, since it typesets in Left-to-Right +% even for Right-to-Left languages (additions by Yaniv Bargury). +% \begin{macrocode} +\newcommand{\hmbox}[1]{\mbox{\R{#1}}} +\newcommand{\embox}[1]{\mbox{\L{#1}}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\@brackets} +% When in Right-to-Left mode, brackets should be swapped. This +% macro receives 3 parameters: left bracket, content, right +% bracket. Brackets can be square brackets, braces, or +% parentheses. +% \begin{macrocode} +\def\@brackets#1#2#3{\protect\if@rl #3#2#1\protect\else + #1#2#3\protect\fi} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@number} +% \begin{macro}{\@latin} +% \cs{@number} preserves numbers direction from Left to Right. +% \cs{@latin} in addition switches current encoding to the latin. +% \begin{macrocode} +\def\@@number#1{\ifmmode\else\beginL\fi#1\ifmmode\else\endL\fi} +\def\@@latin#1{\@@number{{\@fromrl#1}}} +\def\@number{\protect\@@number} +\def\@latin{\protect\@@latin} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \subsubsection{Counters} +% +% To make counter references work in Right to Left text, we need +% to surround their original definitions with an +% |\@number{|\ldots|}| or |\@latin{|\ldots|}|. Note, that +% language-specific counters, such as \cs{hebr} or \cs{gim} are +% provided with language definition file. +% +% We start with saving the original definitions: +% \begin{macrocode} +\let\@@arabic=\@arabic +\let\@@roman=\@roman +\let\@@Roman=\@Roman +\let\@@alph=\@alph +\let\@@Alph=\@Alph +% \end{macrocode} +% +% \begin{macro}{\@arabic} +% \begin{macro}{\@roman} +% \begin{macro}{\@Roman} +% Arabic and roman numbers should be from Left to Right. In +% addition, roman numerals, both lower- and upper-case should be in +% latin encoding. +% \begin{macrocode} +\def\@arabic#1{\@number{\@@arabic#1}} +\def\@roman#1{\@latin{\@@roman#1}} +\def\@Roman#1{\@latin{\@@Roman#1}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\arabicnorl} +% This macro preserves the original definition of |\arabic| +% (overrides the overriding of |\@arabic|) +% \begin{macrocode} +\def\arabicnorl#1{\expandafter\@@arabic\csname c@#1\endcsname} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\make@lr} +% In Right to Left documents all counters defined in the standard +% document classes \emph{article}, \emph{report} and \emph{book} +% provided with \LaTeXe, such as |\thesection|, |\thefigure|, +% |\theequation| should be typed as numbers from left to right. To +% ensure direction, we use the following +% |\make@lr{|\emph{counter}|}| macro: +% \begin{macrocode} +\def\make@lr#1{\begingroup + \toks@=\expandafter{#1}% + \edef\x{\endgroup + \def\noexpand#1{\noexpand\@number{\the\toks@}}}% + \x} +% \end{macrocode} +% +% \begin{macrocode} +\@ifclassloaded{letter}{}{% + \@ifclassloaded{slides}{}{% + \make@lr\thesection + \make@lr\thesubsection + \make@lr\thesubsubsection + \make@lr\theparagraph + \make@lr\thesubparagraph + \make@lr\thefigure + \make@lr\thetable + } + \make@lr\theequation +} +% \end{macrocode} +% \end{macro} +% +% \subsubsection{Preserving logos} +% +% Preserve \TeX, \LaTeX\ and \LaTeXe\ logos. +% \begin{macro}{\TeX} +% \begin{macrocode} +\let\@@TeX\TeX +\def\TeX{\@latin{\@@TeX}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\LaTeX} +% \begin{macrocode} +\let\@@LaTeX\LaTeX +\def\LaTeX{\@latin{\@@LaTeX}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\LaTeXe} +% \begin{macrocode} +\let\@@LaTeXe\LaTeXe +\def\LaTeXe{\@latin{\@@LaTeXe}} +% \end{macrocode} +% \end{macro} +% +% \subsubsection{List environments} +% +% List environments in Right-to-Left languages, are ticked and +% indented from the right instead of from the left. All the +% definitions that caused indentation are revised for Right-to-Left +% languages. \LaTeX\ keeps track on the indentation with the +% \cs{leftmargin} and \cs{rightmargin} values. +% +% \begin{macro}{list} +% Thus we need to override the definition of the |\list| macro: when +% in RTL mode, the right margins are the begining of the line. +% \begin{macrocode} +\def\list#1#2{% + \ifnum \@listdepth >5\relax + \@toodeep + \else + \global\advance\@listdepth\@ne + \fi + \rightmargin\z@ + \listparindent\z@ + \itemindent\z@ + \csname @list\romannumeral\the\@listdepth\endcsname + \def\@itemlabel{#1}% + \let\makelabel\@mklab + \@nmbrlistfalse + #2\relax + \@trivlist + \parskip\parsep + \parindent\listparindent + \advance\linewidth -\rightmargin + \advance\linewidth -\leftmargin +% \end{macrocode} +% The only change in the macro is the |\if@rl| case: +% \begin{macrocode} + \if@rl + \advance\@totalleftmargin \rightmargin + \else + \advance\@totalleftmargin \leftmargin + \fi + \parshape \@ne \@totalleftmargin \linewidth + \ignorespaces} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\labelenumii} +% \begin{macro}{\p@enumiii} +% The \cs{labelenumii} and \cs{p@enumiii} commands use +% \emph{parentheses}. They are revised to work Right-to-Left with +% the help of \cs{@brackets} macro defined above. +% \begin{macrocode} +\def\labelenumii{\@brackets(\theenumii)} +\def\p@enumiii{\p@enumii\@brackets(\theenumii)} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \subsubsection{Tables of moving stuff} +% +% Tables of moving arguments: table of contents (|toc|), list of +% figures (|lof|) and list of tables (|lot|) are handles here. These +% three default \LaTeX\ tables will be used now exclusively for +% Left to Right stuff. +% +% Three additional Right-to-Left tables: RL table of contents +% (|cot|), RL list of figures (|fol|), and RL list of tables +% (|tol|) are added. +% These three tables will be used exclusively for Right to +% Left stuff. +% +% \begin{macro}{\@tableofcontents} +% \begin{macro}{\@listoffigures} +% \begin{macro}{\@listoftables} +% We define 3 new macros similar to the standard \LaTeX\ tables, +% but with one parameter --- table file extension. These macros +% will help us to define our additional tables below. +% \begin{macrocode} +\@ifclassloaded{letter}{}{% other +\@ifclassloaded{slides}{}{% other + \@ifclassloaded{article}{% article + \newcommand\@tableofcontents[1]{% + \section*{\contentsname\@mkboth% + {\MakeUppercase\contentsname}% + {\MakeUppercase\contentsname}}% + \@starttoc{#1}} + \newcommand\@listoffigures[1]{% + \section*{\listfigurename\@mkboth% + {\MakeUppercase\listfigurename}% + {\MakeUppercase\listfigurename}}% + \@starttoc{#1}} + \newcommand\@listoftables[1]{% + \section*{\listtablename\@mkboth% + {\MakeUppercase\listtablename}% + {\MakeUppercase\listtablename}}% + \@starttoc{#1}}}% + {% else report or book + \newcommand\@tableofcontents[1]{% + \@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn% + \fi\chapter*{\contentsname\@mkboth% + {\MakeUppercase\contentsname}% + {\MakeUppercase\contentsname}}% + \@starttoc{#1}\if@restonecol\twocolumn\fi} + \newcommand\@listoffigures[1]{% + \@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn% + \fi\chapter*{\listfigurename\@mkboth% + {\MakeUppercase\listfigurename}% + {\MakeUppercase\listfigurename}}% + \@starttoc{#1}\if@restonecol\twocolumn\fi} + \newcommand\@listoftables[1]{% + \if@twocolumn\@restonecoltrue\onecolumn\else\@restonecolfalse\fi% + \chapter*{\listtablename\@mkboth% + {\MakeUppercase\listtablename}% + {\MakeUppercase\listtablename}}% + \@starttoc{#1}\if@restonecol\twocolumn\fi}}% +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\lrtableofcontents} +% \begin{macro}{\lrlistoffigures} +% \begin{macro}{\lrlistoftables} +% Left-to-Right tables are called now |\lr|\emph{xxx} and defined +% with the aid of three macros defined above (extensions |toc|, +% |lof|, and |lot|). +% \begin{macrocode} + \newcommand\lrtableofcontents{\@tableofcontents{toc}}% + \newcommand\lrlistoffigures{\@listoffigures{lof}}% + \newcommand\lrlistoftables{\@listoftables{lot}}% +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\rltableofcontents} +% \begin{macro}{\rllistoffigures} +% \begin{macro}{\rllistoftables} +% Right-to-Left tables will be called |\rl|\emph{xxx} and defined +% with the aid of three macros defined above (extensions |cot|, +% |fol|, and |tol|). +% \begin{macrocode} + \newcommand\rltableofcontents{\@tableofcontents{cot}}% + \newcommand\rllistoffigures{\@listoffigures{fol}}% + \newcommand\rllistoftables{\@listoftables{tol}}% +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\tableofcontents} +% \begin{macro}{\listoffigures} +% \begin{macro}{\listoftables} +% Let |\|\emph{xxx} be |\rl|\emph{xxx} if the current direction is +% Right-to-Left and |\lr|\emph{xxx} if it is Left-to-Right. +% \begin{macrocode} + \renewcommand\tableofcontents{\if@rl\rltableofcontents% + \else\lrtableofcontents\fi} + \renewcommand\listoffigures{\if@rl\rllistoffigures% + \else\lrlistoffigures\fi} + \renewcommand\listoftables{\if@rl\rllistoftables% + \else\lrlistoftables\fi}}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\@dottedtocline} +% The following makes problems when making a Right-to-Left tables, +% since it uses \cs{leftskip} and \cs{rightskip} which are both +% mode dependent. +% \begin{macrocode} +\def\@dottedtocline#1#2#3#4#5{% + \ifnum #1>\c@tocdepth \else + \vskip \z@ \@plus.2\p@ + {\if@rl\rightskip\else\leftskip\fi #2\relax + \if@rl\leftskip\else\rightskip\fi \@tocrmarg \parfillskip + -\if@rl\leftskip\else\rightskip\fi + \parindent #2\relax\@afterindenttrue + \interlinepenalty\@M + \leavevmode + \@tempdima #3\relax + \advance\if@rl\rightskip\else\leftskip\fi \@tempdima + \null\nobreak\hskip -\if@rl\rightskip\else\leftskip\fi + {#4}\nobreak + \leaders\hbox{$\m@th + \mkern \@dotsep mu\hbox{.}\mkern \@dotsep + mu$}\hfill + \nobreak + \hb@xt@\@pnumwidth{\hfil\normalfont \normalcolor \beginL#5\endL}% + \par}% + \fi} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\l@part} +% This standard macro was redefined for table of contents since it +% uses \cs{rightskip} which is mode dependent. +% \begin{macrocode} +\@ifclassloaded{letter}{}{% other +\@ifclassloaded{slides}{}{% other +\renewcommand*\l@part[2]{% + \ifnum \c@tocdepth >-2\relax + \addpenalty{-\@highpenalty}% + \addvspace{2.25em \@plus\p@}% + \begingroup + \setlength\@tempdima{3em}% + \parindent \z@ \if@rl\leftskip\else\rightskip\fi \@pnumwidth + \parfillskip -\@pnumwidth + {\leavevmode + \large \bfseries #1\hfil \hb@xt@\@pnumwidth{\hss#2}}\par + \nobreak + \global\@nobreaktrue + \everypar{\global\@nobreakfalse\everypar{}}% + \endgroup + \fi}}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@part} +% Part is redefined to support new Right-to-Left table of contents +% (|cot|) as well as the Left-to-Right one (|toc|). +% \begin{macrocode} +\@ifclassloaded{article}{% article class + \def\@part[#1]#2{% + \ifnum \c@secnumdepth >\m@ne + \refstepcounter{part}% + \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}% + \addcontentsline{cot}{part}{\thepart\hspace{1em}#1}% + \else + \addcontentsline{toc}{part}{#1}% + \addcontentsline{cot}{part}{#1}% + \fi + {\parindent \z@ \raggedright + \interlinepenalty \@M + \normalfont + \ifnum \c@secnumdepth >\m@ne + \Large\bfseries \partname~\thepart + \par\nobreak + \fi + \huge \bfseries #2% + \markboth{}{}\par}% + \nobreak + \vskip 3ex + \@afterheading}% +}{% report and book classes + \def\@part[#1]#2{% + \ifnum \c@secnumdepth >-2\relax + \refstepcounter{part}% + \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}% + \addcontentsline{cot}{part}{\thepart\hspace{1em}#1}% + \else + \addcontentsline{toc}{part}{#1}% + \addcontentsline{cot}{part}{#1}% + \fi + \markboth{}{}% + {\centering + \interlinepenalty \@M + \normalfont + \ifnum \c@secnumdepth >-2\relax + \huge\bfseries \partname~\thepart + \par + \vskip 20\p@ + \fi + \Huge \bfseries #2\par}% + \@endpart}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@sect} +% Section was redefined from the \pkg{latex.ltx} file. It is +% changed to support both Left-to-Right (|toc|) and Right-to-Left +% (|cot|) table of contents simultaneously. +% \begin{macrocode} +\def\@sect#1#2#3#4#5#6[#7]#8{% + \ifnum #2>\c@secnumdepth + \let\@svsec\@empty + \else + \refstepcounter{#1}% + \protected@edef\@svsec{\@seccntformat{#1}\relax}% + \fi + \@tempskipa #5\relax + \ifdim \@tempskipa>\z@ + \begingroup + #6{% + \@hangfrom{\hskip #3\relax\@svsec}% + \interlinepenalty \@M #8\@@par}% + \endgroup + \csname #1mark\endcsname{#7}% + \addcontentsline{toc}{#1}{% + \ifnum #2>\c@secnumdepth \else + \protect\numberline{\csname the#1\endcsname}% + \fi + #7}% + \addcontentsline{cot}{#1}{% + \ifnum #2>\c@secnumdepth \else + \protect\numberline{\csname the#1\endcsname}% + \fi + #7}% + \else + \def\@svsechd{% + #6{\hskip #3\relax + \@svsec #8}% + \csname #1mark\endcsname{#7}% + \addcontentsline{toc}{#1}{% + \ifnum #2>\c@secnumdepth \else + \protect\numberline{\csname the#1\endcsname}% + \fi + #7}% + \addcontentsline{cot}{#1}{% + \ifnum #2>\c@secnumdepth \else + \protect\numberline{\csname the#1\endcsname}% + \fi + #7}}% + \fi + \@xsect{#5}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@caption} +% Caption was redefined from the \pkg{latex.ltx} file. It is +% changed to support Left-to-Right list of figures and list of +% tables (|lof| and |lot|) as well as new Right-to-Left lists +% (|fol| and |tol|) simultaneously. +% \begin{macrocode} +\long\def\@caption#1[#2]#3{% + \par + \addcontentsline{\csname ext@#1\endcsname}{#1}% + {\protect\numberline{\csname the#1\endcsname}% + {\ignorespaces #2}}% + \def\@fignm{figure} + \ifx#1\@fignm\addcontentsline{fol}{#1}% + {\protect\numberline{\csname the#1\endcsname}% + {\ignorespaces #2}}\fi% + \def\@tblnm{table} + \ifx#1\@tblnm\addcontentsline{tol}{#1}% + {\protect\numberline{\csname the#1\endcsname}% + {\ignorespaces #2}}\fi% + \begingroup + \@parboxrestore + \if@minipage + \@setminipage + \fi + \normalsize + \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par + \endgroup} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\l@chapter} +% This standard macro was redefined for table of contents since it +% uses \cs{rightskip} which is mode dependent. +% \begin{macrocode} +\@ifclassloaded{letter}{}{% +\@ifclassloaded{slides}{}{% + \@ifclassloaded{article}{}{% + \renewcommand*\l@chapter[2]{% + \ifnum \c@tocdepth >\m@ne + \addpenalty{-\@highpenalty}% + \vskip 1.0em \@plus\p@ + \setlength\@tempdima{1.5em}% + \begingroup + \parindent \z@ \if@rl\leftskip\else\rightskip\fi \@pnumwidth + \parfillskip -\@pnumwidth + \leavevmode \bfseries + \advance\if@rl\rightskip\else\leftskip\fi\@tempdima + \hskip -\if@rl\rightskip\else\leftskip\fi + #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss#2}\par + \penalty\@highpenalty + \endgroup + \fi}}}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\l@section} +% \begin{macro}{\l@subsection} +% \begin{macro}{\l@subsubsection} +% \begin{macro}{\l@paragraph} +% \begin{macro}{\l@subparagraph} +% The toc entry for section did not work in article style. +% Also it does not print dots, which is funny when most of your +% work is divided into sections. +% +% It was revised to use |\@dottedtocline| as in \pkg{report.sty} +% (by Yaniv Bargury) and was updated later for all kinds of +% sections (by Boris Lavva). +% \begin{macrocode} +\@ifclassloaded{article}{% +\renewcommand*\l@section{\@dottedtocline{1}{1.5em}{2.3em}} +\renewcommand*\l@subsection{\@dottedtocline{2}{3.8em}{3.2em}} +\renewcommand*\l@subsubsection{\@dottedtocline{3}{7.0em}{4.1em}} +\renewcommand*\l@paragraph{\@dottedtocline{4}{10em}{5em}} +\renewcommand*\l@subparagraph{\@dottedtocline{5}{12em}{6em}}}{} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \subsubsection{Two-column mode} +% +% This is the support of \texttt{twocolumn} option for the standard +% \LaTeXe\ classes. +% The following code was originally borrowed from the Arab\TeX\ +% package, file \pkg{latexext.sty}, copyright by Klaus Lagally, +% Institut fuer Informatik, Universitaet Stuttgart. It was updated +% for this package by Boris Lavva. +% +% \begin{macro}{\@outputdblcol} +% \begin{macro}{\set@outputdblcol} +% \begin{macro}{rl@outputdblcol} +% First column is \cs{@leftcolumn} will be shown at the right side, +% Second column is \cs{@outputbox} will be shown at the left side. +% +% |\set@outputdblcol| IS CURRENTLY DISABLED. TODO: REMOVE IT [tzafrir] +% \begin{macrocode} +\let\@@outputdblcol\@outputdblcol +%\def\set@outputdblcol{% +% \if@rl\renewcommand{\@outputdblcol}{\rl@outputdblcol}% +% \else\renewcommand{\@outputdblcol}{\@@outputdblcol}\fi} +\renewcommand{\@outputdblcol}{% + \if@rlmain% + \rl@outputdblcol% + \else% + \@@outputdblcol% + \fi% +} +\newcommand{\rl@outputdblcol}{% + \if@firstcolumn + \global \@firstcolumnfalse + \global \setbox\@leftcolumn \box\@outputbox + \else + \global \@firstcolumntrue + \setbox\@outputbox \vbox {\hb@xt@\textwidth {% + \hskip\columnwidth% + \hfil\vrule\@width\columnseprule\hfil + \hb@xt@\columnwidth {% + \box\@leftcolumn \hss}% + \hb@xt@\columnwidth {% + \hskip-\textwidth% + \box\@outputbox \hss}% + \hskip\columnsep% + \hskip\columnwidth}}% + \@combinedblfloats + \@outputpage + \begingroup + \@dblfloatplacement + \@startdblcolumn + \@whilesw\if@fcolmade \fi + {\@outputpage + \@startdblcolumn}% + \endgroup + \fi} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \subsubsection{Footnotes} +% +% \begin{macro}{\footnoterule} +% The Right-to-Left footnote rule is simply reversed default +% Left-to-Right one. Footnotes can be used in RL or LR main +% modes, but changing mode while a footnote is pending is still +% unsolved. +% \begin{macrocode} +\let\@@footnoterule=\footnoterule +\def\footnoterule{\if@rl\hb@xt@\hsize{\hss\vbox{\@@footnoterule}}% + \else\@@footnoterule\fi} +% \end{macrocode} +% \end{macro} +% +% \subsubsection{Headings and two-side support} +% +% When using \texttt{headings} or \texttt{myheadings} modes, we +% have to ensure that the language and direction of heading is the +% same as the whole chapter/part of the document. This is +% implementing by setting special variable \cs{headlanguage} when +% starting new chapter/part. +% +% In addition, when selecting the \texttt{twoside} option (default in +% \texttt{book} document class), the LR and RL modes need to be set +% properly for things on the heading and footing. This is done +% here too. +% +% \begin{macro}{ps@headings} +% \begin{macro}{ps@myheadings} +% \begin{macro}{headeven} +% \begin{macro}{headodd} +% First, we will support the standard \pkg{letter} class: +% \begin{macrocode} +\@ifclassloaded{letter}{% + \def\headodd{\protect\if@rl\beginR\fi\headtoname{} + \ignorespaces\toname + \hfil \@date + \hfil \pagename{} \thepage\protect\if@rl\endR\fi} + \if@twoside + \def\ps@headings{% + \let\@oddfoot\@empty\let\@evenfoot\@empty + \def\@oddhead{\select@language{\headlanguage}\headodd} + \let\@evenhead\@oddhead} + \else + \def\ps@headings{% + \let\@oddfoot\@empty + \def\@oddhead{\select@language{\headlanguage}\headodd}} + \fi + \def\headfirst{\protect\if@rl\beginR\fi\fromlocation \hfill % + \telephonenum\protect\if@rl\endR\fi} + \def\ps@firstpage{% + \let\@oddhead\@empty + \def\@oddfoot{\raisebox{-45\p@}[\z@]{% + \hb@xt@\textwidth{\hspace*{100\p@}% + \ifcase \@ptsize\relax + \normalsize + \or + \small + \or + \footnotesize + \fi + \select@language{\headlanguage}\headfirst}}\hss}} +% + \renewcommand{\opening}[1]{% + \let\headlanguage=\languagename% + \ifx\@empty\fromaddress% + \thispagestyle{firstpage}% + {\raggedleft\@date\par}% + \else % home address + \thispagestyle{empty}% + {\raggedleft + \if@rl\begin{tabular}{@{\beginR\csname% + to\@rllanguagename\endcsname}r@{\endR}}\ignorespaces + \fromaddress \\*[2\parskip]% + \@date \end{tabular}\par% + \else\begin{tabular}{l}\ignorespaces + \fromaddress \\*[2\parskip]% + \@date \end{tabular}\par% + \fi}% + \fi + \vspace{2\parskip}% + {\raggedright \toname \\ \toaddress \par}% + \vspace{2\parskip}% + #1\par\nobreak} +} +% \end{macrocode} +% Then, the \pkg{article}, \pkg{report} and \pkg{book} document +% classes are supported. Note, that in one-sided mode +% \cs{markright} was changed to \cs{markboth}. +% \begin{macrocode} +{% article, report, book + \def\headeven{\protect\if@rl\beginR\thepage\hfil\rightmark\endR + \protect\else\thepage\hfil{\slshape\leftmark} + \protect\fi} + \def\headodd{\protect\if@rl\beginR\leftmark\hfil\thepage\endR + \protect\else{\slshape\rightmark}\hfil\thepage + \protect\fi} + \@ifclassloaded{article}{% article + \if@twoside % two-sided + \def\ps@headings{% + \let\@oddfoot\@empty\let\@evenfoot\@empty + \def\@evenhead{\select@language{\headlanguage}\headeven}% + \def\@oddhead{\select@language{\headlanguage}\headodd}% + \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}}} + \else % one-sided + \def\ps@headings{% + \let\@oddfoot\@empty + \def\@oddhead{\headodd}% + \let\@mkboth\markboth + \def\sectionmark##1{% + \markboth{\MakeUppercase{% + \ifnum \c@secnumdepth >\m@ne + \thesection\quad + \fi + ##1}}{\MakeUppercase{% + \ifnum \c@secnumdepth >\m@ne + \thesection\quad + \fi + ##1}}}} + \fi +% + \def\ps@myheadings{% + \let\@oddfoot\@empty\let\@evenfoot\@empty + \def\@evenhead{\select@language{\headlanguage}\headeven}% + \def\@oddhead{\select@language{\headlanguage}\headodd}% + \let\@mkboth\@gobbletwo + \let\sectionmark\@gobble + \let\subsectionmark\@gobble + }}{% report and book + \if@twoside % two-sided + \def\ps@headings{% + \let\@oddfoot\@empty\let\@evenfoot\@empty + \def\@evenhead{\select@language{\headlanguage}\headeven} + \def\@oddhead{\select@language{\headlanguage}\headodd} + \let\@mkboth\markboth + \def\chaptermark##1{% + \markboth{\MakeUppercase{% + \ifnum \c@secnumdepth >\m@ne + \@chapapp\ \thechapter. \ % + \fi + ##1}}{}}% + \def\sectionmark##1{% + \markright {\MakeUppercase{% + \ifnum \c@secnumdepth >\z@ + \thesection. \ % + \fi + ##1}}}} + \else % one-sided + \def\ps@headings{% + \let\@oddfoot\@empty + \def\@oddhead{\select@language{\headlanguage}\headodd} + \let\@mkboth\markboth + \def\chaptermark##1{% + \markboth{\MakeUppercase{% + \ifnum \c@secnumdepth >\m@ne + \@chapapp\ \thechapter. \ % + \fi + ##1}}{\MakeUppercase{% + \ifnum \c@secnumdepth >\m@ne + \@chapapp\ \thechapter. \ % + \fi + ##1}}}} + \fi + \def\ps@myheadings{% + \let\@oddfoot\@empty\let\@evenfoot\@empty + \def\@evenhead{\select@language{\headlanguage}\headeven}% + \def\@oddhead{\select@language{\headlanguage}\headodd}% + \let\@mkboth\@gobbletwo + \let\chaptermark\@gobble + \let\sectionmark\@gobble + }}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% +% \subsubsection{Postscript Porblems} +% Any command that is implemented by PostScript directives, e.g +% commands from the ps-tricks package, needs to be fixed, because the +% PostScript directives are being interpeted after the document has been +% converted by \TeX to visual Hebrew (DVI, PostScript and PDF have visual +% Hebrew). +% +% For instance: Suppose you wrote in your document: +% +% |\textcolor{cyan}{some ltr text}| +% +% This would be interpeted by \TeX to something like: +% +% |[postscript:make color cyan]some LTR text[postscript:make color black]| +% +% +% However, with the bidirectionality support we get: +% +% |\textcolor{cyan}{\hebalef\hebbet}| +% +% Translated to: +% +% |[postscript:make color black]{bet}{alef}[postscript:make color cyan]| +% +% While we want: +% +% |[postscript:make color cyan]{bet}{alef}[postscript:make color black]| +% +% The following code will probably work at least with code that stays in the +% same line: +% \begin{macro}{@textcolor} +% \begin{macrocode} +\AtBeginDocument{% + %I assume that \@textcolor is only defined by the package color + \ifx\@textcolor\@undefined\else% + % If that macro was defined before the beginning of the document, + % that is: the package was loaded: redefine it with bidi support + \def\@textcolor#1#2#3{% + \if@rl% + \beginL\protect\leavevmode{\color#1{#2}\beginR#3\endR}\endL% + \else% + \protect\leavevmode{\color#1{#2}#3}% + \fi% + }% + \fi% +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\thetrueSlideCounter} +% This macro probably needs to be overriden for when using |prosper|, +% (waiting for feedback. Tzafrir) +% \begin{macrocode} +\@ifclassloaded{prosper}{% + \def\thetrueSlideCounter{\arabicnorl{trueSlideCounter}} +}{} +% \end{macrocode} +% \end{macro} +% +% \subsubsection{Miscellaneous internal \LaTeX\ macros} +% +% \begin{macro}{\raggedright} +% \begin{macro}{\raggedleft} +% \cs{raggedright} was changed from \pkg{latex.ltx} file to support +% Right-to-Left mode, because of the bug in its implementation. +% \begin{macrocode} +\def\raggedright{% + \let\\\@centercr + \leftskip\z@skip\rightskip\@flushglue + \parindent\z@\parfillskip\z@skip} +% \end{macrocode} +% Swap meanings of \cs{raggedright} and \cs{raggedleft} in +% Right-to-Left mode. +% \begin{macrocode} +\let\@@raggedleft=\raggedleft +\let\@@raggedright=\raggedright +\renewcommand\raggedleft{\if@rl\@@raggedright% + \else\@@raggedleft\fi} +\renewcommand\raggedright{\if@rl\@@raggedleft% + \else\@@raggedright\fi} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\author} +% \cs{author} is inserted with \texttt{tabular} environment, and +% will be used in restricted horizontal mode. Therefore we have to +% add explicit direction change command when in Right-to-Left +% mode. +% \begin{macrocode} +\let\@@author=\author +\renewcommand{\author}[1]{\@@author{\if@rl\beginR #1\endR\else #1\fi}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\MakeUppercase} +% \begin{macro}{\MakeLowercase} +% There are no uppercase and lowercase letters in most +% Right-to-Left languages, therefore we should redefine +% \cs{MakeUppercase} and \cs{MakeLowercase} \LaTeXe\ commands. +% \begin{macrocode} +\let\@@MakeUppercase=\MakeUppercase +\def\MakeUppercase#1{\if@rl#1\else\@@MakeUppercase{#1}\fi} +\let\@@MakeLowercase=\MakeLowercase +\def\MakeLowercase#1{\if@rl#1\else\@@MakeLowercase{#1}\fi} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\underline} +% We should explicitly use \cs{L} and \cs{R} commands in +% \cs{underline}d text. +% \begin{macrocode} +\let\@@@underline=\underline +\def\underline#1{\@@@underline{\if@rl\R{#1}\else #1\fi}} +% \end{macrocode} +% \end{macro} +% +% \cs{undertext} was added for \LaTeX 2.09 compatibility mode. +% \begin{macrocode} +\if@compatibility + \let\undertext=\underline +\fi +% \end{macrocode} +% +% \begin{macro}{\@xnthm} +% \begin{macro}{\@opargbegintheorem} +% The following has been inserted to correct the appearance of the +% number in \cs{newtheorem} to reorder theorem number components. A +% similar correction in the definition of \cs{@opargbegintheorem} +% was added too. +% \begin{macrocode} +\def\@xnthm#1#2[#3]{% + \expandafter\@ifdefinable\csname #1\endcsname + {\@definecounter{#1}\@addtoreset{#1}{#3}% + \expandafter\xdef\csname the#1\endcsname{\noexpand\@number + {\expandafter\noexpand\csname the#3\endcsname \@thmcountersep + \@thmcounter{#1}}}% + \global\@namedef{#1}{\@thm{#1}{#2}}% + \global\@namedef{end#1}{\@endtheorem}}} +% +\def\@opargbegintheorem#1#2#3{% + \trivlist + \item[\hskip \labelsep{\bfseries #1\ #2\ + \@brackets({#3})}]\itshape} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\@chapter} +% \begin{macro}{\@schapter} +% The following was added for pretty printing of the chapter +% numbers, for supporting Right-to-Left tables (\texttt{cot}, +% \texttt{fol}, and \texttt{tol}), to save \cs{headlanguage} +% for use in running headers, and to start two-column mode +% depending on chapter's main language. +% \begin{macrocode} +\@ifclassloaded{article}{}{% + % For pretty priniting + \def\@@chapapp{Chapter} + \def\@@thechapter{\@@arabic\c@chapter} + \def\@chapter[#1]#2{% + \let\headlanguage=\languagename% + %\set@outputdblcol% + \ifnum \c@secnumdepth >\m@ne + \refstepcounter{chapter}% + \typeout{\@@chapapp\space\@@thechapter.}% + \addcontentsline{toc}{chapter}% + {\protect\numberline{\thechapter}#1} + \addcontentsline{cot}{chapter}% + {\protect\numberline{\thechapter}#1} + \else + \addcontentsline{toc}{chapter}{#1}% + \addcontentsline{cot}{chapter}{#1}% + \fi + \chaptermark{#1} + \addtocontents{lof}{\protect\addvspace{10\p@}}% + \addtocontents{fol}{\protect\addvspace{10\p@}}% + \addtocontents{lot}{\protect\addvspace{10\p@}}% + \addtocontents{tol}{\protect\addvspace{10\p@}}% + \if@twocolumn + \@topnewpage[\@makechapterhead{#2}]% + \else + \@makechapterhead{#2}% + \@afterheading + \fi} + % + \def\@schapter#1{% + \let\headlanguage=\languagename% + %\set@outputdblcol% + \if@twocolumn + \@topnewpage[\@makeschapterhead{#1}]% + \else + \@makeschapterhead{#1}% + \@afterheading + \fi}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\appendix} +% Changed mainly for pretty printing of appendix numbers, and to +% start two-column mode with the right language (if needed). +% \begin{macrocode} +\@ifclassloaded{letter}{}{% other +\@ifclassloaded{slides}{}{% other + \@ifclassloaded{article}{% article + \renewcommand\appendix{\par + \setcounter{section}{0}% + \setcounter{subsection}{0}% + \renewcommand\thesection{\@Alph\c@section}} + }{% report and book + \renewcommand\appendix{\par + %\set@outputdblcol% + \setcounter{chapter}{0}% + \setcounter{section}{0}% + \renewcommand\@chapapp{\appendixname}% + % For pretty priniting + \def\@@chapapp{Appendix}% + \def\@@thechapter{\@@Alph\c@chapter} + \renewcommand\thechapter{\@Alph\c@chapter}}}}} +% \end{macrocode} +% \end{macro} +% +% \subsubsection{Bibliography and citations} +% +% \begin{macro}{\@cite} +% \begin{macro}{\@biblabel} +% \begin{macro}{\@lbibitem} +% Citations are produced by the macro +% |\@cite{|\emph{LABEL}|}{|\emph{NOTE}|}|. Both the citation label +% and the note is typeset in the current direction. We have to use +% \cs{@brackets} macro in \cs{@cite} and \cs{@biblabel} macros. In +% addition, when using \emph{alpha} or similar bibliography style, +% the \cs{@lbibitem} is used and have to be update to support bot +% Right-to-Left and Left-to-Right citations. +% +% \begin{macrocode} +\def\@cite#1#2{\@brackets[{#1\if@tempswa , #2\fi}]} +\def\@biblabel#1{\@brackets[{#1}]} +\def\@lbibitem[#1]#2{\item[\@biblabel{#1}\hfill]\if@filesw + {\let\protect\noexpand + \immediate + \if@rl\write\@auxout{\string\bibcite{#2}{\R{#1}}}% + \else\write\@auxout{\string\bibcite{#2}{\L{#1}}}\fi% + }\fi\ignorespaces} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{environment}{thebibliography} +% Use \cs{rightmargin} instead of \cs{leftmargin} when in RL mode. +% \begin{macrocode} +\@ifclassloaded{letter}{}{% other +\@ifclassloaded{slides}{}{% other +\@ifclassloaded{article}{% + \renewenvironment{thebibliography}[1] + {\section*{\refname\@mkboth% + {\MakeUppercase\refname}% + {\MakeUppercase\refname}}% + \list{\@biblabel{\@arabic\c@enumiv}}% + {\settowidth\labelwidth{\@biblabel{#1}}% + \if@rl\leftmargin\else\rightmargin\fi\labelwidth + \advance\if@rl\leftmargin\else\rightmargin\fi\labelsep + \@openbib@code + \usecounter{enumiv}% + \let\p@enumiv\@empty + \renewcommand\theenumiv{\@arabic\c@enumiv}}% + \sloppy + \clubpenalty4000 + \@clubpenalty \clubpenalty + \widowpenalty4000% + \sfcode`\.\@m} + {\def\@noitemerr + {\@latex@warning{Empty `thebibliography' environment}}% + \endlist}}% +{\renewenvironment{thebibliography}[1]{% + \chapter*{\bibname\@mkboth% + {\MakeUppercase\bibname}% + {\MakeUppercase\bibname}}% + \list{\@biblabel{\@arabic\c@enumiv}}% + {\settowidth\labelwidth{\@biblabel{#1}}% + \if@rl\leftmargin\else\rightmargin\fi\labelwidth + \advance\if@rl\leftmargin\else\rightmargin\fi\labelsep + \@openbib@code + \usecounter{enumiv}% + \let\p@enumiv\@empty + \renewcommand\theenumiv{\@arabic\c@enumiv}}% + \sloppy + \clubpenalty4000 + \@clubpenalty \clubpenalty + \widowpenalty4000% + \sfcode`\.\@m} + {\def\@noitemerr + {\@latex@warning{Empty `thebibliography' environment}}% + \endlist}}}} +% \end{macrocode} +% \end{environment} +% +% \begin{macro}{\@verbatim} +% All kinds of verbs (\cs{verb},\cs{verb*},\texttt{verbatim} and +% \texttt{verbatim*}) now can be used in Right-to-Left mode. Errors +% in latin mode solved too. +% \begin{macrocode} +\def\@verbatim{% + \let\do\@makeother \dospecials% + \obeylines \verbatim@font \@noligs} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@makecaption} +% Captions are set always centered. This allows us to use bilingual +% captions, for example: |\caption{\R{RLtext} \\ \L{LRtext}}|, +% which will be formatted as: +% \begin{center} +% Right to left caption here (RLtext) \\ +% Left to right caption here (LRtext) +% \end{center} +% See also \cs{bcaption} command below. +% \begin{macrocode} +\long\def\@makecaption#1#2{% + \vskip\abovecaptionskip% + \begin{center}% + #1: #2% + \end{center} \par% + \vskip\belowcaptionskip} +% \end{macrocode} +% \end{macro} +% +% \subsubsection{Additional bidirectional commands} +% +% \begin{itemize} +% \item Section headings are typeset with the default global +% direction. +% \item Text in section headings in the reverse language \emph{do +% not} have to be protected for the reflection command, as in: +% |\protect\L{|\emph{Latin Text}|}|, because \cs{L} and \cs{R} are +% robust now. +% \item Table of contents, list of figures and list of tables +% should be typeset with the \cs{tableofcontents}, +% \cs{listoffigures} and \cs{listoftables} commands respectively. +% \item The above tables will be typeset in the main direction (and +% language) in effect where the above commands are placed. +% \item Only 2 tables of each kind are supported: one for +% Right-to-Left and another for Left-to-Right directions. +% \end{itemize} +% +% How to include line to both tables? One has to use bidirectional +% sectioning commands as following: +% \begin{enumerate} +% \item Use the |\b|\emph{xxx} version of the sectioning commands +% in the text instead of the |\|\emph{xxx} version (\emph{xxx} is +% one of: \texttt{part}, \texttt{chapter}, \texttt{section}, +% \texttt{subsection}, \texttt{subsubsection}, \texttt{caption}). +% \item Syntax of the |\b|\emph{xxx} command is +% |\b|\emph{xxx}|{|\emph{RL text}|}{|\emph{LR text}|}|. +% Both arguments are typeset in proper direction by default (no +% need to change direction for the text inside). +% \item The section header inside the document will be typeset in +% the global direction in effect at the time. i.e. The |{|\emph{RL +% text}|}| will be typeset if Right-to-Left mode is in effect and +% |{|\emph{LR text}|}| otherwise. +% \end{enumerate} +% +% \begin{macro}{\bpart} +% \begin{macrocode} +\newcommand{\bpart}[2]{\part{\protect\if@rl% + #1 \protect\else #2 \protect\fi}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\bchapter} +% \begin{macrocode} +\newcommand{\bchapter}[2]{\chapter{\protect\if@rl% + #1 \protect\else #2 \protect\fi}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\bsection} +% \begin{macrocode} +\newcommand{\bsection}[2]{\section{\protect\if@rl% + #1 \protect\else #2 \protect\fi}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\bsubsection} +% \begin{macrocode} +\newcommand{\bsubsection}[2]{\subsection{\protect\if@rl% + #1 \protect\else #2 \protect\fi}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\bsubsubsection} +% \begin{macrocode} +\newcommand{\bsubsubsection}[2]{\subsubsection{\protect\if@rl% + #1 \protect\else #2 \protect\fi}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\bcaption} +% \begin{macrocode} +\newcommand{\bcaption}[2]{% + \caption[\protect\if@rl \R{#1}\protect\else \L{#2}\protect\fi]{% + \if@rl\R{#1}\protect\\ \L{#2} + \else\L{#2}\protect\\ \R{#1}\fi}} +% \end{macrocode} +% \end{macro} +% +% The following definition is a modified version of \cs{bchapter}, meant +% as a bilingual twin for \cs{chapter*} and \cs{section*} +% (added by Irina Abramovici). +% +% \begin{macro}{\bchapternn} +% \begin{macrocode} +\newcommand{\bchapternn}[2]{\chapter*{\protect\if@rl% + #1 \protect\else #2 \protect\fi}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\bsectionnn} +% \begin{macrocode} +\newcommand{\bsectionnn}[2]{\section*{\protect\if@rl% + #1 \protect\else #2 \protect\fi}} +% \end{macrocode} +% \end{macro} +% +% Finally, at end of \babel\ package, the \cs{headlanguage} and +% two-column mode will be initialized according to the current +% language. +% \begin{macrocode} +\AtEndOfPackage{\rlAtEndOfPackage} +% +\def\rlAtEndOfPackage{% + \global\let\headlanguage=\languagename%\set@outputdblcol% +} +% +% \end{macrocode} +% +% \subsection{Hebrew calendar} +% +% The original version of the package \pkg{hebcal.sty}\footnote{The +% following description of \pkg{hebcal} package is based on the +% comments included with original source by the author, Michail +% Rozman.} for \TeX\ and \LaTeX2.09, entitled ``\TeX{} \& \LaTeX{} +% macros for computing Hebrew date from Gregorian one'' was created +% by Michail Rozman, |misha@iop.tartu.ew.su|\footnote{Please direct +% any comments, bug reports, questions, etc. about the package to +% this address.} +% +% \begin{tabular}{@{}lr@{}c@{}ll} +% Released: &Tammuz 12, 5751&--&June 24, 1991 &\\ +% Corrected:&Shebat 10, 5752&--&January 15, 1992&by Rama Porrat\\ +% Corrected:&Adar II 5, 5752&--&March 10, 1992 &by Misha\\ +% Corrected:&Tebeth, 5756 &--&January 1996 &Dan Haran\\ +% &&&&(haran@math.tau.ac.il) +% \end{tabular} +% +% The package was adjusted for \babel{} and \LaTeXe{} by Boris +% Lavva. +% +% Changes to the printing routine (only) by Ron Artstein, June 1, +% 2003. +% +% This package should be included \emph{after} the \pkg{babel} with +% \pkg{hebrew} option, as following: +% \begin{quote} +% |\documentclass[|\ldots|]{|\ldots|}|\\ +% |\usepackage[hebrew,|\ldots|,|\emph{other languages}|,| +% \ldots|]{babel}|\\ +% |\usepackage{hebcal}| +% \end{quote} +% +% Two main user-level commands are provided by this package: +% +% \DescribeMacro{\Hebrewtoday} +% Computes today's Hebrew date and prints it. If we are presently +% in Hebrew mode, the date will be printed in Hebrew, otherwise --- +% in English (like Shebat 10, 5752). +% +% \DescribeMacro{\Hebrewdate} +% Computes the Hebrew date from the given Gregorian date and +% prints it. If we are presently in Hebrew mode, the date will be +% printed in Hebrew, otherwise --- in English (like Shebat 10, +% 5752). An example of usage is shown below: +% \begin{quote} +% |\newcount\hd \newcount\hm \newcount\hy|\\ +% |\hd=10 \hm=3 \hy=1992|\\ +% |\Hebrewdate{\hd}{\hm}{\hy}| +% \end{quote} +% +% \DescribeMacro{full} +% The package option |full| sets the flag |\@full@hebrew@year|, +% which causes years from the current millenium to be printed with +% the thousands digit (he-tav-shin-samekh-gimel). Without this +% option, thousands are not printed for the current millenium. +% NOTE: should this be a command option rather than a package +% option? --RA. +% +% \subsubsection{Introduction} +% +% The Hebrew calendar is inherently complicated: it is lunisolar -- +% each year starts close to the autumn equinox, but each month must +% strictly start at a new moon. Thus Hebrew calendar must be +% harmonized simultaneously with both lunar and solar events. In +% addition, for reasons of the religious practice, the year cannot +% start on Sunday, Wednesday or Friday. +% +% For the full description of Hebrew calendar and for the list of +% references see: +% \begin{quote} +% Nachum Dershowitz and Edward M. Reingold, +% \emph{``Calendarical Calculations''}, Software--Pract.Exper., +% vol. 20 (9), pp.899--928 (September 1990). +% \end{quote} +% |C| translation of |LISP| programs from the above article +% available from Mr. Wayne Geiser, |geiser%pictel@uunet.uu.net|. +% +% The 4\textsuperscript{th} distribution (July 1989) of hdate/hcal +% (Hebrew calendar programs similar to UNIX date/cal) by Mr. Amos +% Shapir, |amos@shum.huji.ac.il|, contains short and very clear +% description of algorithms. +% +% \subsubsection{Registers, Commands, Formatting Macros} +% +% The command |\Hebrewtoday| produces today's date for Hebrew +% calendar. It is similar to the standard \LaTeXe{} command +% |\today|. In addition three numerical registers |\Hebrewday|, +% |\Hebrewmonth| and |\Hebrewyear| are set. +% For setting this registers without producing of date string +% command |\Hebrewsetreg| can be used. +% +% The command +% |\Hebrewdate{|\emph{Gday}|}{|\emph{Gmonth}|}{|\emph{Gyear}|}| +% produces Hebrew calendar date corresponding to Gregorian date +% |Gday.Gmonth.Gyear|. Three numerical registers |\Hebrewday|, +% |\Hebrewmonth| and |\Hebrewyear| are set. +% +% For converting arbitrary Gregorian date |Gday.Gmonth.Gyear| +% to Hebrew date |Hday.Hmonth.Hyear| without producing date string +% the command: +% \begin{center} +% |\HebrewFromGregorian{|\emph{Gday}|}{|\emph{Gmonth}|}{|% +% \emph{Gyear}|}{|\emph{Hday}|}{|\emph{Hmonth}|}{|\emph{Hyear}|}| +% \end{center} +% can be used. +% +% \begin{macrocode} +%<*calendar> +\newif\if@full@hebrew@year +\@full@hebrew@yearfalse +\DeclareOption{full}{\@full@hebrew@yeartrue} +\ProcessOptions +\newcount\Hebrewday \newcount\Hebrewmonth \newcount\Hebrewyear +% \end{macrocode} +% +% \begin{macro}{\Hebrewdate} +% Hebrew calendar date corresponding to Gregorian date +% |Gday.Gmonth.Gyear|. If Hebrew (right-to-left) fonts \& macros +% are not loaded, we have to use English format. +% \begin{macrocode} +\def\Hebrewdate#1#2#3{% + \HebrewFromGregorian{#1}{#2}{#3} + {\Hebrewday}{\Hebrewmonth}{\Hebrewyear}% + \ifundefined{if@rl}% + \FormatForEnglish{\Hebrewday}{\Hebrewmonth}{\Hebrewyear}% + \else% + \FormatDate{\Hebrewday}{\Hebrewmonth}{\Hebrewyear}% + \fi} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\Hebrewtoday} +% Today's date in Hebrew calendar. +% \begin{macrocode} +\def\Hebrewtoday{\Hebrewdate{\day}{\month}{\year}} +\let\hebrewtoday=\Hebrewtoday +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\Hebrewsetreg} +% Set registers: today's date in hebrew calendar. +% \begin{macrocode} +\def\Hebrewsetreg{% + \HebrewFromGregorian{\day}{\month}{\year} + {\Hebrewday}{\Hebrewmonth}{\Hebrewyear}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\FormatDate} +% Prints a Hebrew calendar date |Hebrewday.Hebrewmonth.Hebrewyear|. +% \begin{macrocode} +\def\FormatDate#1#2#3{% + \if@rl% + \FormatForHebrew{#1}{#2}{#3}% + \else% + \FormatForEnglish{#1}{#2}{#3} + \fi} +% \end{macrocode} +% \end{macro} +% +% To prepare another language version of Hebrew calendar commands, +% one should change or add commands here. +% +% We start with Hebrew language macros. +% \begin{macro}{\HebrewYearName} +% Prints Hebrew year as a Hebrew number. Disambiguates strings by +% adding lamed-pe-gimel to years of the first Jewish millenium and +% to years divisible by 1000. Suppresses the thousands digit in the +% current millenium unless the package option |full| is selected. +% NOTE: should this be provided as a command option rather than a +% package option? --RA. +% \begin{macrocode} +\def\HebrewYearName#1{{% + \@tempcnta=#1\divide\@tempcnta by 1000\multiply\@tempcnta by 1000 + \ifnum#1=\@tempcnta\relax % divisible by 1000: disambiguate + \Hebrewnumeralfinal{#1}\ )\heblamed\hebpe"\hebgimel(% + \else % not divisible by 1000 + \ifnum#1<1000\relax % first millennium: disambiguate + \Hebrewnumeralfinal{#1}\ )\heblamed\hebpe"\hebgimel(% + \else + \ifnum#1<5000 + \Hebrewnumeralfinal{#1}% + \else + \ifnum#1<6000 % current millenium, print without thousands + \@tempcnta=#1\relax + \if@full@hebrew@year\else\advance\@tempcnta by -5000\fi + \Hebrewnumeralfinal{\@tempcnta}% + \else % #1>6000 + \Hebrewnumeralfinal{#1}% + \fi + \fi + \fi + \fi}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\HebrewMonthName} +% The macro |\HebrewMonthName{|\emph{month}|}{|\emph{year}|}| +% returns the name of month in the `year'. +% \begin{macrocode} +\def\HebrewMonthName#1#2{% + \ifnum #1 = 7 % + \CheckLeapHebrewYear{#2}% + \if@HebrewLeap \hebalef\hebdalet\hebresh\ \hebbet'% + \else \hebalef\hebdalet\hebresh% + \fi% + \else% + \ifcase#1% + % nothing for 0 + \or\hebtav\hebshin\hebresh\hebyod% + \or\hebhet\hebshin\hebvav\hebfinalnun% + \or\hebkaf\hebsamekh\heblamed\hebvav% + \or\hebtet\hebbet\hebtav% + \or\hebshin\hebbet\hebtet% + \or\hebalef\hebdalet\hebresh\ \hebalef'% + \or\hebalef\hebdalet\hebresh\ \hebbet'% + \or\hebnun\hebyod\hebsamekh\hebfinalnun% + \or\hebalef\hebyod\hebyod\hebresh% + \or\hebsamekh\hebyod\hebvav\hebfinalnun% + \or\hebtav\hebmem\hebvav\hebzayin% + \or\hebalef\hebbet% + \or\hebalef\heblamed\hebvav\heblamed% + \fi% + \fi} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\HebrewDayName} +% Name of day in Hebrew letters (gimatria). +% \begin{macrocode} +\def\HebrewDayName#1{\Hebrewnumeral{#1}} +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\FormatForHebrew} +% The macro |\FormatForHebrew{|\emph{hday}|}{|\emph{hmonth} +% |}{|\emph{hyear}|}| returns the formatted Hebrew date in Hebrew +% language. +% \begin{macrocode} +\def\FormatForHebrew#1#2#3{% + \HebrewDayName{#1}~\hebbet\HebrewMonthName{#2}{#3},~% + \HebrewYearName{#3}} +% \end{macrocode} +% \end{macro} +% +% We continue with two English language macros for Hebrew calendar. +% \begin{macro}{\HebrewMonthNameInEnglish} +% The macro |\HebrewMonthNameInEnglish{|\emph{month}|}{|% +% \emph{year}|}| is similar to |\Hebrew|\-|Month|\-|Name| described +% above. It returns the name of month in the Hebrew `year' in +% English. +% \begin{macrocode} +\def\HebrewMonthNameInEnglish#1#2{% + \ifnum #1 = 7% + \CheckLeapHebrewYear{#2}% + \if@HebrewLeap Adar II\else Adar\fi% + \else% + \ifcase #1% + % nothing for 0 + \or Tishrei% + \or Heshvan% + \or Kislev% + \or Tebeth% + \or Shebat% + \or Adar I% + \or Adar II% + \or Nisan% + \or Iyar% + \or Sivan% + \or Tammuz% + \or Av% + \or Elul% + \fi + \fi} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\FormatForEnglish} +% The macro |\FormatForEnglish{|\emph{hday}|}{|\emph{hmonth} +% |}{|\emph{hyear}|}| is similar to |\Format|\-|For|\-|Hebrew| +% macro described above and returns the formatted Hebrew date in +% English. +% \begin{macrocode} +\def\FormatForEnglish#1#2#3{% + \HebrewMonthNameInEnglish{#2}{#3} \number#1,\ \number#3} +% \end{macrocode} +% \end{macro} +% +% \subsubsection{Auxiliary Macros} +% +% \begin{macrocode} +\newcount\@common +% \end{macrocode} +% \begin{macro}{\Remainder} +% |\Remainder{|\emph{a}|}{|\emph{b}|}{|\emph{c}|}| calculates +% $c = a\%b == a-b\times\frac{a}{b}$ +% \begin{macrocode} +\def\Remainder#1#2#3{% + #3 = #1% % c = a + \divide #3 by #2% % c = a/b + \multiply #3 by -#2% % c = -b(a/b) + \advance #3 by #1}% % c = a - b(a/b) +% \end{macrocode} +% \end{macro} +% \begin{macrocode} +\newif\if@Divisible +% \end{macrocode} +% \begin{macro}{\CheckIfDivisible} +% |\CheckIfDivisible{|\emph{a}|}{|\emph{b}|}| sets +% |\@Divisibletrue| if $a\%b == 0$ +% \begin{macrocode} +\def\CheckIfDivisible#1#2{% + {% + \countdef\tmp = 0% \tmp == \count0 - temporary variable + \Remainder{#1}{#2}{\tmp}% + \ifnum \tmp = 0% + \global\@Divisibletrue% + \else% + \global\@Divisiblefalse% + \fi}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\ifundefined} +% From the \TeX book, ex. 7.7: +% \begin{quote} +% |\ifundefined{|\emph{command}|}\else\fi| +% \end{quote} +% \begin{macrocode} +\def\ifundefined#1{\expandafter\ifx\csname#1\endcsname\relax} +% \end{macrocode} +% \end{macro} +% +% \subsubsection{Gregorian Part} +% +% \begin{macrocode} +\newif\if@GregorianLeap +% \end{macrocode} +% \begin{macro}{\IfGregorianLeap} +% Conditional which is true if Gregorian `year' is a leap year: +% $((year\%4==0)\wedge(year\%100\neq 0))\vee(year\%400==0)$ +% \begin{macrocode} +\def\IfGregorianLeap#1{% + \CheckIfDivisible{#1}{4}% + \if@Divisible% + \CheckIfDivisible{#1}{100}% + \if@Divisible% + \CheckIfDivisible{#1}{400}% + \if@Divisible% + \@GregorianLeaptrue% + \else% + \@GregorianLeapfalse% + \fi% + \else% + \@GregorianLeaptrue% + \fi% + \else% + \@GregorianLeapfalse% + \fi% + \if@GregorianLeap} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\GregorianDaysInPriorMonths} +% The macro |\GregorianDaysInPriorMonths{|\emph{month}|}{|^^A +% \emph{year}|}{|\emph{days}|}| calculates the number of days in +% months prior to `month' in the `year'. +% \begin{macrocode} +\def\GregorianDaysInPriorMonths#1#2#3{% + {% + #3 = \ifcase #1% + 0 \or% % no month number 0 + 0 \or% + 31 \or% + 59 \or% + 90 \or% + 120 \or% + 151 \or% + 181 \or% + 212 \or% + 243 \or% + 273 \or% + 304 \or% + 334% + \fi% + \IfGregorianLeap{#2}% + \ifnum #1 > 2% % if month after February + \advance #3 by 1% % add leap day + \fi% + \fi% + \global\@common = #3}% + #3 = \@common} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\GregorianDaysInPriorYears} +% The macro |\GregorianDaysInPriorYears{|\emph{year}|}{|^^A +% \emph{days}|}| calculates the number of days in years prior to +% the `year'. +% \begin{macrocode} +\def\GregorianDaysInPriorYears#1#2{% + {% + \countdef\tmpc = 4% % \tmpc==\count4 + \countdef\tmpb = 2% % \tmpb==\count2 + \tmpb = #1% % + \advance \tmpb by -1% % + \tmpc = \tmpb% % \tmpc = \tmpb = year-1 + \multiply \tmpc by 365% % Days in prior years = + #2 = \tmpc% % = 365*(year-1) ... + \tmpc = \tmpb% % + \divide \tmpc by 4% % \tmpc = (year-1)/4 + \advance #2 by \tmpc% % ... plus Julian leap days ... + \tmpc = \tmpb% % + \divide \tmpc by 100% % \tmpc = (year-1)/100 + \advance #2 by -\tmpc% % ... minus century years ... + \tmpc = \tmpb% % + \divide \tmpc by 400% % \tmpc = (year-1)/400 + \advance #2 by \tmpc% % ... plus 4-century years. + \global\@common = #2}% + #2 = \@common} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\AbsoluteFromGregorian} +% The macro |\AbsoluteFromGregorian{|\emph{day}|}{|\emph{month}^^A +% |}{|\emph{year}|}{|\emph{absdate}|}| calculates the absolute date +% (days since $01.01.0001$) from Gregorian date |day.month.year|. +% \begin{macrocode} +\def\AbsoluteFromGregorian#1#2#3#4{% + {% + \countdef\tmpd = 0% % \tmpd==\count0 + #4 = #1% % days so far this month + \GregorianDaysInPriorMonths{#2}{#3}{\tmpd}% + \advance #4 by \tmpd% % add days in prior months + \GregorianDaysInPriorYears{#3}{\tmpd}% + \advance #4 by \tmpd% % add days in prior years + \global\@common = #4}% + #4 = \@common} +% \end{macrocode} +% \end{macro} +% +% \subsubsection{Hebrew Part} +% +% \begin{macrocode} +\newif\if@HebrewLeap +% \end{macrocode} +% \begin{macro}{\CheckLeapHebrewYear} +% Set |\@HebrewLeaptrue| if Hebrew `year' is a leap year, i.e.\ if +% $(1+7\times year)\%19 < 7$ then \emph{true} else \emph{false} +% \begin{macrocode} +\def\CheckLeapHebrewYear#1{% + {% + \countdef\tmpa = 0% % \tmpa==\count0 + \countdef\tmpb = 1% % \tmpb==\count1 +% + \tmpa = #1% + \multiply \tmpa by 7% + \advance \tmpa by 1% + \Remainder{\tmpa}{19}{\tmpb}% + \ifnum \tmpb < 7% % \tmpb = (7*year+1)%19 + \global\@HebrewLeaptrue% + \else% + \global\@HebrewLeapfalse% + \fi}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\HebrewElapsedMonths} +% The macro |\HebrewElapsedMonths{|\emph{year}|}{|\emph{months}|}| +% determines the number of months elapsed from the Sunday prior to +% the start of the Hebrew calendar to the mean conjunction of +% Tishri of Hebrew `year'. +% \begin{macrocode} +\def\HebrewElapsedMonths#1#2{% + {% + \countdef\tmpa = 0% % \tmpa==\count0 + \countdef\tmpb = 1% % \tmpb==\count1 + \countdef\tmpc = 2% % \tmpc==\count2 +% + \tmpa = #1% % + \advance \tmpa by -1% % + #2 = \tmpa% % #2 = \tmpa = year-1 + \divide #2 by 19% % Number of complete Meton cycles + \multiply #2 by 235% % #2 = 235*((year-1)/19) +% + \Remainder{\tmpa}{19}{\tmpb}% \tmpa = years%19-years this cycle + \tmpc = \tmpb% % + \multiply \tmpb by 12% % + \advance #2 by \tmpb% % add regular months this cycle +% + \multiply \tmpc by 7% % + \advance \tmpc by 1% % + \divide \tmpc by 19% % \tmpc = (1+7*((year-1)%19))/19 - +% % number of leap months this cycle + \advance #2 by \tmpc% % add leap months +% + \global\@common = #2}% + #2 = \@common} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\HebrewElapsedDays} +% The macro |\HebrewElapsedDays{|\emph{year}|}{|\emph{days}|}| +% determines the number of days elapsed from the Sunday prior to +% the start of the Hebrew calendar to the mean conjunction of +% Tishri of Hebrew `year'. +% \begin{macrocode} +\def\HebrewElapsedDays#1#2{% + {% + \countdef\tmpa = 0% % \tmpa==\count0 + \countdef\tmpb = 1% % \tmpb==\count1 + \countdef\tmpc = 2% % \tmpc==\count2 +% + \HebrewElapsedMonths{#1}{#2}% + \tmpa = #2% % + \multiply \tmpa by 13753% % + \advance \tmpa by 5604% % \tmpa=MonthsElapsed*13758 + 5604 + \Remainder{\tmpa}{25920}{\tmpc}% \tmpc == ConjunctionParts + \divide \tmpa by 25920% +% + \multiply #2 by 29% + \advance #2 by 1% + \advance #2 by \tmpa% % #2 = 1 + MonthsElapsed*29 + +% % PartsElapsed/25920 + \Remainder{#2}{7}{\tmpa}% % \tmpa == DayOfWeek + \ifnum \tmpc < 19440% + \ifnum \tmpc < 9924% + \else% % New moon at 9 h. 204 p. or later + \ifnum \tmpa = 2% % on Tuesday ... + \CheckLeapHebrewYear{#1}% of a common year + \if@HebrewLeap% + \else% + \advance #2 by 1% + \fi% + \fi% + \fi% + \ifnum \tmpc < 16789% + \else% % New moon at 15 h. 589 p. or later + \ifnum \tmpa = 1% % on Monday ... + \advance #1 by -1% + \CheckLeapHebrewYear{#1}% at the end of leap year + \if@HebrewLeap% + \advance #2 by 1% + \fi% + \fi% + \fi% + \else% + \advance #2 by 1% % new moon at or after midday + \fi% +% + \Remainder{#2}{7}{\tmpa}% % \tmpa == DayOfWeek + \ifnum \tmpa = 0% % if Sunday ... + \advance #2 by 1% + \else% % + \ifnum \tmpa = 3% % Wednesday ... + \advance #2 by 1% + \else% + \ifnum \tmpa = 5% % or Friday + \advance #2 by 1% + \fi% + \fi% + \fi% + \global\@common = #2}% + #2 = \@common} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\DaysInHebrewYear} +% The macro |\DaysInHebrewYear{|\emph{year}|}{|\emph{days}|}| +% calculates the number of days in Hebrew `year'. +% \begin{macrocode} +\def\DaysInHebrewYear#1#2{% + {% + \countdef\tmpe = 12% % \tmpe==\count12 +% + \HebrewElapsedDays{#1}{\tmpe}% + \advance #1 by 1% + \HebrewElapsedDays{#1}{#2}% + \advance #2 by -\tmpe% + \global\@common = #2}% + #2 = \@common} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\HebrewDaysInPriorMonths} +% The macro |\HebrewDaysInPriorMonths{|\emph{month}|}{|^^A +% \emph{year}|}{|\emph{days}|}| calculates the nu\-mber of days in +% months prior to `month' in the `year'. +% \begin{macrocode} +\def\HebrewDaysInPriorMonths#1#2#3{% + {% + \countdef\tmpf= 14% % \tmpf==\count14 +% + #3 = \ifcase #1% % Days in prior month of regular year + 0 \or% % no month number 0 + 0 \or% % Tishri + 30 \or% % Heshvan + 59 \or% % Kislev + 89 \or% % Tebeth + 118 \or% % Shebat + 148 \or% % Adar I + 148 \or% % Adar II + 177 \or% % Nisan + 207 \or% % Iyar + 236 \or% % Sivan + 266 \or% % Tammuz + 295 \or% % Av + 325 \or% % Elul + 400% % Dummy + \fi% + \CheckLeapHebrewYear{#2}% + \if@HebrewLeap% % in leap year + \ifnum #1 > 6% % if month after Adar I + \advance #3 by 30% % add 30 days + \fi% + \fi% + \DaysInHebrewYear{#2}{\tmpf}% + \ifnum #1 > 3% + \ifnum \tmpf = 353% % + \advance #3 by -1% % + \fi% % Short Kislev + \ifnum \tmpf = 383% % + \advance #3 by -1% % + \fi% % + \fi% +% + \ifnum #1 > 2% + \ifnum \tmpf = 355% % + \advance #3 by 1% % + \fi% % Long Heshvan + \ifnum \tmpf = 385% % + \advance #3 by 1% % + \fi% % + \fi% + \global\@common = #3}% + #3 = \@common} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\AbsoluteFromHebrew} +% The macro |\AbsoluteFromHebrew{|\emph{day}|}{|\emph{month}^^A +% |}{|\emph{year}|}{|\emph{absdate}|}| calculates the absolute date +% of Hebrew date |day.month.year|. +% \begin{macrocode} +\def\AbsoluteFromHebrew#1#2#3#4{% + {% + #4 = #1% + \HebrewDaysInPriorMonths{#2}{#3}{#1}% + \advance #4 by #1% % Add days in prior months this year + \HebrewElapsedDays{#3}{#1}% + \advance #4 by #1% % Add days in prior years + \advance #4 by -1373429% % Subtract days before Gregorian + \global\@common = #4}% % 01.01.0001 + #4 = \@common} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\HebrewFromGregorian} +% The macro |\HebrewFromGregorian{|\emph{Gday}|}{|\emph{Gmonth}^^A +% |}{|\emph{Gyear}|}{|\emph{Hday}|}{|\emph{Hmonth}|}|\-|{|^^A +% \emph{Hyear}|}| evaluates Hebrew date |Hday|, |Hmonth|, |Hyear| +% from Gregorian date |Gday|, |Gmonth|, |Gyear|. +% \begin{macrocode} +\def\HebrewFromGregorian#1#2#3#4#5#6{% + {% + \countdef\tmpx= 17% % \tmpx==\count17 + \countdef\tmpy= 18% % \tmpy==\count18 + \countdef\tmpz= 19% % \tmpz==\count19 +% + #6 = #3% % + \global\advance #6 by 3761% approximation from above + \AbsoluteFromGregorian{#1}{#2}{#3}{#4}% + \tmpz = 1 \tmpy = 1% + \AbsoluteFromHebrew{\tmpz}{\tmpy}{#6}{\tmpx}% + \ifnum \tmpx > #4% % + \global\advance #6 by -1% Hyear = Gyear + 3760 + \AbsoluteFromHebrew{\tmpz}{\tmpy}{#6}{\tmpx}% + \fi% % + \advance #4 by -\tmpx% % Days in this year + \advance #4 by 1% % + #5 = #4% % + \divide #5 by 30% % Approximation for month from below + \loop% % Search for month + \HebrewDaysInPriorMonths{#5}{#6}{\tmpx}% + \ifnum \tmpx < #4% + \advance #5 by 1% + \tmpy = \tmpx% + \repeat% + \global\advance #5 by -1% + \global\advance #4 by -\tmpy}} +% +% \end{macrocode} +% \end{macro} +% +% \Finale +%% +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +%% +\endinput diff --git a/Master/texmf-dist/source/generic/babel/hebrew.fdd b/Master/texmf-dist/source/generic/babel/hebrew.fdd new file mode 100644 index 00000000000..f61d06f430e --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/hebrew.fdd @@ -0,0 +1,1297 @@ +% \iffalse meta-comment +% +% Copyright 1989-2005 Johannes L. Braams and any individual authors +% listed elsewhere in this file. All rights reserved. +% +% This file is part of the Babel system. +% -------------------------------------- +% +% It 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 +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2003/12/01 or later. +% +% This work has the LPPL maintenance status "maintained". +% +% The Current Maintainer of this work is Johannes Braams. +% +% The list of all files belonging to the Babel system is +% given in the file `manifest.bbl. See also `legal.bbl' 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 +% \CheckSum{610} +% +% \iffalse meta-comment +%% File `hebrew.fdd' for installing the Hebrew encodings and fonts. +%% Copyright (C) 1997 -- 2005 Boris Lavva. +% +%% Babel package for LaTeX version 2e +%% Copyright (C) 1989 -- 2005 by Johannes Braams, +%% TeXniek +%% All rights reserved. +% \fi +% \iffalse +%\ProvidesFile{lheenc.def} +%\ProvidesFile{lhecmr.fd} +%\ProvidesFile{lhecmss.fd} +%\ProvidesFile{lhecmtt.fd} +%\ProvidesFile{lheclas.fd} +%\ProvidesFile{lheshold.fd} +%\ProvidesFile{lheshscr.fd} +%\ProvidesFile{lheshstk.fd} +%\ProvidesFile{lhefr.fd} +%\ProvidesFile{lhecrml.fd} +%\ProvidesFile{lheredis.fd} +%\ProvidesFile{HE8enc.def} +%\ProvidesFile{HE8cmr.fd} +%\ProvidesFile{HE8cmss.fd} +%\ProvidesFile{HE8cmtt.fd} +% The recoded Omega font (only Hebrew glyphs. Lacks other glyphs) +%\ProvidesFile{HE8OmegaHebrew.fd} +% The culmus fonts: +%\ProvidesFile{HE8aharoni.fd} +%\ProvidesFile{HE8david.fd} +%\ProvidesFile{HE8drugulin.fd} +%\ProvidesFile{HE8ellinia.fd} +%\ProvidesFile{HE8frankruehl.fd} +%\ProvidesFile{HE8yad.fd} +%\ProvidesFile{HE8miriam.fd} +%\ProvidesFile{HE8nachlieli.fd} +% The IBM Type1 fonts (not freely distributable +%\ProvidesFile{HE8CourierShalom.fd} +%\ProvidesFile{HE8HelveticaNarkissTam.fd} +%\ProvidesFile{HE8TimesNarkissim.fd} +% Placeholders for windows fonts: +%\ProvidesFile{HE8mfdavid.fd} +%\ProvidesFile{HE8mffrank.fd} +%\ProvidesFile{HE8mffrankthick.fd} +%\ProvidesFile{HE8mffrankthin.fd} +%\ProvidesFile{HE8mfmiriam.fd} +%\ProvidesFile{HE8mfmiriamwide.fd} +%\ProvidesFile{HE8mfnarkistam.fd} +%\ProvidesPackage{hebfont} +%<*driver> +\ProvidesFile{hebrew.drv} +% +% \fi +% \ProvidesFile{hebrew.fdd} + [2005/05/20 v1.2c % +% \iffalse +% 7-bit Hebrew font encoding +% Hebrew default font +% Hebrew sans-serif font +% Hebrew typewriter font +% Hebrew classic font (by Joel M. Hoffman) +% Hebrew shalom old font (by Jonathan Brecher) +% Hebrew shalom script font (by Jonathan Brecher) +% Hebrew shalom stick font (by Jonathan Brecher) +% Hebrew frank-ruehl font +% Hebrew carmel font (by Dr. Samy Zafrany) +% Hebrew redis font (by Prof. Jacques J. Goldberg) +% 8-bit Hebrew font encoding +% Hebrew default font +% Hebrew sans-serif font +% Hebrew typewriter font +% Hebrew font from the Omega project (by ???) +% Hebrew sans-serif font (Culmus) +% Hebrew serif font (Culmus) +% Hebrew old serif font (Culmus) +% Hebrew sans-serif font (Culmus) +% Hebrew serif font (Culmus) +% Hebrew handwriting font (Culmus) +% Hebrew monospaced font (Culmus) +% Hebrew sans-serif font (Culmus) +% Hebrew Shalom (Courier) font (by IBM) +% Hebrew NarkisTam (Helvetica) (by Zvi Narkis) +% Hebrew Narkissim (Times) (by Zvi Narkis) +% Hebrew David font (by ???) +% Hebrew Frank-Ruehl font (by ??) +% Hebrew Frank-Ruehl (thick) font (by ??) +% Hebrew Frank-Ruehl (thin) font (by ??) +% Hebrew Miriam font (by ???) +% Hebrew Miriam (wide) font (by ???) +% Hebrew Narkis Tam font (by ???) +% Hebrew font switching commands +% Driver file for hebrew.fdd file +% \fi +% Hebrew font encodings support + (test version: still liable to change)] +% +% \font\manual=logo10 +% \providecommand\MF{{\manual META}\-{\manual FONT}} +% \providecommand\PS{\textsc{PostScript}} +% \providecommand\dst{\textsc{docstrip}} +% \providecommand\LHE{\texttt{LHE}} +% \providecommand\HEH{\texttt{HE8}} +% \providecommand\file[1]{\texttt{#1}} +% \providecommand\pkg[1]{\texttt{#1}} +% \GetFileInfo{hebrew.fdd} +% +% \changes{hebfdd-1.0a}{1998/01/01}{% +% Initial version. Supports only 7-bit LHE font encoding and all +% available Hebrew \TeX\ fonts (by Boris Lavva)} +% \changes{hebfdd-1.0b}{2001/08/16}{% +% fixed lhecmr.fd to use oldjaf10 for a slanted font +% available Hebrew \TeX\ fonts (by Tzafrir Cohen)} +% \changes{hebfdd-1.1a}{2001/08/16}{% +% Adding 8-bit HE8 fonts. Note that most of them cannot be distributed +% with heb\LaTeX\ (by Tzafrir Cohen)} +% \changes{hebfdd-1.2a}{2003/08/19}{% +% Adding configurations for the Culmus fonts, currently 0.90 +% (by Tzafrir Cohen)} +% \changes{hebfdd-1.2b}{2004/02/20}{Reinstated the test whether LHE or +% HE8 is to be used} +% +% \changes{hebrew-1.2c}{2005/05/18}{Typo's in the docstrip guards made +% HE8nachlieli.fd unusable} +% \section{Hebrew font encodings}\label{sec:hebfdd} +% +% % Don't forget to update the docs... +% \subsection{THIS SECTION IS OUT OF DATE. UPDATE DOCS TO MATCH HE8 +% ENCODING} +% +% The file \file{\filename}\footnote{The files described in this +% section have version number \fileversion{} and were last revised +% on \filedate.} contains the Local Hebrew Encoding (\LHE) +% definition, the external font information needed to use the +% Hebrew 7-bit fonts (old code fonts) and \pkg{hebfont} package +% that provides Hebrew font switching commands. +% +% Using this file as an input, |lheenc.def| encoding definition +% file, all |.fd| files (font definition files) and font switching +% package for available Hebrew fonts are generated. We chose to use +% 7-bit encoding as default font encoding, because: +% \begin{enumerate} +% \item There are many 7-bit encoded Hebrew fonts available, more +% then for any other encoding. +% \item Available \TeX{} Hebrew fonts do not include latin +% alphabet, and we can safely map Hebrew glyphs to the +% \texttt{ASCII} positions (0 -- 127). +% \end{enumerate} +% +% Current definition of the \LHE{} encoding supports only Hebrew +% letters (|\hebalef|--|\hebtav|), but not Hebrew points, such as +% |\hebdagesh|, |\hebqamats|, |\hebpatah|, |\hebshindot|, etc. We +% are working now on such addition. +% +% \StopEventually{} +% +% \iffalse +% \subsection{A driver for this document} +% +% The next bit of code contains the documentation driver file for +% \TeX{}, i.e., the file that will produce the documentation you are +% currently reading. It will be extracted from this file by the \dst{} +% program. +% +% \begin{macrocode} +%<*driver> +\documentclass{ltxdoc} +\title{Hebrew font encodings for use with \LaTeXe} +\author{Boris Lavva} +\date{Printed \today} +\begin{document} + \maketitle + \DocInput{hebrew.fdd} +\end{document} +% +% \end{macrocode} +% \fi +% +% \subsection{The {\normalfont\dst{}} modules} +% +% The following modules are used in the implementation to direct +% \dst{} in generating external files: +% \begin{center} +% \begin{tabular}{@{}ll} +% driver & produce a documentation driver file \\[4pt] +% HE8enc & produce the encoding definition for CodePage 1255 +% (\HEH)\\[4pt] +% HE8cmr & make Hebrew default font in \HEH\\ +% HE8cmss & make Hebrew sans-serif font in \HEH\\ +% HE8cmtt & make Hebrew typewriter font in \HEH\\ +% HE8OmegaHebrew & Hebrew font from the Omega project (by ???)\\ +% HE8aharoni & Hebrew sans-serif font (Culmus)\\ +% HE8david & Hebrew serif font (Culmus)\\ +% HE8drugulin & Hebrew old serif font (Culmus)\\ +% HE8ellinia & Hebrew isans-serif font (Culmus)\\ +% HE8frankruehl & Hebrew serif font (Culmus)\\ +% HE8KtavYad & Hebrew handwriting font (Culmus)\\ +% HE8MiriamMono & Hebrew monospaced font\\ +% HE8Nachlieli & Hebrew sans-serif font (Culmus)\\ +% HE8CourierShalom & Hebrew Shalom (Courier) font (by IBM)\\ +% HE8HelveticaNarkissTam &Hebrew NarkisTam (Helvetica) (by Zvi Narkis)\\ +% HE8TimesNarkissim & Hebrew Narkissim (Times) (by Zvi Narkis) \\ +% HE8mfdavid & Hebrew David font (by ???)\\ +% HE8mffrank & Hebrew Frank-Ruehl font (by ??)\\ +% HE8mffrankthick & Hebrew Frank-Ruehl (thick) font (by ??)\\ +% HE8mffrankthin & Hebrew Frank-Ruehl (thin) font (by ??)\\ +% HE8mfmiriam & Hebrew Miriam font (by ???)\\ +% HE8mfmiriamwide & Hebrew Miriam (wide) font (by ???)\\ +% HE8mfnarkistam & Hebrew Narkis Tam font (by ???)\\ +% LHEenc & produce the encoding definition for Local Hebrew +% Encoding (\LHE)\\[4pt] +% LHEcmr & make Hebrew default font in \LHE\\ +% LHEcmss & make Hebrew sans-serif font in \LHE\\ +% LHEcmtt & make Hebrew typewriter font in \LHE\\ +% LHEclas & make Hebrew classic font (by Joel M.~Hoffman) in \LHE\\ +% LHEshold & make Hebrew shalom old font (by Jonathan Brecher) +% in \LHE\\ +% LHEshscr & make Hebrew shalom script font (by Jonathan Brecher) +% in \LHE\\ +% LHEshstk & make Hebrew shalom stick font (by Jonathan Brecher) +% in \LHE\\ +% LHEfr & make Hebrew frank-ruehl font in \LHE\\ +% LHEcrml & make Hebrew carmel font (by Dr. Samy Zafrany) in \LHE\\ +% LHEredis & make Hebrew redis font (by Prof. Jacques J.~Goldberg) +% in \LHE\\[4pt] +% nowarn & option for font definition files, that used\\ +% & to produce ``silent'' font substitutions without +% giving warnings\\[4pt] +% hebfont & create Hebrew font switching commands package +% \end{tabular} +% \end{center} +% A typical \dst{} command file would then have entries like: +%\begin{verbatim} +%\generateFile{lhecmr.fd}{t}{\from{hebrew.fdd}{LHEcmr,nowarn}} +%\end{verbatim} +% +% \subsection{The \LHE encoding definition file} +% +% The Hebrew font encoding \LHE{} is based upon the old-code encoding +% also known as the Israeli Standard SI-960. Many Hebrew \TeX{} +% fonts from the Hebrew University of Jerusalem are encoded +% in this encoding. It only uses the lower 128 positions of the font +% table. As local encoding its name start with the letter `L'. +% +% First we define the Local Hebrew Encoding; specify a default +% for the font substitution process for the \LHE{} encoding and +% supply a font to be used when all else fails. +% +% \begin{macrocode} +%<*LHEenc> +\DeclareFontEncoding{LHE}{}{} +\DeclareFontSubstitution{LHE}{cmr}{m}{n} +\DeclareErrorFont{LHE}{cmr}{m}{n}{10} +% +% \end{macrocode} +% Then we define a few commands in the \LHE{} encoding. +% \begin{macrocode} +%<*LHEenc> +\ProvideTextCommand{\textcopyright}{LHE}{\textcircled{\@latin{c}}} +\ProvideTextCommand{\textregistered}{LHE}{\textcircled{\scshape% + \@latin{r}}} +\ProvideTextCommand{\texttrademark}{LHE}{\textsuperscript{\@latin{TM}}} +% +% \end{macrocode} +% +% Because not everyone can input Hebrew input text directly from +% the keyboard we need to define control sequences for all the +% Hebrew glyphs in the fonts. In addition, we want to support +% many input encodings for Hebrew and to keep the language +% definition file (|hebrew.ldf|) independent of the +% encoding. Therefore, we exploit the standard \LaTeXe{} font +% encoding mechanism to define control sequences for all the Hebrew +% glyphs in the fonts in encoding-specific way. The language +% definition file uses only the control sequences and doesn't need +% to check the current font or input encoding. +% +% In the \LHE{} encoding (7-bit encoding) all the Hebrew glyphes +% reside in the \emph{lower} half of the font. Currently, only the +% Hebrew letters are supported. They use the same positions as the +% latin small letters in |ASCII| encoding and the position of |`|. +% +% The symbol |`| (glyph 96) is used by Hebrew letter \emph{Alef}, +% so we need to define its |lccode| to allow hyphenation. All other +% letters retain the same |lccode|s as their latin counterparts. +% \begin{macrocode} +%<+LHEenc>\lccode``=`` +% \end{macrocode} +% Hebrew letters occupy the positions 96--122 in \LHE{} encoding: +% \begin{macrocode} +%<*LHEenc> +\DeclareTextSymbol{\hebalef}{LHE}{96} +\DeclareTextSymbol{\hebbet}{LHE}{97} +\DeclareTextSymbol{\hebgimel}{LHE}{98} +\DeclareTextSymbol{\hebdalet}{LHE}{99} +\DeclareTextSymbol{\hebhe}{LHE}{100} +\DeclareTextSymbol{\hebvav}{LHE}{101} +\DeclareTextSymbol{\hebzayin}{LHE}{102} +\DeclareTextSymbol{\hebhet}{LHE}{103} +\DeclareTextSymbol{\hebtet}{LHE}{104} +\DeclareTextSymbol{\hebyod}{LHE}{105} +\DeclareTextSymbol{\hebfinalkaf}{LHE}{106} +\DeclareTextSymbol{\hebkaf}{LHE}{107} +\DeclareTextSymbol{\heblamed}{LHE}{108} +\DeclareTextSymbol{\hebfinalmem}{LHE}{109} +\DeclareTextSymbol{\hebmem}{LHE}{110} +\DeclareTextSymbol{\hebfinalnun}{LHE}{111} +\DeclareTextSymbol{\hebnun}{LHE}{112} +\DeclareTextSymbol{\hebsamekh}{LHE}{113} +\DeclareTextSymbol{\hebayin}{LHE}{114} +\DeclareTextSymbol{\hebfinalpe}{LHE}{115} +\DeclareTextSymbol{\hebpe}{LHE}{116} +\DeclareTextSymbol{\hebfinaltsadi}{LHE}{117} +\DeclareTextSymbol{\hebtsadi}{LHE}{118} +\DeclareTextSymbol{\hebqof}{LHE}{119} +\DeclareTextSymbol{\hebresh}{LHE}{120} +\DeclareTextSymbol{\hebshin}{LHE}{121} +\DeclareTextSymbol{\hebtav}{LHE}{122} +% +% \end{macrocode} +% Letter |\hebsin| is defined as a synonym of |\hebshin|: +% \begin{macrocode} +%<+LHEenc>\let\hebsin=\hebshin +% \end{macrocode} +% +% \subsection{The font definition files (in \LHE{} encoding)} +% +% \subsubsection{Hebrew default font} +% +% It uses \emph{Jerusalem} font for regular font, \emph{Old +% Jaffa} font for italic shape and small-caps, \emph{Dead Sea} +% font for bold face, and \emph{Tel-Aviv} for bold-italic +% \begin{macrocode} +%<*LHEcmr> +\DeclareFontFamily{LHE}{cmr}{\hyphenchar\font45} +\DeclareFontShape{LHE}{cmr}{m}{n} + {<-> jerus10 }{} +%%%%%%% Italicized shape +\DeclareFontShape{LHE}{cmr}{m}{it} + {<-> oldjaf10 }{} +\DeclareFontShape{LHE}{cmr}{m}{sl} + {<-> oldjaf10 }{} +\DeclareFontShape{LHE}{cmr}{m}{sc} + {<-> oldjaf10 }{} +%%%%%%% Bold extended series +\DeclareFontShape{LHE}{cmr}{bx}{n} + {<-> deads10 }{} +\DeclareFontShape{LHE}{cmr}{b}{n} + {<-> deads10 }{} +%%%%%%% Bold extended (Italic) series +\DeclareFontShape{LHE}{cmr}{bx}{sl} + {<-> telav10 }{} +\DeclareFontShape{LHE}{cmr}{bx}{it} + {<-> telav10 }{} +% +% \end{macrocode} +% +% \subsubsection{Hebrew sans-serif font} +% +% We use \emph{Tel Aviv} font for the Sans family. \emph{Old +% Jaffa} font is used for italic shape and \emph{Dead Sea} +% used for bold face. +% \begin{macrocode} +%<*LHEcmss> +\DeclareFontFamily{LHE}{cmss}{\hyphenchar\font45} +\DeclareFontShape{LHE}{cmss}{m}{n} + {<-> telav10 }{} +%%%%%%% Font/shape undefined, therefore substituted +\DeclareFontShape{LHE}{cmss}{m}{sc} +%<-nowarn> {<->sub * cmss/m/n}{} +%<+nowarn> {<->ssub * cmss/m/n}{} +%%%%%%% Italicized shape +\DeclareFontShape{LHE}{cmss}{m}{it} + {<-> oldjaf10 }{} +%%%%%%% Font/shape undefined, therefore substituted +\DeclareFontShape{LHE}{cmss}{m}{sl} +%<-nowarn> {<->sub * cmss/m/it}{} +%<+nowarn> {<->ssub * cmss/m/it}{} +%%%%%%% Bold extended series +\DeclareFontShape{LHE}{cmss}{bx}{n} + {<-> deads10 }{} +%%%%%%% Font/shape undefined, therefore substituted +\DeclareFontShape{LHE}{cmss}{b}{n} +%<-nowarn> {<->sub * cmss/bx/n}{} +%<+nowarn> {<->ssub * cmss/bx/n}{} +%%%%%%% Font/shape undefined, therefore substituted +\DeclareFontShape{LHE}{cmss}{bx}{sl} +%<-nowarn> {<->sub * cmss/bx/n}{} +%<+nowarn> {<->ssub * cmss/bx/n}{} +%%%%%%% Font/shape undefined, therefore substituted +\DeclareFontShape{LHE}{cmss}{bx}{it} +%<-nowarn> {<->sub * cmss/bx/n}{} +%<+nowarn> {<->ssub * cmss/bx/n}{} +% +% \end{macrocode} +% +% \subsubsection{Hebrew typewriter font} +% +% We use \emph{Tel Aviv} font as the typewriter font. \emph{Old +% Jaffa} font is used for italic shape and \emph{Dead Sea} +% used for bold face. +% \begin{macrocode} +%<*LHEcmtt> +\DeclareFontFamily{LHE}{cmtt}{\hyphenchar \font\m@ne} +\DeclareFontShape{LHE}{cmtt}{m}{n} + {<-> telav10 }{} +%%%%%%% Font/shape undefined, therefore substituted +\DeclareFontShape{LHE}{cmtt}{m}{sc} +%<-nowarn> {<->sub * cmtt/m/n}{} +%<+nowarn> {<->ssub * cmtt/m/n}{} +%%%%%%% Italicized shape +\DeclareFontShape{LHE}{cmtt}{m}{it} + {<-> oldjaf10 }{} +%%%%%%% Font/shape undefined, therefore substituted +\DeclareFontShape{LHE}{cmtt}{m}{sl} +%<-nowarn> {<->sub * cmtt/m/it}{} +%<+nowarn> {<->ssub * cmtt/m/it}{} +%%%%%%% Bold extended series +\DeclareFontShape{LHE}{cmtt}{bx}{n} + {<-> deads10 }{} +%%%%%%% Font/shape undefined, therefore substituted +\DeclareFontShape{LHE}{cmtt}{bx}{it} +%<-nowarn> {<->sub * cmtt/bx/n}{} +%<+nowarn> {<->ssub * cmtt/bx/n}{} +% +% \end{macrocode} +% +% \subsubsection{Hebrew classic font} +% +% \emph{Hclassic} and \emph{hcaption} fonts are distributed freely +% from |CTAN| sites and copyrighted by Joel M.~Hoffman, of 19 +% Hillcrest Lane, Rye, NY 10580 USA, e-mail: +% |72700.402@compuserve.com|. +% +% Hclassic is a modernized Classical Hebrew font (in the same way +% that Knuth's |cmr| family is a modernized Roman font --- but his +% fonts are much nicer). Hcaption is a slanted version of hclassic +% font. Both fonts contain all of the Hebrew consonants, +% the (rarely used) ligature \emph{alef-lamed} and two versions of +% the letter \emph{ayin} for use with and without +% vowels. Hclassic also contains all of the vowels found in Hebrew, +% a symbol for \emph{meteg}, and dots for use as a \emph{dagesh} +% and for differentiating \emph{shin} and \emph{sin} letters. +% +% Currently, only the Hebrew consonants (\emph{hebalef} -- \emph{hebtav}) +% from these fonts are supported by \LaTeXe{}, however one can use +% vowels and dots directly with \PlainTeX{} macros. We are working +% on generic vowels and dots support for \LaTeXe. +% +% \begin{macrocode} +%<*LHEclas> +\DeclareFontFamily{LHE}{clas}{} +\DeclareFontShape{LHE}{clas}{m}{n} + {<-> s * [0.83345] hclassic }{} +%%%%%%% Font/shape undefined, therefore substituted +\DeclareFontShape{LHE}{clas}{m}{sc} +%<-nowarn> {<->sub * clas/m/n}{} +%<+nowarn> {<->ssub * clas/m/n}{} +%%%%%%% Slanted shape +\DeclareFontShape{LHE}{clas}{m}{sl} + {<-> s * [0.69389] hcaption }{} +%%%%%%% Font/shape undefined, therefore substituted +\DeclareFontShape{LHE}{clas}{m}{it} +%<-nowarn> {<->sub * clas/m/sl}{} +%<+nowarn> {<->ssub * clas/m/sl}{} +% +% \end{macrocode} +% +% \subsubsection{Hebrew shalom fonts} +% +% All three shalom fonts (\emph{ShalomScript10}, +% \emph{ShalomStick10} and \emph{ShalomOldStyle10}) have been +% created by Jonathan Brecher, of 9 Skyview Road, Lexington, MA +% 02173-1112 USA, e-mail: |brecher@husc.harvard.edu|. +% +% All shalom fonts have been written in \PS{} via Fontographer on a +% Mac. The fonts have been converted to \MF{} by Rama Porrat +% (e-mail: |rama@cc.huji.ac.il|), using +% the utility typo, a font editor + converter between font formats +% (a commercial product). |ShalomScript10.mf| is the \MF{} +% equivalent of |ShalomScript.ps|, |ShalomStick10.mf| came from +% |ShalomStick.ps| and |ShalomOldStyle10.mf| originated in +% |ShalomOldStyle.ps|. +% +% The fonts differ in the letters' style. ShalomScript10 contains +% hand writing Hebrew letters; ShalomStick10 contains sans-serif +% letters, and ShalomOldStyle10 contains old style letters. All +% three fonts contain vowels and dots (nikud). While converting to +% \MF{}, letters and symbols within the fonts have been arranged +% so as to get a usable font for writing Hebrew documents in \TeX{} +% or \LaTeX{}, with as well as without vowels. +% +% Currently, only the Hebrew consonants (\emph{hebalef} -- \emph{hebtav}) +% from these fonts are supported by \LaTeXe{}, however one can use +% vowels and dots directly with \PlainTeX{} macros. We are working +% on generic vowels and dots support for \LaTeXe. +% +% \begin{macrocode} +%<*LHEshold> +\DeclareFontFamily{LHE}{shold}{} +\DeclareFontShape{LHE}{shold}{m}{n} + {<-> shold10 }{} +% +%<*LHEshscr> +\DeclareFontFamily{LHE}{shscr}{} +\DeclareFontShape{LHE}{shscr}{m}{n} + {<-> shscr10 }{} +% +%<*LHEshstk> +\DeclareFontFamily{LHE}{shstk}{} +\DeclareFontShape{LHE}{shstk}{m}{n} + {<-> shstk10 }{} +% +% \end{macrocode} +% +% \subsubsection{Hebrew frank-ruehl font} +% +% \emph{Frank Ruehl} font was written in \MF{} and includes three +% shapes: regular, bold extaneded and slanted. +% +% \begin{macrocode} +%<*LHEfr> +\DeclareFontFamily{LHE}{fr}{} +\DeclareFontShape{LHE}{fr}{m}{n} + {<-> fr }{} +%%%%%%% Font/shape undefined, therefore substituted +\DeclareFontShape{LHE}{fr}{m}{sc} +%<-nowarn> {<->sub * fr/m/n}{} +%<+nowarn> {<->ssub * fr/m/n}{} +%%%%%%% Slanted shape +\DeclareFontShape{LHE}{fr}{m}{sl} + {<-> frsl }{} +%%%%%%% Font/shape undefined, therefore substituted +\DeclareFontShape{LHE}{fr}{m}{it} +%<-nowarn> {<->sub * fr/m/sl}{} +%<+nowarn> {<->ssub * fr/m/sl}{} +%%%%%%% Bold extended series +\DeclareFontShape{LHE}{fr}{bx}{n} + {<-> frbx }{} +%%%%%%% Font/shape undefined, therefore substituted +\DeclareFontShape{LHE}{fr}{b}{n} +%<-nowarn> {<->sub * fr/bx/n}{} +%<+nowarn> {<->ssub * fr/bx/n}{} +%%%%%%% Font/shape undefined, therefore substituted +\DeclareFontShape{LHE}{fr}{bx}{sl} +%<-nowarn> {<->sub * fr/bx/n}{} +%<+nowarn> {<->ssub * fr/bx/n}{} +%%%%%%% Font/shape undefined, therefore substituted +\DeclareFontShape{LHE}{fr}{bx}{it} +%<-nowarn> {<->sub * fr/bx/n}{} +%<+nowarn> {<->ssub * fr/bx/n}{} +% +% \end{macrocode} +% +% \subsubsection{Hebrew carmel font} +% +% \emph{Carmel} font includes regular and slanted shapes. It was +% created by Dr.~Samy Zafrany of the Technion, Haifa, Israel with +% the intention of making nice fonts for headers and emphasized +% text. +% +% \begin{macrocode} +%<*LHEcrml> +\DeclareFontFamily{LHE}{crml}{} +\DeclareFontShape{LHE}{crml}{m}{n} + {<-> crml10 }{} +%%%%%%% Font/shape undefined, therefore substituted +\DeclareFontShape{LHE}{crml}{m}{sc} +%<-nowarn> {<->sub * crml/m/n}{} +%<+nowarn> {<->ssub * crml/m/n}{} +%%%%%%% Slanted shape +\DeclareFontShape{LHE}{crml}{m}{sl} + {<-> crmlsl10 }{} +%%%%%%% Font/shape undefined, therefore substituted +\DeclareFontShape{LHE}{crml}{m}{it} +%<-nowarn> {<->sub * crml/m/sl}{} +%<+nowarn> {<->ssub * crml/m/sl}{} +% +% \end{macrocode} +% +% \subsubsection{Hebrew redis font} +% +% \emph{Redis} font has been created by Prof.~Jacques J.~Goldberg +% of the Technion. Haifa, Israel. The font is available in regular, +% slanted and bold extanded shapes. This font contains a full set +% of Hebrew letters in a ``sans-serif vectorized'' style, and +% selected punctuation. +% +% \begin{macrocode} +%<*LHEredis> +\DeclareFontFamily{LHE}{redis}{} +\DeclareFontShape{LHE}{redis}{m}{n}{% + <5> <6> redis7 + <7> <8> <9> <10> <12> gen * redis + <10.95> redis10 + <14.4> redis12 + <17.28> <20.74> <24.88> redis17}{} +%%%%%%% Font/shape undefined, therefore substituted +\DeclareFontShape{LHE}{redis}{m}{sc} +%<-nowarn> {<->sub * redis/m/n}{} +%<+nowarn> {<->ssub * redis/m/n}{} +%%%%%%% Slanted shape +\DeclareFontShape{LHE}{redis}{m}{sl}{% + <5> <6> <7> rediss8 + <8> <9> <10> <12> gen * rediss + <10.95> rediss10 + <14.4> <17.28> <20.74> <24.88> rediss12}{} +%%%%%%% Font/shape undefined, therefore substituted +\DeclareFontShape{LHE}{redis}{m}{it} +%<-nowarn> {<->sub * redis/m/sl}{} +%<+nowarn> {<->ssub * redis/m/sl}{} +%%%%%%% Bold extended series +\DeclareFontShape{LHE}{redis}{bx}{n}{% + <5> <6> <7> <8> <9> <10> <10.95> <12> + <14.4> <17.28> <20.74> <24.88> redisb10}{} +%%%%%%% Font/shape undefined, therefore substituted +\DeclareFontShape{LHE}{redis}{b}{n} +%<-nowarn> {<->sub * redis/bx/n}{} +%<+nowarn> {<->ssub * redis/bx/n}{} +%%%%%%% Font/shape undefined, therefore substituted +\DeclareFontShape{LHE}{redis}{bx}{sl} +%<-nowarn> {<->sub * redis/bx/n}{} +%<+nowarn> {<->ssub * redis/bx/n}{} +%%%%%%% Font/shape undefined, therefore substituted +\DeclareFontShape{LHE}{redis}{bx}{it} +%<-nowarn> {<->sub * redis/bx/n}{} +%<+nowarn> {<->ssub * redis/bx/n}{} +% +% \end{macrocode} +% +% \subsection{The \HEH encoding definition file} +% +% The Hebrew font encoding \HEH{} is based upon an extention by +% Microsoft to the ISO-8859-8 standard. This is an 8bit encoding. The +% extentions include hebrew points (``Nikud''). +% +% First we define the Codepage 1255; specify a default +% for the font substitution process for the \HEH{} encoding and +% supply a font to be used when all else fails. +% +% \begin{macrocode} +%<*HE8enc> +\DeclareFontEncoding{HE8}{}{} +\DeclareFontSubstitution{HE8}{cmr}{m}{n} +\DeclareErrorFont{HE8}{cmr}{m}{n}{10} +% +% \end{macrocode} +% Then we define a few commands in the \HEH{} encoding. +% \begin{macrocode} +%<*HE8enc> +\ProvideTextCommand{\textcopyright}{HE8}{\textcircled{\@latin{c}}} +\ProvideTextCommand{\textregistered}{HE8}{\textcircled{\scshape% + \@latin{r}}} +\ProvideTextCommand{\texttrademark}{HE8}{\textsuperscript{\@latin{TM}}} +% +% \end{macrocode} +% +% \subsubsection{CHECK HERE FOR HE8 UPDATES} +% +% Because not everyone can input Hebrew input text directly from +% the keyboard we need to define control sequences for all the +% Hebrew glyphs in the fonts. In addition, we want to support +% many input encodings for Hebrew and to keep the language +% definition file (|hebrew.ldf|) independent of the +% encoding. Therefore, we exploit the standard \LaTeXe{} font +% encoding mechanism to define control sequences for all the Hebrew +% glyphs in the fonts in encoding-specific way. The language +% definition file uses only the control sequences and doesn't need +% to check the current font or input encoding. +% +% % In the \LHE{} encoding (7-bit encoding) all the Hebrew glyphes +% % reside in the \emph{lower} half of the font. Currently, only the +% % Hebrew letters are supported. They use the same positions as the +% % latin small letters in |ASCII| encoding and the position of |`|. +% +% Some general symbols: +% \begin{macrocode} +%<*HE8enc> +\ProvideTextCommand{\textcopyright}{HE8}{\textcircled{\@latin{c}}} +\ProvideTextCommand{\textregistered}{HE8}{\textcircled{\scshape% + \@latin{r}}} +\ProvideTextCommand{\texttrademark}{HE8}{\textsuperscript{\@latin{TM}}} +% +% \end{macrocode} +% +% The hebrew points: +% \begin{macrocode} +%<*HE8enc> +\DeclareTextSymbol{\sheva}{HE8}{192} +\DeclareTextSymbol{\hatafsegol}{HE8}{193} +\DeclareTextSymbol{\hatafpatah}{HE8}{194} +\DeclareTextSymbol{\hatafqamats}{HE8}{195} +\DeclareTextSymbol{\hiriq}{HE8}{196} +\DeclareTextSymbol{\tsere}{HE8}{197} +\DeclareTextSymbol{\segol}{HE8}{198} +\DeclareTextSymbol{\patah}{HE8}{199} +\DeclareTextSymbol{\qamats}{HE8}{200} +\DeclareTextSymbol{\holam}{HE8}{201} +\DeclareTextSymbol{\qubuts}{HE8}{203} +\DeclareTextSymbol{\dagesh}{HE8}{204} +\DeclareTextSymbol{\meteg}{HE8}{205} +\DeclareTextSymbol{\maqaf}{HE8}{206} +\DeclareTextSymbol{\rafe}{HE8}{207} +\DeclareTextSymbol{\paseq}{HE8}{208} +\DeclareTextSymbol{\shindot}{HE8}{209} +\DeclareTextSymbol{\sindot}{HE8}{210} +\DeclareTextSymbol{\sofpasuq}{HE8}{211} +\DeclareTextSymbol{\doublevav}{HE8}{212} +\DeclareTextSymbol{\vavyod}{HE8}{213} +\DeclareTextSymbol{\doubleyod}{HE8}{214} +% +% \end{macrocode} +% +% Hebrew letters occupy the positions 224--250 in \HEH{} encoding [WHAT +% ABOUT OTHER MARKS]: +% \begin{macrocode} +%<*HE8enc> +% \lccode``=`` % probably not needed (Tzafrir) +\DeclareTextSymbol{\hebalef}{HE8}{224} +\DeclareTextSymbol{\hebbet}{HE8}{225} +\DeclareTextSymbol{\hebgimel}{HE8}{226} +\DeclareTextSymbol{\hebdalet}{HE8}{227} +\DeclareTextSymbol{\hebhe}{HE8}{228} +\DeclareTextSymbol{\hebvav}{HE8}{229} +\DeclareTextSymbol{\hebzayin}{HE8}{230} +\DeclareTextSymbol{\hebhet}{HE8}{231} +\DeclareTextSymbol{\hebtet}{HE8}{232} +\DeclareTextSymbol{\hebyod}{HE8}{233} +\DeclareTextSymbol{\hebfinalkaf}{HE8}{234} +\DeclareTextSymbol{\hebkaf}{HE8}{235} +\DeclareTextSymbol{\heblamed}{HE8}{236} +\DeclareTextSymbol{\hebfinalmem}{HE8}{237} +\DeclareTextSymbol{\hebmem}{HE8}{238} +\DeclareTextSymbol{\hebfinalnun}{HE8}{239} +\DeclareTextSymbol{\hebnun}{HE8}{240} +\DeclareTextSymbol{\hebsamekh}{HE8}{241} +\DeclareTextSymbol{\hebayin}{HE8}{242} +\DeclareTextSymbol{\hebfinalpe}{HE8}{243} +\DeclareTextSymbol{\hebpe}{HE8}{244} +\DeclareTextSymbol{\hebfinaltsadi}{HE8}{245} +\DeclareTextSymbol{\hebtsadi}{HE8}{246} +\DeclareTextSymbol{\hebqof}{HE8}{247} +\DeclareTextSymbol{\hebresh}{HE8}{248} +\DeclareTextSymbol{\hebshin}{HE8}{249} +\DeclareTextSymbol{\hebtav}{HE8}{250} +% +% \end{macrocode} +% Letter |\hebsin| is defined as a synonym of |\hebshin|: +% \begin{macrocode} +%<+HE8enc>\let\hebsin=\hebshin +% \end{macrocode} +% +% \subsection{The font definition files (in \HEH{} encoding)} +% +% \subsubsection{Hebrew default font} +% +% It uses \emph{OmegaHebrew} font for regular font, \emph{Old +% Jaffa} font for italic shape and small-caps, \emph{Dead Sea} +% font for bold face, and \emph{Tel-Aviv} for bold-italic +% \begin{macrocode} +%<*HE8cmr> +\DeclareFontFamily{HE8}{cmr}{\hyphenchar\font45} +\DeclareFontShape{HE8}{cmr}{m}{n} + {<-> david }{} +%%%%%%% Italicized shape +\DeclareFontShape{HE8}{cmr}{m}{it} + {<-> davidi }{} +\DeclareFontShape{HE8}{cmr}{m}{sl} + {<-> davidi }{} +\DeclareFontShape{HE8}{cmr}{m}{sc} + {<-> david }{} +%%%%%%% Bold extended series +\DeclareFontShape{HE8}{cmr}{bx}{n} + {<-> davidb }{} +\DeclareFontShape{HE8}{cmr}{b}{n} + {<-> davidb }{} +%%%%%%% Bold extended (Italic) series +\DeclareFontShape{HE8}{cmr}{bx}{sl} + {<-> davidbi }{} +\DeclareFontShape{HE8}{cmr}{bx}{it} + {<-> davidbi }{} +% +% \end{macrocode} +% +% \subsubsection{Hebrew sans-serif font} +% +% Until we have a real sans-serif font in this distribution, this file +% will remain a copy of the roman fonts definitons above. +% \begin{macrocode} +%<*HE8cmss> +\DeclareFontFamily{HE8}{cmss}{\hyphenchar\font45} +\DeclareFontShape{HE8}{cmss}{m}{n} + {<-> nachlieli }{} +%%%%%%% Italicized shape +\DeclareFontShape{HE8}{cmss}{m}{it} + {<-> nachlieli }{} +\DeclareFontShape{HE8}{cmss}{m}{sl} + {<-> nachlieli }{} +\DeclareFontShape{HE8}{cmss}{m}{sc} + {<-> nachlieli }{} +%%%%%%% Bold extended series +\DeclareFontShape{HE8}{cmss}{bx}{n} + {<-> nachlieli }{} +\DeclareFontShape{HE8}{cmss}{b}{n} + {<-> nachlieli }{} +%%%%%%% Bold extended (Italic) series +\DeclareFontShape{HE8}{cmss}{bx}{sl} + {<-> nachlieli }{} +\DeclareFontShape{HE8}{cmss}{bx}{it} + {<-> nachlieli }{} +% +% \end{macrocode} +% +% \subsubsection{Hebrew typewriter font} +% +% Until we have a real sans-serif font in this distribution, this file +% will remain a copy of the roman fonts definitons above. +% \begin{macrocode} +%<*HE8cmtt> +\DeclareFontFamily{HE8}{cmtt}{\hyphenchar\font45} +\DeclareFontShape{HE8}{cmtt}{m}{n} + {<-> miriam }{} +%%%%%%% Italicized shape +\DeclareFontShape{HE8}{cmtt}{m}{it} + {<-> miriam }{} +\DeclareFontShape{HE8}{cmtt}{m}{sl} + {<-> miriam }{} +\DeclareFontShape{HE8}{cmtt}{m}{sc} + {<-> miriam }{} +%%%%%%% Bold extended series +\DeclareFontShape{HE8}{cmtt}{bx}{n} + {<-> miriam }{} +\DeclareFontShape{HE8}{cmtt}{b}{n} + {<-> miriam }{} +%%%%%%% Bold extended (Italic) series +\DeclareFontShape{HE8}{cmtt}{bx}{sl} + {<-> miriam }{} +\DeclareFontShape{HE8}{cmtt}{bx}{it} + {<-> miriam }{} +% +% \end{macrocode} +% +% \subsubsection{8Bit OmegaHebrew font} +% +% \emph{OmegaHebrew} is a serif hebrew font created by the omega project +% [FILL IN CREDITS] +% [FILL IN GENERAL SHAPE DESCRIPTION] +% shapes: [FILL IN] +% +% \begin{macrocode} +%<*HE8OmegaHebrew> +\def\OmegaHebrewscale{0.9} +\DeclareFontFamily{HE8}{OmegaHebrew}{\hyphenchar\font45} +\DeclareFontShape{HE8}{OmegaHebrew}{m}{n}{<-> [\OmegaHebrewscale] OmegaHebrew }{} +%\endinput % is it needed [tzafrir] +% +% \end{macrocode} +% +% +% \subsubsection{8Bit Aharoni font} +% +% \emph{Aharoni} is a serif hebrew font created by the omega project +% [FILL IN CREDITS] +% [FILL IN GENERAL SHAPE DESCRIPTION] +% shapes: [FILL IN] +% +% \begin{macrocode} +%<*HE8aharoni> +\def\Aharoniscale{1.0} +\DeclareFontFamily{HE8}{aharoni}{\hyphenchar\font45} +\DeclareFontShape{HE8}{aharoni}{m}{n} {<-> [\Aharoniscale] aharoni}{} +\DeclareFontShape{HE8}{aharoni}{m}{it} {<-> [\Aharoniscale] aharonii}{} +\DeclareFontShape{HE8}{aharoni}{m}{sl} {<-> [\Aharoniscale] aharonii}{} +\DeclareFontShape{HE8}{aharoni}{b}{n} {<-> [\Aharoniscale] aharonib}{} +\DeclareFontShape{HE8}{aharoni}{bx}{n} {<-> [\Aharoniscale] aharonib}{} +\DeclareFontShape{HE8}{aharoni}{bx}{it} {<-> [\Aharoniscale] aharonibi}{} + +%\endinput % is it needed [tzafrir] +% +% \end{macrocode} +% +% +% \subsubsection{8Bit David font} +% +% \emph{David} is a serif hebrew font created by the omega project +% [FILL IN CREDITS] +% [FILL IN GENERAL SHAPE DESCRIPTION] +% shapes: [FILL IN] +% +% \begin{macrocode} +%<*HE8david> +\def\Davidscale{1.0} +\DeclareFontFamily{HE8}{david}{\hyphenchar\font45} + +\DeclareFontShape{HE8}{david}{m}{n} {<-> [\Davidscale] david}{} +\DeclareFontShape{HE8}{david}{m}{it} {<-> [\Davidscale] davidi}{} +\DeclareFontShape{HE8}{david}{m}{sl} {<-> [\Davidscale] davidi}{} +\DeclareFontShape{HE8}{david}{b}{n} {<-> [\Davidscale] davidb}{} +\DeclareFontShape{HE8}{david}{bx}{n} {<-> [\Davidscale] davidb}{} +\DeclareFontShape{HE8}{david}{bx}{it} {<-> [\Davidscale] davidbi}{} + + +%\endinput % is it needed [tzafrir] +% +% \end{macrocode} +% +% +% \subsubsection{8Bit Drugulin font} +% +% \emph{Drugulin} is a serif hebrew font created by the omega project +% [FILL IN CREDITS] +% [FILL IN GENERAL SHAPE DESCRIPTION] +% shapes: [FILL IN] +% +% \begin{macrocode} +%<*HE8drugulin> +\def\Drugulinscale{1.0} +\DeclareFontFamily{HE8}{drugulin}{\hyphenchar\font45} +\DeclareFontShape{HE8}{drugulin}{m}{n} {<-> [\Drugulinscale] drugulinb}{} +\DeclareFontShape{HE8}{drugulin}{m}{it} {<-> [\Drugulinscale] drugulinbi}{} +\DeclareFontShape{HE8}{drugulin}{m}{sl} {<-> [\Drugulinscale] drugulinbi}{} +\DeclareFontShape{HE8}{drugulin}{b}{n} {<-> [\Drugulinscale] drugulinb}{} +\DeclareFontShape{HE8}{drugulin}{bx}{n} {<-> [\Drugulinscale] drugulinb}{} +\DeclareFontShape{HE8}{drugulin}{bx}{it} {<-> [\Drugulinscale] drugulinbi}{} +%\endinput % is it needed [tzafrir] +% +% \end{macrocode} +% +% +% \subsubsection{8Bit Ellinia font} +% +% \emph{Ellinia} is a sans-serif hebrew font created by the omega project +% [FILL IN CREDITS] +% [FILL IN GENERAL SHAPE DESCRIPTION] +% shapes: [FILL IN] +% +% \begin{macrocode} +%<*HE8ellinia> +\def\Elliniascale{1.0} +\DeclareFontFamily{HE8}{ellinia}{\hyphenchar\font45} +\DeclareFontShape{HE8}{ellinia}{m}{n} {<-> [\Elliniascale] ellinia}{} +\DeclareFontShape{HE8}{ellinia}{m}{it} {<-> [\Elliniascale] elliniai}{} +\DeclareFontShape{HE8}{ellinia}{m}{sl} {<-> [\Elliniascale] elliniai}{} +\DeclareFontShape{HE8}{ellinia}{b}{n} {<-> [\Elliniascale] elliniab}{} +\DeclareFontShape{HE8}{ellinia}{bx}{n} {<-> [\Elliniascale] elliniab}{} +\DeclareFontShape{HE8}{ellinia}{bx}{it} {<-> [\Elliniascale] elliniabi}{} +%\endinput % is it needed [tzafrir] +% +% \end{macrocode} +% +% +% \subsubsection{8Bit FrankRuehl font} +% +% \emph{FrankRuehl} is a serif hebrew font created by the omega project +% [FILL IN CREDITS] +% [FILL IN GENERAL SHAPE DESCRIPTION] +% shapes: [FILL IN] +% +% \begin{macrocode} +%<*HE8frankruehl> +\def\FrankRuehlscale{1.0} +\DeclareFontFamily{HE8}{frank}{\hyphenchar\font45} +\DeclareFontShape{HE8}{frank}{m}{n} {<-> [\FrankRuehlscale] frank}{} +\DeclareFontShape{HE8}{frank}{m}{it} {<-> [\FrankRuehlscale] franki}{} +\DeclareFontShape{HE8}{frank}{m}{sl} {<-> [\FrankRuehlscale] franki}{} +\DeclareFontShape{HE8}{frank}{b}{n} {<-> [\FrankRuehlscale] frankb}{} +\DeclareFontShape{HE8}{frank}{bx}{n} {<-> [\FrankRuehlscale] frankb}{} +\DeclareFontShape{HE8}{frank}{bx}{it} {<-> [\FrankRuehlscale] frankbi}{} +%\endinput % is it needed [tzafrir] +% +% \end{macrocode} +% +% +% \subsubsection{8Bit KtavYad font} +% +% \emph{KtavYad} is a serif hebrew font created by the omega project +% [FILL IN CREDITS] +% [FILL IN GENERAL SHAPE DESCRIPTION] +% shapes: [FILL IN] +% +% \begin{macrocode} +%<*HE8yad> +\def\KtavYadscale{1.0} +\DeclareFontFamily{HE8}{yad}{\hyphenchar\font45} +\DeclareFontShape{HE8}{yad}{m}{n} {<-> [\KtavYadscale] yadi}{} +\DeclareFontShape{HE8}{yad}{m}{it} {<-> [\KtavYadscale] yadi}{} +\DeclareFontShape{HE8}{yad}{m}{sl} {<-> [\KtavYadscale] yadi}{} +\DeclareFontShape{HE8}{yad}{b}{n} {<-> [\KtavYadscale] yadbi}{} +\DeclareFontShape{HE8}{yad}{bx}{n} {<-> [\KtavYadscale] yadbi}{} +\DeclareFontShape{HE8}{yad}{bx}{it} {<-> [\KtavYadscale] yadbi}{} +%\endinput % is it needed [tzafrir] +% +% \end{macrocode} +% +% \subsubsection{8Bit MiriamMono font} +% +% \emph{MiriamMono} is a serif hebrew font created by the omega project +% [FILL IN CREDITS] +% [FILL IN GENERAL SHAPE DESCRIPTION] +% shapes: [FILL IN] +% +% \begin{macrocode} +%<*HE8miriam> +\def\MiriamMonoscale{1.0} +\DeclareFontFamily{HE8}{miriam}{\hyphenchar\font45} +\DeclareFontShape{HE8}{miriam}{m}{n} {<-> [\MiriamMonoscale] miriam}{} +\DeclareFontShape{HE8}{miriam}{m}{it} {<-> [\MiriamMonoscale] miriami}{} +\DeclareFontShape{HE8}{miriam}{m}{sl} {<-> [\MiriamMonoscale] miriami}{} +\DeclareFontShape{HE8}{miriam}{b}{n} {<-> [\MiriamMonoscale] miriamb}{} +\DeclareFontShape{HE8}{miriam}{bx}{n} {<-> [\MiriamMonoscale] miriamb}{} +\DeclareFontShape{HE8}{miriam}{bx}{it} {<-> [\MiriamMonoscale] miriambi}{} + +%\endinput % is it needed [tzafrir] +% +% \end{macrocode} +% +% +% \subsubsection{8Bit Nachlieli font} +% +% \emph{Nachlieli} is a serif hebrew font created by the omega project +% [FILL IN CREDITS] +% [FILL IN GENERAL SHAPE DESCRIPTION] +% shapes: [FILL IN] +% +% \begin{macrocode} +%<*HE8nachlieli> +\def\Nachlieliscale{1.0} +\DeclareFontFamily{HE8}{nachlieli}{\hyphenchar\font45} +\DeclareFontShape{HE8}{nachlieli}{m}{n} {<-> [\Nachlieliscale] nachlieli}{} +\DeclareFontShape{HE8}{nachlieli}{m}{it} {<-> [\Nachlieliscale] nachlielii}{} +\DeclareFontShape{HE8}{nachlieli}{m}{sl} {<-> [\Nachlieliscale] nachlielii}{} +\DeclareFontShape{HE8}{nachlieli}{b}{n} {<-> [\Nachlieliscale] nachlielib}{} +\DeclareFontShape{HE8}{nachlieli}{bx}{n} {<-> [\Nachlieliscale] nachlielib}{} +\DeclareFontShape{HE8}{nachlieli}{bx}{it} {<-> [\Nachlieliscale] nachlielibi}{} +%\endinput % is it needed [tzafrir] +% +% \end{macrocode} +% +% +% \subsubsection{Hebrew font switching commands} +% +% The \pkg{hebfont} package defines a number of high-level commands +% (all starting with |\text..| similar to the standard \LaTeXe{} +% font-change commands, for example |\textbf|) that have one +% argument and typeset this argument in the requested way. These +% commands are defined for all available Hebrew fonts defined above +% and change only font parameters but not direction. +% +% For example, to use Hebrew Classic font family, the following +% sequence of commands should be included in a \LaTeXe{} document: +% \begin{quote} +% |\sethebrew|\\ +% |\textclas{Hebrew text printed with Classic fonts}| +% \end{quote} +% or to use Hebrew with Classic fonts locally: +% \begin{quote} +% |\R{\textclas{Hebrew text printed with Classic fonts}}| +% \end{quote} +% +% \begin{table}[t] +% \begin{center} +% \begin{tabular}{lll} +% \textit{Command} & \textit{Corresponds to} & +% \textit{Font family} \\[4pt] +% |\textjm{..}| & |\rmfamily| & Jerusalem font \\ +% |\textds{..}| & |\bfseries| & Dead Sea font \\ +% |\textoj{..}| & |\itshape| & Old Jaffa font \\ +% & |\slshape| & \\ +% & |\emph| & \\ +% |\textta{..}| & |\sffamily| & Tel-Aviv font \\ +% & |\ttfamily| & \\[2pt] +% |\textcrml{..}| & |\fontfamily{crml}| & Carmel fonts \\[2pt] +% |\textfr{..}| & |\fontfamily{fr}| & Frank-Ruehl fonts \\[2pt] +% |\textredis{..}| & |\fontfamily{redis}| & Redis fonts \\[2pt] +% |\textclas{..}| & |\fontfamily{redis}| & Classic fonts \\[2pt] +% |\textshold{..}| & |\fontfamily{shold}| & Shalom Old Style font \\ +% |\textshscr{..}| & |\fontfamily{shscr}| & Shalom Script font \\ +% |\textshstk{..}| & |\fontfamily{shstk}| & Shalom Stick font +% \end{tabular} +% \end{center} +% \caption{Hebrew font-change commands with arguments} +% \label{tab:fntcmds} +% \begin{quote} +% The font change commands provided here all start with |\text..| +% to emphasize that they are for use in normal text and to be +% easily memorable. +% \end{quote} +% \end{table} +% +% We declare \LaTeXe{} font commands, e.g.\ |\textjm{|\ldots|}| +% for all available fonts. Table~\ref{tab:fntcmds} shows the +% meanings of all these new high-level commands. +% +% \begin{macro}{\textjm} +% Switches to \emph{Jerusalem} font which is default regular Hebrew +% font (``roman'' family). Commands |\textrm{|\ldots|}| and +% old-style |{\rm |\ldots|}| will produce the same result. +% \begin{macrocode} +%<*hebfont> +\def\ivritex@tmp{HE8} +\ifx\ivritex@tmp\HeblatexEncoding % + % compatibility with hebfonts: + \DeclareTextFontCommand{\textjm}{\rmfamily\selectfont} + \DeclareTextFontCommand{\textds}{\bfseries\selectfont} + \DeclareTextFontCommand{\textoj}{\itshape\selectfont} + \DeclareTextFontCommand{\textta}{\sffamily\selectfont} + + % an attempt to give some replacements to the original hebfonts: + % + \DeclareTextFontCommand{\textcrml}{\fontfamily{david}\selectfont} + \DeclareTextFontCommand{\textfr}{\fontfamily{frank}\selectfont} + \DeclareTextFontCommand{\textredis}{\fontfamily{aharoni}\selectfont} + \DeclareTextFontCommand{\textclas}{\fontfamily{drugulin}\selectfont} + \DeclareTextFontCommand{\textshold}{\fontfamily{frank}\selectfont} + \DeclareTextFontCommand{\textshscr}{\fontfamily{yad}\selectfont} + \DeclareTextFontCommand{\textshstk}{\fontfamily{aharoni}\selectfont} + % note that redis is larger than shstk + + + \DeclareTextFontCommand{\textaha}{\fontfamily{aharoni}\selectfont} + \DeclareTextFontCommand{\textdav}{\fontfamily{david}\selectfont} + \DeclareTextFontCommand{\textdru}{\fontfamily{drugulin}\selectfont} + \DeclareTextFontCommand{\textel} {\fontfamily{ellinia}\selectfont} + % \textfr is already declared above + \DeclareTextFontCommand{\textmir}{\fontfamily{miriam}\selectfont} + \DeclareTextFontCommand{\textna} {\fontfamily{nachlieli}\selectfont} + % is this necessary: + \DeclareTextFontCommand{\textyad} {\fontfamily{yad}\selectfont} + +\else% +\DeclareTextFontCommand{\textjm}{\rmfamily\selectfont} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\textds} +% Switches to \emph{Dead Sea} font which is default bold font in +% Hebrew. Commands |\textbf{|\ldots|}| and old-style +% |{\bf |\ldots|}| will produce the same result. +% \begin{macrocode} +\DeclareTextFontCommand{\textds}{\bfseries\selectfont} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\textoj} +% Switches to \emph{Old Jaffa} font which is default italic font in +% Hebrew. Commands |\textit{|\ldots|}|, |\textsl{|\ldots|}|, +% |\emph{|\ldots|}| and old-style |{\it |\ldots|}| or +% |{\em |\ldots|}| will produce the same result. +% \begin{macrocode} +\DeclareTextFontCommand{\textoj}{\itshape\selectfont} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\textta} +% Switches to \emph{Tel-Aviv} font which is default sans-serif font +% in Hebrew. Commands |\textsf{|\ldots|}|, |\texttt{|\ldots|}| and +% old-style |{\sf |\ldots|}| or |{\tt |\ldots|}| will produce the +% same result (because sans-serif is used as typewriter font when +% in Hebrew mode). +% \begin{macrocode} +\DeclareTextFontCommand{\textta}{\sffamily\selectfont} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\textcrml} +% Switches to \emph{Carmel} font. Regular and slanted variants of +% carmel font will be used.. +% \begin{macrocode} +\DeclareTextFontCommand{\textcrml}{\fontfamily{crml}\selectfont} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\textfr} +% Switches to \emph{Frank-Ruehl} font family. Regular, bold and +% slanted frank ruehl fonts will be used. +% \begin{macrocode} +\DeclareTextFontCommand{\textfr}{\fontfamily{fr}\selectfont} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\textredis} +% Switches to \emph{Redis} font family. Regular, bold and slanted +% redis fonts of various sizes will be used. +% \begin{macrocode} +\DeclareTextFontCommand{\textredis}{\fontfamily{redis}\selectfont} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\textclas} +% Switches to \emph{Classic} font family. The normal font will be +% hclassic and slanted --- hcaption. +% \begin{macrocode} +\DeclareTextFontCommand{\textclas}{\fontfamily{clas}\selectfont} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\textshold} +% Switches to \emph{Shalom Old Style} font. +% \begin{macrocode} +\DeclareTextFontCommand{\textshold}{\fontfamily{shold}\selectfont} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\textshscr} +% Switches to \emph{Shalom Script} font. +% \begin{macrocode} +\DeclareTextFontCommand{\textshscr}{\fontfamily{shscr}\selectfont} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\textshstk} +% Switches to \emph{Shalom Stick} font. +% \begin{macrocode} +\DeclareTextFontCommand{\textshstk}{\fontfamily{shstk}\selectfont} +\fi +% \end{macrocode} +% \end{macro} +% +% Finally, for backward compatibility with \LaTeX2.09. four old +% font commands, e.g.\ |{\jm |\ldots|}| are defined too (see +% Table~\ref{tab:oldcmds}). +% \begin{table}[t] +% \begin{center} +% \begin{tabular}{lll} +% \textit{Old font command} & \textit{Font name} & +% \textit{Comment}\\[4pt] +% |{\jm ..}| & Jerusalem & default regular (roman) font \\ +% |{\ds ..}| & Dead Sea & default bold font \\ +% |{\oj ..}| & Old Jaffa & default italic and slanted font \\ +% & & used also to emphasize text \\ +% |{\ta ..}| & Tel-Aviv & default sans-serif and typewriter font\\ +% \end{tabular} +% \end{center} +% \caption{Hebrew old font-change commands for compatibility mode} +% \label{tab:oldcmds} +% \end{table} +% \begin{macrocode} +\if@compatibility + \DeclareOldFontCommand{\jm}{\normalfont\rmfamily\selectfont}% + {\@nomath\jm} + \DeclareOldFontCommand{\ds}{\normalfont\bfseries\selectfont}% + {\@nomath\ds} + \DeclareOldFontCommand{\oj}{\normalfont\itshape\selectfont}% + {\@nomath\oj} + \DeclareOldFontCommand{\ta}{\normalfont\sffamily\selectfont}% + {\@nomath\ta} +\fi +% +% \end{macrocode} +% +% \Finale +%% +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +%% +\endinput diff --git a/Master/texmf-dist/source/generic/babel/hebrew.ins b/Master/texmf-dist/source/generic/babel/hebrew.ins new file mode 100644 index 00000000000..80f35a41eca --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/hebrew.ins @@ -0,0 +1,215 @@ +%% +%% This file will generate fast loadable files and documentation +%% driver files from the doc files in this package when run through +%% LaTeX or TeX. +%% +%% Copyright 1989-2005 Johannes L. Braams and any individual authors +%% listed elsewhere in this file. All rights reserved. +%% +%% This file is part of the Babel system. +%% -------------------------------------- +%% +%% It 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 +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% The Current Maintainer of this work is Johannes Braams. +%% +%% The list of all files belonging to the LaTeX base distribution is +%% given in the file `manifest.bbl. See also `legal.bbl' 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. +%% +%% --------------- start of docstrip commands ------------------ +%% +%% +%% Copyright (C) 1997 -- 1998 Boris Lavva. +%% Copyright (C) 1989 -- 2004 by Johannes Braams, +%% TeXniek +%% All rights reserved. +%% +%% This file is contributed to the `babel' system. +%% +%% You are allowed to distribute this file together with all files +%% mentioned in manifest.bbl. +%% +%% You are not allowed to modify its contents. +%% +\def\filedate{2004/02/20} +\def\batchfile{hebrew.ins} +\input docstrip + +{\ifx\generate\undefined +\Msg{**********************************************} +\Msg{*} +\Msg{* This installation requires docstrip} +\Msg{* version 2.3c or later.} +\Msg{*} +\Msg{* An older version of docstrip has been input} +\Msg{*} +\Msg{**********************************************} +\errhelp{Move or rename old docstrip.tex.} +\errmessage{Old docstrip in input path} +\batchmode +\csname @@end\endcsname +\fi} + +\declarepreamble\mainpreamble + +This is a generated file. + +Copyright 1997-2004 Boris Lavva and any individual authors +listed elsewhere in this file. All rights reserved. + +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl 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. +\endpreamble + +\declarepreamble\fdpreamble + +This is a generated file. + +Copyright 1997-2004 Boris Lavva and any individual authors +listed elsewhere in this file. All rights reserved. + +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl for additional +information. + +In particular, permission is granted to customize the declarations in +this file to serve the needs of your installation. + +However, NO PERMISSION is granted to distribute a modified version +of this file under its original name. + +\endpreamble + +\keepsilent + +\usedir{tex/generic/babel} + +\Msg{*** Generating hebrew font encoding files ***} +\usepreamble\fdpreamble +\generate{\file{lheenc.def}{\from{hebrew.fdd}{LHEenc}} + \file{lhecmr.fd}{\from{hebrew.fdd}{LHEcmr,nowarn}} + \file{lhecmss.fd}{\from{hebrew.fdd}{LHEcmss,nowarn}} + \file{lhecmtt.fd}{\from{hebrew.fdd}{LHEcmtt,nowarn}} + \file{lheclas.fd}{\from{hebrew.fdd}{LHEclas,nowarn}} + \file{he8enc.def}{\from{hebrew.fdd}{HE8enc}} + \file{he8cmr.fd}{\from{hebrew.fdd}{HE8cmr,nowarn}} + \file{he8cmss.fd}{\from{hebrew.fdd}{HE8cmss,nowarn}} + \file{he8cmtt.fd}{\from{hebrew.fdd}{HE8cmtt,nowarn}} + \file{he8aharoni.fd}{\from{hebrew.fdd}{HE8aharoni,nowarn}} + \file{he8david.fd}{\from{hebrew.fdd}{HE8david,nowarn}} + \file{he8drugulin.fd}{\from{hebrew.fdd}{HE8drugulin,nowarn}} + \file{he8frankruehl.fd}{\from{hebrew.fdd}{HE8frankruehl,nowarn}} + \file{he8yad.fd}{\from{hebrew.fdd}{HE8yad,nowarn}} + \file{he8miriam.fd}{\from{hebrew.fdd}{HE8miriam,nowarn}} + \file{he8nachlieli.fd}{\from{hebrew.fdd}{HE8nachlieli,nowarn}} + \file{he8OmegaHebrew.fd}{\from{hebrew.fdd}{HE8OmegaHebrew,nowarn}} + \file{lheshold.fd}{\from{hebrew.fdd}{LHEshold,nowarn}} + \file{lheshscr.fd}{\from{hebrew.fdd}{LHEshscr,nowarn}} + \file{lheshstk.fd}{\from{hebrew.fdd}{LHEshstk,nowarn}} + \file{lhefr.fd}{\from{hebrew.fdd}{LHEfr,nowarn}} + \file{lhecrml.fd}{\from{hebrew.fdd}{LHEcrml,nowarn}} + \file{lheredis.fd}{\from{hebrew.fdd}{LHEredis,nowarn}} + \file{hebfont.sty}{\from{hebrew.fdd}{hebfont}} + } + +\Msg{*** Generating hebrew input encoding files ***} +\usepreamble\mainpreamble +\generate{\file{8859-8.def}{\from{hebinp.dtx}{8859-8}} + \file{cp1255.def}{\from{hebinp.dtx}{cp1255}} + \file{cp862.def}{\from{hebinp.dtx}{cp862}} + \file{si960.def}{\from{hebinp.dtx}{si960}} + } + +\Msg{*** Generating hebrew language support files ***} +\generate{\file{hebrew.ldf}{\from{hebrew.dtx}{hebrew}} + \file{rlbabel.def}{\from{hebrew.dtx}{rightleft}} + \file{hebcal.sty}{\from{hebrew.dtx}{calendar}} + } + +\Msg{*** Generating hebrew 2.09 compatibility files ***} +\generate{\file{hebrew_newcode.sty}{\from{heb209.dtx}{newcode}} + \file{hebrew_p.sty}{\from{heb209.dtx}{pccode}} + \file{hebrew_oldcode.sty}{\from{heb209.dtx}{oldcode}} + } + +\ifToplevel{ +\Msg{*************************************************************} +\Msg{*} +\Msg{* To finish the installation you have to move the following} +\Msg{* files into a directory searched by TeX:} +\Msg{*} +\Msg{* \space\space All *.cls, *.sty, *.ldf, *.fd and *.def} +\Msg{*} +\Msg{* To produce the documentation run `hebrew.dtx' through LaTeX} +\Msg{*} +\Msg{* Happy TeXing} +\Msg{*************************************************************} +} + +\endbatchfile diff --git a/Master/texmf-dist/source/generic/babel/icelandic.dtx b/Master/texmf-dist/source/generic/babel/icelandic.dtx new file mode 100644 index 00000000000..7b4be56c383 --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/icelandic.dtx @@ -0,0 +1,749 @@ +% \iffalse meta-comment +% +% Copyright 1989-2005 Johannes L. Braams and any individual authors +% listed elsewhere in this file. All rights reserved. +% +% This file is part of the Babel system. +% -------------------------------------- +% +% It 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 +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2003/12/01 or later. +% +% This work has the LPPL maintenance status "maintained". +% +% The Current Maintainer of this work is Johannes Braams. +% +% The list of all files belonging to the Babel system is +% given in the file `manifest.bbl. See also `legal.bbl' 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 +% \CheckSum{546} +% +% \iffalse +% Tell the \LaTeX\ system who we are and write an entry on the +% transcript. +%<*dtx> +\ProvidesFile{icelandic.dtx} +% +%\ProvidesLanguage{icelandic} +%\fi +%\ProvidesFile{icelandic.dtx} + [2005/03/30 v1.1g Icelandic support from the babel system] +%\iffalse +%% File iceland.dtx +%% Babel package for LaTeX version 2e +%% Copyright (C) 1989--2005 +%% by Johannes Braams, TeXniek +% +%% Icelandic Language Definition File +%% Copyright (C) 1996--2005 +%% by Einar \'Arnason +%% Johannes Braams, TeXniek +% +%% Please report errors to: Einar \'Arnason +%% einar at lif.hi.is +%% or to: J.L. Braams +%% babel at braams.cistron.nl +%% +% +%<*filedriver> +\documentclass{ltxdoc} +\usepackage{t1enc} +\usepackage[icelandic,english]{babel} +\font\manual=logo10 % font used for the METAFONT logo, etc. +\newcommand*\MF{{\manual META}\-{\manual FONT}} +\newcommand*\TeXhax{\TeX hax} +\newcommand*\babel{\textsf{babel}} +\newcommand*\langvar{$\langle \it lang \rangle$} +\newcommand*\note[1]{} +\newcommand*\Lopt[1]{\textsf{#1}} +\newcommand*\file[1]{\texttt{#1}} +\begin{document} +\begin{center} + \textbf{\Large A Babel language definition file for + Icelandic}\\[3mm]^^A\] + Einar \'Arnason\\ + \texttt{einar@lif.hi.is} +\end{center} + \DocInput{icelandic.dtx} +\end{document} +% +%\fi +% \GetFileInfo{iceland.dtx} +% +% +% \changes{icelandic-1.1c}{1997/05/21}{Removed code already present in +% \file{babel.def}} +% +% \section{The Icelandic language} +% +% \subsection{Overview} +% +% The file \file{\filename}\footnote{The file described in this +% section has version number \fileversion\ and was last revised on +% \filedate. } defines all the language definition macros for +% the Icelandic language +% +% Customization for the Icelandic language was made following +% several official and semiofficial publications~\cite{74:_augl, +% 77:_augl,88:_reglur,94:_si,97:_forst_fs}. These publications do +% not always agree and we indicate those instances. +% +% For this language the character |"| is made active. In +% table~\ref{tab:icelandic-extras} an overview is given of its +% purpose. +% \begin{table}[htb] +% \begin{center} +% \begin{otherlanguage*}{icelandic} +% \begin{tabular}{lp{8cm}} +% \verb="|= & disable ligature at this position. \\ +% |"-| & an explicit hyphen sign, allowing hyphenation +% in the rest of the word. \\ +% |""| & like |"-|, but producing no hyphen sign +% (for compund words with hyphen, e.g.\ |x-""y|). \\ +% |"~| & for a compound word mark without a breakpoint. \\ +% |"=| & for a compound word mark with a breakpoint, allowing +% hyphenation in the composing words. \\ +% |"`| & for Icelandic left double quotes (looks like ,,). \\ +% |"'| & for Icelandic right double quotes. \\ +% |">| & for Icelandic `french' left double quotes +% (similar to $>>$).\\ +% |"<| & for Icelandic `french' right double quotes +% (similar to $<<$).\\ +% |"o| & for old Icelandic "o \\ +% |"O| & for old Icelandic "O \\ +% |"ó| & for old Icelandic "ó \\ +% |"Ó| & for old Icelandic "Ó \\ +% |"e| & for old Icelandic "e \\ +% |"E| & for old Icelandic "E \\ +% |"é| & for old Icelandic "é \\ +% |"É| & for old Icelandic "É \\ +% |\tala| & for typesetting numbers\\ +% |\grada| & for the `degree' symbol\\ +% |\gradur| & for `degrees', e.g. 5~\gradur C\\ +% |\upp| & for textsuperscript \\ +% \end{tabular} +% \end{otherlanguage*} +% \caption{The shorthands and extra definitions made +% by \file{icelandic.ldf}}\label{tab:icelandic-extras} +% \end{center} +% \end{table} +% The shorthands in table~\ref{tab:icelandic-extras} can also be +% typeset by using the commands in +% table~\ref{tab:icelandic-commands}. +% \begin{table}[htb] +% \begin{center} +% \begin{otherlanguage*}{icelandic} +% \begin{tabular}{lp{8cm}} +% |\ilqq| & for Icelandic left double quotes +% (looks like ,,). \\ +% |\irqq| & for Icelandic right double quotes +% (looks like ``). \\ +% |\ilq| & for Icelandic left single quotes +% (looks like ,). \\ +% |\irq| & for Icelandic right single quotes +% (looks like `). \\ +% |\iflqq| & for Icelandic `french' left double quotes +% (similar to $>>$).\\ +% |\ifrqq| & for Icelandic `french' right double quotes +% (similar to $<<$).\\ +% |\ifrq| & for Icelandic `french' right single quotes +% (similar to $<$).\\ +% |\iflq| & for Icelandic `french' left single quotes +% (similar to $>$). \\ +% |\dq| & the original quotes character (|"|). \\ +% |\oob| & for old Icelandic "o \\ +% |\Oob| & for old Icelandic "O \\ +% |\ooob| & for old Icelandic "ó \\ +% |\OOob| & for old Icelandic "Ó \\ +% |\eob| & for old Icelandic "e \\ +% |\Eob| & for old Icelandic "E \\ +% |\eeob| & for old Icelandic "é \\ +% |\EEob| & for old Icelandic "É \\ +% \end{tabular} +% \end{otherlanguage*} +% \caption{Commands which produce quotes and old Icelandic +% diacritics, defined by +% \file{icelandic.ldf}}\label{tab:icelandic-commands} +% \end{center} +% \end{table} +% +% \begin{thebibliography}{1} +% +% \bibitem{88:_reglur} +% Alþingi. +% \newblock {\em Reglur um frágang þingskjala og prentun umræðna}, +% 1988. +% +% \bibitem{74:_augl} +% Auglýsing um greinarmerkjasetningu. +% \newblock Stj.tíð B, nr. 133/1974, 1974. +% +% \bibitem{77:_augl} +% Auglýsing um breyting auglýsingu nr. 132/1974 um íslenska +% stafsetningu. +% \newblock Stj.tíð B, nr. 261/1977, 1977. +% +% \bibitem{unknown72:_first_gramm_treat} +% Einar Haugen, editor. +% \newblock {\em First Grammatical Treatise}. +% \newblock Longman, London, 2 edition, 1972. +% +% \bibitem{97:_forst_fs} +% Staðlaráð Íslands og Fagráð í upplýsingatækni, Reykjavík. +% \newblock {\em Forstaðall FS 130:1997}, 1997. +% +% \bibitem{94:_si} +% STRÍ Staðlaráð Íslands. +% \newblock {\em SI - kerfið}, 2 edition, 1994. +% +% \end{thebibliography} +% +% \StopEventually{} +% +% +% \subsection{\TeX{}nical details} +% +% When this file was read through the option \Lopt{icelandic} we make +% it behave as if \Lopt{icelandic} was specified. +% +% \begin{macrocode} +\def\bbl@tempa{icelandic} +\ifx\CurrentOption\bbl@tempa + \def\CurrentOption{icelandic} +\fi +% \end{macrocode} +% +% The macro |\LdfInit| takes care of preventing that this file is +% loaded more than once, checking the category code of the +% \texttt{@} sign, etc. +% \begin{macrocode} +%<*code> +\LdfInit\CurrentOption{captions\CurrentOption} +% \end{macrocode} +% +% When this file is read as an option, i.e., by the |\usepackage| +% command, \texttt{icelandic} will be an `unknown' language, so we +% have to make it known. So we check for the existence of +% |\l@icelandic| to see whether we have to do something here. +% +% \begin{macrocode} +\ifx\l@icelandic\@undefined + \@nopatterns{Icelandic} + \adddialect\l@icelandic0 +\fi +% \end{macrocode} +% +% \begin{macro}{\if@Two@E} +% We will need a new `if' : |\if@Two@E| is true if and only if +% \LaTeXe{} is running \emph{not} in compatibility mode. It is +% used in the definitions of the command |\tala| and |\upp|. +% The definition is somewhat complicated, due to the fact that +% |\if@compatibility| is not recognized as a |\if| in +% \LaTeX-2.09 based formats. +% \begin{macrocode} +\newif\if@Two@E \@Two@Etrue +\def\@FI@{\fi} +\ifx\@compatibilitytrue\@undefined + \@Two@Efalse \def\@FI@{\relax} +\else + \if@compatibility \@Two@Efalse \fi +\@FI@ +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\extrasicelandic} +% \begin{macro}{\noextrasicelandic} +% +% The macro |\extrasicelandic| +% will perform all the extra definitions needed for the Icelandic +% language. The macro |\noextrasicelandic| is used to cancel the +% actions of |\extrasicelandic|. +% +% For Icelandic the \texttt{"} character is +% made active. This is done once, later on its definition may vary. +% \begin{macrocode} +\initiate@active@char{"} +\@namedef{extras\CurrentOption}{% + \languageshorthands{icelandic}} +\expandafter\addto\csname extras\CurrentOption\endcsname{% + \bbl@activate{"}} +% \end{macrocode} +% Don't forget to turn the shorthands off again. +% \changes{icelandic-1.1e}{1999/12/17}{Deactivate shorthands ouside of +% Icelandic} +% \begin{macrocode} +\addto\noextrasicelandic{\bbl@deactivate{"}} +% \end{macrocode} +% +% The icelandic hyphenation patterns can be used with +% |\lefthyphenmin| and |\righthyphenmin| set to~2. +% \changes{icelandic-1.1f}{2000/09/22}{Now use \cs{providehyphenmins} +% to provide a default value} +% \begin{macrocode} +\providehyphenmins{\CurrentOption}{\tw@\tw@} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% The code above is necessary because we need an extra active +% character. This character is then used as indicated in +% table~\ref{tab:icelandic-commands}. +% +% To be able to define the function of |"|, we first define a +% couple of `support' macros. +% +% \subsection{Captionnames and date} +% +% The next step consists of defining the Icelandic equivalents for +% the \LaTeX{} captionnames. +% +% \begin{macro}{\captionsicelandic} +% The macro |\captionsicelandic| will define all strings used +% used in the four standard document classes provided +% with \LaTeX. +% \changes{icelandic-1.1f}{2000/09/20}{Added \cs{glossaryname}} +% \changes{icelandic-1.1g}{2002/01/00}{Only use 7-bit ASCII characters +% in order to keep the texts input encoding independant} +% \changes{icelandic-1.1g}{2002/01/09}{Added translation for Glossary} +% \begin{macrocode} +\@namedef{captions\CurrentOption}{% + \def\prefacename{Form\'{a}li}% + \def\refname{Heimildir}% + \def\abstractname{\'{U}tdr\'{a}ttur}% + \def\bibname{Heimildir}% + \def\chaptername{Kafli}% + \def\appendixname{Vi{\dh}auki}% + \def\contentsname{Efnisyfirlit}% + \def\listfigurename{Myndaskr\'{a}}% + \def\listtablename{T\"{o}fluskr\'{a}}% + \def\indexname{Atri{\dh}isor{\dh}askr\'{a}}% + \def\figurename{Mynd}% + \def\tablename{Tafla}% + \def\partname{Hluti}% + \def\enclname{Hj\'{a}lagt}% + \def\ccname{Samrit}% + \def\headtoname{Til:}% in letter + \def\pagename{Bla{\dh}s\'{\i}{\dh}a}% + \def\seename{Sj\'{a}}% + \def\alsoname{Sj\'{a} einnig}% + \def\proofname{S\"{o}nnun}% + \def\glossaryname{Or{\dh}alisti}% + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\dateicelandic} +% The macro |\dateicelandic| redefines the command |\today| +% to produce Icelandic dates. +% \changes{icelandic-1.1c}{1997/10/01}{Use \cs{edef} to define +% \cs{today} to save memory} +% \changes{icelandic-1.1c}{1998/03/28}{use \cs{def} instead of \cs{edef}} +% \begin{macrocode} +\def\dateicelandic{% + \def\today{\number\day.~\ifcase\month\or + jan\'{u}ar\or febr\'{u}ar\or mars\or apr\'{\i}l\or ma\'{\i}\or + j\'{u}n\'{\i}\or j\'{u}l\'{\i}\or \'{a}g\'{u}st\or september\or + okt\'{o}ber\or n\'{o}vember\or desember\fi + \space\number\year}} +% \end{macrocode} +% \end{macro} +% +% +% \subsection{Icelandic quotation marks} +% +% +% \begin{macro}{\dq} +% We save the original double quote character in |\dq| to keep +% it available, the math accent |\"| can now be typed as |"|. +% \begin{macrocode} +\begingroup \catcode`\"12 +\def\x{\endgroup + \def\@SS{\mathchar"7019 } + \def\dq{"}} +\x +% \end{macrocode} +% \end{macro} +% +% Now we can define the icelandic and icelandic `french' quotes. +% The icelandic `french' guillemets are the reverse of french +% guillemets. We define single icelandic `french' quotes for +% compatibility. Shorthands are provided for a number of different +% quotation marks, which make them useable both outside and +% inside mathmode. +% +% \begin{macrocode} +\let\ilq\grq +\let\irq\grq +\let\iflq\frq +\let\ifrq\flq +\let\ilqq\glqq +\let\irqq\grqq +\let\iflqq\frqq +\let\ifrqq\flqq +% \end{macrocode} +% +% \begin{macrocode} +\declare@shorthand{icelandic}{"`}{\glqq} +\declare@shorthand{icelandic}{"'}{\grqq} +\declare@shorthand{icelandic}{">}{\frqq} +\declare@shorthand{icelandic}{"<}{\flqq} +% \end{macrocode} +% and some additional commands: +% \begin{macrocode} +\declare@shorthand{icelandic}{"-}{\nobreak\-\bbl@allowhyphens} +\declare@shorthand{icelandic}{"|}{% + \textormath{\nobreak\discretionary{-}{}{\kern.03em}% + \bbl@allowhyphens}{}} +\declare@shorthand{icelandic}{""}{\hskip\z@skip} +\declare@shorthand{icelandic}{"~}{\textormath{\leavevmode\hbox{-}}{-}} +\declare@shorthand{icelandic}{"=}{\nobreak-\hskip\z@skip} +% \end{macrocode} +% +% +% \subsection{Old Icelandic} +% \label{oldicelandic} +% +% \changes{icelandic-1.1}{1997/04/24}{Added definitions for old +% icelandic.} +% +% In old Icelandic some letters have special diacritical marks, +% described for example in \emph{First Grammatical +% Treatise}~\cite{unknown72:_first_gramm_treat,97:_forst_fs}. We +% provide these in the \texttt{T1} encoding with the `ogonek'. The +% ogonek is placed with the letters `o', and `O', `ó' and `Ó', `e' +% and `E', and `é' and `É'. Shorthands are provided for these as +% well. +% +% The following code by Leszek Holenderski lifted from +% \texttt{polish.dtx} is designed to position the diacritics +% correctly for every font in every size. These macros need a +% few extra dimension variables. +% +% \begin{macrocode} +\newdimen\pl@left +\newdimen\pl@down +\newdimen\pl@right +\newdimen\pl@temp +% \end{macrocode} +% +% \begin{macro}{\sob} +% The macro |\sob| is used to put the `ogonek' in the right +% place. +% +% \begin{macrocode} +\def\sob#1#2#3#4#5{%parameters: letter and fractions hl,ho,vl,vo + \setbox0\hbox{#1}\setbox1\hbox{\k{}}\setbox2\hbox{p}% + \pl@right=#2\wd0 \advance\pl@right by-#3\wd1 + \pl@down=#5\ht1 \advance\pl@down by-#4\ht0 + \pl@left=\pl@right \advance\pl@left by\wd1 + \pl@temp=-\pl@down \advance\pl@temp by\dp2 \dp1=\pl@temp + \leavevmode + \kern\pl@right\lower\pl@down\box1\kern-\pl@left #1} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\oob} +% \begin{macro}{\Oob} +% \begin{macro}{\ooob} +% \begin{macro}{\OOob} +% \begin{macro}{\eob} +% \begin{macro}{\Eob} +% \begin{macro}{\eeob} +% \begin{macro}{\EEob} +% \begin{macrocode} +\DeclareTextCommand{\oob}{T1}{\sob {o}{.85}{0}{.04}{0}} +\DeclareTextCommand{\Oob}{T1}{\sob {O}{.7}{0}{0}{0}} +\DeclareTextCommand{\ooob}{T1}{\sob {ó}{.85}{0}{.04}{0}} +\DeclareTextCommand{\OOob}{T1}{\sob {Ó}{.7}{0}{0}{0}} +\DeclareTextCommand{\eob}{T1}{\sob {e}{1}{0}{.04}{0}} +\DeclareTextCommand{\Eob}{T1}{\sob {E}{1}{0}{.04}{0}} +\DeclareTextCommand{\eeob}{T1}{\sob {é}{1}{0}{.04}{0}} +\DeclareTextCommand{\EEob}{T1}{\sob {É}{1}{0}{.04}{0}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macrocode} +\declare@shorthand{icelandic}{"o}{\oob} +\declare@shorthand{icelandic}{"O}{\Oob} +\declare@shorthand{icelandic}{"ó}{\ooob} +\declare@shorthand{icelandic}{"Ó}{\OOob} +\declare@shorthand{icelandic}{"e}{\eob} +\declare@shorthand{icelandic}{"E}{\Eob} +\declare@shorthand{icelandic}{"é}{\eeob} +\declare@shorthand{icelandic}{"É}{\EEob} +% \end{macrocode} +% +% \subsection{Formatting numbers} +% \label{numbers} +% +% \changes{icelandic-1.1a}{1997/04/26}{Added definitions for +% formatting numbers in Icelandic and some extra utilities.} +% This section is lifted from \texttt{frenchb.dtx} by D. Flipo. +% In English the decimal part starts with a point and thousands +% should be separated by a comma: an approximation of $1000\pi$ +% should be inputed as |$3{,}141.592{,}653$| in math-mode and +% as |3,141.592,653| in text. +% \changes{icelandic-1.1b}{1997/05/05}{Added references to various +% publications used} +% +% In Icelandic the decimal part starts with a comma and thousands +% should be separated by a space~\cite{88:_reglur} or by a +% period~\cite{97:_forst_fs}; we have the space. The above +% approximation of $1000\pi$ should be inputed as +% |$3\;141{,}592\;653$| in math-mode and as something like +% |3~141,592~653| in text. Braces are mandatory around the comma in +% math-mode, the reason is mentioned in the \TeX{}book p.~134: +% the comma is of type |\mathpunct| (thus normally followed by a +% space) while the point is of type |\mathord| (no space added). +% +% Thierry Bouche suggested that a second type of comma, of type +% |\mathord| would be useful in math-mode, and proposed to +% introduce a command (named |\decimalsep| in this package), +% the expansion of which would depend on the current language. +% +% Vincent Jalby suggested a command |\nombre| to conveniently +% typeset numbers: inputting |\nombre{3141,592653}| either in +% text or in math-mode will format this number properly according +% to the current language (Icelandic or non-Icelandic). We use +% |\nombre| to define command |\tala| in Icelandic. +% +% |\tala| accepts an optional argument which happens to be +% useful with the extension `dcolumn', it specifies the decimal +% separator used in the \emph{source code}: +% |\newcolumntype{d}{D{,}{\decimalsep}{-1}}| \\ +% |\begin{tabular}{|d|}\hline | \\ +% | 3,14 \\ | \\ +% | \tala[,]{123,4567} \\ | \\ +% | \tala[,]{9876,543}\\\hline| \\ +% |\end{tabular} | \\ +% will print a column of numbers aligned on the decimal point +% (comma or point depending on the current language), each slice +% of 3 digits being separated by a space or a comma according to +% the current language. +% +% \begin{macro}{\decimalsep} +% \begin{macro}{\thousandsep} +% We need a internal definition, valid in both text and math-mode, +% for the comma (|\@comma@|) and another one for the unbreakable +% fixed length space (no glue) used in Icelandic (|\f@thousandsep|). +% +% The commands |\decimalsep| and |\thousandsep| get default +% definitions (for the English language) when |icelandic| is loaded; +% these definitions will be updated when the current language is +% switched to or from Icelandic. +% \begin{macrocode} +\mathchardef\m@comma="013B \def\@comma@{\ifmmode\m@comma\else,\fi} +\def\f@thousandsep{\ifmmode\mskip5.5mu\else\penalty\@M\kern.3em\fi} +\newcommand{\decimalsep}{.} \newcommand{\thousandsep}{\@comma@} +\expandafter\addto\csname extras\CurrentOption\endcsname{% + \def\decimalsep{\@comma@}% + \def\thousandsep{\f@thousandsep}} +\expandafter\addto\csname noextras\CurrentOption\endcsname{% + \def\decimalsep{.}% + \def\thousandsep{\@comma@}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\tala} +% The decimal separator used when \emph{inputing} a number +% with |\tala| \emph{has to be a comma}. +% |\tala| splits the inputed number into two parts: what +% comes before the first comma will be formatted by +% \cs{@integerpart} while the rest (if not empty) will be +% formatted by \cs{@decimalpart}. Both parts, once formatted +% separately will be merged together with between them, either +% the decimal separator \cs{decimalsep} or (in \LaTeXe{} +% \emph{only}) the optional argument of |\tala|. +% +% \begin{macrocode} +\if@Two@E + \newcommand{\tala}[2][\decimalsep]{% + \def\@decimalsep{#1}\@tala#2\@empty,\@empty,\@nil} +\else + \newcommand{\tala}[1]{% + \def\@decimalsep{\decimalsep}\@tala#1\@empty,\@empty,\@nil} +\fi +\def\@tala#1,#2,#3\@nil{% + \ifx\@empty#2% + \@integerpart{#1}% + \else + \@integerpart{#1}\@decimalsep\@decimalpart{#2}% + \fi} +% \end{macrocode} +% The easiest bit is the decimal part: +% We attempt to read the first four digits of the decimal part, if +% it has less than 4 digits, we just have to print them, otherwise +% |\thousandsep| has to be appended after the third digit, and the +% algorithm is applied recursively to the rest of the decimal part. +% \begin{macrocode} +\def\@decimalpart#1{\@@decimalpart#1\@empty\@empty\@empty} +\def\@@decimalpart#1#2#3#4{#1#2#3% + \ifx\@empty#4% + \else + \thousandsep\expandafter\@@decimalpart\expandafter#4% + \fi} +% \end{macrocode} +% Formatting the integer part is more difficult because the slices +% of 3 digits start from the \emph{bottom} while the number is +% read from the top! +% This (tricky) code is borrowed from David Carlisle's comma.sty. +% \begin{macrocode} +\def\@integerpart#1{\@@integerpart{}#1\@empty\@empty\@empty} +\def\@@integerpart#1#2#3#4{% + \ifx\@empty#2% + \@addthousandsep#1\relax + \else + \ifx\@empty#3% + \@addthousandsep\@empty\@empty#1#2\relax + \else + \ifx\@empty#4% + \@addthousandsep\@empty#1#2#3\relax + \else + \@@integerpartafterfi{#1#2#3#4}% + \fi + \fi + \fi} +\def\@@integerpartafterfi#1\fi\fi\fi{\fi\fi\fi\@@integerpart{#1}} +\def\@addthousandsep#1#2#3#4{#1#2#3% + \if#4\relax + \else + \thousandsep\expandafter\@addthousandsep\expandafter#4% + \fi} +% \end{macrocode} +% \end{macro} +% +% \subsection{Extra utilities} +% +% We now provide the Icelandic user with some extra utilities. +% +% \begin{macro}{\upp} +% |\upp| is for typesetting superscripts. |\upp| relies on +% \begin{macro}{\upp@size} +% The internal macro |\upp@size| holds the size at which the +% superscript will be typeset. The reason for this is that we have +% to specify it differently for different formats. +% \begin{macrocode} +\ifx\sevenrm\@undefined + \ifx\@ptsize\@undefined + \let\upp@size\small + \else + \ifx\selectfont\@undefined +% \end{macrocode} +% In this case the format is the original \LaTeX-2.09: +% \begin{macrocode} + \ifcase\@ptsize + \let\upp@size\ixpt\or + \let\upp@size\xpt\or + \let\upp@size\xipt + \fi +% \end{macrocode} +% When |\selectfont| is defined we probably have NFSS available: +% \begin{macrocode} + \else + \ifcase\@ptsize + \def\upp@size{\fontsize\@ixpt{10pt}\selectfont}\or + \def\upp@size{\fontsize\@xpt{11pt}\selectfont}\or + \def\upp@size{\fontsize\@xipt{12pt}\selectfont} + \fi + \fi + \fi +\else +% \end{macrocode} +% If we end up here it must be a plain based \TeX{} format, so: +% \begin{macrocode} + \let\upp@size\sevenrm +\fi +% \end{macrocode} +% \end{macro} +% Now we can define |\upp|. When \LaTeXe{} runs in +% compatibility mode (\LaTeX-2.09 emulation), |\textsuperscript| is +% also defined, but does no good job, so we give two different +% definitions for |\upp| using |\if@Two@E|. +% \begin{macrocode} +\if@Two@E + \DeclareRobustCommand*{\upp}[1]{\textsuperscript{#1}} +\else + \DeclareRobustCommand*{\upp}[1]{% + \leavevmode\raise1ex\hbox{\upp@size#1}} +\fi +% \end{macrocode} +% +% \end{macro} +% +% Some definitions for special characters. +% |\grada| needs a special treatment: it is |\char6| +% in T1-encoding and |\char23| in OT1-encoding. +% \begin{macrocode} +\ifx\fmtname\LaTeXeFmtName + \DeclareTextSymbol{\grada}{T1}{6} + \DeclareTextSymbol{\grada}{OT1}{23} +\else + \def\T@one{T1} + \ifx\f@encoding\T@one + \newcommand{\grada}{\char6} + \else + \newcommand{\grada}{\char23} + \fi +\fi +% \end{macrocode} +% +% \begin{macro}{\gradur} +% Macro for typesetting the abbreviation for `degrees' (as in +% `degrees Celsius'). As the bounding box of the character `degree' +% has \emph{very} different widths in CMR/DC and PostScript fonts, +% we fix the width of the bounding box of |\gradur| to 0.3\,em, +% this lets the symbol `degree' stick to the preceding +% (e.g., |45\gradur|) or following character (e.g., |20~\gradur C|). +% \begin{macrocode} +\DeclareRobustCommand*{\gradur}{% + \leavevmode\hbox to 0.3em{\hss\grada\hss}} +% \end{macrocode} +% \end{macro} +% +% The macro |\ldf@finish| takes care of looking for a +% configuration file, setting the main language to be switched on +% at |\begin{document}| and resetting the category code of +% \texttt{@} to its original value. +% \begin{macrocode} +\ldf@finish\CurrentOption +% +% \end{macrocode} +% +% \Finale +%% +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +%% +\endinput diff --git a/Master/texmf-dist/source/generic/babel/icelandic.ins b/Master/texmf-dist/source/generic/babel/icelandic.ins new file mode 100644 index 00000000000..21ba5daade9 --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/icelandic.ins @@ -0,0 +1,148 @@ +%% +%% This file will generate fast loadable files and documentation +%% driver files from the doc files in this package when run through +%% LaTeX or TeX. +%% +%% Copyright 1989-2005 Johannes L. Braams and any individual authors +%% listed elsewhere in this file. All rights reserved. +%% +%% This file is part of the Babel system. +%% -------------------------------------- +%% +%% It 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 +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% The Current Maintainer of this work is Johannes Braams. +%% +%% The list of all files belonging to the LaTeX base distribution is +%% given in the file `manifest.bbl. See also `legal.bbl' 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. +%% +%% --------------- start of docstrip commands ------------------ +%% +\def\filedate{2000/09/26} +\def\batchfile{icelandic.ins} +\input docstrip.tex + +{\ifx\generate\undefined +\Msg{**********************************************} +\Msg{*} +\Msg{* This installation requires docstrip} +\Msg{* version 2.3c or later.} +\Msg{*} +\Msg{* An older version of docstrip has been input} +\Msg{*} +\Msg{**********************************************} +\errhelp{Move or rename old docstrip.tex.} +\errmessage{Old docstrip in input path} +\batchmode +\csname @@end\endcsname +\fi} + +\declarepreamble\mainpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl 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. +\endpreamble + +\declarepreamble\fdpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl for additional +information. + +In particular, permission is granted to customize the declarations in +this file to serve the needs of your installation. + +However, NO PERMISSION is granted to distribute a modified version +of this file under its original name. + +\endpreamble + +\keepsilent + +\usedir{tex/generic/babel} + +\usepreamble\mainpreamble +\generate{\file{icelandic.ldf}{\from{icelandic.dtx}{code}} + } +\usepreamble\fdpreamble + +\ifToplevel{ +\Msg{***********************************************************} +\Msg{*} +\Msg{* To finish the installation you have to move the following} +\Msg{* files into a directory searched by TeX:} +\Msg{*} +\Msg{* \space\space All *.def, *.fd, *.ldf, *.sty} +\Msg{*} +\Msg{* To produce the documentation run the files ending with} +\Msg{* '.dtx' and `.fdd' through LaTeX.} +\Msg{*} +\Msg{* Happy TeXing} +\Msg{***********************************************************} +} + +\endinput diff --git a/Master/texmf-dist/source/generic/babel/interlingua.dtx b/Master/texmf-dist/source/generic/babel/interlingua.dtx new file mode 100644 index 00000000000..56b109fdca7 --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/interlingua.dtx @@ -0,0 +1,207 @@ +% \iffalse meta-comment +% +% Copyright 1989-2005 Johannes L. Braams and any individual authors +% listed elsewhere in this file. All rights reserved. +% +% This file is part of the Babel system. +% -------------------------------------- +% +% It 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 +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2003/12/01 or later. +% +% This work has the LPPL maintenance status "maintained". +% +% The Current Maintainer of this work is Johannes Braams. +% +% The list of all files belonging to the Babel system is +% given in the file `manifest.bbl. See also `legal.bbl' 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 +% \CheckSum{85} +% +% \iffalse +% Tell the \LaTeX\ system who we are and write an entry on the +% transcript. +%<*dtx> +\ProvidesFile{interlingua.dtx} +% +%\ProvidesLanguage{interlingua} +%\fi +%\ProvidesFile{interlingua.dtx} + [2005/03/30 v1.6 Interlingua support from the babel system] +%\iffalse +%% Babel package for LaTeX version 2e +%% Copyright (C) 1989 -- 2005 +%% by Johannes Braams, TeXniek +% +%% Please report errors to: J.L. Braams +%% babel at braams.cistron.nl +% +% This file is part of the babel system, it provides the source code for +% the Interlingua language definition file. +%<*filedriver> +\documentclass{ltxdoc} +\newcommand*{\TeXhax}{\TeX hax} +\newcommand*{\babel}{\textsf{babel}} +\newcommand*{\langvar}{$\langle \mathit lang \rangle$} +\newcommand*{\note}[1]{} +\newcommand*{\Lopt}[1]{\textsf{#1}} +\newcommand*{\file}[1]{\texttt{#1}} +\usepackage{url} +\begin{document} + \DocInput{interlingua.dtx} +\end{document} +% +%\fi +% \GetFileInfo{interlingua.dtx} +% +% \section{The Interlingua language} +% +% The file \file{\filename}\footnote{The file described in this +% section has version number \fileversion\ and was last revised on +% \filedate.} defines all the language definition macros for the +% Interlingua language. This file was contributed by Peter +% Kleiweg, kleiweg at let.rug.nl. +% +% Interlingua is an auxiliary language, built from the common +% vocabulary of Spanish/Portuguese, English, Italian and French, +% with some normalisation of spelling. The grammar is very easy, +% more similar to English's than to neolatin languages. The site +% \url{http://www.interlingua.com} is mostly written in interlingua +% (as is \url{http://interlingua.altervista.org}), in case you want +% to read some sample of it. +% +% You can have a look at the grammar at +% \url{http://www.geocities.com/linguablau} +% +% \StopEventually{} +% +% The macro |\LdfInit| takes care of preventing that this file is +% loaded more than once, checking the category code of the +% \texttt{@} sign, etc. +% \begin{macrocode} +%<*code> +\LdfInit{interlingua}{captionsinterlingua} +% \end{macrocode} +% +% When this file is read as an option, i.e. by the |\usepackage| +% command, \texttt{interlingua} could be an `unknown' language in +% which case we have to make it known. So we check for the +% existence of |\l@interlingua| to see whether we have to do +% something here. +% +% \begin{macrocode} +\ifx\undefined\l@interlingua + \@nopatterns{Interlingua} + \adddialect\l@interlingua0\fi +% \end{macrocode} + +% The next step consists of defining commands to switch to (and +% from) the Interlingua language. +% +% +% \begin{macro}{\interlinguahyphenmins} +% This macro is used to store the correct values of the hyphenation +% parameters |\lefthyphenmin| and |\righthyphenmin|. +% \begin{macrocode} +\providehyphenmins{interlingua}{\tw@\tw@} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\captionsinterlingua} +% The macro |\captionsinterlingua| defines all strings used in the +% four standard documentclasses provided with \LaTeX. +% \begin{macrocode} +\def\captionsinterlingua{% + \def\prefacename{Prefacio}% + \def\refname{Referentias}% + \def\abstractname{Summario}% + \def\bibname{Bibliographia}% + \def\chaptername{Capitulo}% + \def\appendixname{Appendice}% + \def\contentsname{Contento}% + \def\listfigurename{Lista de figuras}% + \def\listtablename{Lista de tabellas}% + \def\indexname{Indice}% + \def\figurename{Figura}% + \def\tablename{Tabella}% + \def\partname{Parte}% + \def\enclname{Incluso}% + \def\ccname{Copia}% + \def\headtoname{A}% + \def\pagename{Pagina}% + \def\seename{vide}% + \def\alsoname{vide etiam}% + \def\proofname{Prova}% + \def\glossaryname{Glossario}% + } +% \end{macrocode} +% \end{macro} + + +% \begin{macro}{\dateinterlingua} +% The macro |\dateinterlingua| redefines the command |\today| to +% produce Interlingua dates. +% \begin{macrocode} +\def\dateinterlingua{% + \def\today{le~\number\day\space de \ifcase\month\or + januario\or februario\or martio\or april\or maio\or junio\or + julio\or augusto\or septembre\or octobre\or novembre\or + decembre\fi + \space \number\year}} +% \end{macrocode} +% \end{macro} +% + +% \begin{macro}{\extrasinterlingua} +% \begin{macro}{\noextrasinterlingua} +% The macro |\extrasinterlingua| will perform all the extra +% definitions needed for the Interlingua language. The macro +% |\noextrasinterlingua| is used to cancel the actions of +% |\extrasinterlingua|. For the moment these macros are empty but +% they are defined for compatibility with the other +% language definition files. +% +% \begin{macrocode} +\addto\extrasinterlingua{} +\addto\noextrasinterlingua{} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% The macro |\ldf@finish| takes care of looking for a +% configuration file, setting the main language to be switched on +% at |\begin{document}| and resetting the category code of +% \texttt{@} to its original value. +% \begin{macrocode} +\ldf@finish{interlingua} +% +% \end{macrocode} +% +% \Finale +%\endinput +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +%% diff --git a/Master/texmf-dist/source/generic/babel/interlingua.ins b/Master/texmf-dist/source/generic/babel/interlingua.ins new file mode 100644 index 00000000000..679af1e10c4 --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/interlingua.ins @@ -0,0 +1,148 @@ +%% +%% This file will generate fast loadable files and documentation +%% driver files from the doc files in this package when run through +%% LaTeX or TeX. +%% +%% Copyright 1989-2005 Johannes L. Braams and any individual authors +%% listed elsewhere in this file. All rights reserved. +%% +%% This file is part of the Babel system. +%% -------------------------------------- +%% +%% It 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 +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% The Current Maintainer of this work is Johannes Braams. +%% +%% The list of all files belonging to the LaTeX base distribution is +%% given in the file `manifest.bbl. See also `legal.bbl' 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. +%% +%% --------------- start of docstrip commands ------------------ +%% +\def\filedate{2003/11/13} +\def\batchfile{interlingua.ins} +\input docstrip.tex + +{\ifx\generate\undefined +\Msg{**********************************************} +\Msg{*} +\Msg{* This installation requires docstrip} +\Msg{* version 2.3c or later.} +\Msg{*} +\Msg{* An older version of docstrip has been input} +\Msg{*} +\Msg{**********************************************} +\errhelp{Move or rename old docstrip.tex.} +\errmessage{Old docstrip in input path} +\batchmode +\csname @@end\endcsname +\fi} + +\declarepreamble\mainpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl 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. +\endpreamble + +\declarepreamble\fdpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl for additional +information. + +In particular, permission is granted to customize the declarations in +this file to serve the needs of your installation. + +However, NO PERMISSION is granted to distribute a modified version +of this file under its original name. + +\endpreamble + +\keepsilent + +\usedir{tex/generic/babel} + +\usepreamble\mainpreamble +\generate{\file{interlingua.ldf}{\from{interlingua.dtx}{code}} + } +\usepreamble\fdpreamble + +\ifToplevel{ +\Msg{***********************************************************} +\Msg{*} +\Msg{* To finish the installation you have to move the following} +\Msg{* files into a directory searched by TeX:} +\Msg{*} +\Msg{* \space\space All *.def, *.fd, *.ldf, *.sty} +\Msg{*} +\Msg{* To produce the documentation run the files ending with} +\Msg{* '.dtx' and `.fdd' through LaTeX.} +\Msg{*} +\Msg{* Happy TeXing} +\Msg{***********************************************************} +} + +\endinput diff --git a/Master/texmf-dist/source/generic/babel/irish.dtx b/Master/texmf-dist/source/generic/babel/irish.dtx new file mode 100644 index 00000000000..221c08f91a5 --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/irish.dtx @@ -0,0 +1,218 @@ +% \iffalse meta-comment +% +% Copyright 1989-2005 Johannes L. Braams and any individual authors +% listed elsewhere in this file. All rights reserved. +% +% This file is part of the Babel system. +% -------------------------------------- +% +% It 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 +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2003/12/01 or later. +% +% This work has the LPPL maintenance status "maintained". +% +% The Current Maintainer of this work is Johannes Braams. +% +% The list of all files belonging to the Babel system is +% given in the file `manifest.bbl. See also `legal.bbl' 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 +% \CheckSum{122} +% \iffalse +% Tell the \LaTeX\ system who we are and write an entry on the +% transcript. +%<*dtx> +\ProvidesFile{irish.dtx} +% +%\ProvidesLanguage{irish} +%\fi +%\ProvidesFile{irish.dtx} + [2005/03/30 v1.0h Irish support from the babel system] +%\iffalse +%% File `irish.dtx' +%% Babel package for LaTeX version 2e +%% Copyright (C) 1989 -- 2005 +%% by Johannes Braams, TeXniek +% +%% Please report errors to: J.L. Braams +%% babel at braams.cistron.nl +% +% This file is part of the babel system, it provides the source +% code for the Irish language definition file. +% +% The Gaeilge or Irish Gaelic terms were tranlated from those +% provided by Fraser Grant \texttt{FRASER@CERNVM} by Marion Gunn. +%<*filedriver> +\documentclass{ltxdoc} +\newcommand*{\TeXhax}{\TeX hax} +\newcommand*{\babel}{\textsf{babel}} +\newcommand*{\langvar}{$\langle \mathit lang \rangle$} +\newcommand*{\note}[1]{} +\newcommand*{\Lopt}[1]{\textsf{#1}} +\newcommand*{\file}[1]{\texttt{#1}} +\begin{document} + \DocInput{irish.dtx} +\end{document} +% +%\fi +% \GetFileInfo{irish.dtx} +% +% \changes{irish-1.0b}{1995/06/14}{Corrected typo (PR1652)} +% \changes{irish-1.0e}{1996/10/10}{Replaced \cs{undefined} with +% \cs{@undefined} and \cs{empty} with \cs{@empty} for consistency +% with \LaTeX, moved the definition of \cs{atcatcode} right to the +% beginning.} +% +% \section{The Irish language} +% +% The file \file{\filename}\footnote{The file described in this +% section has version number \fileversion\ and was last revised on +% \filedate. A contribution was made by Marion Gunn.} defines all +% the language definition macros for the Irish language. +% +% For this language currently no special definitions are needed or +% available. +% +% \StopEventually{} +% +% The macro |\LdfInit| takes care of preventing that this file is +% loaded more than once, checking the category code of the +% \texttt{@} sign, etc. +% \changes{irish-1.0e}{1996/11/03}{Now use \cs{LdfInit} to perform +% initial checks} +% \begin{macrocode} +%<*code> +\LdfInit{irish}\captionsirish +% \end{macrocode} +% +% When this file is read as an option, i.e. by the |\usepackage| +% command, \texttt{irish} could be an `unknown' language in which +% case we have to make it known. So we check for the existence of +% |\l@irish| to see whether we have to do something here. +% +% \begin{macrocode} +\ifx\l@irish\@undefined + \@nopatterns{irish} + \adddialect\l@irish0\fi +% \end{macrocode} +% +% The next step consists of defining commands to switch to (and +% from) the Irish language. +% +% \begin{macro}{\irishhyphenmins} +% This macro is used to store the correct values of the hyphenation +% parameters |\lefthyphenmin| and |\righthyphenmin|. +% \changes{irish-1.0f}{1998/06/08}{Added definition of +% \cs{hyphenmins}} +% \changes{irish-1.0h}{2000/09/22}{Now use \cs{providehyphenmins} to +% provide a default value} +% \begin{macrocode} +\providehyphenmins{\CurrentOption}{\tw@\thr@@} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\captionsirish} +% The macro |\captionsirish| defines all strings used in the +% four standard documentclasses provided with \LaTeX. +% \changes{irish-1.0c}{1995/07/04}{Added \cs{proofname} for +% AMS-\LaTeX} +% \changes{irish-1.0f}{1998/06/08}{Added missing translations provided +% in PR 2719} +% \changes{irish-1.0h}{2000/09/20}{Added \cs{glossaryname}} +% \begin{macrocode} +\addto\captionsirish{% + \def\prefacename{R\'eamhr\'a}% <-- also "Brollach" + \def\refname{Tagairt\'{\i}}% + \def\abstractname{Achoimre}% + \def\bibname{Leabharliosta}% + \def\chaptername{Caibidil}% + \def\appendixname{Aguis\'{\i}n}% + \def\contentsname{Cl\'ar \'Abhair}% + \def\listfigurename{L\'ear\'aid\'{\i}}% + \def\listtablename{T\'abla\'{\i}}% + \def\indexname{Inn\'eacs}% + \def\figurename{L\'ear\'aid}% + \def\tablename{T\'abla}% + \def\partname{Cuid}% + \def\enclname{faoi iamh}% + \def\ccname{cc}% abrv. `c\'oip chuig' + \def\headtoname{Go}% + \def\pagename{Leathanach}% + \def\seename{f\'each}% + \def\alsoname{f\'each freisin}% + \def\proofname{Cruth\'unas}% + \def\glossaryname{Glossary}% <-- Needs translation + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\dateirish} +% The macro |\dateirish| redefines the command |\today| to produce +% Irish dates. +% \changes{irish-1.0f}{1997/10/01}{Use \cs{edef} to define +% \cs{today} to save memory} +% \changes{irish-1.0f}{1998/03/28}{use \cs{def} instead of \cs{edef}} +% \begin{macrocode} +\def\dateirish{% + \def\today{% + \number\day\space \ifcase\month\or + Ean\'air\or Feabhra\or M\'arta\or Aibre\'an\or + Bealtaine\or Meitheamh\or I\'uil\or L\'unasa\or + Me\'an F\'omhair\or Deireadh F\'omhair\or + M\'{\i} na Samhna\or M\'{\i} na Nollag\fi + \space \number\year}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\extrasirish} +% \begin{macro}{\noextrasirish} +% The macro |\extrasirish| will perform all the extra definitions +% needed for the Irish language. The macro |\noextrasirish| is used +% to cancel the actions of |\extrasirish|. For the moment these +% macros are empty but they are defined for compatibility with the +% other language definition files. +% +% \begin{macrocode} +\addto\extrasirish{} +\addto\noextrasirish{} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% The macro |\ldf@finish| takes care of looking for a +% configuration file, setting the main language to be switched on +% at |\begin{document}| and resetting the category code of +% \texttt{@} to its original value. +% \changes{irish-1.0e}{1996/11/03}{Now use \cs{ldf@finish} to wrap up} +% \begin{macrocode} +\ldf@finish{irish} +% +% \end{macrocode} +% +% \Finale +%\endinput +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +%% diff --git a/Master/texmf-dist/source/generic/babel/irish.ins b/Master/texmf-dist/source/generic/babel/irish.ins new file mode 100644 index 00000000000..33a3172ee2b --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/irish.ins @@ -0,0 +1,148 @@ +%% +%% This file will generate fast loadable files and documentation +%% driver files from the doc files in this package when run through +%% LaTeX or TeX. +%% +%% Copyright 1989-2005 Johannes L. Braams and any individual authors +%% listed elsewhere in this file. All rights reserved. +%% +%% This file is part of the Babel system. +%% -------------------------------------- +%% +%% It 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 +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% The Current Maintainer of this work is Johannes Braams. +%% +%% The list of all files belonging to the LaTeX base distribution is +%% given in the file `manifest.bbl. See also `legal.bbl' 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. +%% +%% --------------- start of docstrip commands ------------------ +%% +\def\filedate{1999/04/11} +\def\batchfile{irish.ins} +\input docstrip.tex + +{\ifx\generate\undefined +\Msg{**********************************************} +\Msg{*} +\Msg{* This installation requires docstrip} +\Msg{* version 2.3c or later.} +\Msg{*} +\Msg{* An older version of docstrip has been input} +\Msg{*} +\Msg{**********************************************} +\errhelp{Move or rename old docstrip.tex.} +\errmessage{Old docstrip in input path} +\batchmode +\csname @@end\endcsname +\fi} + +\declarepreamble\mainpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl 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. +\endpreamble + +\declarepreamble\fdpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl for additional +information. + +In particular, permission is granted to customize the declarations in +this file to serve the needs of your installation. + +However, NO PERMISSION is granted to distribute a modified version +of this file under its original name. + +\endpreamble + +\keepsilent + +\usedir{tex/generic/babel} + +\usepreamble\mainpreamble +\generate{\file{irish.ldf}{\from{irish.dtx}{code}} + } +\usepreamble\fdpreamble + +\ifToplevel{ +\Msg{***********************************************************} +\Msg{*} +\Msg{* To finish the installation you have to move the following} +\Msg{* files into a directory searched by TeX:} +\Msg{*} +\Msg{* \space\space All *.def, *.fd, *.ldf, *.sty} +\Msg{*} +\Msg{* To produce the documentation run the files ending with} +\Msg{* '.dtx' and `.fdd' through LaTeX.} +\Msg{*} +\Msg{* Happy TeXing} +\Msg{***********************************************************} +} + +\endinput diff --git a/Master/texmf-dist/source/generic/babel/italian.dtx b/Master/texmf-dist/source/generic/babel/italian.dtx new file mode 100644 index 00000000000..ea9899f79f2 --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/italian.dtx @@ -0,0 +1,857 @@ +% \iffalse meta-comment +% +% Copyright 1989-2005 Johannes L. Braams and any individual authors +% listed elsewhere in this file. All rights reserved. +% +% This file is part of the Babel system. +% -------------------------------------- +% +% It 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 +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2003/12/01 or later. +% +% This work has the LPPL maintenance status "maintained". +% +% The Current Maintainer of this work is Johannes Braams. +% +% The list of all files belonging to the Babel system is +% given in the file `manifest.bbl. See also `legal.bbl' 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 +% \CheckSum{419} +% \iffalse +% Tell the \LaTeX\ system who we are and write an entry on the +% transcript. +%<*dtx> +\ProvidesFile{italian.dtx} +% +%\ProvidesLanguage{italian} +%\fi +%\ProvidesFile{italian.dtx} + [2005/02/05 v1.2q Italian support from the babel system] +%\iffalse +%% File `italian.dtx' +%% Babel package for LaTeX version 2e +%% Copyright (C) 1989 - 2005 +%% by Johannes Braams, TeXniek +% +%% Please report errors to: J.L. Braams babel at braams.cistron.nl +%% Claudio Beccari beccari at polito.it +% +% This file is part of the babel system, it provides the source +% code for the Italian language definition file. +% The original version of this file was written by Maurizio +% Codogno, (mau@beatles.cselt.stet.it). Several features were added +% by Claudio Beccari, (beccari@polito.it). +%<*filedriver> +\documentclass{ltxdoc} +\newcommand*\TeXhax{\TeX hax} +\newcommand*\babel{\textsf{babel}} +\newcommand*\langvar{$\langle \it lang \rangle$} +\newcommand*\note[1]{} +\newcommand*\Lopt[1]{\textsf{#1}} +\newcommand*\file[1]{\texttt{#1}} +\begin{document} + \DocInput{italian.dtx} +\end{document} +% +%\fi +% \GetFileInfo{italian.dtx} +% +% \changes{italian-0.99}{1990/07/11}{First version, from english.doc} +% \changes{italian-1.0}{1991/04/23}{Modified for babel 3.0} +% \changes{italian-1.0a}{1991/05/23}{removed typo} +% \changes{italian-1.0b}{1991/05/29}{Removed bug found by van der Meer} +% \changes{italian-1.0e}{1991/07/15}{Renamed \file{babel.sty} in +% \file{babel.com}} +% \changes{italian-1.1}{1992/02/16}{Brought up-to-date with babel 3.2a} +% \changes{italian-1.2}{1994/02/09}{Update for\ LaTeXe} +% \changes{italian-1.2e}{1994/06/26}{Removed the use of \cs{filedate} +% and moved identification after the loading of \file{babel.def}} +% \changes{italian-1.2f}{1995/05/28}{Updated for babel 3.5} +% \changes{italian-1.2i}{1996/10/10}{Replaced \cs{undefined} with +% \cs{@undefined} and \cs{empty} with \cs{@empty} for consistency +% with \LaTeX, moved the definition of \cs{atcatcode} right to the +% beginning.} +% \changes{italian-1.2l}{1999/04/24}{Added \cs{unit}, \cs{ap}, and +% \cs{ped} macros} +% \changes{italian-1.2m}{2000/01/05}{Added support for etymological +% hyphenation} +% \changes{italian-1.2n}{2000/02/02}{Completely modified etymological +% hyphenation facility} +% \changes{italian-1.2n}{2000/05/28}{Added several commands for the +% caporali double quotes and for simplifying the accented vowel input} +% \changes{italian-1.2o}{2000/12/12}{Added \cs{glossaryname}} +% \changes{italian-1.2p}{2002/07/10}{Removed redefinition of +% \cs{add@acc} since its functionality has been introduced into the +% kernel of LaTeX 2001/06/01} +% \changes{italian-1.2q}{2005/02/05}{Added test for avoiding conflict +% with package units.sty; adjusted caporali functionality, since +% the previous one did not work with the standard (although obsolete) +% slides class file} +% \section{The Italian language} +% +% The file \file{\filename}\footnote{The file described in this +% section has version number \fileversion\ and was last revised on +% \filedate. The original author is Maurizio Codogno, +% (\texttt{mau@beatles.cselt.stet.it}). It has been largely revised +% by Johannes Braams and Claudio Beccari} defines all the +% language-specific macros for the Italian language. +% +% The features of this language definition file are the following: +% \begin{enumerate} +% \item The Italian hyphenation is invoked, provided that file +% \texttt{ithyph.tex} was loaded when the \LaTeXe\ format was +% built; in case it was not, read the information coming with your +% distribution of the \TeX\ software, and the \babel\ +% documentation. +% \item The language dependent fixed words to be inserted by such +% commands as |\chapter|, |\caption|, |\tableofcontents|, +% etc. are redefined in accordance with the Italian +% typographical practice. +% \item Since Italian can be easily hyphenated and Italian practice +% allows to break a word before the last two letters, hyphenation +% parameters have been set accordingly, but a very high demerit +% value has been set in order to avoid word breaks in the +% penultimate line of a paragraph. Specifically the |\clubpenalty|, +% and the |\widowpenalty| are set to rather high values and +% |\finalhyphendemerits| is set to such a high value that +% hyphenation is prohibited between the last two lines of a +% paragraph. +% \item Some language specific shortcuts have been defined so as to +% allow etymological hyphenation, specifically |"| inserts a +% break point in any word boundary that the typesetter chooses, +% provided it is not followed by and accented letter (very unlikely +% in Italian, where compulsory accents fall only on the last and +% ending vowel of a word, but may take place with compound words +% that include foreign roots), and \verb="|= when the desired break +% point falls before an accented letter. +% \item The shortcut |""| introduces the raised (English) opening +% double quotes; this shortcut proves its usefulness when one +% reminds that the Italian keyboard misses the backtick key, and +% the backtick on a Windows based platform may be obtained only by +% pressing the \texttt{Alt} key while inputting the numerical code +% 0096; very, very annoying! +% \item The shortcuts |"<| and |">| insert the French guillemots, +% sometimes used in Italian typography; with the T1 font encoding +% the ligatures |<<| and |>>| should insert such signs directly, +% but not all the virtual fonts that claim to follow the T1 font +% encoding actually contain the guillemots; with the OT1 encoding +% the guillemots are not available and must be faked in some +% way. By using the |"<| and |">| shortcuts (even with the T1 +% encoding) the necessary tests are performed and in case the +% suitable glyphs are taken from other fonts normally available +% with any good, modern \LaTeX\ distribution. +% \item Three new specific commands |\unit|, |\ped|, and |\ap| are +% introduced so as to enable the correct composition of technical +% mathematics according to the ISO~31/XI recommendations. |\unit| +% does not get redefined if the \babel\ package is loaded \emph{after} +% the package \texttt{units.sty} whose homonymous command plays +% a different role and follows a different syntax. +% \end{enumerate} +% +% For this language a limited number of shortcuts has been defined, +% table~\ref{t:itshrtct}, some of which are used to overcome +% certain limitations of the Italian keyboard; in +% section~\ref{s:itkbd} there are other comments and hints in order +% to overcome some other keyboard limitations. +% +% \begin{table}[htb]\centering +% \begin{tabular}{cp{80mm}} +% |"| & inserts a compound word mark where hyphenation is legal; +% it allows etymological hyphenation which is recommended +% for technical terms, chemical names and the like; it +% does not work if the next character is represented with +% a control sequence or is an accented character.\\ +% \texttt{\string"\string|} +% & the same as the above without the limitation on +% characters represented with control sequences or accented +% ones.\\ +% |""| & inserts open quotes ``.\\ %^^A'' emacs matching +% |"<| & inserts open guillemots.\\ +% |">| & inserts closed guillemots.\\ +% |"/| & equivalent to |\slash| +% \end{tabular} +% \caption{Shortcuts for the Italian language}\label{t:itshrtct} +% \end{table} +% +% \StopEventually{% +% \begin{thebibliography}{1} +% \bibitem{CBec} Beccari C., ``Computer Aided Hyphenation for +% Italian and Modern Latin'', \textsf{TUGboat} vol.~13, n.~1, +% pp.~23-33 (1992). +% \bibitem{Becc2} Beccari C., ``Typesetting mathematics for science +% and technology according to ISO\,31/XI'', \textsf{TUGboat} +% vol.~18, n.~1, pp.~39-48 (1997). +% \end{thebibliography}} +% +% The macro |\LdfInit| takes care of preventing that this file is +% loaded more than once, checking the category code of the +% \texttt{@} sign, etc. +% \changes{italian-1.2i}{1996/11/03}{Now use \cs{LdfInit} to perform +% initial checks} +% \changes{italian-1.2j}{1996/12/29}{Added braces around second arg of +% \cs{LdfInit}} +% \begin{macrocode} +%<*code> +\LdfInit{italian}{captionsitalian}% +% \end{macrocode} +% +% When this file is read as an option, i.e. by the |\usepackage| +% command, \texttt{italian} will be an `unknown' language in which +% case we have to make it known. So we check for the existence of +% |\l@italian| to see whether we have to do something here. +% +% \changes{italian-1.0}{1991/04/23}{Now use \cs{adddialect} if +% language undefined} +% \changes{italian-1.0h}{1991/10/08}{Removed use of \cs{@ifundefined}} +% \changes{italian-1.1}{1992/02/16}{Added a warning when no +% hyphenation patterns were loaded.} +% \changes{italian-1.2e}{1994/06/26}{Now use \cs{@nopatterns} to +% produce the warning} +% \begin{macrocode} +\ifx\l@italian\@undefined + \@nopatterns{Italian}% + \adddialect\l@italian0\fi +% \end{macrocode} +% +% The next step consists of defining commands to switch to (and +% from) the Italian language. +% +% \begin{macro}{\captionsitalian} +% The macro |\captionsitalian| defines all strings used +% in the four standard document classes provided with \LaTeX. +% \changes{italian-1.0c}{1991/06/06}{Removed \cs{global} definitions} +% \changes{italian-1.0c}{1991/06/06}{\cs{pagename} should be +% \cs{headpagename}} +% \changes{italian-1.0d}{1991/07/01}{`contiene' substitued by `Allegati' +% as suggested by Marco Bozzo (\texttt{BOZZO@CERNVM}).} +% \changes{italian-1.1}{1992/02/16}{Added \cs{seename}, \cs{alsoname} +% and \cs{prefacename}} +% \changes{italian-1.1}{1993/07/15}{\cs{headpagename} should be +% \cs{pagename}} +% \changes{italian-1.2b}{1994/05/19}{Changed some of the words +% following suggestions from Claudio Beccari} +% \changes{italian-1.2g}{1995/07/04}{Added \cs{proofname} for +% AMS-\LaTeX} +% \changes{italian-1.2h}{1995/07/27}{Added translation of `Proof'} +% \begin{macrocode} +\addto\captionsitalian{% + \def\prefacename{Prefazione}% + \def\refname{Riferimenti bibliografici}% + \def\abstractname{Sommario}% + \def\bibname{Bibliografia}% + \def\chaptername{Capitolo}% + \def\appendixname{Appendice}% + \def\contentsname{Indice}% + \def\listfigurename{Elenco delle figure}% + \def\listtablename{Elenco delle tabelle}% + \def\indexname{Indice analitico}% + \def\figurename{Figura}% + \def\tablename{Tabella}% + \def\partname{Parte}% + \def\enclname{Allegati}% + \def\ccname{e~p.~c.}% + \def\headtoname{Per}% + \def\pagename{Pag.}% % in Italian the abbreviation is preferred + \def\seename{vedi}% + \def\alsoname{vedi anche}% + \def\proofname{Dimostrazione}% + \def\glossaryname{Glossario}% + }% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\dateitalian} +% The macro |\dateitalian| redefines the command +% |\today| to produce Italian dates. +% \changes{italian-1.0c}{1991/06/06}{Removed \cs{global} definitions} +% \begin{macrocode} +\def\dateitalian{% + \def\today{\number\day~\ifcase\month\or + gennaio\or febbraio\or marzo\or aprile\or maggio\or giugno\or + luglio\or agosto\or settembre\or ottobre\or novembre\or + dicembre\fi\space \number\year}}% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\italianhyphenmins} +% \changes{italian-1.2b}{1994/05/19}{Added setting of left and +% righthyphenmin according to Claudio Beccari's suggestion} +% +% The italian hyphenation patterns can be used with both +% |\lefthyphenmin| and |\righthyphenmin| set to~2. +% \changes{italian-1.2m}{2000/09/22}{Now use \cs{providehyphenmins} to +% provide a default value} +% \begin{macrocode} +\providehyphenmins{\CurrentOption}{\tw@\tw@} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\extrasitalian} +% \begin{macro}{\noextrasitalian} +% +% \changes{italian-1.2b}{1994/05/19}{Added setting of club- and +% widowpenalty} +% Lower the chance that clubs or widows occur. +% \begin{macrocode} +\addto\extrasitalian{% + \babel@savevariable\clubpenalty + \babel@savevariable\widowpenalty + \clubpenalty3000\widowpenalty3000}% +% \end{macrocode} +% +% \changes{italian-1.2b}{1994/05/19}{Added setting of +% finalhyphendemerits} +% +% Never ever break a word between the last two lines of a paragraph +% in italian texts. +% \begin{macrocode} +\addto\extrasitalian{% + \babel@savevariable\finalhyphendemerits + \finalhyphendemerits50000000}% +% \end{macrocode} +% +% \changes{italian-1.2h}{1995/11/10}{Now give the apostrophe a +% lowercase code} +% \changes{italian-1.2l}{1999/04/5}{Changed example ``begl'italiani'' +% (obsolete spelling) with another, ``nell'altezza'', that behaves +% the same way} +% In order to enable the hyphenation of words such as +% ``nell'altezza'' we give the \texttt{'} a non-zero lower case +% code. When we do that \TeX\ finds the following hyphenation +% points |nel-l'al-tez-za| instead of none. +% \begin{macrocode} +\addto\extrasitalian{% + \lccode`'=`'}% +\addto\noextrasitalian{% + \lccode`'=0}% +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \changes{italian-1.2m}{2000/01/05}{Support for etymological +% hyphenation} +% +% \subsection{Support for etymological hyphenation} +% +% In his article on Italian hyphenation \cite{CBec} Beccari pointed +% out that the Italian language gets hyphenated on a phonetic +% basis, although etymological hyphenation is allowed; this is in +% contrast with what happens in Latin, for example, where +% etymological hyphenation is always used. Since the patterns for +% both languages would become too complicated in order to cope with +% etymological hyphenation, in his paper Beccari proposed the +% definition of an active character `|_|' such that it could insert +% a ``soft'' discretionary hyphen at the compound word +% boundary. For several reasons that idea and the specific active +% character proved to be unpractical and was abandoned. +% +% This problem is so important with the majority of the European +% languages, that \babel\ from the very beginning developed +% the tradition of making the |"| character active so as to perform +% several actions that turned useful with every language. +% One of these actions consisted in defining the shortcut \verb="|= +% that was extensively used in German and in many other languages +% in order to insert a discretionary hyphen such that hyphenation +% would not be precluded in the rest of the word as it happens with +% the standard \TeX\ command |\-|. +% +% Meanwhile the \texttt{ec} fonts with the double Cork encoding +% (thus formerly called the \texttt{dc} fonts) have become more or +% less standard and are widely used by virtually all Europeans that +% write languages with many special national characters; by so +% doing they avoid the use of the |\accent| primitive which would +% be required with the standard \texttt{cm} fonts; with the latter +% fonts the primitive command |\accent| is such that hyphenation +% becomes almost impossible, in any case strongly impeached. +% +% The \texttt{ec} fonts contain a special character, named +% ``compound word mark'', that occupies position 23 in the font +% scheme and may be input with the sequence |^^W|. Up to now, +% apparently, this special character has never been used in a +% practical way for the typesetting of languages rich of compound +% words; also it has never been inserted in the hyphenation pattern +% files of any language. Beccari modified his pattern file +% \file{ithyph.tex v4.8b} for Italian so as to contain five new +% patterns that involve |^^W|, and he tried to give the +% \babel\ active character |"| a new shortcut definition, +% so as to allow the insertion of the ``compound word mark'' in the +% proper place within any word where two semantic fragments join +% up. With such facility for marking the compound word boundaries, +% etymological hyphenation becomes possible even if the patterns +% know nothing about etymology (but the typesetter hopefully +% does!). +% In Italian such etymological hyphenation is desirable with +% technical terms, chemical names, and the like. +% +% Even this solution proved to be inconvenient on certain UN*X +% platforms, so Beccari resorted to another approach that uses the +% \babel\ active character |"| and relies on the category +% code of the character that follows |"|. +% +% \changes{italian-1.2n}{2000/02/02}{Completely new etymological +% hyphenation facility} +% +% \begin{macrocode} +\initiate@active@char{"}% +\addto\extrasitalian{\bbl@activate{"}\languageshorthands{italian}}% +% \end{macrocode} +% \begin{macro}{\it@cwm} +% The active character |"| is now defined for language |italian| so +% as to perform different actions in math mode compared to text +% mode; specifically in math mode a double quote is inserted so as +% to produce a double prime sign, while in text mode the temporary +% macro |\it@next| is defined so as to defer any further action +% until the next token category code has been tested. +% \begin{macrocode} +\declare@shorthand{italian}{"}{% +\ifmmode + \def\it@next{''}% +\else + \def\it@next{\futurelet\it@temp\it@cwm}% +\fi +\it@next +}% +% \end{macrocode} +% \begin{macro}{\it@cwm} +% The \cs{it@next} service control sequence is such that upon its +% execution a temporary variable \cs{it@temp} is made equivalent to +% the next token in the input list without actually removing +% it. Such temporary token is then tested by the macro \cs{it@cwm} +% and if it is found to be a letter token, then it introduces a +% compound word separator control sequence \cs{it@allowhyphens} +% whose expansion introduces a discretionary hyphen and an +% unbreakable space; in case the token is not a letter, then it is +% tested against \verb=|=$_{12}$: if so a compound word separator +% is inserted and the \verb=|= token is removed, otherwise another +% test is performed so as to see if another double quote sign +% follows: in this case a double open quote mark is inserted, +% otherwise two other tests are performed so as to see if +% guillemets have to be inserted, otherwise nothing is done. +% The double quote shortcut for inserting a double open quote sign +% is useful for people who are inputting Italian text by means of +% an Italian keyboard that unfortunately misses the grave or +% backtick key. +% By this shortcut |""| becomes equivalent to |``| for inserting +% raised open high double quotes. +% \begin{macrocode} +\def\it@@cwm{\nobreak\discretionary{-}{}{}\hskip\z@skip}% +\def\it@@ocap#1{\it@ocap}\def\it@@ccap#1{\it@ccap}% +\DeclareRobustCommand*{\it@cwm}{\let\it@@next\relax +\ifcat\noexpand\it@temp a% + \def\it@@next{\it@@cwm}% +\else + \if\noexpand\it@temp \string|% + \def\it@@next{\it@@cwm\@gobble}% + \else + \if\noexpand\it@temp \string<% + \def\it@@next{\it@@ocap}% + \else + \if\noexpand\it@temp \string>% + \def\it@@next{\it@@ccap}% + \else + \if\noexpand\it@temp\string/% + \def\it@next{\slash\@gobble}% + \else + \ifx\it@temp"% + \def\it@@next{``\@gobble}% + \fi + \fi + \fi + \fi + \fi +\fi +\it@@next}% +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% +% \begin{sloppypar} +% By this definition of |"| if one types |macro"istruzione| the +% possible break points become \textsf{ma-cro-istru-zio-ne}, while +% without the |"| mark they would be \textsf{ma-croi-stru-zio-ne}, +% according to the phonetic rules such that the |macro| prefix is +% not taken as a unit. +% A chemical name such as \texttt{des"clor"fenir"amina"cloridrato} +% is breakable as \textsf{des-clor-fe-nir-ami-na-clo-ri-dra-to} +% instead of \textsf{de-sclor-fe-ni-ra-mi-na-...} +% +% In other language description files a shortcut is defined so as +% to allow a break point without actually inserting any hyphen +% sign; examples are given such as \mbox{entrada/salida}; actually +% if one wants to allow a breakpoint after the slash, it is much +% clearer to type |\slash| instead of |/| and \LaTeX\ does +% everything by itself; here the shortcut |"/| was introduced to +% stand for |\slash| so that one can type |input"/output| and allow +% a line break after the slash. +% This shortcut works only for the slash, since in Italian such +% constructs are extremely rare. +% \end{sloppypar} +% +% Attention: the expansion of |"| takes place before the actual +% expansion of OT1 or T1 accented sequences such as |\`{a}|; +% therefore this etymological hyphenation facility works as it +% should only when the semantic word fragments \textit{do not +% start} with an accented letter; this in Italian is always +% avoidable, because compulsory accents fall only on the last +% vowel, but it may be necessary to mark a compound word where one +% or more components come from a foreign language and contain +% diacritical marks according to the spelling rules of that +% language. In this case the special shorthand \verb!"|! may be +% used that performs exactly as |"| normally does, except that the +% \verb!|! sign is removed from the token input list: +% \verb!kilo"|{\"o}rsted! gets hyphenated as +% \texttt{ki-lo-\"or-sted}. +% +% \changes{italian-1.2l}{1999/04/05}{Added useful macros for +% fulfilling ISO 31/XI regulations} +% +% \subsection{Facilities required by the ISO 31/XI regulations} +% The ISO 31/XI regulations require that units of measure are +% typeset in upright font in any circumstance, math or text, and +% that in text mode they are separated from the numerical +% indication of the measure with an unbreakable (thin) space. +% The command |\unit| that was defined for achieving this +% goal happened to conflict with the homonymous command defined by +% the package \texttt{units.sty}; we therefore need to test if that +% package has already been loaded so as to avoid conflicts; we assume +% that if the user loads that package, s/he wants to use that package +% facilities and command syntax. +% +% The same regulations require also that super and subscripts +% (apices and pedices) are in upright font, \emph{not in math +% italics}, when they represent ``adjectives'' or appositions to +% mathematical or physical variables that do not represent +% countable or measurable entities such as, for example, +% $V_{\mathrm{max}}$ or $V_{\mathrm{rms}}$ for a maximum or a root +% mean square voltage, compared to $V_i$ or $V_T$ as the $i$-th +% voltage in a set, or a voltage that depends on the thermodynamic +% temperature $T$. See \cite{Becc2} for a complete description of +% the ISO regulations in connection with typesetting. +% +% More rarely it happens to use superscripts that are not +% mathematical variables, such as the notation +% $\mathbf{A}^{\!\mathrm{T}}$ to denote the transpose of matrix +% $\mathbf{A}$; text superscripts are useful also as ordinals or +% in old fashioned abbreviations in text mode; for example the +% feminine ordinal $1^{\mathrm{a}}$ or the old fashioned obsolete +% abbreviation F$^{\mathrm{lli}}$ for \mbox{Fratelli} in company +% names (compare with ``Bros.'' for \underline{bro}ther\underline{s} +% in American English); text subscripts are mostly used in logos. +% +% \begin{macro}{\unit} +% \begin{macro}{\ap} +% \begin{macro}{\ped} +% First we define the new (internal) commands |\bbl@unit|, |\bbl@ap|, +% and |\bbl@ped| as robust ones. +% \changes{italian-1.2q}{2005/02/05}{Added testing for avoiding conflicts +% with the units.sty package} +% \begin{macrocode} +\@ifpackageloaded{units}{}{% + \DeclareRobustCommand*{\bbl@unit}[1]{% + \textormath{\,\mbox{#1}}{\,\mathrm{#1}}}% + }% +\DeclareRobustCommand*{\bbl@ap}[1]{% + \textormath{\textsuperscript{#1}}{^{\mathrm{#1}}}}% +\DeclareRobustCommand*{\bbl@ped}[1]{% + \textormath{$_{\mbox{\fontsize\sf@size\z@ + \selectfont#1}}$}{_\mathrm{#1}}}% +% \end{macrocode} +% Then we can use |\let| to define the user level commands, but in +% case the macros already have a different meaning before entering +% in Italian mode typesetting, we first memorize their meaning so +% as to restore them on exit. +% \begin{macrocode} +\@ifpackageloaded{units}{}{% + \addto\extrasitalian{% + \babel@save\unit\let\unit\bbl@unit}% + }% +\addto\extrasitalian{% + \babel@save\ap\let\ap\bbl@ap + \babel@save\ped\let\ped\bbl@ped + }% +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \subsection{Accents}\label{s:itkbd} +% Most of the other language description files introduce a number +% of shortcuts for inserting accents and other language specific +% diacritical marks in a more comfortable way compared with the +% lengthy standard \TeX\ conventions. When an Italian keyboard is +% being used on a Windows based platform, it exhibits such +% limitations that up to now no convenient shortcuts have been +% developed; the reason lies in the fact that the Italian keyboard +% lacks the grave accent (also known as ``backtick''), which is +% compulsory on all accented vowels except the `e', but, on the +% opposite, it carries the keys with all the accented lowercase +% vowels; the keyboard lacks also the tie |~| (tilde) key, while +% the curly braces require pressing three keys simultaneously. +% +% The best solution Italians have found so far is to use a smart +% editor that accepts shortcut definitions such that, for example, +% by striking |"(| one gets directly |{| on the screen and the same +% sign is saved into the \file{.tex} file; the same smart editor +% should be capable of translating the accented characters into the +% standard \TeX\ sequences when writing a file to disk (for the +% sake of file portability), and to transform the standard \TeX\ +% sequences into the corresponding signs when loading a \file{.tex} +% file from disk to memory. Such smart editors do exist and can be +% downloaded from the \textsc{ctan} archives. +% +% \changes{italian-1.2p}{2002/07/10}{Removed redefinition of \cs{add@acc} since its +% functionality has been introduced into the kernel of LaTeX 2001/06/01} +% +% For what concerns the missing backtick key, +% which is used also for inputting the open quotes, it must be +% noticed that the shortcut |""| described above completely solves +% the problem for \textit{double} raised open quotes; according to +% the traditions of particular publishing houses, since there are +% no compulsory regulations on the matter, the French guillemets +% may be used; in this case the T1 font encoding solves the problem +% by means of its built in ligatures |<<| and |>>|. But\dots +% +% \subsection{\emph{Caporali} or French double quotes} +% Although the T1 font encoding ligatures solve the problem, there +% are some circumstances where even the T1 font encoding cannot be +% used, either because the author\slash typesetter wants to use the +% OT1 encoding, or because s/he uses a font set that does +% not comply completely with the T1 font encoding; some virtual +% fonts, for example, are supposed to implement the double Cork +% font encoding but actually miss some glyphs; one such virtual +% font set is given by the \texttt{ae} virtual fonts, because they +% are supposed to implement such double font encoding simply using +% the \texttt{cm} fonts, of which the type~1 PostScript version +% exists and is freely available. Since guillemets (in Italian +% \emph{caporali}) do not exist in any \texttt{cm} latin font, +% their glyphs must be substituted with something else that +% approaches them. +% +% \changes{italian-1.2q}{2005/02/05}{Redefined the caporali machinery +% so as to avoid incompatibilities with the slides class, as there +% are no Cyrillic slides fonts as there are for Latins script} +% +% Since in French typesetting guillemets are compulsory, the French +% language definition file resorts to a clever font substitution; +% such file exploits the \LaTeXe\ font selection machinery so as to +% get the guillemets from the Cyrillic fonts, because it suffices +% to locally change the default encoding. There are several sets of +% Cyrillic fonts, but the ones that obey the OT2 font encoding are +% generally distributed with all recent implementations of the +% \TeX\ software; they are part of the American Mathematical +% Society fonts and come both as \textsf{METAFONT} source files and +% Type~1 PostScript \texttt{.pfb} files. The availability of such +% fonts should be guaranteed by the presence of the +% \texttt{OT2cmr.fd} font description file. Actually the presence +% of this file does not guarantee the completeness of your \TeX\ +% implementation; should \LaTeX\ complain about a missing Cyrillic +% \texttt{.tfm} file (that kind of file that contains the font +% metric parameters) and/or about missing Cyrillic \texttt(.mf) +% files, then your \TeX\ system is \emph{incomplete} and you should +% download such fonts from the \textsc{ctan} archives. Temporarily +% you may issue the command |\LtxSymbCaporali| so as to approximate +% the missing glyphs with the \LaTeX\ symbol fonts. In some case +% warning messages are issued so as to inform the typesetter about +% the necessity of resorting to some \emph{poor man} solution. +% +% In spite of these alternate fonts, we must avoid invoking unusual +% fonts if the available encoding allows to use built in caporali. +% As far as I know (CB) the only T1-encoded font families that miss +% the guillemets are the AE ones; we therefore first test if the +% default encoding id the T1 one and in this case if the AE families +% are the default ones; in order for this to work properly it is +% necessary to load these optional packages \emph{before} \babel. +% If the T1 encoding is not the default one when the Italian language +% is specified, then some substitutions must be done. +% +% \begin{macro}{\LtxSymbCaporali} +% \begin{macro}{\it@ocap} +% \begin{macro}{\it@ccap} +% We define some macros for substituting the default guillemets; first the +% emulation by means of the \LaTeX\ symbols; each one of these macro sets +% actually redefines the control sequences |\it@ocap| and |\it@ccap| that +% are the ones effectively activated by the shortcuts |"<| and |">|. +% \begin{macrocode} +\def\LtxSymbCaporali{% + \DeclareRobustCommand*{\it@ocap}{\mbox{% + \fontencoding{U}\fontfamily{lasy}\selectfont(\kern-0.20em(}% + \ignorespaces}% + \DeclareRobustCommand*{\it@ccap}{\ifdim\lastskip>\z@\unskip\fi + \mbox{% + \fontencoding{U}\fontfamily{lasy}\selectfont)\kern-0.20em)}}% +}% +% \end{macrocode} +% Then the substitution with any specific font that contains such +% glyphs; it might be the CBgreek fonts, the Cyrillic one, the super-cm ones, the lm ones, +% or any other the user might prefer (the code is adapted from the one +% that appears in the \texttt{frenchb.ld} file; thanks to Daniel Flipo). +% By default if the user did not select the T1 encoding, the existence of the +% CBgreek fonts is tested; if they exist the guillemets are taken from this +% font, and since its families are a superset of the default CM ones and they apply also +% to typeset slides with the standard class \texttt{slides}. If the +% CBgreek fonts are not found, then the existence of the Cyrillic ones is tested, +% although this choice is not suited for typesetting slides; +% otherwise the poor man solution of the \LaTeX\ special symbols is used. +% In any case the user can force the use of the Cyrillic guillemets substitution +% by issuing the declaration |\CyrillicCaporali| just before the +% |\begin{document}| statement; in alternative the user can specify with +% \begin {flushleft} +% |\CaporaliFrom|\marg{encoding}\marg{family}\marg{opening number}\marg{closing number} +% \end{flushleft} +% the encoding and family of the font s/he prefers, and the slot numbers of the opening +% and closing guillemets respectively. For example if the T1-encoded Latin Modern fonts +% are desired the specific command should be +% \begin {flushleft} +% |\CaporaliFrom{T1}{lmr}{19}{20}| +% \end{flushleft} +% These user choices might be necessary for assuring the correct typesetting +% with fonts that contain the required glyphs and are available also in PostScript form +% so as to use them directly di \texttt{pdflatex}, for example. +% \begin{macrocode} +\def\CaporaliFrom#1#2#3#4{% + \DeclareFontEncoding{#1}{}{}% + \DeclareTextCommand{\it@ocap}{T1}{% + {\fontencoding{#1}\fontfamily{#2}\selectfont\char#3\ignorespaces}}% + \DeclareTextCommand{\it@ccap}{T1}{\ifdim\lastskip>\z@\unskip\fi% + {\fontencoding{#1}\fontfamily{#2}\selectfont\char#4}}% + \DeclareTextCommand{\it@ocap}{OT1}{% + {\fontencoding{#1}\fontfamily{#2}\selectfont\char#3\ignorespaces}}% + \DeclareTextCommand{\it@ccap}{OT1}{\ifdim\lastskip>\z@\unskip\fi% + {\fontencoding{#1}\fontfamily{#2}\selectfont\char#4}}} +% \end{macrocode} +% Then we set a boolean variable and test the default family; +% if such family has a name that starts with the letters ``ae'' +% then we have no built in guillemets; of course if the AE font family is chosen +% after the \babel\ package is loaded, the test does not perform as required. +% \begin{macrocode} +\def\get@ae#1#2#3!{\def\bbl@ae{#1#2}}% +\def\@ifT@one@noCap{\expandafter\get@ae\f@family!% +\def\bbl@temp{ae}\ifx\bbl@ae\bbl@temp\expandafter\@firstoftwo\else + \expandafter\@secondoftwo\fi}% +% \end{macrocode} +% We set another couple of boolean variables for testing the existence of the +% CBgreek or the Cyrillic fonts +% \begin{macrocode} +\newif\if@CBgreekEncKnown +\IfFileExists{lgrcmr.fd}% + {\@CBgreekEncKnowntrue}{\@CBgreekEncKnownfalse} +\newif\if@CyrEncKnown +\IfFileExists{ot2cmr.fd}% + {\@CyrEncKnowntrue}{\@CyrEncKnownfalse}% +% \end{macrocode} +% \begin {macro}{\CBgreekCaporali} +% \begin {macro}{\CyrillicCaporali} +% \begin {macro}{\T@unoCaporali} +% Next we define the macros |\CBgreekCaporali|, |\T@unoCaporali|, +% and |\CyrillicCaporali|; +% with the latter one we test the loaded class, and if it's \texttt{slides} +% nothing gets done. In any case each one of these declarations, if used, must be specified +% in the preamble. +% \begin{macrocode} +\def\CBgreekCaporali{\@ifclassloaded{slides}{% + \IfFileExists{lgrlcmss.fd}{\DeclareFontEncoding{LGR}{}{}% + \DeclareRobustCommand*{\it@ccap}% + {\ifdim\lastskip>\z@\unskip\fi + {\fontencoding{LGR}\selectfont))}}% + \DeclareRobustCommand*{\it@ocap}% + {{\fontencoding{LGR}\selectfont((}\ignorespaces}}% + {\LtxSymbCaporali}}% + {\DeclareFontEncoding{LGR}{}{}% + \DeclareRobustCommand*{\it@ccap}% + {\ifdim\lastskip>\z@\unskip + \fi{\fontencoding{LGR}\selectfont))}}% + \DeclareRobustCommand*{\it@ocap}% + {{\fontencoding{LGR}\selectfont((}\ignorespaces}}% + }% +\def\CyrillicCaporali{\@ifclassloaded{slides}{\relax}% + {\DeclareFontEncoding{OT2}{}{}% + \DeclareRobustCommand*{\it@ccap}% + {\ifdim\lastskip>\z@\unskip\fi + {\fontencoding{OT2}\selectfont\char62\relax}}% + \DeclareRobustCommand*{\it@ocap}% + {{\fontencoding{OT2}\selectfont\char60\relax}\ignorespaces}}}% +\@onlypreamble{\CBgreekCaporali}\@onlypreamble{\CyrillicCaporali}% +\def\T@unoCaporali{\DeclareRobustCommand*{\it@ocap}{<<\ignorespaces}% + \DeclareRobustCommand*{\it@ccap}{\ifdim\lastskip>\z@\unskip\fi>>}}% +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% Now we can do some real setting; first we start testing the encoding; +% if the encoding is T1 we test if the font family is the AE one; if so, +% we further test for other possibilities +% \begin{macrocode} +\ifx\cf@encoding\bbl@t@one + \@ifT@one@noCap{% + \if@CBgreekEncKnown + \CBgreekCaporali + \else + \if@CyrEncKnown + \CyrilicCaporali + \else + \LtxSymbCaporali + \fi + \fi}% + {\T@unoCaporali}% +% \end{macrocode} +% But if the default encoding is not the T1 one, then the +% substitutions must be performed. +% \begin{macrocode} +\else + \if@CBgreekEncKnown + \CBgreekCaporali + \else + \if@CyrEncKnown + \CyrilicCaporali + \else + \LtxSymbCaporali + \fi + \fi +\fi +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \subsection{Finishing commands} +% The macro |\ldf@finish| takes care of looking for a +% configuration file, setting the main language to be switched on +% at |\begin{document}| and resetting the category code of +% \texttt{@} to its original value. +% \changes{italian-1.2i}{1996/11/03}{Now use \cs{ldf@finish} to wrap +% up} +% \begin{macrocode} +\ldf@finish{italian}% +% +% \end{macrocode} +% +% \Finale +%% +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +%% +\endinput diff --git a/Master/texmf-dist/source/generic/babel/italian.ins b/Master/texmf-dist/source/generic/babel/italian.ins new file mode 100644 index 00000000000..e7e51cbbd19 --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/italian.ins @@ -0,0 +1,155 @@ +%% +%% This file will generate fast loadable files and documentation +%% driver files from the doc files in this package when run through +%% LaTeX or TeX. +%% +%% Copyright 1989-2005 Johannes L. Braams and any individual authors +%% listed elsewhere in this file. All rights reserved. +%% +%% This file is part of the Babel system. +%% -------------------------------------- +%% +%% It 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 +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% The Current Maintainer of this work is Johannes Braams. +%% +%% The list of all files belonging to the LaTeX base distribution is +%% given in the file `manifest.bbl. See also `legal.bbl' 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. +%% +%% --------------- start of docstrip commands ------------------ +%% +%% +%% Questo file serve per generare dal file italian.dtx il file +%% italian.ldf mediante il programma LaTeX/docstrip che toglie +%% praticamente tutti i commenti e ne rende il caricamento molto +%% veloce. La documentazione puo' essere ottenuta passando a +%% LaTeX2e il file sorgente italian.dtx +%% +\def\filedate{2001/01/19} +\def\batchfile{italian.ins} +\input docstrip.tex + +{\ifx\generate\undefined +\Msg{**********************************************} +\Msg{*} +\Msg{* This installation requires docstrip} +\Msg{* version 2.3c or later.} +\Msg{*} +\Msg{* An older version of docstrip has been input} +\Msg{*} +\Msg{**********************************************} +\errhelp{Move or rename old docstrip.tex.} +\errmessage{Old docstrip in input path} +\batchmode +\csname @@end\endcsname +\fi} + +\declarepreamble\mainpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl 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. +\endpreamble + +\declarepreamble\fdpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl for additional +information. + +In particular, permission is granted to customize the declarations in +this file to serve the needs of your installation. + +However, NO PERMISSION is granted to distribute a modified version +of this file under its original name. + +\endpreamble + +\keepsilent + +\usedir{tex/generic/babel} + +\usepreamble\mainpreamble +\generate{\file{italian.ldf}{\from{italian.dtx}{code}} + } +\usepreamble\fdpreamble + +\ifToplevel{ +\Msg{***********************************************************} +\Msg{*} +\Msg{* To finish the installation you have to move the following} +\Msg{* files into a directory searched by TeX:} +\Msg{*} +\Msg{* \space\space All *.def, *.fd, *.ldf, *.sty} +\Msg{*} +\Msg{* To produce the documentation run the files ending with} +\Msg{* '.dtx' and `.fdd' through LaTeX.} +\Msg{*} +\Msg{* Happy TeXing} +\Msg{***********************************************************} +} + +\endinput diff --git a/Master/texmf-dist/source/generic/babel/latin.dtx b/Master/texmf-dist/source/generic/babel/latin.dtx new file mode 100644 index 00000000000..c3b3a599990 --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/latin.dtx @@ -0,0 +1,623 @@ +% \iffalse meta-comment +% +% Copyright 1989-2005 Johannes L. Braams and any individual authors +% listed elsewhere in this file. All rights reserved. +% +% This file is part of the Babel system. +% -------------------------------------- +% +% It 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 +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2003/12/01 or later. +% +% This work has the LPPL maintenance status "maintained". +% +% The Current Maintainer of this work is Johannes Braams. +% +% The list of all files belonging to the Babel system is +% given in the file `manifest.bbl. See also `legal.bbl' 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 +% \CheckSum{434} +% \iffalse +% Tell the \LaTeX\ system who we are and write an entry on the +% transcript. +%<*dtx> +\ProvidesFile{latin.dtx} +% +%\ProvidesFile{latin.ldf} +%\fi +%\ProvidesFile{latin.dtx}% + [2005/03/30 v2.0f Latin support from the babel system] +%\iffalse +%% File `latin.dtx' +%% Babel package for LaTeX version 2e +%% Copyright (C) 1989 - 2005 +%% by Johannes Braams, TeXniek +% +%% Please report errors to: J.L. Braams babel at braams.cistron.nl +%% Claudio Beccari beccari at polito.it +% +% This file is part of the babel system, it provides the source +% code for the Latin language definition file. +% The original version of this file was written by +% Claudio Beccari, (beccari@polito.it) and includes contributions +% by Krzysztof Konrad \.Zelechowski, (\texttt{kkz@alfa.mimuw.edu.pl}). +%<*filedriver> +\documentclass{ltxdoc} +\newcommand*\TeXhax{\TeX hax} +\newcommand*\babel{\textsf{babel}} +\newcommand*\langvar{$\langle \it lang \rangle$} +\newcommand*\note[1]{} +\newcommand*\Lopt[1]{\textsf{#1}} +\newcommand*\file[1]{\texttt{#1}} +\providecommand*\pkg[1]{\textsf{#1}} +\begin{document} + \DocInput{latin.dtx} +\end{document} +% +%\fi +% \GetFileInfo{latin.dtx} +% +% \changes{latin-0.99}{1999/12/06}{First version, from italian.dtx (CB)} +% \changes{latin-0.99}{1999/12/06}{Added shortcuts for breve, macron, +% and etymological hyphenation (CB)} +% \changes{latin-1.2}{2000/01/31}{Added suggestions from Krzysztof +% Konrad \.Zelechowski (CB)} +% \changes{latin-2.0}{2000/02/10}{Completely new etymological +% hyphenation (CB)} +% \changes{latin-2.0a}{2000/10/15}{Revised by JB} +% \changes{latin-2.0b}{2000/12/13}{Simplified shortcuts for +% etymological hyphenation; modified breve and macro shortcuts; +% language attribute medieval declared} +% \changes{latin-2.0d}{2001/06/04}{Restored caret and equals sign +% category codes before exiting} +% \changes{latin-2.0e}{2003/04/11}{Introduced the language attribute +% `withprosodicmarks'; modified use of breve and macron shortcuts +% in order to avoid possible conflicts with other packages} +% +% \section{The Latin language} +% +% The file \file{\filename}\footnote{The file described in this +% section has version number \fileversion\ and was last revised on +% \filedate. The original author is Claudio Beccari with +% contributions by Krzysztof Konrad \.Zelechowski, +% (\texttt{kkz@alfa.mimuw.edu.pl})} defines all the +% language-specific macros for the Latin language both in modern +% and medieval spelling. +% +% For this language two ``styles'' of typesetting are implemented: +% ``regular'' or modern-spelling Latin, and medieval Latin. +% The medieval Latin specific commands can be activated by means of +% the language attribute |medieval|; the medieval spelling differs +% from the modern one by the systematic use of the lower case `u' +% also where in modern spelling the letter `v' is used; when +% typesetting with capital letters, on the opposite, the letter 'V' +% is used also in place of 'U'. +% Medieval spelling also includes the ligatures |\ae| (\ae), |\oe| +% (\oe), |\AE| (\AE), and |\OE| (\OE) that are not used in modern +% spelling, nor were used in the classical times. +% +% Furthermore a third typesetting style |withprosodicmarks| is +% defined in order to use special shortcuts for inserting breves +% and macrons when typesetting grammars, dictionaries, teaching +% texts, and the like, where prosodic marks are important for the +% complete information on the words or the verses. The shortcuts, +% listed in table~\ref{t:lashrtct} and described in +% section~\ref{s:shrtcts}, may interfere with other packages; +% therefore by default this third style is off and no interference +% is introduced. If this third style is used and interference is +% experienced, there are special commands for turning on and off +% the specific short hand commands of this style. +% +% For what concerns \textsf{babel} and typesetting with \LaTeX, the +% differences between the two styles of spelling reveal themselves +% in the strings used to name for example the ``Preface'' that +% becomes ``Praefatio'' or ``Pr\ae fatio'' respectively. +% Hyphenation rules are also different, but the hyphenation pattern +% file \file{lahyph.tex} takes care of both versions of the +% language. Needless to say that such patterns must be loaded in +% the \LaTeX\ format by by running |initex| (or whatever the name +% of the initializer) on |latex.ltx|. +% +% The name strings for chapters, figures, tables, etcetera, are +% suggested by prof. Raffaella Tabacco, a classicist of the +% University of Turin, Italy, to whom we address our warmest +% thanks. The names suggested by Krzysztof Konrad \.Zelechowski, +% when different, are used as the names for the medieval variety, +% since he made a word and spelling choice more suited for this +% variety. +% +% For this language some shortcuts are defined according to +% table~\ref{t:lashrtct}; all of them are supposed to work with +% both spelling styles, except where the opposite is explicitly +% stated. +% \begin{table}[htb]\centering +% \begin{tabular}{cp{80mm}} +% |^i| & inserts the breve accent as \u{\i}; valid also for the +% other lowercase vowels, but it does not operate on the +% medieval ligatures \ae\ and \oe.\\ +% |=a| & inserts the macron accent as \=a; valid also for the +% other lowercase vowels, but it does not operate on the +% medieval ligatures \ae\ and \oe.\\ +% |"| & inserts a compound word mark where hyphenation is legal; +% the next character must not be a medieval ligature \ae\ +% or \oe, nor an accented letter (foreign names).\\ +% \texttt{\string"\string|} +% & same as above, but operates also when the next character +% is a medieval ligature or an accented letter. +% \end{tabular} +% \caption[]{Shortcuts defined for the Latin language. The +% characters \texttt{\string^} and \texttt{\string=} are +% active only when the language attribute +% \texttt{withprosodicmarks} has been declared, +% otherwise they are disabled; see +% section~\ref{s:shrtcts} for more details.}% +% \label{t:lashrtct} +% \end{table} +% \StopEventually{} +% +% The macro |\LdfInit| takes care of preventing that this file is +% loaded more than once, checking the category code of the +% \texttt{@} sign, etc. +% \begin{macrocode} +%<*code> +\LdfInit{latin}{captionslatin} +% \end{macrocode} +% +% When this file is read as an option, i.e. by the |\usepackage| +% command, \texttt{latin} will be an `unknown' language in which +% case we have to make it known. So we check for the existence of +% |\l@latin| to see whether we have to do something here. +% +% \begin{macrocode} +\ifx\l@latin\@undefined + \@nopatterns{Latin} + \adddialect\l@latin0\fi +% \end{macrocode} +% +% +% Now we declare the |medieval| language attribute. +% \begin{macrocode} +\bbl@declare@ttribute{latin}{medieval}{% + \addto\captionslatin{\def\prefacename{Pr{\ae}fatio}}% + \def\november{Nouembris}% + \expandafter\addto\expandafter\extraslatin + \expandafter{\extrasmedievallatin}% + } +% \end{macrocode} +% +% The third typesetting style |withprosodicmarks| is defined here +% \begin{macrocode} +\bbl@declare@ttribute{latin}{withprosodicmarks}{% + \expandafter\addto\expandafter\extraslatin + \expandafter{\extraswithprosodicmarks}% + } +% \end{macrocode} +% It must be remembered that the |medieval| and the |withprosodicmarks| +% styles may be used together. +% +% The next step consists of defining commands to switch to (and +% from) the Latin language\footnote{Most of these names were +% kindly suggested by Raffaella Tabacco.}. +% +% \begin{macro}{\captionslatin} +% The macro |\captionslatin| defines all strings used +% in the four standard document classes provided with \LaTeX. +% \begin{macrocode} +\@namedef{captionslatin}{% + \def\prefacename{Praefatio}% + \def\refname{Conspectus librorum}% + \def\abstractname{Summarium}% + \def\bibname{Conspectus librorum}% + \def\chaptername{Caput}% + \def\appendixname{Additamentum}% + \def\contentsname{Index}% + \def\listfigurename{Conspectus descriptionum}% + \def\listtablename{Conspectus tabularum}% + \def\indexname{Index rerum notabilium}% + \def\figurename{Descriptio}% + \def\tablename{Tabula}% + \def\partname{Pars}% + \def\enclname{Adduntur}% Or " Additur" ? Or simply Add.? + \def\ccname{Exemplar}% Use the recipient's dative + \def\headtoname{\ignorespaces}% Use the recipient's dative + \def\pagename{Charta}% + \def\seename{cfr.}% + \def\alsoname{cfr.}% R.Tabacco never saw "cfr. atque" or similar forms + \def\proofname{Demonstratio}% + \def\glossaryname{Glossarium}% + } +% \end{macrocode} +% \end{macro} +% In the above definitions there are some points that might change +% in the future or that require a minimum of attention from the +% typesetter. +% \begin{enumerate} +% \item the \cs{enclname} is translated by a passive verb, that +% literally means ``(they) are being added''; if just one +% enclosure is joined to the document, the plural passive is not +% suited any more; nevertheless a generic plural passive might be +% incorrect but suited for most circumstances. On the opposite +% ``Additur'', the corresponding singular passive, might be more +% correct with one enclosure and less suited in general: what +% about the abbreviation ``Add.'' that works in both cases, but +% certainly is less elegant? +% \item The \cs{headtoname} is empty and gobbles the possible +% following space; in practice the typesetter should use the +% dative of the recipient's name; since nowadays not all such +% names can be translated into Latin, they might result +% indeclinable. The clever use of an appellative by the +% typesetter such as ``Domino'' or ``Dominae'' might solve the +% problem, but the header might get too impressive. The typesetter +% must make a decision on his own. +% \item The same holds true for the copy recipient's name in the +% ``Cc'' field of \cs{ccname}. +% \end{enumerate} +% +% \begin{macro}{\datelatin} +% The macro |\datelatin| redefines the command |\today| to produce +% Latin dates; the choice of faked small caps Latin numerals is +% arbitrary and may be changed in the future. For medieval latin +% the spelling of `Novembris' should be \textit{Nouembris}. This is +% taken care of by using a control sequence which can be redefined +% when the attribute `medieval' is selected. +% \changes{latin-2.0f}{2005/03/30}{Added a comment character to +% prevent unwanted space} +% \begin{macrocode} +\def\datelatin{% + \def\november{Novembris}% + \def\today{% + {\check@mathfonts\fontsize\sf@size\z@\math@fontsfalse\selectfont + \uppercase\expandafter{\romannumeral\day}}\nobreakspace + \ifcase\month\or + Ianuarii\or Februarii\or Martii\or Aprilis\or Maii\or Iunii\or + Iulii\or Augusti\or Septembris\or Octobris\or \november\or + Decembris\fi + \space{\uppercase\expandafter{\romannumeral\year}}}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\romandate} +% Thomas Martin Widmann (\texttt{viralbus@daimi.au.dk}) developed a +% macro originally named |\latindate| (but to be renamed +% |\romandate| so as not to conflict with the standard \babel\ +% conventions) that should compute and translate the current date +% into a date \textit{ab urbe condita} with days numbered according +% to the kalendae and idus; for the moment this is a placeholder +% for Thomas' macro, waiting for a self standing one that keeps +% local all the intermediate data, counters, etc. If he succeeds, +% here is the place to add his macro. +% \end{macro} +% +% \begin{macro}{\latinhyphenmins} +% The Latin hyphenation patterns can be used with both +% |\lefthyphenmin| and |\righthyphenmin| set to~2. +% \changes{latin-2.0a}{2000/10/15}{Now use \cs{providehyphenmins} to +% provide a default value} +% \begin{macrocode} +\providehyphenmins{\CurrentOption}{\tw@\tw@} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\extraslatin} +% \begin{macro}{\noextraslatin} +% For this language the |\clubpenalty|, |\widowpenalty| are set to +% rather high values and |\finalhyphendemerits| is set to such a +% high value that hyphenation is prohibited between the last two +% lines of a paragraph. +% \begin{macrocode} +\addto\extraslatin{% + \babel@savevariable\clubpenalty + \babel@savevariable\widowpenalty + \clubpenalty3000\widowpenalty3000} +% \end{macrocode} +% Never ever break a word between the last two lines of a paragraph +% in latin texts. +% \begin{macrocode} +\addto\extraslatin{% + \babel@savevariable\finalhyphendemerits + \finalhyphendemerits50000000} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% With medieval Latin we need the suitable correspondence between +% upper case V and lower case u, since in that spelling there is +% only one sign, and the u shape is the (uncial) version of the +% capital V. Everything else is identical with Latin. +% \begin{macrocode} +\addto\extrasmedievallatin{% +\babel@savevariable{\lccode`\V}% +\babel@savevariable{\uccode`\u}% +\lccode`\V=`\u \uccode`\u=`\V} +% \end{macrocode} +% +% \begin{macro}{\SetLatinLigatures} +% We need also the lccodes for \ae\ and \oe; since they occupy +% different positions in the OT1 \TeX-fontencoding compared to the +% T1 one, we must save the lc- and the uccodes for both encodings, +% but we specify the new lc- and uccodes separately as it appears +% natural not to change encoding while typesetting the same +% language. The encoding is assumed to be set before starting to +% use the Latin language, so that if Latin is the default language, +% the font encoding must be chosen before requiring the \pkg{babel} +% package with the |latin| option, in any case before any +% |\selectlanguage| or |\foreignlanguage| command. +% +% All this fuss is made in order to allow the use of the medieval +% ligatures \ae\ and \oe\ while typesetting with the medieval +% spelling; I have my doubts that the medieval spelling should be +% used at all in modern books, reports, and the like, as the uncial +% `u' shape of the lower case `v' and the above ligatures were +% used until the middle of the XVII century. Since my opinion (CB) +% may be wrong, I managed to set up the instruments and it is up +% to the typesetter to use them or not. +% +% \begin{macrocode} +\addto\extrasmedievallatin{% + \babel@savevariable{\lccode`\^^e6}% T1 \ae + \babel@savevariable{\uccode`\^^e6}% T1 \ae + \babel@savevariable{\lccode`\^^c6}% T1 \AE + \babel@savevariable{\lccode`\^^f7}% T1 \oe + \babel@savevariable{\uccode`\^^f7}% T1 \OE + \babel@savevariable{\lccode`\^^d7}% T1 \OE + \babel@savevariable{\lccode`\^^1a}% OT1 \ae + \babel@savevariable{\uccode`\^^1a}% OT1 \ae + \babel@savevariable{\lccode`\^^1d}% OT1 \AE + \babel@savevariable{\lccode`\^^1b}% OT1 \oe + \babel@savevariable{\uccode`\^^1b}% OT1 \OE + \babel@savevariable{\lccode`\^^1e}% OT1 \OE + \SetLatinLigatures} +\providecommand\SetLatinLigatures{% + \def\@tempA{T1}\ifx\@tempA\f@encoding + \catcode`\^^e6=11 \lccode`\^^e6=`\^^e6 \uccode`\^^e6=`\^^c6 % \ae + \catcode`\^^c6=11 \lccode`\^^c6=`\^^e6 % \AE + \catcode`\^^f7=11 \lccode`\^^f7=`\^^f7 \uccode`\^^f7=`\^^d7 % \oe + \catcode`\^^d7=11 \lccode`\^^d7=`\^^f7 % \OE + \else + \catcode`\^^1a=11 \lccode`\^^1a=`\^^1a \uccode`\^^1a=`\^^1d % \ae + \catcode`\^^1d=11 \lccode`\^^1d=`\^^1a % \AE (^^]) + \catcode`\^^1b=11 \lccode`\^^1b=`\^^1b \uccode`\^^1b=`\^^1e % \oe + \catcode`\^^1e=11 \lccode`\^^1e=`\^^1b % \OE (^^^) + \fi + \let\@tempA\@undefined + } +% \end{macrocode} +% With the above definitions we are sure that |\MakeUppercase| +% works properly and |\MakeUppercase{C{\ae}sar}| correctly `yields +% `C{\AE}SAR''; correspondingly |\MakeUppercase{Heluetia}| +% correctly yields ``HELVETIA''. +% \end{macro} +% +% \section{Latin shortcuts}\label{s:shrtcts} +% For writing dictionaries or didactic texts we defined a third +% language attribute, or a third typesetting style, where a couple +% of other active characters are defined: |^| for marking a vowel +% with the breve sign, and |=| for marking a vowel with the macro +% sign. Please take notice that neither the OT1 font encoding, nor +% the T1 one for most vowels, contain directly the marked vowels, +% therefore hyphenation of words containing these ``accents'' may +% become problematic; for this reason the above active characters +% not only introduce the required accent, but also the necessary +% code for allowing hyphenation in the rest of the word. +% +% It must be remarked that the active characters |^| and |=| may +% have other meanings in other contexts. For example the equals +% sign is used by the graphic extensions for specifying keyword +% options for handling the graphic elements to be included in the +% document. At the same time, as mentioned in the previous +% paragraph, diacritical marking in Latin is used only for +% typesetting certain kind of documents, such as grammars and +% dictionaries. It is reasonable that the breve and macron active +% characters may be switched on and off at will, and in particular +% that they are off by default if the attribute |withprosodicmarks| +% has not been set. +% +% \begin{macro}{\ProsodicMarksOn} +% \begin{macro}{\ProsodicMarksOff} +% We begin by adding to the normal typesetting style the +% definitions of the new commands |\ProsodicMarksOn| and +% |\ProsodicMarksOff| that should produce error messages when the +% third style is not declared: +% \begin{macrocode} +\addto\extraslatin{\def\ProsodicMarksOn{% +\GenericError{(latin)\@spaces\@spaces\@spaces\@spaces}% + {Latin language error: \string\ProsodicMarksOn\space + is defined by setting the\MessageBreak + language attribute to `withprosodicmarks'\MessageBreak + If you continue you are likely to encounter\MessageBreak + fatal errors that I can't recover}% + {See the Latin language description in the babel + documentation for explanation}{\@ehd}}} +\addto\extraslatin{\let\ProsodicMarksOff\relax} +% \end{macrocode} +% +% Then we temporarily set the caret and the equals sign to active +% characters so that they can receive their definitions: +% \begin{macrocode} +\catcode`\= \active +\catcode`\^ \active +% \end{macrocode} +% and we add the necessary declarations to the macros that are +% being activated when the Latin language and its typesetting +% styles are declared: +% \begin{macrocode} +\addto\extraslatin{\languageshorthands{latin}}% +\addto\extraswithprosodicmarks{\bbl@activate{^}}% +\addto\extraswithprosodicmarks{\bbl@activate{=}}% +\addto\noextraswithprosodicmarks{\bbl@deactivate{^}}% +\addto\noextraswithprosodicmarks{\bbl@deactivate{=}}% +\addto\extraswithprosodicmarks{\ProsodicMarks} +% \end{macrocode} +% +% \begin{macro}{\ProsodicMarks} +% Next we define the defining macro for the active characters +% \begin{macrocode} +\def\ProsodicMarks{% +\def\ProsodicMarksOn{\catcode`\^ 13\catcode`\= 13\relax}% +\def\ProsodicMarksOff{\catcode`\^ 7\catcode`\= 12\relax}% +% \end{macrocode} +% Notice that with the above redefinitions of the commands +% |\ProsodicMarksOn| and |\ProsodicMarksOff|, the operation of the +% newly defined shortcuts may be switched on and off at will, so +% that even if a picture has to be inserted in the document by +% means of the commands and keyword options of the |graphicx| +% package, it suffices to switch them off before invoking the +% picture including command, and switched on again afterwards; or, +% even better, since the picture very likely is being inserted +% within a |figure| environment, it suffices the switch them off +% within the environment, being conscious that their deactivation +% remains local to the environment. +% \begin{macrocode} +\initiate@active@char{^}% +\initiate@active@char{=}% +\declare@shorthand{latin}{^a}{% + \textormath{\u{a}\allowhyphens}{\hat{a}}}% +\declare@shorthand{latin}{^e}{% + \textormath{\u{e}\allowhyphens}{\hat{e}}}% +\declare@shorthand{latin}{^i}{% + \textormath{\u{\i}\allowhyphens}{\hat{\imath}}}% +\declare@shorthand{latin}{^o}{% + \textormath{\u{o}\allowhyphens}{\hat{o}}}% +\declare@shorthand{latin}{^u}{% + \textormath{\u{u}\allowhyphens}{\hat{u}}}% +\declare@shorthand{latin}{=a}{% + \textormath{\={a}\allowhyphens}{\bar{a}}}% +\declare@shorthand{latin}{=e}{% + \textormath{\={e}\allowhyphens}{\bar{e}}}% +\declare@shorthand{latin}{=i}{% + \textormath{\={\i}\allowhyphens}{\bar{\imath}}}% +\declare@shorthand{latin}{=o}{% + \textormath{\={o}\allowhyphens}{\bar{o}}}% +\declare@shorthand{latin}{=u}{% + \textormath{\={u}\allowhyphens}{\bar{u}}}% +} +% \end{macrocode} +% Notice that the short hand definitions are given only for lower +% case letters; it would not be difficult to extend the set of +% definitions to upper case letters, but it appears of very little +% use in view of the kind of documents where prosodic marks are +% supposed to be used. Nevertheless in those rare cases when it's +% required to set some uppercase letters with their prosodic +% marks, it is always possible to use the standard \LaTeX\ commands +% such as |\u{I}| for typesetting \u{I}, or |\={A}| for +% typesetting~\=A. +% +% Finally we restore the caret and equals sign initial default +% category codes. +% \begin{macrocode} +\catcode`\= 12\relax +\catcode`\^ 7\relax +% \end{macrocode} +% \end{macro} +% +% It must be understood that by using the above prosodic marks, +% line breaking is somewhat impeached; since such prosodic marks +% are used almost exclusively in dictionaries, grammars, and poems +% (only in school textbooks), this shouldn't be of any importance +% for what concerns the quality of typesetting. +% \end{macro} +% \end{macro} +% +% \section{Etymological hyphenation} +% In order to deal in a clean way with prefixes and compound words +% to be divided etymologically, the active character |"| is given +% a special definition so as to behave as a discretionary break +% with hyphenation allowed after it. +% Most of the code for dealing with the active |"| is already +% contained in the core of \babel, but we are going to use it as a +% single character shorthand for Latin. +% \begin{macrocode} +\initiate@active@char{"}% +\addto\extraslatin{\bbl@activate{"}% +} +% \end{macrocode} +% +% A temporary macro is defined so as to take different actions in +% math mode and text mode: specifically in the former case the +% macro inserts a double quote as it should in math mode, otherwise +% another delayed macro comes into action. +% \begin{macrocode} +\declare@shorthand{latin}{"}{% + \ifmmode + \def\lt@@next{''}% + \else + \def\lt@@next{\futurelet\lt@temp\lt@cwm}% + \fi + \lt@@next +}% +% \end{macrocode} +% In text mode the \cs{lt@next} control sequence is such that upon +% its execution a temporary variable \cs{lt@temp} is made +% equivalent to the next token in the input list without actually +% removing it. Such temporary token is then tested by the macro +% \cs{lt@cwm} and if it is found to be a letter token, then it +% introduces a compound word separator control sequence +% \cs{lt@allowhyphens} whose expansion introduces a discretionary +% hyphen and an unbreakable space; in case the token is not a +% letter, the token is tested again to find if it is the character +% \texttt{\string|}, in which case it is gobbled and a +% discretionary break is introduced. +% \begin{macrocode} +\def\lt@allowhyphens{\nobreak\discretionary{-}{}{}\hskip\z@skip} +\newcommand*{\lt@cwm}{\let\lt@n@xt\relax + \ifcat\noexpand\lt@temp a% + \let\lt@n@xt\lt@allowhyphens + \else + \if\noexpand\lt@temp\string|% + \def\lt@n@xt{\lt@allowhyphens\@gobble}% + \fi + \fi + \lt@n@xt}% +% \end{macrocode} +% +% Attention: the category code comparison does not work if the +% temporary control sequence \cs{lt@temp} has been let equal to an +% implicit character, such as |\ae|; therefore this etymological +% hyphenation facility does not work with medieval Latin spelling +% when |"| immediately precedes a ligature. in order to overcome +% this drawback the shorthand \verb!"|! may be used in such cases; +% it behaves exactly as |"|, but it does not test the implicit +% character control sequence. An input such as +% \verb!super"|{\ae}quitas!\footnote{This word does not exist in +% ``regular'' Latin, and it is used just as an example.} +% gets hyphenated as \texttt{su-per-{\ae}qui-tas} instead of +% \texttt{su-pe-r\ae-qui-tas}. +% +% The macro |\ldf@finish| takes care of looking for a +% configuration file, setting the main language to be switched on +% at |\begin{document}| and resetting the category code of +% \texttt{@} to its original value. +% \begin{macrocode} +\ldf@finish{latin} +% +% \end{macrocode} +% +% \Finale +%% +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +%% +\endinput diff --git a/Master/texmf-dist/source/generic/babel/latin.ins b/Master/texmf-dist/source/generic/babel/latin.ins new file mode 100644 index 00000000000..88bfe93d36d --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/latin.ins @@ -0,0 +1,150 @@ +%% +%% This file will generate fast loadable files and documentation +%% driver files from the doc files in this package when run through +%% LaTeX or TeX. +%% +%% Copyright 1989-2005 Johannes L. Braams and any individual authors +%% listed elsewhere in this file. All rights reserved. +%% +%% This file is part of the Babel system. +%% -------------------------------------- +%% +%% It 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 +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% The Current Maintainer of this work is Johannes Braams. +%% +%% The list of all files belonging to the LaTeX base distribution is +%% given in the file `manifest.bbl. See also `legal.bbl' 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. +%% +%% --------------- start of docstrip commands ------------------ +%% +\def\filedate{1999/04/11} +\def\batchfile{latin.ins} +\input docstrip.tex + +{\ifx\generate\undefined +\Msg{**********************************************} +\Msg{*} +\Msg{* This installation requires docstrip} +\Msg{* version 2.3c or later.} +\Msg{*} +\Msg{* An older version of docstrip has been input} +\Msg{*} +\Msg{**********************************************} +\errhelp{Move or rename old docstrip.tex.} +\errmessage{Old docstrip in input path} +\batchmode +\csname @@end\endcsname +\fi} + +\declarepreamble\mainpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl 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. + +Copyright 1999-2001 Claudio Beccari All rights reserved. +\endpreamble + +\declarepreamble\fdpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl for additional +information. + +In particular, permission is granted to customize the declarations in +this file to serve the needs of your installation. + +However, NO PERMISSION is granted to distribute a modified version +of this file under its original name. + +\endpreamble + +\keepsilent + +\usedir{tex/generic/babel} + +\usepreamble\mainpreamble +\generate{\file{latin.ldf}{\from{latin.dtx}{code}} + } +\usepreamble\fdpreamble + +\ifToplevel{ +\Msg{***********************************************************} +\Msg{*} +\Msg{* To finish the installation you have to move the following} +\Msg{* files into a directory searched by TeX:} +\Msg{*} +\Msg{* \space\space All *.def, *.fd, *.ldf, *.sty} +\Msg{*} +\Msg{* To produce the documentation run the files ending with} +\Msg{* '.dtx' and `.fdd' through LaTeX.} +\Msg{*} +\Msg{* Happy TeXing} +\Msg{***********************************************************} +} + +\endinput diff --git a/Master/texmf-dist/source/generic/babel/lsorbian.dtx b/Master/texmf-dist/source/generic/babel/lsorbian.dtx new file mode 100644 index 00000000000..9f528f8aa9c --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/lsorbian.dtx @@ -0,0 +1,239 @@ +% \iffalse meta-comment +% +% Copyright 1989-2005 Johannes L. Braams and any individual authors +% listed elsewhere in this file. All rights reserved. +% +% This file is part of the Babel system. +% -------------------------------------- +% +% It 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 +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2003/12/01 or later. +% +% This work has the LPPL maintenance status "maintained". +% +% The Current Maintainer of this work is Johannes Braams. +% +% The list of all files belonging to the Babel system is +% given in the file `manifest.bbl. See also `legal.bbl' 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 +% \CheckSum{129} +% \iffalse +% +% Tell the \LaTeX\ system who we are and write an entry on the +% transcript. +%<*dtx> +\ProvidesFile{lsorbian.dtx} +% +%\ProvidesLanguage{lsorbian} +%\fi +%\ProvidesFile{lsorbian.dtx} + [2005/03/31 v1.0f Lower Sorbian support from the babel system] +%\iffalse +%% File `lsorbian.dtx' +%% Babel package for LaTeX version 2e +%% Copyright (C) 1989 - 2005 +%% by Johannes Braams, TeXniek +% +%% Lower Sorbian Language Definition File +%% Copyright (C) 1994 - 2005 +%% by Eduard Werner +% Werner, Eduard", +% Serbski institut z. t., +% Dw\'orni\v{s}\'cowa 6 +% 02625 Budy\v{s}in/Bautzen +% Germany", +% (??)3591 497223", +% edi at kaihh.hanse.de", +% +%% Please report errors to: Eduard Werner edi at kaihh.hanse.de +%% +% This file is part of the babel system, it provides the source +% code for the Lower Sorbian definition file. +%<*filedriver> +\documentclass{ltxdoc} +\newcommand*\TeXhax{\TeX hax} +\newcommand*\babel{\textsf{babel}} +\newcommand*\langvar{$\langle \it lang \rangle$} +\newcommand*\note[1]{} +\newcommand*\Lopt[1]{\textsf{#1}} +\newcommand*\file[1]{\texttt{#1}} +\begin{document} + \DocInput{lsorbian.dtx} +\end{document} +% +%\fi +% +% \GetFileInfo{lsorbian.dtx} +% +% \changes{lsorbian-0.1}{1994/10/10}{First version} +% \changes{lsorbian-1.0d}{1996/10/10}{Replaced \cs{undefined} with +% \cs{@undefined} and \cs{empty} with \cs{@empty} for consistency +% with \LaTeX, moved the definition of \cs{atcatcode} right to the +% beginning.} +% +% \section{The Lower Sorbian language} +% +% The file \file{\filename}\footnote{The file described in this +% section has version number \fileversion\ and was last revised on +% \filedate. It was written by Eduard Werner +% (\texttt{edi@kaihh.hanse.de}).} It defines all the +% language-specific macros for Lower Sorbian. +% +% \StopEventually{} +% +% The macro |\LdfInit| takes care of preventing that this file is +% loaded more than once, checking the category code of the +% \texttt{@} sign, etc. +% \changes{lsorbian-1.0d}{1996/11/03}{Now use \cs{LdfInit} to perform +% initial checks} +% \begin{macrocode} +%<*code> +\LdfInit{lsorbian}\captionslsorbian +% \end{macrocode} +% +% When this file is read as an option, i.e. by the |\usepackage| +% command, \texttt{lsorbian} will be an `unknown' languagein which +% case we have to make it known. So we check for the existence of +% |\l@lsorbian| to see whether we have to do something here. +% +% \begin{macrocode} +\ifx\l@lsorbian\@undefined + \@nopatterns{Lsorbian} + \adddialect\l@lsorbian\l@usorbian\fi +% \end{macrocode} +% +% The next step consists of defining commands to switch to (and +% from) the Lower Sorbian language. +% +% \begin{macro}{\captionslsorbian} +% The macro |\captionslsorbian| defines all strings used in the four +% standard documentclasses provided with \LaTeX. +% \changes{lsorbian-1.0b}{1995/07/04}{Added \cs{proofname} for +% AMS-\LaTeX} +% \changes{lsorbian-1.0f}{2000/09/22}{Added \cs{glossaryname}} +% \begin{macrocode} +\addto\captionslsorbian{% + \def\prefacename{Zawod}% + \def\refname{Referency}% + \def\abstractname{Abstrakt}% + \def\bibname{Literatura}% + \def\chaptername{Kapitl}% + \def\appendixname{Dodawki}% + \def\contentsname{Wop\'simje\'se}% + \def\listfigurename{Zapis wobrazow}% + \def\listtablename{Zapis tabulkow}% + \def\indexname{Indeks}% + \def\figurename{Wobraz}% + \def\tablename{Tabulka}% + \def\partname{\'Z\v el}% + \def\enclname{P\'si\l oga}% + \def\ccname{CC}% + \def\headtoname{Komu}% + \def\pagename{Strona}% + \def\seename{gl.}% + \def\alsoname{gl.~teke}% + \def\proofname{Proof}% <-- needs translation + \def\glossaryname{Glossary}% <-- Needs translation + }% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\newdatelsorbian} +% The macro |\newdatelsorbian| redefines the command |\today| to +% produce Lower Sorbian dates. +% \changes{lsorbian-1.0e}{1997/10/01}{Use \cs{edef} to define +% \cs{today} to save memory} +% \changes{lsorbian-1.0e}{1998/03/28}{use \cs{def} instead of +% \cs{edef}} +% \begin{macrocode} +\def\newdatelsorbian{% + \def\today{\number\day.~\ifcase\month\or + januara\or februara\or m\v erca\or apryla\or maja\or + junija\or julija\or awgusta\or septembra\or oktobra\or + nowembra\or decembra\fi + \space \number\year}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\olddatelsorbian} +% The macro |\olddatelsorbian| redefines the command |\today| to +% produce old-style Lower Sorbian dates. +% \begin{macrocode} +\def\olddatelsorbian{% + \def\today{\number\day.~\ifcase\month\or + wjelikego ro\v zka\or + ma\l ego ro\v zka\or + nal\v etnika\or + jat\v sownika\or + ro\v zownika\or + sma\v znika\or + pra\v znika\or + \v znje\'nca\or + po\v znje\'nca\or + winowca\or + nazymnika\or + godownika\fi \space \number\year}} +% \end{macrocode} +% \end{macro} +% +% The default will be the new-style dates. +% \begin{macrocode} +\let\datelsorbian\newdatelsorbian +% \end{macrocode} +% +% \begin{macro}{\extraslsorbian} +% \begin{macro}{\noextraslsorbian} +% The macro |\extraslsorbian| will perform all the extra +% definitions needed for the lsorbian language. The macro +% |\noextraslsorbian| is used to cancel the actions of +% |\extraslsorbian|. For the moment these macros are empty but +% they are defined for compatibility with the other language +% definition files. +% +% \begin{macrocode} +\addto\extraslsorbian{} +\addto\noextraslsorbian{} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% The macro |\ldf@finish| takes care of looking for a +% configuration file, setting the main language to be switched on +% at |\begin{document}| and resetting the category code of +% \texttt{@} to its original value. +% \changes{lsorbian-1.0d}{1996/11/03}{Now use \cs{ldf@finish} to wrap +% up} +% \begin{macrocode} +\ldf@finish{lsorbian} +% +% \end{macrocode} +% +% \Finale +%% +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +%% +\endinput diff --git a/Master/texmf-dist/source/generic/babel/magyar.dtx b/Master/texmf-dist/source/generic/babel/magyar.dtx new file mode 100644 index 00000000000..febd734ad76 --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/magyar.dtx @@ -0,0 +1,1411 @@ +% \iffalse meta-comment +% +% Copyright 1989-2005 Johannes L. Braams and any individual authors +% listed elsewhere in this file. All rights reserved. +% +% This file is part of the Babel system. +% -------------------------------------- +% +% It 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 +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2003/12/01 or later. +% +% This work has the LPPL maintenance status "maintained". +% +% The Current Maintainer of this work is Johannes Braams. +% +% The list of all files belonging to the Babel system is +% given in the file `manifest.bbl. See also `legal.bbl' 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 +% \CheckSum{1538} +% \iffalse +% Tell the \LaTeX\ system who we are and write an entry on the +% transcript. +%<*dtx> +\ProvidesFile{magyar.dtx} +% +%\ProvidesLanguage{magyar} +%\fi +%\ProvidesFile{magyar.dtx} + [2005/03/30 v1.4j Magyar support from the babel system] +%\iffalse +%% File `magyar.dtx' +%% Babel package for LaTeX version 2e +%% Copyright (C) 1989 - 2005 +%% by Johannes Braams, TeXniek +% +%% Magyar Language Definition File +%% Copyright (C) 1989 - 2005 +%% by Johannes Braams, TeXniek +%% \'Arp\'ad B\'IR\'O +%% J\'ozsef B\'ERCES +% +% Please report errors to: J.L. Braams babel braams.cistron.nl +% +% This file is part of the babel system, it provides the source +% code for the Hungarian language definition file. A contribution +% was made by Attila Koppanyi (attila@cernvm.cern.ch). +%<*filedriver> +\documentclass{ltxdoc} +\newcommand*\TeXhax{\TeX hax} +\newcommand*\babel{\textsf{babel}} +\newcommand*\langvar{$\langle \it lang \rangle$} +\newcommand*\note[1]{} +\newcommand*\Lopt[1]{\textsf{#1}} +\newcommand*\file[1]{\texttt{#1}} +\begin{document} + \DocInput{magyar.dtx} +\end{document} +% +%\fi +% \GetFileInfo{magyar.dtx} +% +% \changes{magyar-1.0a}{1991/07/15}{Renamed \file{babel.sty} in +% \file{babel.com}} +% \changes{magyar-1.1}{1992/02/16}{Brought up-to-date with babel 3.2a} +% \changes{magyar-1.1d}{1994/02/08}{Further spelling corrections} +% \changes{magyar-1.1e}{1994/02/09}{Still more spelling corrections} +% \changes{magyar-1.2}{1994/02/27}{Update for \LaTeXe} +% \changes{magyar-1.3c}{1994/06/26}{Removed the use of \cs{filedate} +% and moved identification after the loading of \file{babel.def}} +% \changes{magyar-1.3g}{1996/07/12}{Replaced \cs{undefined} with +% \cs{@undefined} and \cs{empty} with \cs{@empty} for consistency +% with \LaTeX} +% \changes{magyar-1.4a}{1998/06/04}{order inverting in +% headings/titles/captions; definite article handling; active char +% for special hyphenation} +% \changes{magyar-1.4d}{2001/11/15}{Corrected checksum} +% \changes{magyar-1.4j}{2004/11/17}{Added missing comment characters +% in the redefinitions of \cs{ps@headings} to prevent spurious +% spaces} +% +% \section{The Hungarian language} +% +% The file option \file{\filename} defines all the +% language definition macros for the Hungarian language. +% +% The \babel{} support for the Hungarian language until file +% version 1.3i was essentially changing the English document +% elements to Hungarian ones, but because of the differences +% between these too languages this was actually unusable (`Part I' +% was transferred to `R\'esz I' which is not usable instead of `I.\ +% r\'esz'). To enhance the typesetting facilities for Hungarian +% the following should be considered: +% \begin{itemize} +% \item In Hungarian documents there is a period after +% the part, section, subsection \mbox{etc.} numbers. +% +% \item In the part, chapter, appendix name the number +% (or letter) goes before the name, so `Part I' translates to +% `I.\ r\'esz'. +% +% \item The same is true with captions +% (`Table 2.1' goes to `2.1.\ t\'abl\'azat'). +% +% \item There is a period after the caption name instead of a colon. +% (`Table 2.1:' goes to `2.1.\ t\'abl\'azat.') +% +% \item There is a period at the end of the title in a run-in head +% (when |afterskip<0| in |\@startsection|). +% +% \item Special hyphenation rules must be applied +% for the so-called long double consonants (ccs, ssz,\dots). +% +% \item The opening quotation mark is like the German one +% (the closing is the same as in English). +% +% \item In Hungarian figure, table, \mbox{etc.} +% referencing a definite article is also incorporated. +% The Hungarian definite articles behave like the English +% indefinite ones (`a/an'). `a' is used for words beginning +% with a consonant and `az' goes for a vowel. +% Since some numbers begin with a vowel some others +% with a consonant some commands should be provided for +% automatic definite article generation. +% \end{itemize} +% +% Until file version 1.3i\footnote{That file was +% last revised on 1996/12/23 with a contribution by the next +% authors: Attila Kopp\'anyi (\texttt{attila@cernvm.cern.ch}), +% \'Arp\'ad B\'{\i}r\'o (\texttt{JZP1104@HUSZEG11.bitnet}), +% Istv\'an Hamecz (\texttt{hami@ursus.bke.hu)} and +% Dezs\H{o} Horv\'ath (\texttt{horvath@pisa.infn.it}).} +% the special typesetting rules of the Hungarian language +% mentioned above were not taken into consideration. +% This version (\fileversion)\footnote{It was written by J\'ozsef +% B\'erces (\texttt{jozsi@docs4.mht.bme.hu}) with some help from +% Ferenc Wettl (\texttt{wettl@math.bme.hu}) and an idea from David +% Carlisle (\texttt{david@dcarlisle.demon.co.uk}).} +% enables \babel{} to typeset `good-looking' Hungarian texts. +% +% \DescribeMacro\ontoday +% The |\ontoday| command works like |\today| but +% produces a slightly different date format used in expressions such +% as `on February 10th'. +% +% \DescribeMacro\Az +% The commands |\Az#1| and |\az#1| write the correct +% definite article for the argument and the argument itself +% (separated with a |~|). The star-forms (|\Az*| and |\az*|) +% produce the article only. +% +% \DescribeMacro\Azr +% |\Azr#1| and |\azr#1| treat the argument as a label so expand +% it then write the definite article for |\r@#1|, a non-breakable +% space then the label expansion. The star-forms do not print +% the label expansion. |\Azr(#1| and |\azr(#1| are used for +% equation referencing with the syntax |\azr(|\textit{label}|)|. +% +% \DescribeMacro\Aref +% There are two aliases |\Aref| and |\aref| for |\Azr| and |\azr|, +% respectively. During the preparation of a document it is not +% known in general, if the code `|a~\ref{|\textit{label}|}|' or the code +% `|az~\ref{|\textit{label}|}|' is the grammatically correct one. Writing +% `|\aref{|\textit{label}|}|' instead of the previous ones solves the +% problem. +% +% \DescribeMacro\Azp +% |\Azp#1| and |\azp#1| also treat the argument as a label but +% use the label's page for definite article determination. +% There are star-forms giving only the definite article without +% the page number. +% +% \DescribeMacro\Apageref +% There are aliases |\Apageref| and |\apageref| for |\Azp| and +% |\azp|, respectively. The code |\apageref{|\textit{label}|}| +% is equivalent either to |a~\pageref{|\textit{label}|}| or +% to |az~\pageref{|\textit{label}|}|. +% +% \DescribeMacro\Azc +% |\Azc| and |\azc| work like the |\cite| command but +% (of course) they insert the definite article. There can be +% several comma separated cite labels and in that case the +% definite article is given for the first one. +% They accept |\cite|'s optional argument. +% There are star-forms giving the definite article only. +% +% \DescribeMacro\Acite +% There are aliases |\Acite| and |\acite| for +% |\Azc| and |\azc|, respectively. +% +% For this language the character |`| is made active. +% Table~\ref{tab:hun-actives} shows the shortcuts. +% The main reason for the activation of the |`| character +% is to handle the special hyphenation of the long double +% consonants. +% \begin{table} +% \begin{center} +% \begin{tabular}{lp{45mm}p{47mm}} +% shortcut & explanation & example \\ +% \hline +% |``| & same as |\glqq| in \babel{}, or +% |\quotedblbase| in T1 +% (opening quotation mark, like ,,) +% & |``id\'ezet''|$\longrightarrow$,,id\'ezet'{}' \\ +% |`c|, |`C| & ccs is hyphenated as cs-cs +% & |lo`ccsan|$\longrightarrow$locs-csan \\ +% |`d|, |`D| & ddz is hyphenated as dz-dz +% & |e`ddz\"unk|$\longrightarrow$edz-dz\"unk \\ +% |`g|, |`G| & ggy is hyphenated as gy-gy +% & |po`ggy\'asz|$\longrightarrow$pogy-gy\'asz \\ +% |`l|, |`L| & lly is hyphenated as ly-ly +% & |Kod\'a`llyal|$\longrightarrow$Kod\'aly-lyal \\ +% |`n|, |`N| & nny is hyphenated as ny-ny +% & |me`nnyei|$\longrightarrow$meny-nyei \\ +% |`s|, |`S| & ssz is hyphenated as sz-sz +% & |vi`ssza|$\longrightarrow$visz-sza \\ +% |`t|, |`T| & tty is hyphenated as ty-ty +% & |po`ttyan|$\longrightarrow$poty-tyan \\ +% |`z|, |`Z| & zzs is hyphenated as zs-zs +% & |ri`zzsel|$\longrightarrow$rizs-zsel \\ +% \end{tabular} +% \caption{The shortcuts defined in \file{magyar.ldf}} +% \label{tab:hun-actives} +% \end{center} +% \end{table} +% +% +% \StopEventually{} +% +% The macro |\LdfInit| takes care of preventing that this file is +% loaded more than once, checking the category code of the +% \texttt{@} sign, etc. +% \changes{magyar-1.3h}{1996/11/03}{Now use \cs{LdfInit} to perform +% initial checks} +% \begin{macrocode} +%<*code> +\LdfInit{magyar}{caption\CurrentOption} +% \end{macrocode} +% +% When this file is read as an option, i.e. by the |\usepackage| +% command, \texttt{magyar} will be an `unknown' language in which +% case we have to make it known. So we check for the existence of +% |\l@magyar| or |\l@hungarian| to see whether we have to do +% something here. +% +% \changes{magyar-1.0b}{1991/10/29}{Removed use of \cs{@ifundefined}} +% \changes{magyar-1.1}{1992/02/16}{Added a warning when no hyphenation +% patterns were loaded.} +% \changes{magyar-1.3c}{1994/06/26}{Now use \cs{@nopatterns} to +% produce the warning} +% \changes{magyar-1.4d}{2003/09/18}{The \cs{else} clause got outside +% of the \cs{if} statement, breaking the Hungarian support} +% \changes{magyar-1.4g}{2003/10/07}{Further change to make it work +% when neither \cs{l@magyar} nor \cs{l@hugarian} are defined} +% \begin{macrocode} +\ifx\l@magyar\@undefined + \ifx\l@hungarian\@undefined + \@nopatterns{Magyar} + \adddialect\l@magyar0 + \else + \let\l@magyar\l@hungarian + \fi +\fi +% \end{macrocode} +% The statement above makes sure that |\l@magyar| is always +% defined; if |\l@hungarian| is still undefined we make it equal to +% |\l@magyar|. +% \begin{macrocode} +\ifx\l@hungarian\@undefined + \let\l@hungarian\l@magyar +\fi +% \end{macrocode} +% +% The next step consists of defining commands to switch to (and +% from) the Hungarian language. +% +% \begin{macro}{\captionsmagyar} +% The macro |\captionsmagyar| defines all strings used in the four +% standard document classes provided with \LaTeX. +% \changes{magyar-1.1}{1992/02/16}{Added \cs{seename}, \cs{alsoname} +% and \cs{prefacename}} +% \changes{magyar-1.1}{1993/07/15}{\cs{headpagename} should be +% \cs{pagename}} +% \changes{magyar-1.1c}{1994/01/05}{Added translations, fixed typos} +% \changes{magyar-1.3e}{1995/07/04}{Added \cs{proofname} for +% AMS-\LaTeX} +% \changes{magyar-1.3f}{1996/04/18}{translated Proof and replaced some +% translations} +% \changes{magyar-1.4a}{1998/06/04}{the initial letter of fejezet, +% t\'abl\'azat, r\'esz, l\'asd changed to lowercase} +% \begin{macrocode} +\@namedef{captions\CurrentOption}{% + \def\prefacename{El\H osz\'o}% +% \end{macrocode} +% For the list of references at the end of an article we have a +% choice between two words, `Referenci\'ak' (a Hungarian version of +% the English word) and `Hivatkoz\'asok'. The latter seems to +% be in more widespread use. +% \begin{macrocode} + \def\refname{Hivatkoz\'asok}% +% \end{macrocode} +% If you have a document with a summary instead of an abstract you +% might want to replace the word `Kivonat' with +% `\"Osszefoglal\'o'. +% \begin{macrocode} + \def\abstractname{Kivonat}% +% \end{macrocode} +% The Hungarian version of `Bibliography' is `Bibliogr\'afia', but +% a more natural word to use is `Irodalomjegyz\'ek'. +% \begin{macrocode} + \def\bibname{Irodalomjegyz\'ek}% + \def\chaptername{fejezet}% + \def\appendixname{F\"uggel\'ek}% + \def\contentsname{Tartalomjegyz\'ek}% + \def\listfigurename{\'Abr\'ak jegyz\'eke}% + \def\listtablename{T\'abl\'azatok jegyz\'eke}% + \def\indexname{T\'argymutat\'o}% + \def\figurename{\'abra}% + \def\tablename{t\'abl\'azat}% + \def\partname{r\'esz}% + \def\enclname{Mell\'eklet}% + \def\ccname{K\"orlev\'el--c\'\i mzettek}% + \def\headtoname{C\'\i mzett}% + \def\pagename{oldal}% + \def\seename{l\'asd}% + \def\alsoname{l\'asd m\'eg}% +% \end{macrocode} +% Besides the Hungarian word for Proof, `Bizony\'\i t\'as' we can +% also name Corollary (K\"ovetkezm\'eny), Theorem (T\'etel) and +% Lemma (Lemma). +% \changes{magyar-1.4b}{2000/09/20}{Added \cs{glossaryname}} +% \changes{magyar-1.4h}{2003/11/20}{Inserted translation for Glossary} +% \begin{macrocode} + \def\proofname{Bizony\'\i t\'as}% + \def\glossaryname{Sz\'ojegyz\'ek}% + }% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\datemagyar} +% The macro |\datemagyar| redefines the command |\today| to produce +% Hungarian dates. +% \changes{magyar-1.1d}{1994/02/08}{Rewritten to produce the correct +% date format} +% \changes{magyar-1.4a}{1998/06/10}{Use \cs{number}\cs{day} instead of +% \cs{ifcase} construct} +% \begin{macrocode} +\@namedef{date\CurrentOption}{% + \def\today{% + \number\year.\nobreakspace\ifcase\month\or + janu\'ar\or febru\'ar\or m\'arcius\or + \'aprilis\or m\'ajus\or j\'unius\or + j\'ulius\or augusztus\or szeptember\or + okt\'ober\or november\or december\fi + \space\number\day.}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\ondatemagyar} +% The macro |\ondatemagyar| produces Hungarian dates which have the +% meaning `\emph{on this day}'. It does not redefine the command +% |\today|. +% \changes{magyar-1.1c}{1994/01/05}{The date number should not be +% followed by a dot.} +% \changes{magyar-1.1d}{1994/02/08}{Renamed from \cs{datemagyar}; +% nolonger redefines \cs{today}.} +% \begin{macrocode} +\@namedef{ondate\CurrentOption}{% + \number\year.\nobreakspace\ifcase\month\or + janu\'ar\or febru\'ar\or m\'arcius\or + \'aprilis\or m\'ajus\or j\'unius\or + j\'ulius\or augusztus\or szeptember\or + okt\'ober\or november\or december\fi + \space\ifcase\day\or + 1-j\'en\or 2-\'an\or 3-\'an\or 4-\'en\or 5-\'en\or + 6-\'an\or 7-\'en\or 8-\'an\or 9-\'en\or 10-\'en\or + 11-\'en\or 12-\'en\or 13-\'an\or 14-\'en\or 15-\'en\or + 16-\'an\or 17-\'en\or 18-\'an\or 19-\'en\or 20-\'an\or + 21-\'en\or 22-\'en\or 23-\'an\or 24-\'en\or 25-\'en\or + 26-\'an\or 27-\'en\or 28-\'an\or 29-\'en\or 30-\'an\or + 31-\'en\fi} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\extrasmagyar} +% \begin{macro}{\noextrasmagyar} +% The macro |\extrasmagyar| will perform all the extra definitions +% needed for the Hungarian language. The macro |\noextrasmagyar| is +% used to cancel the actions of |\extrasmagyar|. +% +% \begin{macrocode} + \@namedef{extras\CurrentOption}{% + \expandafter\let\expandafter\ontoday + \csname ondate\CurrentOption\endcsname} +\@namedef{noextras\CurrentOption}{\let\ontoday\@undefined} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% Now we redefine some commands included into \file{latex.ltx}. +% The original form of a command is always saved with +% |\babel@save| and the changes are added to |\extrasmagyar|. +% This ensures that the Hungarian version of a macro is alive +% \emph{only} if the Hungarian language is active. +% +% \begin{macro}{\fnum@figure} +% \begin{macro}{\fnum@table} +% In figure and table captions the order of the figure/table +% number and |\figurename|\hspace{0pt}/|\tablename| must be changed. +% To achieve this |\fnum@figure| and |\fnum@table| are +% redefined and added to |\extrasmagyar|. +% \changes{magyar-1.4i}{2004/02/20}{Use \cs{nobreakspace} instead of +% tilde} +% \begin{macrocode} +\expandafter\addto\csname extras\CurrentOption\endcsname{% + \babel@save\fnum@figure + \def\fnum@figure{\thefigure.\nobreakspace\figurename}} +\expandafter\addto\csname extras\CurrentOption\endcsname{% + \babel@save\fnum@table + \def\fnum@table{\thetable.\nobreakspace\tablename}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\@makecaption} +% The colon in a figure/table caption must be replaced by a dot +% by redefining |\@makecaption|. +% \begin{macrocode} +\expandafter\addto\csname extras\CurrentOption\endcsname{% + \babel@save\@makecaption + \def\@makecaption#1#2{% + \vskip\abovecaptionskip + \sbox\@tempboxa{#1. #2}% + \ifdim \wd\@tempboxa >\hsize + {#1. #2\csname par\endcsname} + \else + \global \@minipagefalse + \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}% + \fi + \vskip\belowcaptionskip}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@caption} +% There should be a dot after the figure/table number in lof/lot, +% so |\@caption| is redefined. +% \begin{macrocode} +\expandafter\addto\csname extras\CurrentOption\endcsname{% + \babel@save\@caption + \long\def\@caption#1[#2]#3{% + \csname par\endcsname + \addcontentsline{\csname ext@#1\endcsname}{#1}% + {\protect\numberline{\csname the#1\endcsname.}{\ignorespaces #2}}% + \begingroup + \@parboxrestore + \if@minipage + \@setminipage + \fi + \normalsize + \@makecaption{\csname fnum@#1\endcsname}% + {\ignorespaces #3}\csname par\endcsname + \endgroup}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@seccntformat} +% In order to have a dot after the section number +% |\@seccntformat| is redefined. +% \begin{macrocode} +\expandafter\addto\csname extras\CurrentOption\endcsname{% + \babel@save\@seccntformat + \def\@seccntformat#1{\csname the#1\endcsname.\quad}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@sect} +% Alas, |\@sect| must also be redefined to have that dot in toc too. +% On the other hand, we include a dot after a run-in head. +% \begin{macrocode} +\expandafter\addto\csname extras\CurrentOption\endcsname{% + \babel@save\@sect + \def\@sect#1#2#3#4#5#6[#7]#8{% + \ifnum #2>\c@secnumdepth + \let\@svsec\@empty + \else + \refstepcounter{#1}% + \protected@edef\@svsec{\@seccntformat{#1}\relax}% + \fi + \@tempskipa #5\relax + \ifdim \@tempskipa>\z@ + \begingroup + #6{% + \@hangfrom{\hskip #3\relax\@svsec}% + \interlinepenalty \@M #8\@@par}% + \endgroup + \csname #1mark\endcsname{#7}% + \addcontentsline{toc}{#1}{% + \ifnum #2>\c@secnumdepth \else + \protect\numberline{\csname the#1\endcsname.}% + \fi + #7}% + \else + \def\@svsechd{% + #6{\hskip #3\relax + \@svsec #8.}% + \csname #1mark\endcsname{#7}% + \addcontentsline{toc}{#1}{% + \ifnum #2>\c@secnumdepth \else + \protect\numberline{\csname the#1\endcsname.}% + \fi + #7}}% + \fi + \@xsect{#5}}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@ssect} +% In order to have that dot after a run-in head when the star form of the +% sectioning commands is used, we have to redefine |\@ssect|. +% \begin{macrocode} +\expandafter\addto\csname extras\CurrentOption\endcsname{% + \babel@save\@ssect + \def\@ssect#1#2#3#4#5{% + \@tempskipa #3\relax + \ifdim \@tempskipa>\z@ + \begingroup + #4{% + \@hangfrom{\hskip #1}% + \interlinepenalty \@M #5\@@par}% + \endgroup + \else + \def\@svsechd{#4{\hskip #1\relax #5.}}% + \fi + \@xsect{#3}}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@begintheorem} +% \begin{macro}{\@opargbegintheorem} +% Order changing and dot insertion in theorem by redefining +% |\@begintheorem| and |\@opargbegintheorem|. +% \begin{macrocode} +\expandafter\addto\csname extras\CurrentOption\endcsname{% + \babel@save\@begintheorem + \def\@begintheorem#1#2{\trivlist + \item[\hskip \labelsep{\bfseries #2.\ #1.}]\itshape}% + \babel@save\@opargbegintheorem + \def\@opargbegintheorem#1#2#3{\trivlist + \item[\hskip \labelsep{\bfseries #2.\ #1\ (#3).}]\itshape}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% The next step is to redefine some macros included into the +% class files. It is determined which class file is loaded +% then the original form of the macro is saved and the changes +% are added to |\extrasmagyar|. +% +% First we check if the \file{book.cls} is loaded. +% \begin{macrocode} +\@ifclassloaded{book}{% +% \end{macrocode} +% \begin{macro}{\ps@headings} +% The look of the headings is changed: we have to insert some dots +% and change the order of chapter number and |\chaptername|. +% \begin{macrocode} + \expandafter\addto\csname extras\CurrentOption\endcsname{% + \babel@save\ps@headings} + \expandafter\addto\csname extras\CurrentOption\endcsname{% + \if@twoside + \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\chaptermark##1{% + \markboth {\MakeUppercase{% + \ifnum \c@secnumdepth >\m@ne + \if@mainmatter + \thechapter. \@chapapp. \ % + \fi + \fi + ##1}}{}}% + \def\sectionmark##1{% + \markright {\MakeUppercase{% + \ifnum \c@secnumdepth >\z@ + \thesection. \ % + \fi + ##1}}}}% + \else + \def\ps@headings{% + \let\@oddfoot\@empty + \def\@oddhead{{\slshape\rightmark}\hfil\thepage}% + \let\@mkboth\markboth + \def\chaptermark##1{% + \markright {\MakeUppercase{% + \ifnum \c@secnumdepth >\m@ne + \if@mainmatter + \thechapter. \@chapapp. \ % + \fi + \fi + ##1}}}}% + \fi} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\@part} +% At the beginning of a part we need \mbox{eg.} `I.\ r\'esz' +% instead of `Part I' (in toc too). +% To achieve this |\@part| is redefined. +% \begin{macrocode} + \expandafter\addto\csname extras\CurrentOption\endcsname{% + \babel@save\@part + \def\@part[#1]#2{% + \ifnum \c@secnumdepth >-2\relax + \refstepcounter{part}% + \addcontentsline{toc}{part}{\thepart.\hspace{1em}#1}% + \else + \addcontentsline{toc}{part}{#1}% + \fi + \markboth{}{}% + {\centering + \interlinepenalty \@M + \normalfont + \ifnum \c@secnumdepth >-2\relax + \huge\bfseries \thepart.\nobreakspace\partname + \csname par\endcsname + \vskip 20\p@ + \fi + \Huge \bfseries #2\csname par\endcsname}% + \@endpart}} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\@chapter} +% The same changes are made to chapter. +% First the screen typeout and the toc are changed by +% redefining |\@chapter|. +% \begin{macrocode} + \expandafter\addto\csname extras\CurrentOption\endcsname{% + \babel@save\@chapter + \def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne + \if@mainmatter + \refstepcounter{chapter}% + \typeout{\thechapter.\space\@chapapp.}% + \addcontentsline{toc}{chapter}% + {\protect\numberline{\thechapter.}#1}% + \else + \addcontentsline{toc}{chapter}{#1}% + \fi + \else + \addcontentsline{toc}{chapter}{#1}% + \fi + \chaptermark{#1}% + \addtocontents{lof}{\protect\addvspace{10\p@}}% + \addtocontents{lot}{\protect\addvspace{10\p@}}% + \if@twocolumn + \@topnewpage[\@makechapterhead{#2}]% + \else + \@makechapterhead{#2}% + \@afterheading + \fi}} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\@makechapterhead} +% Then the look of the chapter-start is modified by redefining +% |\@makechapterhead|. +% \begin{macrocode} + \expandafter\addto\csname extras\CurrentOption\endcsname{% + \babel@save\@makechapterhead + \def\@makechapterhead#1{% + \vspace*{50\p@}% + {\parindent \z@ \raggedright \normalfont + \ifnum \c@secnumdepth >\m@ne + \if@mainmatter + \huge\bfseries \thechapter.\nobreakspace\@chapapp{} + \csname par\endcsname\nobreak + \vskip 20\p@ + \fi + \fi + \interlinepenalty\@M + \Huge \bfseries #1\csname par\endcsname\nobreak + \vskip 40\p@ + }}}% +% \end{macrocode} +% \end{macro} +% This the end of the book class modification. +% \begin{macrocode} +}{} +% \end{macrocode} +% +% Now we check if \file{report.cls} is loaded. +% \begin{macrocode} +\@ifclassloaded{report}{% +% \end{macrocode} +% \begin{macro}{\ps@headings} +% First the headings are modified just in case of the book class. +% \begin{macrocode} + \expandafter\addto\csname extras\CurrentOption\endcsname{% + \babel@save\ps@headings} + \expandafter\addto\csname extras\CurrentOption\endcsname{% + \if@twoside + \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\chaptermark##1{% + \markboth {\MakeUppercase{% + \ifnum \c@secnumdepth >\m@ne + \thechapter. \@chapapp. \ % + \fi + ##1}}{}}% + \def\sectionmark##1{% + \markright {\MakeUppercase{% + \ifnum \c@secnumdepth >\z@ + \thesection. \ % + \fi + ##1}}}}% + \else + \def\ps@headings{% + \let\@oddfoot\@empty + \def\@oddhead{{\slshape\rightmark}\hfil\thepage}% + \let\@mkboth\markboth + \def\chaptermark##1{% + \markright {\MakeUppercase{% + \ifnum \c@secnumdepth >\m@ne + \thechapter. \@chapapp. \ % + \fi + ##1}}}}% + \fi} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\@chapter} +% Chapter-start modification with |\@chapter| +% \begin{macrocode} + \expandafter\addto\csname extras\CurrentOption\endcsname{% + \babel@save\@chapter + \def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne + \refstepcounter{chapter}% + \typeout{\thechapter.\space\@chapapp.}% + \addcontentsline{toc}{chapter}% + {\protect\numberline{\thechapter.}#1}% + \else + \addcontentsline{toc}{chapter}{#1}% + \fi + \chaptermark{#1}% + \addtocontents{lof}{\protect\addvspace{10\p@}}% + \addtocontents{lot}{\protect\addvspace{10\p@}}% + \if@twocolumn + \@topnewpage[\@makechapterhead{#2}]% + \else + \@makechapterhead{#2}% + \@afterheading + \fi}} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\@makechapterhead} +% and |\@makechapterhead|. +% \begin{macrocode} + \expandafter\addto\csname extras\CurrentOption\endcsname{% + \babel@save\@makechapterhead + \def\@makechapterhead#1{% + \vspace*{50\p@}% + {\parindent \z@ \raggedright \normalfont + \ifnum \c@secnumdepth >\m@ne + \huge\bfseries \thechapter.\nobreakspace\@chapapp{} + \csname par\endcsname\nobreak + \vskip 20\p@ + \fi + \interlinepenalty\@M + \Huge \bfseries #1\csname par\endcsname\nobreak + \vskip 40\p@ + }}}% +% \end{macrocode} +% \end{macro} +% End of report class modification. +% \begin{macrocode} +}{} +% \end{macrocode} +% +% Checking if \file{article.cls} is loaded. +% \begin{macrocode} +\@ifclassloaded{article}{% +% \end{macrocode} +% \begin{macro}{\ps@headings} +% Changing headings by redefining |\ps@headings|. +% \begin{macrocode} + \expandafter\addto\csname extras\CurrentOption\endcsname{% + \babel@save\ps@headings} + \expandafter\addto\csname extras\CurrentOption\endcsname{% + \if@twoside + \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}}}% + \else + \def\ps@headings{% + \let\@oddfoot\@empty + \def\@oddhead{{\slshape\rightmark}\hfil\thepage}% + \let\@mkboth\markboth + \def\sectionmark##1{% + \markright {\MakeUppercase{% + \ifnum \c@secnumdepth >\m@ne + \thesection.\quad + \fi + ##1}}}}% + \fi}% +% \end{macrocode} +% \end{macro} +% No more necessary changes specific to the article class. +% \begin{macrocode} +}{} +% \end{macrocode} +% +% And now this is the turn of \file{letter.cls}. +% \begin{macrocode} +\@ifclassloaded{letter}{% +% \end{macrocode} +% \begin{macro}{\ps@headings} +% In the headings the page number must be followed by a dot +% and then |\pagename|. +% \begin{macrocode} + \expandafter\addto\csname extras\CurrentOption\endcsname{% + \babel@save\ps@headings} + \expandafter\addto\csname extras\CurrentOption\endcsname{% + \if@twoside + \def\ps@headings{% + \let\@oddfoot\@empty\let\@evenfoot\@empty + \def\@oddhead{\slshape\headtoname{:} \ignorespaces\toname + \hfil \@date + \hfil \thepage.\nobreakspace\pagename}% + \let\@evenhead\@oddhead} + \else + \def\ps@headings{% + \let\@oddfoot\@empty + \def\@oddhead{\slshape\headtoname{:} \ignorespaces\toname + \hfil \@date + \hfil \thepage.\nobreakspace\pagename}} + \fi}% +% \end{macrocode} +% \end{macro} +% End of letter class. +% \begin{macrocode} +}{} +% \end{macrocode} +% +% After making the changes to the \LaTeX{} +% macros we define some new ones to handle the problem +% with definite articles. +% \begin{macro}{\az} +% |\az| is a user-level command which decides if the next +% character is a star. |\@az| is called for |\az*| and +% |\az@| for |\az|. +% \begin{macrocode} +\def\az{a\@ifstar{\@az}{\az@}} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\Az} +% |\Az| is used at the beginning of a sentence. Otherwise it behaves +% the same as |\az|. +% \begin{macrocode} +\def\Az{A\@ifstar{\@az}{\az@}} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\az@} +% |\az@| is called if there is no star after |\az| or |\Az|. +% It calls |\@az| and writes |#1| separating with a non-breakable +% space. +% \begin{macrocode} +\def\az@#1{\@az{#1}\nobreakspace#1} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\@az} +% This macro calls |\hun@tempadef| to remove the accents from +% the argument then calls |\@@az| that determines if a `z' +% should be written after a/A (written by |\az|/|\Az|). +% \begin{macrocode} +\def\@az#1{% + \hun@tempadef{relax}{relax}{#1}% + \edef\@tempb{\noexpand\@@az\@tempa\hbox!}% + \@tempb} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\hun@tempadef} +% The macro |\hun@tempadef| has three tasks: +% \begin{itemize} +% \item Accent removal. Accented letters confuse +% |\@@az|, the main definite article determinator +% macro, so they must be changed to their non-accented +% counterparts. Special letters must also be changed, +% \mbox{eg.} \oe$\,\rightarrow\,$o. +% \item Labels must be expanded. +% \item To handle Roman numerals correctly, commands starting +% with |\hun@| are defined for labels containing Roman +% numbers with the Roman numerals +% replaced by their Arabic representation. +% This macro can check if there is a |\hun@| command. +% \end{itemize} +% There are three arguments: +% \begin{enumerate} +% \item The primary command that should be expanded if it exists. +% This is usually the |\hun@| command for a label. +% \item The secondary command which is used if the first one +% is |\relax|. This is usually the original \LaTeX{} +% command for a label. +% \item This is used if the first two is |\relax|. For this one +% no expansion is carried out but the accents are still +% removed and special letters are changed. +% \end{enumerate} +% \changes{magyar-1.4f}{2003/09/29}{Added +% \cs{def}\cs{safe@activesfalse{}} as a fix for PR3426} +% \begin{macrocode} +\def\hun@tempadef#1#2#3{% + \begingroup + \def\@safe@activesfalse{}% + \def\setbox ##1{}% to get rid of accents and special letters + \def\hbox ##1{}% + \def\accent ##1 ##2{##2}% + \def\add@accent ##1##2{##2}% + \def\@text@composite@x ##1##2{##2}% + \def\i{i}\def\j{j}% + \def\ae{a}\def\AE{A}\def\oe{o}\def\OE{O}% + \def\ss{s}\def\L{L}% + \def\d{}\def\b{}\def\c{}\def\t{}% + \expandafter\ifx\csname #1\endcsname\relax + \expandafter\ifx\csname #2\endcsname\relax + \xdef\@tempa{#3}% + \else + \xdef\@tempa{\csname #2\endcsname}% + \fi + \else + \xdef\@tempa{\csname #1\endcsname}% + \fi + \endgroup} +% \end{macrocode} +% \end{macro} +% +% The following macros are used to determine the definite +% article for a label's expansion. +% \begin{macro}{\aref} +% |\aref| is an alias for |\azr|. +% \begin{macrocode} +\def\aref{\azr} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\Aref} +% |\Aref| is an alias for |\Azr|. +% \begin{macrocode} +\def\Aref{\Azr} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\azr} +% |\azr| calls |\@azr| if the next character is a star, +% otherwise it calls |\azr@|. +% \begin{macrocode} +\def\azr{a\@ifstar{\@azr}{\azr@}} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\Azr} +% |\Azr| is the same as |\azr| except that it writes `A' +% instead of `a'. +% \begin{macrocode} +\def\Azr{A\@ifstar{\@azr}{\azr@}} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\azr@} +% |\azr@| decides if the next character is |(| and +% in that case it calls |\azr@@@| which writes an extra |(| +% for equation referencing. Otherwise |\azr@@| is called. +% \begin{macrocode} +\def\azr@{\@ifnextchar ({\azr@@@}{\azr@@}} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\azr@@} +% Calls |\@azr| then writes the label's expansion preceded by +% a non-breakable space. +% \begin{macrocode} +\def\azr@@#1{\@azr{#1}\nobreakspace\ref{#1}} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\azr@@@} +% Same as |\azr@@| but inserts a |(| between the +% non-breakable space and the label expansion. +% \begin{macrocode} +\def\azr@@@(#1{\@azr{#1}\nobreakspace(\ref{#1}} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\@azr} +% Calls |\hun@tempadef| to choose between the label's +% |\hun@| or original \LaTeX{} command and to expand +% it with accent removal and special letter substitution. +% Then calls |\@@az|, the core macro of definite article handling. +% \begin{macrocode} +\def\@azr#1{% + \hun@tempadef{hun@r@#1}{r@#1}{}% + \ifx\@tempa\empty + \else + \edef\@tempb{\noexpand\@@az\expandafter\@firstoftwo\@tempa\hbox!}% + \@tempb + \fi +} +% \end{macrocode} +% \end{macro} +% +% The following commands are used to generate the definite article +% for the page number of a label. +% \begin{macro}{\apageref} +% |\apageref| is an alias for |\azp|. +% \begin{macrocode} +\def\apageref{\azp} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\Apageref} +% |\Apageref| is an alias for |\Azp|. +% \begin{macrocode} +\def\Apageref{\Azp} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\azp} +% Checks if the next character is |*| and calls +% |\@azp| or |\azp@|. +% \begin{macrocode} +\def\azp{a\@ifstar{\@azp}{\azp@}} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\Azp} +% Same as |\azp| except that it writes `A' instead of `a'. +% \begin{macrocode} +\def\Azp{A\@ifstar{\@azp}{\azp@}} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\azp@} +% Calls |\@azp| then writes the label's page preceded by +% a non-breakable space. +% \begin{macrocode} +\def\azp@#1{\@azp{#1}\nobreakspace\pageref{#1}} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\@azp} +% Calls |\hun@tempadef| then takes the label's page and passes +% it to |\@@az|. +% \begin{macrocode} +\def\@azp#1{% + \hun@tempadef{hun@r@#1}{r@#1}{}% + \ifx\@tempa\empty + \else + \edef\@tempb{\noexpand\@@az\expandafter\@secondoftwo\@tempa\hbox!}% + \@tempb + \fi +} +% \end{macrocode} +% \end{macro} +% +% The following macros are used to give the definite article to +% citations. +% \begin{macro}{\acite} +% This is an alias for |\azc|. +% \begin{macrocode} +\def\acite{\azc} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\Acite} +% This is an alias for |\Azc|. +% \begin{macrocode} +\def\Acite{\Azc} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\azc} +% Checks if the next character is a star and +% calls |\@azc| or |\azc@|. +% \begin{macrocode} +\def\azc{a\@ifstar{\@azc}{\azc@}} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\Azc} +% Same as |\azc| but used at the beginning of sentences. +% \begin{macrocode} +\def\Azc{A\@ifstar{\@azc}{\azc@}} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\azc@} +% If there is no star we accept an optional argument, +% just like the |\cite| command. +% \begin{macrocode} +\def\azc@{\@ifnextchar [{\azc@@}{\azc@@[]}} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\azc@@} +% First calls |\@azc| then |\cite|. +% \begin{macrocode} +\def\azc@@[#1]#2{% + \@azc{#2}\nobreakspace\def\@tempa{#1}% + \ifx\@tempa\@empty\cite{#2}\else\cite[#1]{#2}\fi} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\@azc} +% This is an auxiliary macro to get the first cite label +% from a comma-separated list. +% \begin{macrocode} +\def\@azc#1{\@@azc#1,\hbox!} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\@@azc} +% This one uses only the first argument, that is the first +% element of the comma-separated list of cite labels. +% Calls |\hun@tempadef| to expand the cite label with accent +% removal and special letter replacement. +% Then |\@@az|, the core macro, is called. +% \begin{macrocode} +\def\@@azc#1,#2\hbox#3!{% + \hun@tempadef{hun@b@#1}{b@#1}{}% + \ifx\@tempa\empty + \else + \edef\@tempb{\noexpand\@@az\@tempa\hbox!}% + \@tempb + \fi} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\hun@number@lehgth} +% This macro is used to count the number of digits in its +% argument until a non-digit character is found or +% the end of the argument is reached. +% It must be called as +% |\hun@number@lehgth|\textit{arg}|\hbox\hbox!| and +% |\count@| must be zeroed. +% It is called by |\@@az|. +% \begin{macrocode} +\def\hun@number@lehgth#1#2\hbox#3!{% + \ifcat\noexpand#11% + \ifnum\expandafter`\csname#1\endcsname>47 + \ifnum\expandafter`\csname#1\endcsname<58 + \advance\count@ by \@ne + \hun@number@lehgth#2\hbox\hbox!\fi\fi\fi} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\hun@alph@lehgth} +% This is used to count the number of letters until a +% non-letter is found or the end of the argument is reached. +% It must be called as +% |\hun@alph@lehgth|\textit{arg}|\hbox\hbox!| and +% |\count@| must be set to zero. +% It is called by |\@@az@string|. +% \begin{macrocode} +\def\hun@alph@lehgth#1#2\hbox#3!{% + \ifcat\noexpand#1A% + \advance\count@ by \@ne + \hun@alph@lehgth#2\hbox\hbox!\fi} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@@az@string} +% This macro is called by |\@@az| if the argument begins +% with a letter. +% The task of |\@@az@string| is to determine if the argument +% starts with a vowel and in that case |\let\@tempa\@tempb|. +% After checking if the first letter is A, E, I, O, or U, +% |\hun@alph@lehgth| is called +% to determine the length of the argument. If it gives 1 +% (that is the argument is a single-letter one or the second +% character is not letter) then the letters L, M, N, R, S, X, and Y +% are also considered as a vowel since their Hungarian pronounced +% name starts with a vowel. +% \begin{macrocode} +\def\@@az@string#1#2{% + \ifx#1A% + \let\@tempa\@tempb + \else\ifx#1E% + \let\@tempa\@tempb + \else\ifx#1I% + \let\@tempa\@tempb + \else\ifx#1O% + \let\@tempa\@tempb + \else\ifx#1U% + \let\@tempa\@tempb + \fi\fi\fi\fi\fi + \ifx\@tempa\@tempb + \else + \count@\z@ + \hun@alph@lehgth#1#2\hbox\hbox!% + \ifnum\count@=\@ne + \ifx#1F% + \let\@tempa\@tempb + \else\ifx#1L% + \let\@tempa\@tempb + \else\ifx#1M% + \let\@tempa\@tempb + \else\ifx#1N% + \let\@tempa\@tempb + \else\ifx#1R% + \let\@tempa\@tempb + \else\ifx#1S% + \let\@tempa\@tempb + \else\ifx#1X% + \let\@tempa\@tempb + \else\ifx#1Y% + \let\@tempa\@tempb + \fi\fi\fi\fi\fi\fi\fi\fi + \fi + \fi} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@@az} +% This macro is the core of definite article handling. +% It determines if the argument needs `az' or `a' definite +% article by setting |\@tempa| to `z' or |\@empty|. +% It sets |\@tempa| to `z' if +% \begin{itemize} +% \item the first character of the argument is 5; or +% \item the first character of the argument is 1 and +% the $\mathit{length\ of\ the\ number} \pmod 3 = 1$ +% (one--egy, thousand--ezer, million--egymilli\'o,\dots); or +% \item the first character of the argument is +% a, A, e, E, i, I, o, O, u, or U; or +% \item the first character of the argument is +% l, L, m, M, n, N, r, R, s, S, x, X, y, or Y +% and the length of the argument is 1 or the second +% character is a non-letter. +% \end{itemize} +% At the end it calls |\@tempa|, that is, it either typesets a `z' +% or nothing. +% \begin{macrocode} +\def\@@az#1#2\hbox#3!{% + \let\@tempa\@empty + \def\@tempb{z}% + \uppercase{% + \ifx5#1% + \let\@tempa\@tempb + \else\ifx1#1% + \count@\@ne + \hun@number@lehgth#2\hbox\hbox!% + \loop + \ifnum\count@>\thr@@ + \advance\count@-\thr@@ + \repeat + \ifnum\count@=\@ne + \let\@tempa\@tempb + \fi + \else + \@@az@string{#1}{#2}% + \fi\fi + }% + \@tempa} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\refstepcounter} +% |\refstepcounter| must be redefined in order to keep +% |\@currentlabel| unexpanded. This is necessary to enable +% the |\label| command to write a |\hunnewlabel| command +% to the aux file with the Roman numerals substituted by +% their Arabic representations. +% Of course, the original definition of |\refstepcounter| is +% saved and restored if the Hungarian language is switched off. +% \begin{macrocode} +\expandafter\addto\csname extras\CurrentOption\endcsname{% + \babel@save\refstepcounter + \def\refstepcounter#1{\stepcounter{#1}% + \def\@currentlabel{\csname p@#1\endcsname\csname the#1\endcsname}}% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\label} +% |\label| is redefined to write another line into the aux +% file: |\hunnewlabel{ }{ }| where the Roman numerals +% are replaced their Arabic representations. +% The original definition of |\label| is saved into +% |\old@label| and it is also called by |\label|. +% On leaving the Hungarian typesetting mode |\label|'s +% original is restored since it is added to |\noextrasmagyar|. +% \begin{macrocode} +\expandafter\addto\csname extras\CurrentOption\endcsname{% + \let\old@label\label + \def\label#1{\@bsphack + \old@label{#1}% + \begingroup + \let\romannumeral\number + \def\@roman##1{\number ##1}% + \def\@Roman##1{\number ##1}% + {\toks0={\noexpand\noexpand\noexpand\number}% + \def\number##1{\the\toks0 ##1}\xdef\tempb@{\thepage}}% + \edef\@tempa##1{\noexpand\protected@write\@auxout{}% + {\noexpand\string\noexpand\hunnewlabel + {##1}{{\@currentlabel}{\tempb@}}}}% + \@tempa{#1}% + \endgroup + \@esphack}% +} +\expandafter\addto\csname noextras\CurrentOption\endcsname{% + \let\label\old@label +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\hunnewlabel} +% Finally, |\hunnewlabel| is defined. +% It checks if the label's expansion (|#2|) differs from that +% one given in the |\newlabel| command. If yes +% (that is, the label contains some Roman numerals), +% it defines the macro |\hun@r@|\textit{label}, +% otherwise it does nothing. +% \begin{macrocode} +\def\hunnewlabel#1#2{% + \def\@tempa{#2}% + \expandafter\ifx\csname r@#1\endcsname\@tempa + \relax% \message{No need for def: #1}% + \else + \global\expandafter\let\csname hun@r@#1\endcsname\@tempa% + \fi +} +% \end{macrocode} +% \end{macro} +% +% For Hungarian the |`| character is made active. +% \changes{magyar-1.4c}{2001/03/05}{Make sure that the grave accent +% has catcode 12 \emph{before} it is made \cs{active}} +% \begin{macrocode} +\AtBeginDocument{% + \if@filesw\immediate\write\@auxout{\catcode096=12}\fi} +\initiate@active@char{`} +\expandafter\addto\csname extras\CurrentOption\endcsname{% + \languageshorthands{magyar}% + \bbl@activate{`}} +\expandafter\addto\csname noextras\CurrentOption\endcsname{% + \bbl@deactivate{`}} +% \end{macrocode} +% +% The character sequence |``| is declared as a shorthand +% in order to produce +% the opening quotation sign appropriate for Hungarian. +% \begin{macrocode} +\declare@shorthand{magyar}{``}{\glqq} +% \end{macrocode} +% +% In Hungarian there are some long double consonants which +% must be hyphenated specially. +% For all these long double consonants (except dzzs, that is +% extremely very-very rare) a shortcut is defined. +% \begin{macrocode} +\declare@shorthand{magyar}{`c}{\textormath{\bbl@disc{c}{cs}}{c}} +\declare@shorthand{magyar}{`C}{\textormath{\bbl@disc{C}{CS}}{C}} +\declare@shorthand{magyar}{`d}{\textormath{\bbl@disc{d}{dz}}{d}} +\declare@shorthand{magyar}{`D}{\textormath{\bbl@disc{D}{DZ}}{D}} +\declare@shorthand{magyar}{`g}{\textormath{\bbl@disc{g}{gy}}{g}} +\declare@shorthand{magyar}{`G}{\textormath{\bbl@disc{G}{GY}}{G}} +\declare@shorthand{magyar}{`l}{\textormath{\bbl@disc{l}{ly}}{l}} +\declare@shorthand{magyar}{`L}{\textormath{\bbl@disc{L}{LY}}{L}} +\declare@shorthand{magyar}{`n}{\textormath{\bbl@disc{n}{ny}}{n}} +\declare@shorthand{magyar}{`N}{\textormath{\bbl@disc{N}{NY}}{N}} +\declare@shorthand{magyar}{`s}{\textormath{\bbl@disc{s}{sz}}{s}} +\declare@shorthand{magyar}{`S}{\textormath{\bbl@disc{S}{SZ}}{S}} +\declare@shorthand{magyar}{`t}{\textormath{\bbl@disc{t}{ty}}{t}} +\declare@shorthand{magyar}{`T}{\textormath{\bbl@disc{T}{TY}}{T}} +\declare@shorthand{magyar}{`z}{\textormath{\bbl@disc{z}{zs}}{z}} +\declare@shorthand{magyar}{`Z}{\textormath{\bbl@disc{Z}{ZS}}{Z}} +% \end{macrocode} +% +% The macro |\ldf@finish| takes care of looking for a +% configuration file, setting the main language to be switched on +% at |\begin{document}| and resetting the category code of +% \texttt{@} to its original value. +% \changes{magyar-1.3h}{1996/10/30}{Now use \cs{ldf@finish} to wrap up} +% \begin{macrocode} +\ldf@finish\CurrentOption +% +% \end{macrocode} +% +% \Finale +%% +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +%% +\endinput diff --git a/Master/texmf-dist/source/generic/babel/magyar.ins b/Master/texmf-dist/source/generic/babel/magyar.ins new file mode 100644 index 00000000000..ea4b4851d12 --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/magyar.ins @@ -0,0 +1,148 @@ +%% +%% This file will generate fast loadable files and documentation +%% driver files from the doc files in this package when run through +%% LaTeX or TeX. +%% +%% Copyright 1989-2005 Johannes L. Braams and any individual authors +%% listed elsewhere in this file. All rights reserved. +%% +%% This file is part of the Babel system. +%% -------------------------------------- +%% +%% It 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 +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% The Current Maintainer of this work is Johannes Braams. +%% +%% The list of all files belonging to the LaTeX base distribution is +%% given in the file `manifest.bbl. See also `legal.bbl' 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. +%% +%% --------------- start of docstrip commands ------------------ +%% +\def\filedate{1999/04/11} +\def\batchfile{magyar.ins} +\input docstrip.tex + +{\ifx\generate\undefined +\Msg{**********************************************} +\Msg{*} +\Msg{* This installation requires docstrip} +\Msg{* version 2.3c or later.} +\Msg{*} +\Msg{* An older version of docstrip has been input} +\Msg{*} +\Msg{**********************************************} +\errhelp{Move or rename old docstrip.tex.} +\errmessage{Old docstrip in input path} +\batchmode +\csname @@end\endcsname +\fi} + +\declarepreamble\mainpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl 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. +\endpreamble + +\declarepreamble\fdpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl for additional +information. + +In particular, permission is granted to customize the declarations in +this file to serve the needs of your installation. + +However, NO PERMISSION is granted to distribute a modified version +of this file under its original name. + +\endpreamble + +\keepsilent + +\usedir{tex/generic/babel} + +\usepreamble\mainpreamble +\generate{\file{magyar.ldf}{\from{magyar.dtx}{code}} + } +\usepreamble\fdpreamble + +\ifToplevel{ +\Msg{***********************************************************} +\Msg{*} +\Msg{* To finish the installation you have to move the following} +\Msg{* files into a directory searched by TeX:} +\Msg{*} +\Msg{* \space\space All *.def, *.fd, *.ldf, *.sty} +\Msg{*} +\Msg{* To produce the documentation run the files ending with} +\Msg{* '.dtx' and `.fdd' through LaTeX.} +\Msg{*} +\Msg{* Happy TeXing} +\Msg{***********************************************************} +} + +\endinput diff --git a/Master/texmf-dist/source/generic/babel/ngermanb.dtx b/Master/texmf-dist/source/generic/babel/ngermanb.dtx new file mode 100644 index 00000000000..12b940fdceb --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/ngermanb.dtx @@ -0,0 +1,357 @@ +% \iffalse meta-comment +% +% Copyright 1989-2005 Johannes L. Braams and any individual authors +% listed elsewhere in this file. All rights reserved. +% +% This file is part of the Babel system. +% -------------------------------------- +% +% It 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 +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2003/12/01 or later. +% +% This work has the LPPL maintenance status "maintained". +% +% The Current Maintainer of this work is Johannes Braams. +% +% The list of all files belonging to the Babel system is +% given in the file `manifest.bbl. See also `legal.bbl' 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 +% \CheckSum{266} +% +% \iffalse +% Tell the \LaTeX\ system who we are and write an entry on the +% transcript. +%<*dtx> +\ProvidesFile{ngermanb.dtx} +% +%\ProvidesLanguage{ngermanb} +%\fi +%\ProvidesFile{ngermanb.dtx} + [2004/02/20 v2.6m new German support from the babel system] +%\iffalse +%% File `ngermanb.dtx' +%% Babel package for LaTeX version 2e +%% Copyright (C) 1989 - 2004 +%% by Johannes Braams, TeXniek +% +%% new Germanb Language Definition File +%% Copyright (C) 1989 - 2004 +%% by Bernd Raichle raichle at azu.Informatik.Uni-Stuttgart.de +%% Johannes Braams, TeXniek, +%% Walter Schmidt. +% This file is based on german.tex version 2.5e +% by Bernd Raichle, Hubert Partl et.al. +% +%% Please report errors to: J.L. Braams +%% babel at braams.cistron.nl +% +%<*filedriver> +\documentclass{ltxdoc} +\font\manual=logo10 % font used for the METAFONT logo, etc. +\newcommand*\MF{{\manual META}\-{\manual FONT}} +\newcommand*\TeXhax{\TeX hax} +\newcommand*\babel{\textsf{babel}} +\newcommand*\langvar{$\langle \it lang \rangle$} +\newcommand*\note[1]{} +\newcommand*\Lopt[1]{\textsf{#1}} +\newcommand*\file[1]{\texttt{#1}} +\begin{document} + \DocInput{ngermanb.dtx} +\end{document} +% +%\fi +% \GetFileInfo{ngermanb.dtx} +% +% \changes{ngermanb-2.6f}{1999/03/24}{Renamed from \file{germanb.ldf}; +% language names changed from \texttt{german} and \texttt{austrian} +% to \texttt{ngerman} and \texttt{naustrian}.} +% +% \section{The German language -- new orthography} +% +% The file \file{\filename}\footnote{The file described in this +% section has version number \fileversion\ and was last revised on +% \filedate.} defines all the language definition macros for the +% German language with the `new orthography' introduced in +% August 1998. This includes also the Austrian dialect of this +% language. +% +% As with the `traditional' German orthography, +% the character |"| is made active, and +% the commands in table~\ref{tab:german-quote} can be used, except +% for |"ck| and |"ff| etc., which are no longer required. +% +% The internal language names are |ngerman| and |naustrian|. +% +% \StopEventually{} +% +% When this file was read through the option \Lopt{ngermanb} we make +% it behave as if \Lopt{ngerman} was specified. +% \begin{macrocode} +\def\bbl@tempa{ngermanb} +\ifx\CurrentOption\bbl@tempa + \def\CurrentOption{ngerman} +\fi +% \end{macrocode} +% +% The macro |\LdfInit| takes care of preventing that this file is +% loaded more than once, checking the category code of the +% \texttt{@} sign, etc. +% \begin{macrocode} +%<*code> +\LdfInit\CurrentOption{captions\CurrentOption} +% \end{macrocode} +% +% When this file is read as an option, i.e., by the |\usepackage| +% command, \texttt{ngerman} will be an `unknown' language, so we +% have to make it known. So we check for the existence of +% |\l@ngerman| to see whether we have to do something here. +% +% \begin{macrocode} +\ifx\l@ngerman\@undefined + \@nopatterns{ngerman} + \adddialect\l@ngerman0 +\fi +% \end{macrocode} +% +% For the Austrian version of these definitions we just add another +% language. +% \begin{macrocode} +\adddialect\l@naustrian\l@ngerman +% \end{macrocode} +% +% The next step consists of defining commands to switch to (and +% from) the German language. +% +% \begin{macro}{\captionsngerman} +% \begin{macro}{\captionsnaustrian} +% Either the macro |\captionnsgerman| or the macro +% |\captionsnaustrian| will define all strings used in the four +% standard document classes provided with \LaTeX. +% +% \changes{ngermanb-2.6k}{2000/09/20}{Added \cs{glossaryname}} +% \begin{macrocode} +\@namedef{captions\CurrentOption}{% + \def\prefacename{Vorwort}% + \def\refname{Literatur}% + \def\abstractname{Zusammenfassung}% + \def\bibname{Literaturverzeichnis}% + \def\chaptername{Kapitel}% + \def\appendixname{Anhang}% + \def\contentsname{Inhaltsverzeichnis}% % oder nur: Inhalt + \def\listfigurename{Abbildungsverzeichnis}% + \def\listtablename{Tabellenverzeichnis}% + \def\indexname{Index}% + \def\figurename{Abbildung}% + \def\tablename{Tabelle}% % oder: Tafel + \def\partname{Teil}% + \def\enclname{Anlage(n)}% % oder: Beilage(n) + \def\ccname{Verteiler}% % oder: Kopien an + \def\headtoname{An}% + \def\pagename{Seite}% + \def\seename{siehe}% + \def\alsoname{siehe auch}% + \def\proofname{Beweis}% + \def\glossaryname{Glossar}% + } +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\datengerman} +% The macro |\datengerman| redefines the command +% |\today| to produce German dates. +% \begin{macrocode} +\def\month@ngerman{\ifcase\month\or + Januar\or Februar\or M\"arz\or April\or Mai\or Juni\or + Juli\or August\or September\or Oktober\or November\or Dezember\fi} +\def\datengerman{\def\today{\number\day.~\month@ngerman + \space\number\year}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\dateanustrian} +% The macro |\datenaustrian| redefines the command +% |\today| to produce Austrian version of the German dates. +% \begin{macrocode} +\def\datenaustrian{\def\today{\number\day.~\ifnum1=\month + J\"anner\else \month@ngerman\fi \space\number\year}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\extrasngerman} +% \begin{macro}{\extrasnaustrian} +% \begin{macro}{\noextrasngerman} +% \begin{macro}{\noextrasnaustrian} +% Either the macro |\extrasngerman| or the macros |\extrasnaustrian| +% will perform all the extra definitions needed for the German +% language. The macro |\noextrasngerman| is used to cancel the +% actions of |\extrasngerman|. +% +% For German (as well as for Dutch) the \texttt{"} character is +% made active. This is done once, later on its definition may vary. +% \begin{macrocode} +\initiate@active@char{"} +\@namedef{extras\CurrentOption}{% + \languageshorthands{ngerman}} +\expandafter\addto\csname extras\CurrentOption\endcsname{% + \bbl@activate{"}} +% \end{macrocode} +% Don't forget to turn the shorthands off again. +% \changes{ngermanb-2.6j}{1999/12/16}{Deactivate shorthands ouside of +% German} +% \begin{macrocode} +\addto\noextrasngerman{\bbl@deactivate{"}} +% \end{macrocode} +% +% +% In order for \TeX\ to be able to hyphenate German words which +% contain `\ss' (in the \texttt{OT1} position |^^Y|) we have to +% give the character a nonzero |\lccode| (see Appendix H, the \TeX +% book). +% \begin{macrocode} +\expandafter\addto\csname extras\CurrentOption\endcsname{% + \babel@savevariable{\lccode25}% + \lccode25=25} +% \end{macrocode} +% +% The umlaut accent macro |\"| is changed to lower the umlaut dots. +% The redefinition is done with the help of |\umlautlow|. +% \begin{macrocode} +\expandafter\addto\csname extras\CurrentOption\endcsname{% + \babel@save\"\umlautlow} +\@namedef{noextras\CurrentOption}{\umlauthigh} +% \end{macrocode} +% The current +% version of the `new' German hyphenation patterns (\file{dehyphn.tex} +% is to be used with |\lefthyphenmin| and |\righthyphenmin| set to~2. +% \changes{ngermanb-2.6k}{2000/09/22}{Now use \cs{providehyphenmins} to +% provide a default value} +% \begin{macrocode} +\providehyphenmins{\CurrentOption}{\tw@\tw@} +% \end{macrocode} +% For German texts we need to make sure that |\frenchspacing| is +% turned on. +% \changes{ngermanb-2.6m}{2001/01/26}{Turn frenchspacing on, as in +% \texttt{german.sty}} +% \begin{macrocode} +\expandafter\addto\csname extras\CurrentOption\endcsname{% + \bbl@frenchspacing} +\expandafter\addto\csname noextras\CurrentOption\endcsname{% + \bbl@nonfrenchspacing} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% The code above is necessary because we need an extra active +% character. This character is then used as indicated in +% table~\ref{tab:german-quote}. +% +% To be able to define the function of |"|, we first define a +% couple of `support' macros. +% +% +% \begin{macro}{\dq} +% We save the original double quote character in |\dq| to keep +% it available, the math accent |\"| can now be typed as |"|. +% \begin{macrocode} +\begingroup \catcode`\"12 +\def\x{\endgroup + \def\@SS{\mathchar"7019 } + \def\dq{"}} +\x +% \end{macrocode} +% \end{macro} +% +% Now we can define the doublequote macros: the umlauts, +% \begin{macrocode} +\declare@shorthand{ngerman}{"a}{\textormath{\"{a}\allowhyphens}{\ddot a}} +\declare@shorthand{ngerman}{"o}{\textormath{\"{o}\allowhyphens}{\ddot o}} +\declare@shorthand{ngerman}{"u}{\textormath{\"{u}\allowhyphens}{\ddot u}} +\declare@shorthand{ngerman}{"A}{\textormath{\"{A}\allowhyphens}{\ddot A}} +\declare@shorthand{ngerman}{"O}{\textormath{\"{O}\allowhyphens}{\ddot O}} +\declare@shorthand{ngerman}{"U}{\textormath{\"{U}\allowhyphens}{\ddot U}} +% \end{macrocode} +% tremas, +% \begin{macrocode} +\declare@shorthand{ngerman}{"e}{\textormath{\"{e}}{\ddot e}} +\declare@shorthand{ngerman}{"E}{\textormath{\"{E}}{\ddot E}} +\declare@shorthand{ngerman}{"i}{\textormath{\"{\i}}% + {\ddot\imath}} +\declare@shorthand{ngerman}{"I}{\textormath{\"{I}}{\ddot I}} +% \end{macrocode} +% german es-zet (sharp s), +% \begin{macrocode} +\declare@shorthand{ngerman}{"s}{\textormath{\ss}{\@SS{}}} +\declare@shorthand{ngerman}{"S}{\SS} +\declare@shorthand{ngerman}{"z}{\textormath{\ss}{\@SS{}}} +\declare@shorthand{ngerman}{"Z}{SZ} +% \end{macrocode} +% german and french quotes, +% \begin{macrocode} +\declare@shorthand{ngerman}{"`}{\glqq} +\declare@shorthand{ngerman}{"'}{\grqq} +\declare@shorthand{ngerman}{"<}{\flqq} +\declare@shorthand{ngerman}{">}{\frqq} +% \end{macrocode} +% and some additional commands: +% \begin{macrocode} +\declare@shorthand{ngerman}{"-}{\nobreak\-\bbl@allowhyphens} +\declare@shorthand{ngerman}{"|}{% + \textormath{\penalty\@M\discretionary{-}{}{\kern.03em}% + \allowhyphens}{}} +\declare@shorthand{ngerman}{""}{\hskip\z@skip} +\declare@shorthand{ngerman}{"~}{\textormath{\leavevmode\hbox{-}}{-}} +\declare@shorthand{ngerman}{"=}{\penalty\@M-\hskip\z@skip} +% \end{macrocode} +% +% \begin{macro}{\mdqon} +% \begin{macro}{\mdqoff} +% All that's left to do now is to define a couple of commands +% for reasons of compatibility with \file{german.sty}. +% \begin{macrocode} +\def\mdqon{\shorthandon{"}} +\def\mdqoff{\shorthandoff{"}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% The macro |\ldf@finish| takes care of looking for a +% configuration file, setting the main language to be switched on +% at |\begin{document}| and resetting the category code of +% \texttt{@} to its original value. +% \begin{macrocode} +\ldf@finish\CurrentOption +% +% \end{macrocode} +% +% \Finale +%% +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +%% +\endinput diff --git a/Master/texmf-dist/source/generic/babel/norsk.dtx b/Master/texmf-dist/source/generic/babel/norsk.dtx new file mode 100644 index 00000000000..6fe166ca066 --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/norsk.dtx @@ -0,0 +1,453 @@ +% \iffalse meta-comment +% +% Copyright 1989-2005 Johannes L. Braams and any individual authors +% listed elsewhere in this file. All rights reserved. +% +% This file is part of the Babel system. +% -------------------------------------- +% +% It 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 +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2003/12/01 or later. +% +% This work has the LPPL maintenance status "maintained". +% +% The Current Maintainer of this work is Johannes Braams. +% +% The list of all files belonging to the Babel system is +% given in the file `manifest.bbl. See also `legal.bbl' 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 +%\CheckSum{305} +% \iffalse +% Tell the \LaTeX\ system who we are and write an entry on the +% transcript. +%<*dtx> +\ProvidesFile{norsk.dtx} +% +%\ProvidesLanguage{norsk} +%\fi +%\ProvidesFile{norsk.dtx} + [2005/03/30 v2.0h Norsk support from the babel system] +%\iffalse +%%File `norsk.dtx' +%% Babel package for LaTeX version 2e +%% Copyright (C) 1989 - 2005 +%% by Johannes Braams, TeXniek +% +%% Please report errors to: J.L. Braams +%% babel at braams.cistron.nl +% +% This file is part of the babel system, it provides the source +% code for the Norwegian language definition file. Contributions +% were made by Haavard Helstrup (HAAVARD@CERNVM) and Alv Kjetil +% Holme (HOLMEA@CERNVM); the `nynorsk' variant has been supplied by +% Per Steinar Iversen (iversen@vxcern.cern.ch) and Terje Engeset +% Petterst (TERJEEP@VSFYS1.FI.UIB.NO) +% +% Rune Kleveland (runekl at math.uio.no) added the shorthand +% definitions +%<*filedriver> +\documentclass{ltxdoc} +\newcommand*\TeXhax{\TeX hax} +\newcommand*\babel{\textsf{babel}} +\newcommand*\langvar{$\langle \it lang \rangle$} +\newcommand*\note[1]{} +\newcommand*\Lopt[1]{\textsf{#1}} +\newcommand*\file[1]{\texttt{#1}} +\begin{document} + \DocInput{norsk.dtx} +\end{document} +% +%\fi +% \GetFileInfo{norsk.dtx} +% +% \changes{norsk-1.0a}{1991/07/15}{Renamed \file{babel.sty} in +% \file{babel.com}} +% \changes{norsk-1.1a}{1992/02/16}{Brought up-to-date with babel 3.2a} +% \changes{norsk-1.1c}{1993/11/11}{Added a couple of translations +% (from Per Norman Oma, TeX@itk.unit.no)} +% \changes{norsk-1.2a}{1994/02/27}{Update for \LaTeXe} +% \changes{norsk-1.2d}{1994/06/26}{Removed the use of \cs{filedate} +% and moved identification after the loading of \file{babel.def}} +% \changes{norsk-1.2h}{1996/07/12}{Replaced \cs{undefined} with +% \cs{@undefined} and \cs{empty} with \cs{@empty} for consistency +% with \LaTeX} +% \changes{norsk-1.2h}{1996/10/10}{Moved the definition of +% \cs{atcatcode} right to the beginning.} +% +% +% \section{The Norwegian language} +% +% The file \file{\filename}\footnote{The file described in this +% section has version number \fileversion\ and was last revised on +% \filedate. Contributions were made by Haavard Helstrup +% (\texttt{HAAVARD@CERNVM)} and Alv Kjetil Holme +% (\texttt{HOLMEA@CERNVM}); the `nynorsk' variant has been supplied +% by Per Steinar Iversen \texttt{iversen@vxcern.cern.ch}) and Terje +% Engeset Petterst (\texttt{TERJEEP@VSFYS1.FI.UIB.NO)}; the +% shorthand definitions were provided by Rune Kleveland +% (\texttt{runekl@math.uio.no}).} defines all the language definition +% macros for the Norwegian language as well as for an alternative +% variant `nynorsk' of this language. +% +% For this language the character |"| is made active. In +% table~\ref{tab:norsk-quote} an overview is given of its purpose. +% \begin{table}[htb] +% \begin{center} +% \begin{tabular}{lp{.7\textwidth}} +% |"ff|& for |ff| to be hyphenated as |ff-f|, +% this is also implemented for b, d, f, g, l, m, n, +% p, r, s, and t. (|o"ppussing|) \\ +% |"ee|& Hyphenate |"ee| as |\'e-e|. (|komit"een|) \\ +% |"-| & an explicit hyphen sign, allowing hyphenation in the +% composing words. Use this for compound words when the +% hyphenation patterns fail to hyphenate +% properly. (|alpin"-anlegg|) \\ +% \verb="|= & Like |"-|, but inserts 0.03em space. Use it if +% the compound point is spanned by a ligature. +% (\verb=hoff"|intriger=) \\ +% |""| & Like |"-|, but producing no hyphen sign. +% (|i""g\aa{}r|) \\ +% |"~| & Like |-|, but allows no hyphenation at all. (|E"~cup|)\\ +% |"=| & Like |-|, but allowing hyphenation in the composing +% words. (|marksistisk"=leninistisk|) \\ +% |"<| & for French left double quotes (similar to $<<$). \\ +% |">| & for French right double quotes (similar to $>>$). \\ +% \end{tabular} +% \caption{The extra definitions made +% by \file{norsk.sty}}\label{tab:norsk-quote} +% \end{center} +% \end{table} +% \changes{norsk-2.0a}{1998/06/24}{Describe the use of double quote as +% active character} +% +% Rune Kleveland distributes a Norwegian dictionary for ispell +% (570000 words). It can be found at +% |http://www.uio.no/~runekl/dictionary.html|. +% +% This dictionary supports the spellings |spi"sslede| for +% `spisslede' (hyphenated spiss-slede) and other such words, and +% also suggest the spelling |spi"sslede| for `spisslede' and +% `spissslede'. +% +% \StopEventually{} +% +% The macro |\LdfInit| takes care of preventing that this file is +% loaded more than once, checking the category code of the +% \texttt{@} sign, etc. +% \changes{norsk-1.2h}{1996/11/03}{Now use \cs{LdfInit} to perform +% initial checks} +% \begin{macrocode} +%<*code> +\LdfInit\CurrentOption{captions\CurrentOption} +% \end{macrocode} +% +% When this file is read as an option, i.e. by the |\usepackage| +% command, \texttt{norsk} will be an `unknown' language in which +% case we have to make it known. So we check for the existence of +% |\l@norsk| to see whether we have to do something here. +% +% \changes{norsk-1.0c}{1991/10/29}{Removed use of \cs{@ifundefined}} +% \changes{norsk-1.1a}{1992/02/16}{Added a warning when no hyphenation +% patterns were loaded.} +% \changes{norsk-1.2d}{1994/06/26}{Now use \cs{@nopatterns} to produce +% the warning} +% \begin{macrocode} +\ifx\l@norsk\@undefined + \@nopatterns{Norsk} + \adddialect\l@norsk0\fi +% \end{macrocode} +% +% \begin{macro}{\norskhyphenmins} +% Some sets of Norwegian hyphenation patterns can be used with +% |\lefthyphenmin| set to~1 and |\righthyphenmin| set to~2, but +% the most common set |nohyph.tex| can't. So we use +% |\lefthyphenmin=2| by default. +% \changes{norsk-1.2f}{1995/07/02}{Added setting of hyphenmin +% parameters} +% \changes{norsk-2.0a}{1998/06/24}{Changed setting of hyphenmin +% parameters to 2~2} +% \changes{norsk-2.0e}{2000/09/22}{Now use \cs{providehyphenmins} to +% provide a default value} +% \begin{macrocode} +\providehyphenmins{\CurrentOption}{\tw@\tw@} +% \end{macrocode} +% \end{macro} +% +% Now we have to decide which version of the captions should be +% made available. This can be done by checking the contents of +% |\CurrentOption|. +% \begin{macrocode} +\def\bbl@tempa{norsk} +\ifx\CurrentOption\bbl@tempa +% \end{macrocode} +% +% The next step consists of defining commands to switch to (and +% from) the Norwegian language. +% +% \begin{macro}{\captionsnorsk} +% The macro |\captionsnorsk| defines all strings used +% in the four standard documentclasses provided with \LaTeX. +% \changes{norsk-1.1a}{1992/02/16}{Added \cs{seename}, \cs{alsoname} and +% \cs{prefacename}} +% \changes{norsk-1.1b}{1993/07/15}{\cs{headpagename} should be +% \cs{pagename}} +% \changes{norsk-1.2f}{1995/07/02}{Added \cs{proofname} for +% AMS-\LaTeX} +% \changes{norsk-1.2g}{1996/04/01}{Replaced `Proof' by its +% translation} +% \changes{norsk-2.0e}{2000/09/20}{Added \cs{glossaryname}} +% \changes{norsk-2.0g}{1996/04/01}{Replaced `Glossary' by its +% translation} +% \begin{macrocode} + \def\captionsnorsk{% + \def\prefacename{Forord}% + \def\refname{Referanser}% + \def\abstractname{Sammendrag}% + \def\bibname{Bibliografi}% or Litteraturoversikt + % or Litteratur or Referanser + \def\chaptername{Kapittel}% + \def\appendixname{Tillegg}% or Appendiks + \def\contentsname{Innhold}% + \def\listfigurename{Figurer}% or Figurliste + \def\listtablename{Tabeller}% or Tabelliste + \def\indexname{Register}% + \def\figurename{Figur}% + \def\tablename{Tabell}% + \def\partname{Del}% + \def\enclname{Vedlegg}% + \def\ccname{Kopi sendt}% + \def\headtoname{Til}% in letter + \def\pagename{Side}% + \def\seename{Se}% + \def\alsoname{Se ogs\aa{}}% + \def\proofname{Bevis}% + \def\glossaryname{Ordliste}% + } +\else +% \end{macrocode} +% \end{macro} +% +% For the `nynorsk' version of these definitions we just add a +% ``dialect''. +% \begin{macrocode} + \adddialect\l@nynorsk\l@norsk +% \end{macrocode} +% +% \begin{macro}{\captionsnynorsk} +% The macro |\captionsnynorsk| defines all strings used in the four +% standard documentclasses provided with \LaTeX, but using a +% different spelling than in the command |\captionsnorsk|. +% \changes{norsk-1.1a}{1992/02/16}{Added \cs{seename}, \cs{alsoname} and +% \cs{prefacename}} +% \changes{norsk-1.1b}{1993/07/15}{\cs{headpagename} should be +% \cs{pagename}} +% \changes{norsk-1.2g}{1996/04/01}{Replaced `Proof' by its +% translation} +% \changes{norsk-2.0e}{2000/09/20}{Added \cs{glossaryname}} +% \changes{norsk-2.0g}{1996/04/01}{Replaced `Glossary' by its +% translation} +% \changes{norks-2.0h}{2001/01/12}{Changed \cs{ccname} and \cs{alsoname}} +% \begin{macrocode} + \def\captionsnynorsk{% + \def\prefacename{Forord}% + \def\refname{Referansar}% + \def\abstractname{Samandrag}% + \def\bibname{Litteratur}% or Litteraturoversyn + % or Referansar + \def\chaptername{Kapittel}% + \def\appendixname{Tillegg}% or Appendiks + \def\contentsname{Innhald}% + \def\listfigurename{Figurar}% or Figurliste + \def\listtablename{Tabellar}% or Tabelliste + \def\indexname{Register}% + \def\figurename{Figur}% + \def\tablename{Tabell}% + \def\partname{Del}% + \def\enclname{Vedlegg}% + \def\ccname{Kopi til}% + \def\headtoname{Til}% in letter + \def\pagename{Side}% + \def\seename{Sj\aa{}}% + \def\alsoname{Sj\aa{} \`{o}g}% + \def\proofname{Bevis}% + \def\glossaryname{Ordliste}% + } +\fi +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\datenorsk} +% The macro |\datenorsk| redefines the command |\today| to produce +% Norwegian dates. +% \changes{norsk-1.2i}{1997/10/01}{Use \cs{edef} to define +% \cs{today} to save memory} +% \changes{norsk-1.2i}{1998/03/28}{use \cs{def} instead of \cs{edef}} +% \begin{macrocode} +\@namedef{date\CurrentOption}{% + \def\today{\number\day.~\ifcase\month\or + januar\or februar\or mars\or april\or mai\or juni\or + juli\or august\or september\or oktober\or november\or desember + \fi + \space\number\year}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\extrasnorsk} +% \begin{macro}{\extrasnynorsk} +% The macro |\extrasnorsk| will perform all the extra definitions +% needed for the Norwegian language. The macro |\noextrasnorsk| is +% used to cancel the actions of |\extrasnorsk|. +% +% Norwegian typesetting requires |\frencspacing| to be in effect. +% \begin{macrocode} +\@namedef{extras\CurrentOption}{\bbl@frenchspacing} +\@namedef{noextras\CurrentOption}{\bbl@nonfrenchspacing} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% For Norsk the \texttt{"} character is made active. This is done +% once, later on its definition may vary. +% \changes{norsk-2.0a}{1998/06/24}{Made double quote character active} +% \begin{macrocode} +\initiate@active@char{"} +\expandafter\addto\csname extras\CurrentOption\endcsname{% + \languageshorthands{norsk}} +\expandafter\addto\csname extras\CurrentOption\endcsname{% + \bbl@activate{"}} +% \end{macrocode} +% Don't forget to turn the shorthands off again. +% \changes{norsk-2.0c}{1999/12/17}{Deactivate shorthands ouside of +% Norsk} +% \begin{macrocode} +\expandafter\addto\csname noextras\CurrentOption\endcsname{% + \bbl@deactivate{"}} +% \end{macrocode} +% +% The code above is necessary because we need to define a number of +% shorthand commands. These sharthand commands are then used as +% indicated in table~\ref{tab:norsk-quote}. +% +% To be able to define the function of |"|, we first define a +% couple of `support' macros. +% +% \begin{macro}{\dq} +% We save the original double quote character in |\dq| to keep +% it available, the math accent |\"| can now be typed as |"|. +% \begin{macrocode} +\begingroup \catcode`\"12 +\def\x{\endgroup + \def\@SS{\mathchar"7019 } + \def\dq{"}} +\x +% \end{macrocode} +% \end{macro} +% +% Now we can define the discretionary shorthand commands. +% The number of words where such hyphenation is required is for +% each character +% \begin{center} +% \begin{tabular}{*{11}c} +% b&d&f &g&k &l &n&p &r&s &t \\ +% 4&4&15&3&43&30&8&12&1&33&35 +% \end{tabular} +% \end{center} +% taken from a list of 83000 ispell-roots. +% +% \changes{norsk-2.0d}{2000/02/29}{Shorthands are the same for both +% spelling variants, no need to use \cs{CurrentOption}} +% \begin{macrocode} +\declare@shorthand{norsk}{"b}{\textormath{\bbl@disc b{bb}}{b}} +\declare@shorthand{norsk}{"B}{\textormath{\bbl@disc B{BB}}{B}} +\declare@shorthand{norsk}{"d}{\textormath{\bbl@disc d{dd}}{d}} +\declare@shorthand{norsk}{"D}{\textormath{\bbl@disc D{DD}}{D}} +\declare@shorthand{norsk}{"e}{\textormath{\bbl@disc e{\'e}}{}} +\declare@shorthand{norsk}{"E}{\textormath{\bbl@disc E{\'E}}{}} +\declare@shorthand{norsk}{"F}{\textormath{\bbl@disc F{FF}}{F}} +\declare@shorthand{norsk}{"g}{\textormath{\bbl@disc g{gg}}{g}} +\declare@shorthand{norsk}{"G}{\textormath{\bbl@disc G{GG}}{G}} +\declare@shorthand{norsk}{"k}{\textormath{\bbl@disc k{kk}}{k}} +\declare@shorthand{norsk}{"K}{\textormath{\bbl@disc K{KK}}{K}} +\declare@shorthand{norsk}{"l}{\textormath{\bbl@disc l{ll}}{l}} +\declare@shorthand{norsk}{"L}{\textormath{\bbl@disc L{LL}}{L}} +\declare@shorthand{norsk}{"n}{\textormath{\bbl@disc n{nn}}{n}} +\declare@shorthand{norsk}{"N}{\textormath{\bbl@disc N{NN}}{N}} +\declare@shorthand{norsk}{"p}{\textormath{\bbl@disc p{pp}}{p}} +\declare@shorthand{norsk}{"P}{\textormath{\bbl@disc P{PP}}{P}} +\declare@shorthand{norsk}{"r}{\textormath{\bbl@disc r{rr}}{r}} +\declare@shorthand{norsk}{"R}{\textormath{\bbl@disc R{RR}}{R}} +\declare@shorthand{norsk}{"s}{\textormath{\bbl@disc s{ss}}{s}} +\declare@shorthand{norsk}{"S}{\textormath{\bbl@disc S{SS}}{S}} +\declare@shorthand{norsk}{"t}{\textormath{\bbl@disc t{tt}}{t}} +\declare@shorthand{norsk}{"T}{\textormath{\bbl@disc T{TT}}{T}} +% \end{macrocode} +% We need to treat |"f| a bit differently in order to preserve the +% ff-ligature. +% \changes{norsk-2.0b}{1999/11/19}{Copied the coding for \texttt{"f} +% from germanb.dtx version 2.6g} +% \begin{macrocode} +\declare@shorthand{norsk}{"f}{\textormath{\bbl@discff}{f}} +\def\bbl@discff{\penalty\@M + \afterassignment\bbl@insertff \let\bbl@nextff= } +\def\bbl@insertff{% + \if f\bbl@nextff + \expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi + {\relax\discretionary{ff-}{f}{ff}\allowhyphens}{f\bbl@nextff}} +\let\bbl@nextff=f +% \end{macrocode} +% We now define the French double quotes and some commands +% concerning hyphenation: +% \changes{norsk-2.0b}{1999/11/22}{added the french double quotes} +% \changes{norsk-2.0d}{2000/01/28}{Use \cs{bbl@allowhyphens} in +% \texttt{"-}} +% \begin{macrocode} +\declare@shorthand{norsk}{"<}{\flqq} +\declare@shorthand{norsk}{">}{\frqq} +\declare@shorthand{norsk}{"-}{\penalty\@M\-\bbl@allowhyphens} +\declare@shorthand{norsk}{"|}{% + \textormath{\penalty\@M\discretionary{-}{}{\kern.03em}% + \allowhyphens}{}} +\declare@shorthand{norsk}{""}{\hskip\z@skip} +\declare@shorthand{norsk}{"~}{\textormath{\leavevmode\hbox{-}}{-}} +\declare@shorthand{norsk}{"=}{\penalty\@M-\hskip\z@skip} +% \end{macrocode} +% +% The macro |\ldf@finish| takes care of looking for a +% configuration file, setting the main language to be switched on +% at |\begin{document}| and resetting the category code of +% \texttt{@} to its original value. +% \changes{norsk-1.2h}{1996/11/03}{Now use \cs{ldf@finish} to wrap up} +% \begin{macrocode} +\ldf@finish\CurrentOption +% +% \end{macrocode} +% +% \Finale +%% +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +%% +\endinput diff --git a/Master/texmf-dist/source/generic/babel/norsk.ins b/Master/texmf-dist/source/generic/babel/norsk.ins new file mode 100644 index 00000000000..9ec2729e642 --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/norsk.ins @@ -0,0 +1,148 @@ +%% +%% This file will generate fast loadable files and documentation +%% driver files from the doc files in this package when run through +%% LaTeX or TeX. +%% +%% Copyright 1989-2005 Johannes L. Braams and any individual authors +%% listed elsewhere in this file. All rights reserved. +%% +%% This file is part of the Babel system. +%% -------------------------------------- +%% +%% It 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 +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% The Current Maintainer of this work is Johannes Braams. +%% +%% The list of all files belonging to the LaTeX base distribution is +%% given in the file `manifest.bbl. See also `legal.bbl' 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. +%% +%% --------------- start of docstrip commands ------------------ +%% +\def\filedate{1999/04/11} +\def\batchfile{norsk.ins} +\input docstrip.tex + +{\ifx\generate\undefined +\Msg{**********************************************} +\Msg{*} +\Msg{* This installation requires docstrip} +\Msg{* version 2.3c or later.} +\Msg{*} +\Msg{* An older version of docstrip has been input} +\Msg{*} +\Msg{**********************************************} +\errhelp{Move or rename old docstrip.tex.} +\errmessage{Old docstrip in input path} +\batchmode +\csname @@end\endcsname +\fi} + +\declarepreamble\mainpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl 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. +\endpreamble + +\declarepreamble\fdpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl for additional +information. + +In particular, permission is granted to customize the declarations in +this file to serve the needs of your installation. + +However, NO PERMISSION is granted to distribute a modified version +of this file under its original name. + +\endpreamble + +\keepsilent + +\usedir{tex/generic/babel} + +\usepreamble\mainpreamble +\generate{\file{norsk.ldf}{\from{norsk.dtx}{code}} + } +\usepreamble\fdpreamble + +\ifToplevel{ +\Msg{***********************************************************} +\Msg{*} +\Msg{* To finish the installation you have to move the following} +\Msg{* files into a directory searched by TeX:} +\Msg{*} +\Msg{* \space\space All *.def, *.fd, *.ldf, *.sty} +\Msg{*} +\Msg{* To produce the documentation run the files ending with} +\Msg{* '.dtx' and `.fdd' through LaTeX.} +\Msg{*} +\Msg{* Happy TeXing} +\Msg{***********************************************************} +} + +\endinput diff --git a/Master/texmf-dist/source/generic/babel/polish.dtx b/Master/texmf-dist/source/generic/babel/polish.dtx new file mode 100644 index 00000000000..a2e66978558 --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/polish.dtx @@ -0,0 +1,563 @@ +% \iffalse meta-comment +% +% Copyright 1989-2005 Johannes L. Braams and any individual authors +% listed elsewhere in this file. All rights reserved. +% +% This file is part of the Babel system. +% -------------------------------------- +% +% It 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 +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2003/12/01 or later. +% +% This work has the LPPL maintenance status "maintained". +% +% The Current Maintainer of this work is Johannes Braams. +% +% The list of all files belonging to the Babel system is +% given in the file `manifest.bbl. See also `legal.bbl' 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 +% \CheckSum{543} +% +% \iffalse +% Tell the \LaTeX\ system who we are and write an entry on the +% transcript. +%<*dtx> +\ProvidesFile{polish.dtx} +% +%\ProvidesLanguage{polish} +%\fi +%\ProvidesFile{polish.dtx} + [2005/03/31 v1.2l Polish support from the babel system] +%\iffalse +%% File `polish.dtx' +%% Babel package for LaTeX version 2e +%% Copyright (C) 1989 -- 2005 +%% by Johannes Braams, TeXniek +% +%% Polish Language Definition File +%% Copyright (C) 1989 - 2005 +%% by Elmar Schalueck, Michael Janich +% Universitaet-Gesamthochschule Paderborn +% Warburger Strasse 100 +% 4790 Paderborn +% Germany +% elmar at uni-paderborn.de +% massa at uni-paderborn.de +% +%% Please report errors to: J.L. Braams +%% babel at braams.cistron.nl +% +% This file is part of the babel system, it provides the source +% code for the Polish language definition file. It was developped +% out of Polish.tex, which was written by Elmar Schalueck and +% Michael Janich. Polish.tex was based on code by Leszek +% Holenderski, Jerzy Ryll and J. S. Bie\'n from Faculty of +% Mathematics,Informatics and Mechanics of Warsaw University, exept +% of Jerzy Ryll (Instytut Informatyki Uniwersytetu Warszawskiego). +%<*filedriver> +\documentclass{ltxdoc} +\newcommand*\TeXhax{\TeX hax} +\newcommand*\babel{\textsf{babel}} +\newcommand*\langvar{$\langle \it lang \rangle$} +\newcommand*\note[1]{} +\newcommand*\Lopt[1]{\textsf{#1}} +\newcommand*\file[1]{\texttt{#1}} +\begin{document} + \DocInput{polish.dtx} +\end{document} +% +%\fi +% \GetFileInfo{polish.dtx} +% +% \changes{polish-1.1c}{1994/06/26}{Removed the use of \cs{filedate} +% and moved identification after the loading of babel.def} +% \changes{polish-1.2d}{1996/10/10}{Replaced \cs{undefined} with +% \cs{@undefined} and \cs{empty} with \cs{@empty} for consistency +% with \LaTeX, moved the definition of \cs{atcatcode} right to the +% beginning.} +% +% \section{The Polish language} +% +% The file \file{\filename}\footnote{The file described in this +% section has version number \fileversion\ and was last revised on +% \filedate.} defines all the language-specific macros for the +% Polish language. +% +% For this language the character |"| is made active. In +% table~\ref{tab:polish-quote} an overview is given of its purpose. +% \begin{table}[htb] +% \begin{center} +% \begin{tabular}{lp{8cm}} +% |"a| & or |\aob|, for tailed-a (like \c{a})\\ +% |"A| & or |\Aob|, for tailed-A (like \c{A})\\ +% |"e| & or |\eob|, for tailed-e (like \c{e})\\ +% |"E| & or |\Eob|, for tailed-E (like \c{E})\\ +% |"c| & or |\'c|, for accented c (like \'c), +% same with uppercase letters and n,o,s\\ +% |"l| & or |\lpb{}|, for l with stroke (like \l)\\ +% |"L| & or |\Lpb{}|, for L with stroke (like \L)\\ +% |"r| & or |\zkb{}|, for pointed z (like \.z), cf. +% pronounciation\\ +% |"R| & or |\Zkb{}|, for pointed Z (like \.Z)\\ +% |"z| & or |\'z|, for accented z\\ +% |"Z| & or |\'Z|, for accented Z\\ +% \verb="|= & disable ligature at this position.\\ +% |"-| & an explicit hyphen sign, allowing hyphenation +% in the rest of the word.\\ +% |""| & like |"-|, but producing no hyphen sign +% (for compund words with hyphen, e.g.\ |x-""y|). \\ +% |"`| & for German left double quotes (looks like ,,). \\ +% |"'| & for German right double quotes. \\ +% |"<| & for French left double quotes (similar to $<<$). \\ +% |">| & for French right double quotes (similar to $>>$).\\ +% \end{tabular} +% \caption{The extra definitions made by \file{polish.sty}} +% \label{tab:polish-quote} +% \end{center} +% \end{table} +% +% \StopEventually{} +% +% The macro |\LdfInit| takes care of preventing that this file is +% loaded more than once, checking the category code of the +% \texttt{@} sign, etc. +% \changes{polish-1.2d}{1996/11/03}{Now use \cs{LdfInit} to perform +% initial checks} +% \begin{macrocode} +%<*code> +\LdfInit{polish}\captionspolish +% \end{macrocode} +% +% When this file is read as an option, i.e. by the |\usepackage| +% command, \texttt{polish} could be an `unknown' language in which +% case we have to make it known. So we check for the existence of +% |\l@polish| to see whether we have to do something here. +% +% \changes{polish-1.1c}{1994/06/26}{Now use \cs{@nopatterns} to +% produce the warning} +% \begin{macrocode} +\ifx\l@polish\@undefined + \@nopatterns{Polish} + \adddialect\l@polish0\fi +% \end{macrocode} +% +% The next step consists of defining commands to switch to (and +% from) the Polish language. +% +% \begin{macro}{\captionspolish} +% The macro |\captionspolish| defines all strings used in the four +% standard documentclasses provided with \LaTeX. +% \changes{polish-1.2b}{1995/07/04}{Added \cs{proofname} for +% AMS-\LaTeX} +% \changes{polish-1.2f}{1997/09/11}{Added translation for Proof and +% changed translation of Contents} +% \changes{polish-1.2i}{2000/09/19}{\cs{bibname} and \cs{refname} were +% swapped} +% \changes{polish-1.2i}{2000/09/19}{Added \cs{glossaryname}} +% \begin{macrocode} +\addto\captionspolish{% + \def\prefacename{Przedmowa}% + \def\refname{Literatura}% + \def\abstractname{Streszczenie}% + \def\bibname{Bibliografia}% + \def\chaptername{Rozdzia\l}% + \def\appendixname{Dodatek}% + \def\contentsname{Spis tre\'sci}% + \def\listfigurename{Spis rysunk\'ow}% + \def\listtablename{Spis tablic}% + \def\indexname{Indeks}% + \def\figurename{Rysunek}% + \def\tablename{Tablica}% + \def\partname{Cz\eob{}\'s\'c}% + \def\enclname{Za\l\aob{}cznik}% + \def\ccname{Kopie:}% + \def\headtoname{Do}% + \def\pagename{Strona}% + \def\seename{Por\'ownaj}% + \def\alsoname{Por\'ownaj tak\.ze}% + \def\proofname{Dow\'od}% + \def\glossaryname{Glossary}% <-- Needs translation +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\datepolish} +% The macro |\datepolish| redefines the command |\today| to produce +% Polish dates. +% \changes{polish-1.2f}{1997/10/01}{Use \cs{edef} to define +% \cs{today} to save memory} +% \changes{polish-1.2f}{1998/03/28}{use \cs{def} instead of \cs{edef}} +% \changes{polish-1.2i}{2000/01/08}{A missing comment character caused +% an unwanted space character in the output} +% \begin{macrocode} +\def\datepolish{% + \def\today{\number\day~\ifcase\month\or + stycznia\or lutego\or marca\or kwietnia\or maja\or czerwca\or lipca\or + sierpnia\or wrze\'snia\or pa\'zdziernika\or listopada\or grudnia\fi + \space\number\year}% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\extraspolish} +% \begin{macro}{\noextraspolish} +% The macro |\extraspolish| will perform all the extra definitions +% needed for the Polish language. The macro |\noextraspolish| is +% used to cancel the actions of |\extraspolish|. +% +% For Polish the \texttt{"} character is made active. This is +% done once, later on its definition may vary. Other languages in +% the same document may also use the \texttt{"} character for +% shorthands; we specify that the polish group of shorthands +% should be used. +% +% \begin{macrocode} +\initiate@active@char{"} +\addto\extraspolish{\languageshorthands{polish}} +\addto\extraspolish{\bbl@activate{"}} +% \end{macrocode} +% Don't forget to turn the shorthands off again. +% \changes{polish-1.2h}{1999/12/17}{Deactivate shorthands ouside of +% Polish} +% \begin{macrocode} +\addto\noextraspolish{\bbl@deactivate{"}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% The code above is necessary because we need an extra +% active character. This character is then used as indicated in +% table~\ref{tab:polish-quote}. +% +% If you have problems at the end of a word with a linebreak, use +% the other version without hyphenation tricks. Some TeX wizard may +% produce a better solution with forcasting another token to decide +% whether the character after the double quote is the last in a +% word. Do it and let us know. +% +% In Polish texts some letters get special diacritical marks. +% Leszek Holenderski designed the following code to position the +% diacritics correctly for every font in every size. These macros +% need a few extra dimension variables. +% +% \begin{macrocode} +\newdimen\pl@left +\newdimen\pl@down +\newdimen\pl@right +\newdimen\pl@temp +% \end{macrocode} +% +% \begin{macro}{\sob} +% The macro |\sob| is used to put the `ogonek' in the right +% place. +% +% \changes{polish-1.2d}{1996/08/18}{This macro is meant to be used in +% horizontal mode; so leave vertical mode if necessary} +% \begin{macrocode} +\def\sob#1#2#3#4#5{%parameters: letter and fractions hl,ho,vl,vo + \setbox0\hbox{#1}\setbox1\hbox{$_\mathchar'454$}\setbox2\hbox{p}% + \pl@right=#2\wd0 \advance\pl@right by-#3\wd1 + \pl@down=#5\ht1 \advance\pl@down by-#4\ht0 + \pl@left=\pl@right \advance\pl@left by\wd1 + \pl@temp=-\pl@down \advance\pl@temp by\dp2 \dp1=\pl@temp + \leavevmode + \kern\pl@right\lower\pl@down\box1\kern-\pl@left #1} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\aob} +% \begin{macro}{\Aob} +% \begin{macro}{\eob} +% \begin{macro}{\Eob} +% The ogonek is placed with the letters `a', `A', `e', and `E'. +% \changes{polish-1.2d}{1996/08/18}{Use the constructed version of the +% characters only in OT1; use proper characters in T1.} +% \begin{macrocode} +\DeclareTextCommand{\aob}{OT1}{\sob a{.66}{.20}{0}{.90}} +\DeclareTextCommand{\Aob}{OT1}{\sob A{.80}{.50}{0}{.90}} +\DeclareTextCommand{\eob}{OT1}{\sob e{.50}{.35}{0}{.93}} +\DeclareTextCommand{\Eob}{OT1}{\sob E{.60}{.35}{0}{.90}} +% \end{macrocode} +% For the 'new' \texttt{T1} encoding we can provide simpler +% definitions. +% \begin{macrocode} +\DeclareTextCommand{\aob}{T1}{\k a} +\DeclareTextCommand{\Aob}{T1}{\k A} +\DeclareTextCommand{\eob}{T1}{\k e} +\DeclareTextCommand{\Eob}{T1}{\k E} +% \end{macrocode} +% Construct the characters by default from the OT1 encoding. +% \begin{macrocode} +\ProvideTextCommandDefault{\aob}{\UseTextSymbol{OT1}{\aob}} +\ProvideTextCommandDefault{\Aob}{\UseTextSymbol{OT1}{\Aob}} +\ProvideTextCommandDefault{\eob}{\UseTextSymbol{OT1}{\eob}} +\ProvideTextCommandDefault{\Eob}{\UseTextSymbol{OT1}{\Eob}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\spb} +% The macro |\spb| is used to put the `poprzeczka' in the +% right place. +% +% \changes{polish-1.2d}{1996/08/18}{\cs{spb} is meant to be used in +% horizontal mode; so leave vertical mode if necessary} +% \begin{macrocode} +\def\spb#1#2#3#4#5{% + \setbox0\hbox{#1}\setbox1\hbox{\char'023}% + \pl@right=#2\wd0 \advance\pl@right by-#3\wd1 + \pl@down=#5\ht1 \advance\pl@down by-#4\ht0 + \pl@left=\pl@right \advance\pl@left by\wd1 + \ht1=\pl@down \dp1=-\pl@down + \leavevmode + \kern\pl@right\lower\pl@down\box1\kern-\pl@left #1} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\skb} +% The macro |\skb| is used to put the `kropka' in the +% right place. +% +% \changes{polish-1.2d}{1996/08/18}{\cs{skb} is meant to be used in +% horizontal mode; so leave vertical mode if necessary} +% \begin{macrocode} +\def\skb#1#2#3#4#5{% + \setbox0\hbox{#1}\setbox1\hbox{\char'056}% + \pl@right=#2\wd0 \advance\pl@right by-#3\wd1 + \pl@down=#5\ht1 \advance\pl@down by-#4\ht0 + \pl@left=\pl@right \advance\pl@left by\wd1 + \leavevmode + \kern\pl@right\lower\pl@down\box1\kern-\pl@left #1} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\textpl} +% For the `poprzeczka' and the `kropka' in text fonts we don't need +% any special coding, but we can (almost) use what is already +% available. +% +% \begin{macrocode} +\def\textpl{% + \def\lpb{\plll}% + \def\Lpb{\pLLL}% + \def\zkb{\.z}% + \def\Zkb{\.Z}} +% \end{macrocode} +% Initially we assume that typesetting is done with text fonts. +% \changes{polish-1.0a}{1993/11/05}{Initially execute `textpl} +% \begin{macrocode} +\textpl +% \end{macrocode} +% +% \begin{macrocode} +\let\lll=\l \let\LLL=\L +\def\plll{\lll} +\def\pLLL{\LLL} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\telepl} +% But for the `teletype' font in `OT1' encoding we have to take some +% special actions, involving the macros defined above. +% +% \begin{macrocode} +\def\telepl{% + \def\lpb{\spb l{.45}{.5}{.4}{.8}}% + \def\Lpb{\spb L{.23}{.5}{.4}{.8}}% + \def\zkb{\skb z{.5}{.5}{1.2}{0}}% + \def\Zkb{\skb Z{.5}{.5}{1.1}{0}}} +% \end{macrocode} +% \end{macro} +% +% To activate these codes the font changing commands as they are +% defined in \LaTeX\ are modified. The same is done for plain +% \TeX's font changing commands. +% +% When |\selectfont| is undefined the current format is spposed to be +% either plain (based) or \LaTeX$\:$2.09. +% \changes{polish-1.2a}{1995/06/06}{Don't modify \cs{rm} and friends for +% \LaTeXe, take \cs{selectfont } instead} +% \begin{macrocode} +\ifx\selectfont\@undefined + \ifx\prm\@undefined \addto\rm{\textpl}\else \addto\prm{\textpl}\fi + \ifx\pit\@undefined \addto\it{\textpl}\else \addto\pit{\textpl}\fi + \ifx\pbf\@undefined \addto\bf{\textpl}\else \addto\pbf{\textpl}\fi + \ifx\psl\@undefined \addto\sl{\textpl}\else \addto\psl{\textpl}\fi + \ifx\psf\@undefined \else \addto\psf{\textpl}\fi + \ifx\psc\@undefined \else \addto\psc{\textpl}\fi + \ifx\ptt\@undefined \addto\tt{\telepl}\else \addto\ptt{\telepl}\fi +\else +% \end{macrocode} +% When |\selectfont| exists we assume \LaTeXe. +% \begin{macrocode} + \expandafter\addto\csname selectfont \endcsname{% + \csname\f@encoding @pl\endcsname} +\fi +% \end{macrocode} +% Currently we support the OT1 and T1 encodings. For T1 we don't +% have to make a difference between typewriter fonts and other +% fonts, they all have the same glyphs. +% \begin{macrocode} +\expandafter\let\csname T1@pl\endcsname\textpl +% \end{macrocode} +% For OT1 we need to check the current font family, stored in +% |\f@family|. Unfortunately we need a hack as |\ttdefault| is +% defined as a |\long| macro, while |\f@family| is not. +% \begin{macrocode} +\expandafter\def\csname OT1@pl\endcsname{% + \long\edef\curr@family{\f@family}% + \ifx\curr@family\ttdefault + \telepl + \else + \textpl + \fi} +% \end{macrocode} +% +% \begin{macro}{\dq} +% We save the original double quote character in |\dq| to keep +% it available, the math accent |\"| can now be typed as |"|. +% \begin{macrocode} +\begingroup \catcode`\"12 +\def\x{\endgroup + \def\dq{"}} +\x +% \end{macrocode} +% \end{macro} +% +% Now we can define the doublequote macros for diacritics, +% \changes{polish-1.1d}{1995/01/31}{The dqmacro for C used \cs{'c}} +% \begin{macrocode} +\declare@shorthand{polish}{"a}{\textormath{\aob}{\ddot a}} +\declare@shorthand{polish}{"A}{\textormath{\Aob}{\ddot A}} +\declare@shorthand{polish}{"c}{\textormath{\'c}{\acute c}} +\declare@shorthand{polish}{"C}{\textormath{\'C}{\acute C}} +\declare@shorthand{polish}{"e}{\textormath{\eob}{\ddot e}} +\declare@shorthand{polish}{"E}{\textormath{\Eob}{\ddot E}} +\declare@shorthand{polish}{"l}{\textormath{\lpb}{\ddot l}} +\declare@shorthand{polish}{"L}{\textormath{\Lpb}{\ddot L}} +\declare@shorthand{polish}{"n}{\textormath{\'n}{\acute n}} +\declare@shorthand{polish}{"N}{\textormath{\'N}{\acute N}} +\declare@shorthand{polish}{"o}{\textormath{\'o}{\acute o}} +\declare@shorthand{polish}{"O}{\textormath{\'O}{\acute O}} +\declare@shorthand{polish}{"s}{\textormath{\'s}{\acute s}} +\declare@shorthand{polish}{"S}{\textormath{\'S}{\acute S}} +% \end{macrocode} +% \begin{macro}{\polishrz} +% \begin{macro}{\polishzx} +% \changes{polish-1.2j}{2000/11/11}{Added support for two +% notationstyles for kropka and accented z} +% The command |\polishrz| defines the shorthands |"r|, |"z| and +% |"x| to produce pointed z, accented z and |"x|. This is the +% default as these shorthands were defined by this language +% definition file for quite some time. +% \begin{macrocode} +\newcommand*{\polishrz}{% + \declare@shorthand{polish}{"r}{\textormath{\zkb}{\ddot r}}% + \declare@shorthand{polish}{"R}{\textormath{\Zkb}{\ddot R}}% + \declare@shorthand{polish}{"z}{\textormath{\'z}{\acute z}}% + \declare@shorthand{polish}{"Z}{\textormath{\'Z}{\acute Z}}% + \declare@shorthand{polish}{"x}{\dq x}% + \declare@shorthand{polish}{"X}{\dq X}% + } +\polishrz +% \end{macrocode} +% The command |\polishzx| switches to a different set of +% shorthands, |"z|, |"x| and |"r| to produce pointed z, accented z +% and |"r|; a different shorthand notation also in use. +% \changes{polish-1.2k}{2003/10/12}{Fixed a typo} +% \begin{macrocode} +\newcommand*{\polishzx}{% + \declare@shorthand{polish}{"z}{\textormath{\zkb}{\ddot z}}% + \declare@shorthand{polish}{"Z}{\textormath{\Zkb}{\ddot Z}}% + \declare@shorthand{polish}{"x}{\textormath{\'z}{\acute x}}% + \declare@shorthand{polish}{"X}{\textormath{\'Z}{\acute X}}% + \declare@shorthand{polish}{"r}{\dq r}% + \declare@shorthand{polish}{"R}{\dq R}% + } +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% Then we define access to two forms of quotation marks, similar +% to the german and french quotation marks. +% \changes{polish-1.2e}{1997/04/03}{Removed empty groups after +% double quote and guillemot characters} +% \changes{polish-1.2l}{2004/02/18}{Changed closing quote} +% \begin{macrocode} +\declare@shorthand{polish}{"`}{% + \textormath{\quotedblbase}{\mbox{\quotedblbase}}} +\declare@shorthand{polish}{"'}{% + \textormath{\textquotedblright}{\mbox{\textquotedblright}}} +\declare@shorthand{polish}{"<}{% + \textormath{\guillemotleft}{\mbox{\guillemotleft}}} +\declare@shorthand{polish}{">}{% + \textormath{\guillemotright}{\mbox{\guillemotright}}} +% \end{macrocode} +% then we define two shorthands to be able to specify hyphenation +% breakpoints that behavew a little different from |\-|. +% \begin{macrocode} +\declare@shorthand{polish}{"-}{\nobreak-\bbl@allowhyphens} +\declare@shorthand{polish}{""}{\hskip\z@skip} +% \end{macrocode} +% And we want to have a shorthand for disabling a ligature. +% \begin{macrocode} +\declare@shorthand{polish}{"|}{% + \textormath{\discretionary{-}{}{\kern.03em}}{}} +% \end{macrocode} +% +% +% \begin{macro}{\mdqon} +% \begin{macro}{\mdqoff} +% All that's left to do now is to define a couple of commands +% for reasons of compatibility with \file{polish.tex}. +% \changes{polish-1.2f}{1998/06/07}{Now use \cs{shorthandon} and +% \cs{shorthandoff}} +% \begin{macrocode} +\def\mdqon{\shorthandon{"}} +\def\mdqoff{\shorthandoff{"}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% The macro |\ldf@finish| takes care of looking for a +% configuration file, setting the main language to be switched on +% at |\begin{document}| and resetting the category code of +% \texttt{@} to its original value. +% \changes{polish-1.2d}{1996/11/03}{Now use \cs{ldf@finish} to wrap +% up} +% \begin{macrocode} +\ldf@finish{polish} +% +% \end{macrocode} +% +% \Finale +% +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +%% +\endinput diff --git a/Master/texmf-dist/source/generic/babel/polish.ins b/Master/texmf-dist/source/generic/babel/polish.ins new file mode 100644 index 00000000000..00a5e50a92b --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/polish.ins @@ -0,0 +1,148 @@ +%% +%% This file will generate fast loadable files and documentation +%% driver files from the doc files in this package when run through +%% LaTeX or TeX. +%% +%% Copyright 1989-2005 Johannes L. Braams and any individual authors +%% listed elsewhere in this file. All rights reserved. +%% +%% This file is part of the Babel system. +%% -------------------------------------- +%% +%% It 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 +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% The Current Maintainer of this work is Johannes Braams. +%% +%% The list of all files belonging to the LaTeX base distribution is +%% given in the file `manifest.bbl. See also `legal.bbl' 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. +%% +%% --------------- start of docstrip commands ------------------ +%% +\def\filedate{1999/04/11} +\def\batchfile{polish.ins} +\input docstrip.tex + +{\ifx\generate\undefined +\Msg{**********************************************} +\Msg{*} +\Msg{* This installation requires docstrip} +\Msg{* version 2.3c or later.} +\Msg{*} +\Msg{* An older version of docstrip has been input} +\Msg{*} +\Msg{**********************************************} +\errhelp{Move or rename old docstrip.tex.} +\errmessage{Old docstrip in input path} +\batchmode +\csname @@end\endcsname +\fi} + +\declarepreamble\mainpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl 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. +\endpreamble + +\declarepreamble\fdpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl for additional +information. + +In particular, permission is granted to customize the declarations in +this file to serve the needs of your installation. + +However, NO PERMISSION is granted to distribute a modified version +of this file under its original name. + +\endpreamble + +\keepsilent + +\usedir{tex/generic/babel} + +\usepreamble\mainpreamble +\generate{\file{polish.ldf}{\from{polish.dtx}{code}} + } +\usepreamble\fdpreamble + +\ifToplevel{ +\Msg{***********************************************************} +\Msg{*} +\Msg{* To finish the installation you have to move the following} +\Msg{* files into a directory searched by TeX:} +\Msg{*} +\Msg{* \space\space All *.def, *.fd, *.ldf, *.sty} +\Msg{*} +\Msg{* To produce the documentation run the files ending with} +\Msg{* '.dtx' and `.fdd' through LaTeX.} +\Msg{*} +\Msg{* Happy TeXing} +\Msg{***********************************************************} +} + +\endinput diff --git a/Master/texmf-dist/source/generic/babel/portuges.dtx b/Master/texmf-dist/source/generic/babel/portuges.dtx new file mode 100644 index 00000000000..8c4fbf1d6f3 --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/portuges.dtx @@ -0,0 +1,473 @@ +% \iffalse meta-comment +% +% Copyright 1989-2005 Johannes L. Braams and any individual authors +% listed elsewhere in this file. All rights reserved. +% +% This file is part of the Babel system. +% -------------------------------------- +% +% It 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 +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2003/12/01 or later. +% +% This work has the LPPL maintenance status "maintained". +% +% The Current Maintainer of this work is Johannes Braams. +% +% The list of all files belonging to the Babel system is +% given in the file `manifest.bbl. See also `legal.bbl' 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 +% \CheckSum{319} +% \iffalse +% Tell the \LaTeX\ system who we are and write an entry on the +% transcript. +%<*dtx> +\ProvidesFile{portuges.dtx} +% +%\ProvidesLanguage{portuges} +%\fi +%\ProvidesFile{portuges.dtx} + [2005/03/31 v1.2p Portuguese support from the babel system] +%\iffalse +%% File `portuges.dtx' +%% Babel package for LaTeX version 2e +%% Copyright (C) 1989 - 2005 +%% by Johannes Braams, TeXniek +% +%% Portuguese Language Definition File +%% Copyright (C) 1989 - 2005 +%% by Johannes Braams, TeXniek +% +%% Please report errors to: J.L. Braams +%% babel at braams.cistron.nl +% +% This file is part of the babel system, it provides the source +% code for the Portuguese language definition file. The Portuguese +% words were contributed by Jose Pedro Ramalhete, (JRAMALHE@CERNVM +% or Jose-Pedro_Ramalhete@MACMAIL). +% +% Arnaldo Viegas de Lima contributed +% brasilian translations and suggestions for enhancements. +%<*filedriver> +\documentclass{ltxdoc} +\newcommand*\TeXhax{\TeX hax} +\newcommand*\babel{\textsf{babel}} +\newcommand*\langvar{$\langle \it lang \rangle$} +\newcommand*\note[1]{} +\newcommand*\Lopt[1]{\textsf{#1}} +\newcommand*\file[1]{\texttt{#1}} +\begin{document} + \DocInput{portuges.dtx} +\end{document} +% +%\fi +% +% \GetFileInfo{portuges.dtx} +% +% \changes{portuges-1.0a}{1991/07/15}{Renamed \file{babel.sty} in +% \file{babel.com}} +% \changes{portuges-1.1}{1992/02/16}{Brought up-to-date with babel 3.2a} +% \changes{portuges-1.2}{1994/02/26}{Update for \LaTeXe} +% \changes{portuges-1.2d}{1994/06/26}{Removed the use of \cs{filedate} +% and moved identification after the loading of \file{babel.def}} +% \changes{portuges-1.2g}{1995/06/04}{Enhanced support for brasilian} +% \changes{portuges-1.2j}{1996/07/11}{Replaced \cs{undefined} with +% \cs{@undefined} and \cs{empty} with \cs{@empty} for consistency +% with \LaTeX} +% \changes{portuges-1.2j}{1996/10/10}{Moved the definition of +% \cs{atcatcode} right to the beginning.} +% +% \section{The Portuguese language} +% +% The file \file{\filename}\footnote{The file described in this +% section has version number \fileversion\ and was last revised on +% \filedate. Contributions were made by Jose Pedro Ramalhete +% (\texttt{JRAMALHE@CERNVM} or +% \texttt{Jose-Pedro\_Ramalhete@MACMAIL}) and Arnaldo Viegas de +% Lima \texttt{arnaldo@VNET.IBM.COM}.} defines all the +% language-specific macros for the Portuguese language as well as +% for the Brasilian version of this language. +% +% For this language the character |"| is made active. In +% table~\ref{tab:port-quote} an overview is given of its purpose. +% +% \begin{table}[htb] +% \centering +% \begin{tabular}{lp{8cm}} +% \verb="|= & disable ligature at this position.\\ +% |"-| & an explicit hyphen sign, allowing hyphenation +% in the rest of the word.\\ +% |""| & like \verb="-=, but producing no hyphen sign (for +% words that should break at some sign such as +% ``entrada/salida.''\\ +% |"<| & for French left double quotes (similar to $<<$).\\ +% |">| & for French right double quotes (similar to $>>$).\\ +% |\-| & like the old |\-|, but allowing hyphenation +% in the rest of the word. \\ +% \end{tabular} +% \caption{The extra definitions made by \file{portuges.ldf}} +% \label{tab:port-quote} +% \end{table} +% +% \StopEventually{} +% +% The macro |\LdfInit| takes care of preventing that this file is +% loaded more than once, checking the category code of the +% \texttt{@} sign, etc. +% \changes{portuges-1.2j}{1996/11/03}{Now use \cs{LdfInit} to perform +% initial checks} +% \begin{macrocode} +%<*code> +\LdfInit\CurrentOption{captions\CurrentOption} +% \end{macrocode} +% +% When this file is read as an option, i.e. by the |\usepackage| +% command, \texttt{portuges} will be an `unknown' language in which +% case we have to make it known. So we check for the existence of +% |\l@portuges| to see whether we have to do something here. Since +% it is possible to load this file with any of the following four +% options to babel: \Lopt{portuges}, \Lopt{portuguese}, +% \Lopt{brazil} and \Lopt{brazilian} we also allow that the +% hyphenation patterns are loaded under any of these four names. We +% just have to find out which one was used. +% +% \changes{portuges-1.0b}{1991/10/29}{Removed use of cs{@ifundefined}} +% \changes{portuges-1.1}{1992/02/16}{Added a warning when no +% hyphenation patterns were loaded.} +% \changes{portuges-1.2d}{1994/06/26}{Now use \cs{@nopatterns} to +% produce the warning} +% \begin{macrocode} +\ifx\l@portuges\@undefined + \ifx\l@portuguese\@undefined + \ifx\l@brazil\@undefined + \ifx\l@brazilian\@undefined + \@nopatterns{Portuguese} + \adddialect\l@portuges0 + \else + \let\l@portuges\l@brazilian + \fi + \else + \let\l@portuges\l@brazil + \fi + \else + \let\l@portuges\l@portuguese + \fi +\fi +% \end{macrocode} +% By now |\l@portuges| is defined. When the language definition +% file was loaded under a different name we make sure that the +% hyphenation patterns can be found. +% \begin{macrocode} +\expandafter\ifx\csname l@\CurrentOption\endcsname\relax + \expandafter\let\csname l@\CurrentOption\endcsname\l@portuges +\fi +% \end{macrocode} +% +% Now we have to decide whether this language definition file was +% loaded for Portuguese or Brasilian use. This can be done by +% checking the contents of |\CurrentOption|. When it doesn't +% contain either `portuges' or `portuguese' we make |\bbl@tempb| +% empty. +% \begin{macrocode} +\def\bbl@tempa{portuguese} +\ifx\CurrentOption\bbl@tempa + \let\bbl@tempb\@empty +\else + \def\bbl@tempa{portuges} + \ifx\CurrentOption\bbl@tempa + \let\bbl@tempb\@empty + \else + \def\bbl@tempb{brazil} + \fi +\fi +\ifx\bbl@tempb\@empty +% \end{macrocode} +% +% The next step consists of defining commands to switch to (and from) +% the Portuguese language. +% +% \begin{macro}{\captionsportuges} +% The macro |\captionsportuges| defines all strings used +% in the four standard documentclasses provided with \LaTeX. +% \changes{portuges-1.1}{1992/02/16}{Added \cs{seename}, \cs{alsoname} +% and \cs{prefacename}} +% \changes{portuges-1.1}{1993/07/15}{\cs{headpagename} should be +% \cs{pagename}} +% \changes{portuges-1.2e}{1994/11/09}{Added a few missing +% translations} +% \changes{portuges-1.2h}{1995/07/04}{Added \cs{proofname} for +% AMS-\LaTeX} +% \changes{portuges-1.2i}{1995/11/25}{Substituted `Prova' for `Proof'} +% \begin{macrocode} + \@namedef{captions\CurrentOption}{% + \def\prefacename{Pref\'acio}% + \def\refname{Refer\^encias}% + \def\abstractname{Resumo}% + \def\bibname{Bibliografia}% + \def\chaptername{Cap\'{\i}tulo}% + \def\appendixname{Ap\^endice}% +% \end{macrocode} +% Some discussion took place around the correct translations for +% `Table of Contents' and `Index'. the translations differ for +% Portuguese and Brasilian based the following history: +% \begin{quote} +% The whole issue is that some books without a real index at the +% end misused the term `\'Indice' as table of contents. Then, +% what happens is that some books apeared with `\'Indice' at the +% begining and a `\'Indice Remissivo' at the end. Remissivo is a +% redundant word in this case, but was introduced to make up the +% difference. So in Brasil people started using `Sum\'ario' and +% `\'Indice Remissivo'. In Portugal this seems not to be very +% common, therefore we chose `\'Indice' instead of `\'Indice +% Remissivo'. +% \end{quote} +% \begin{macrocode} + \def\contentsname{Conte\'udo}% + \def\listfigurename{Lista de Figuras}% + \def\listtablename{Lista de Tabelas}% + \def\indexname{\'Indice}% + \def\figurename{Figura}% + \def\tablename{Tabela}% + \def\partname{Parte}% + \def\enclname{Anexo}% + \def\ccname{Com c\'opia a}% + \def\headtoname{Para}% + \def\pagename{P\'agina}% + \def\seename{ver}% + \def\alsoname{ver tamb\'em}% +% \end{macrocode} +% An alternate term for `Proof' could be `Prova'. +% \changes{portuges-1.2m}{2000/09/20}{Added \cs{glossaryname}} +% \changes{portuges-1.2p}{2003/05/23}{Substituted `Gloss\'ario' for +% `Glossary'} +% \begin{macrocode} + \def\proofname{Demonstra\c{c}\~ao}% + \def\glossaryname{Gloss\'ario}% + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\dateportuges} +% The macro |\dateportuges| redefines the command |\today| to +% produce Portuguese dates. +% \changes{portuges-1.2k}{1997/10/01}{Use \cs{edef} to define +% \cs{today} to save memory} +% \changes{portuges-1.2k}{1998/03/28}{use \cs{def} instead of +% \cs{edef}} +% \changes{portuges-1.2n}{2001/01/27}{Removed spurious space after +% Dezembro} +% \begin{macrocode} + \@namedef{date\CurrentOption}{% + \def\today{\number\day\space de\space\ifcase\month\or + Janeiro\or Fevereiro\or Mar\c{c}o\or Abril\or Maio\or Junho\or + Julho\or Agosto\or Setembro\or Outubro\or Novembro\or Dezembro% + \fi + \space de\space\number\year}} +\else +% \end{macrocode} +% \end{macro} +% +% For the Brasilian version of these definitions we just add a +% ``dialect''. +% \begin{macrocode} + \expandafter + \adddialect\csname l@\CurrentOption\endcsname\l@portuges +% \end{macrocode} +% +% \begin{macro}{\captionsbrazil} +% \changes{portuges-1.2g}{1995/06/04}{The captions for brasilian and +% portuguese are different now} +% +% The ``captions'' are different for both versions of the language, +% so we define the macro |\captionsbrazil| here. +% \changes{portuges-1.2i}{1995/11/25}{Added \cs{proofname} for +% AMS-\LaTeX} +% \changes{portuges-1.2m}{2000/09/20}{Added \cs{glossaryname}} +% \begin{macrocode} + \@namedef{captions\CurrentOption}{% + \def\prefacename{Pref\'acio}% + \def\refname{Refer\^encias}% + \def\abstractname{Resumo}% + \def\bibname{Refer\^encias Bibliogr\'aficas}% + \def\chaptername{Cap\'{\i}tulo}% + \def\appendixname{Ap\^endice}% + \def\contentsname{Sum\'ario}% + \def\listfigurename{Lista de Figuras}% + \def\listtablename{Lista de Tabelas}% + \def\indexname{\'Indice Remissivo}% + \def\figurename{Figura}% + \def\tablename{Tabela}% + \def\partname{Parte}% + \def\enclname{Anexo}% + \def\ccname{C\'opia para}% + \def\headtoname{Para}% + \def\pagename{P\'agina}% + \def\seename{veja}% + \def\alsoname{veja tamb\'em}% + \def\proofname{Demonstra\c{c}\~ao}% + \def\glossaryname{Glossary}% <-- Needs translation + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\datebrazil} +% The macro |\datebrazil| redefines the command +% |\today| to produce Brasilian dates, for which the names +% of the months are not capitalized. +% \changes{portuges-1.2k}{1997/10/01}{Use \cs{edef} to define +% \cs{today} to save memory} +% \changes{portuges-1.2k}{1998/03/28}{use \cs{def} instead of +% \cs{edef}} +% \changes{portuges-1.2n}{2001/01/27}{Removed spurious space after +% dezembro} +% \begin{macrocode} + \@namedef{date\CurrentOption}{% + \def\today{\number\day\space de\space\ifcase\month\or + janeiro\or fevereiro\or mar\c{c}o\or abril\or maio\or junho\or + julho\or agosto\or setembro\or outubro\or novembro\or dezembro% + \fi + \space de\space\number\year}} +\fi +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\portugeshyphenmins} +% \changes{portuges-1.2g}{1995/06/04}{Added setting of hyphenmin +% values} +% Set correct values for |\lefthyphenmin| and |\righthyphenmin|. +% \changes{portuges-1.2m}{2000/09/22}{Now use \cs{providehyphenmins} to +% provide a default value} +% \changes{portuges-1.2o}{2001/02/16}{Set \cs{righthyphenmin} to 3 if +% not provided by the pattern file.} +% \begin{macrocode} +\providehyphenmins{\CurrentOption}{\tw@\thr@@} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\extrasportuges} +% \changes{portuges-1.2g}{1995/06/04}{Added the definition of some +% \texttt{"} shorthands} +% \begin{macro}{\noextrasportuges} +% The macro |\extrasportuges| will perform all the extra +% definitions needed for the Portuguese language. The macro +% |\noextrasportuges| is used to cancel the actions of +% |\extrasportuges|. +% +% For Portuguese the \texttt{"} character is made active. This is +% done once, later on its definition may vary. Other languages in +% the same document may also use the \texttt{"} character for +% shorthands; we specify that the portuguese group of shorthands +% should be used. +% +% \begin{macrocode} +\initiate@active@char{"} +\@namedef{extras\CurrentOption}{\languageshorthands{portuges}} +\expandafter\addto\csname extras\CurrentOption\endcsname{% + \bbl@activate{"}} +% \end{macrocode} +% Don't forget to turn the shorthands off again. +% \changes{portuges-1.2m}{1999/12/17}{Deactivate shorthands ouside of +% Basque} +% \begin{macrocode} +\addto\noextrasportuges{\bbl@deactivate{"}} +% \end{macrocode} +% First we define access to the guillemets for quotations, +% \changes{portuges-1.2k}{1997/04/03}{Removed empty groups after +% guillemot characters} +% \begin{macrocode} +\declare@shorthand{portuges}{"<}{% + \textormath{\guillemotleft}{\mbox{\guillemotleft}}} +\declare@shorthand{portuges}{">}{% + \textormath{\guillemotright}{\mbox{\guillemotright}}} +% \end{macrocode} +% then we define two shorthands to be able to specify hyphenation +% breakpoints that behave a little different from |\-|. +% \begin{macrocode} +\declare@shorthand{portuges}{"-}{\nobreak-\bbl@allowhyphens} +\declare@shorthand{portuges}{""}{\hskip\z@skip} +% \end{macrocode} +% And we want to have a shorthand for disabling a ligature. +% \begin{macrocode} +\declare@shorthand{portuges}{"|}{% + \textormath{\discretionary{-}{}{\kern.03em}}{}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\-} +% +% All that is left now is the redefinition of |\-|. The new version +% of |\-| should indicate an extra hyphenation position, while +% allowing other hyphenation positions to be generated +% automatically. The standard behaviour of \TeX\ in this respect is +% very unfortunate for languages such as Dutch and German, where +% long compound words are quite normal and all one needs is a means +% to indicate an extra hyphenation position on top of the ones that +% \TeX\ can generate from the hyphenation patterns. +% \begin{macrocode} +\expandafter\addto\csname extras\CurrentOption\endcsname{% + \babel@save\-} +\expandafter\addto\csname extras\CurrentOption\endcsname{% + \def\-{\allowhyphens\discretionary{-}{}{}\allowhyphens}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\ord} +% \changes{portuges-1.2g}{1995/06/04}{Added macro} +% \begin{macro}{\ro} +% \changes{portuges-1.2g}{1995/06/04}{Added macro} +% \begin{macro}{\orda} +% \changes{portuges-1.2g}{1995/06/04}{Added macro} +% \begin{macro}{\ra} +% \changes{portuges-1.2g}{1995/06/04}{Added macro} +% We also provide an easy way to typeset ordinals, both in the male +% (|\ord| or |\ro|) and the female (|orda| or |\ra|) form. +% \begin{macrocode} +\def\ord{$^{\rm o}$} +\def\orda{$^{\rm a}$} +\let\ro\ord\let\ra\orda +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% The macro |\ldf@finish| takes care of looking for a +% configuration file, setting the main language to be switched on +% at |\begin{document}| and resetting the category code of +% \texttt{@} to its original value. +% \changes{portuges-1.2j}{1996/11/03}{ow use \cs{ldf@finish} to wrap +% up} +% \begin{macrocode} +\ldf@finish\CurrentOption +% +% \end{macrocode} +% +% \Finale +%% +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +%% +\endinput diff --git a/Master/texmf-dist/source/generic/babel/portuges.ins b/Master/texmf-dist/source/generic/babel/portuges.ins new file mode 100644 index 00000000000..3889bc8f8b2 --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/portuges.ins @@ -0,0 +1,148 @@ +%% +%% This file will generate fast loadable files and documentation +%% driver files from the doc files in this package when run through +%% LaTeX or TeX. +%% +%% Copyright 1989-2005 Johannes L. Braams and any individual authors +%% listed elsewhere in this file. All rights reserved. +%% +%% This file is part of the Babel system. +%% -------------------------------------- +%% +%% It 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 +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% The Current Maintainer of this work is Johannes Braams. +%% +%% The list of all files belonging to the LaTeX base distribution is +%% given in the file `manifest.bbl. See also `legal.bbl' 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. +%% +%% --------------- start of docstrip commands ------------------ +%% +\def\filedate{1999/04/11} +\def\batchfile{portuges.ins} +\input docstrip.tex + +{\ifx\generate\undefined +\Msg{**********************************************} +\Msg{*} +\Msg{* This installation requires docstrip} +\Msg{* version 2.3c or later.} +\Msg{*} +\Msg{* An older version of docstrip has been input} +\Msg{*} +\Msg{**********************************************} +\errhelp{Move or rename old docstrip.tex.} +\errmessage{Old docstrip in input path} +\batchmode +\csname @@end\endcsname +\fi} + +\declarepreamble\mainpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl 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. +\endpreamble + +\declarepreamble\fdpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl for additional +information. + +In particular, permission is granted to customize the declarations in +this file to serve the needs of your installation. + +However, NO PERMISSION is granted to distribute a modified version +of this file under its original name. + +\endpreamble + +\keepsilent + +\usedir{tex/generic/babel} + +\usepreamble\mainpreamble +\generate{\file{portuges.ldf}{\from{portuges.dtx}{code}} + } +\usepreamble\fdpreamble + +\ifToplevel{ +\Msg{***********************************************************} +\Msg{*} +\Msg{* To finish the installation you have to move the following} +\Msg{* files into a directory searched by TeX:} +\Msg{*} +\Msg{* \space\space All *.def, *.fd, *.ldf, *.sty} +\Msg{*} +\Msg{* To produce the documentation run the files ending with} +\Msg{* '.dtx' and `.fdd' through LaTeX.} +\Msg{*} +\Msg{* Happy TeXing} +\Msg{***********************************************************} +} + +\endinput diff --git a/Master/texmf-dist/source/generic/babel/romanian.dtx b/Master/texmf-dist/source/generic/babel/romanian.dtx new file mode 100644 index 00000000000..88950570306 --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/romanian.dtx @@ -0,0 +1,232 @@ +% \iffalse meta-comment +% +% Copyright 1989-2005 Johannes L. Braams and any individual authors +% listed elsewhere in this file. All rights reserved. +% +% This file is part of the Babel system. +% -------------------------------------- +% +% It 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 +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2003/12/01 or later. +% +% This work has the LPPL maintenance status "maintained". +% +% The Current Maintainer of this work is Johannes Braams. +% +% The list of all files belonging to the Babel system is +% given in the file `manifest.bbl. See also `legal.bbl' 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 +% \CheckSum{89} +% \iffalse +% Tell the \LaTeX\ system who we are and write an entry on the +% transcript. +%<*dtx> +\ProvidesFile{romanian.dtx} +% +%\ProvidesLanguage{romanian} +%\fi +%\ProvidesFile{romanian.dtx} + [2005/03/31 v1.2l Romanian support from the babel system] +%\iffalse +%% File `romanian.dtx' +%% Babel package for LaTeX version 2e +%% Copyright (C) 1989 - 2005 +%% by Johannes Braams, TeXniek +% +%% Romanian Language Definition File +%% Copyright (C) 1989 - 2005 +%% by Johannes Braams, TeXniek +% +%% Please report errors to: J.L. Braams +%% babel at braams.cistron.nl +% +% This file is part of the babel system, it provides the source +% code for the Romanian language definition file. A contribution +% was made by Umstatter Horst (hhu at cernvm.cern.ch) and Robert +% Juhasz (robertj at uni-paderborn.de) +%<*filedriver> +\documentclass{ltxdoc} +\newcommand*\TeXhax{\TeX hax} +\newcommand*\babel{\textsf{babel}} +\newcommand*\langvar{$\langle \it lang \rangle$} +\newcommand*\note[1]{} +\newcommand*\Lopt[1]{\textsf{#1}} +\newcommand*\file[1]{\texttt{#1}} +\begin{document} + \DocInput{romanian.dtx} +\end{document} +% +%\fi +% +% \GetFileInfo{romanian.dtx} +% +% \changes{romanian-1.0a}{1991/07/15}{Renamed babel.sty in babel.com} +% \changes{romanian-1.1}{1992/02/16}{Brought up-to-date with babel 3.2a} +% \changes{romanian-1.2}{1994/02/27}{Update for LaTeX2e} +% \changes{romanian-1.2d}{1994/06/26}{Removed the use of \cs{filedate} +% and moved identification after the loading of babel.def} +% \changes{romanian-1.2e}{1995/05/25}{Updated for babel release 3.5} +% \changes{romanian-1.2h}{1996/10/10}{Replaced \cs{undefined} with +% \cs{@undefined} and \cs{empty} with \cs{@empty} for consistency +% with \LaTeX, moved the definition of \cs{atcatcode} right to the +% beginning.} +% +% \section{The Romanian language} +% +% The file \file{\filename}\footnote{The file described in this +% section has version number \fileversion\ and was last revised on +% \filedate. A contribution was made by Umstatter Horst +% (\texttt{hhu@cernvm.cern.ch}).} defines all the +% language-specific macros for the Romanian language. +% +% For this language currently no special definitions are needed or +% available. +% +% \StopEventually{} +% +% The macro |\LdfInit| takes care of preventing that this file is +% loaded more than once, checking the category code of the +% \texttt{@} sign, etc. +% \changes{romanian-1.2h}{1996/11/03}{Now use \cs{LdfInit} to perform +% initial checks} +% \begin{macrocode} +%<*code> +\LdfInit{romanian}\captionsromanian +% \end{macrocode} +% +% When this file is read as an option, i.e. by the |\usepackage| +% command, \texttt{romanian} will be an `unknown' language in which +% case we have to make it known. So we check for the existence of +% |\l@romanian| to see whether we have to do something here. +% +% \changes{romanian-1.0b}{1991/10/29}{Removed use of +% \cs{@ifundefined}} +% \changes{romanian-1.1}{1992/02/16}{Added a warning when no +% hyphenation patterns were loaded.} +% \changes{romanian-1.2d}{1994/06/26}{Now use \cs{@nopatterns} to +% produce the warning} +% \begin{macrocode} +\ifx\l@romanian\@undefined + \@nopatterns{Romanian} + \adddialect\l@romanian0\fi +% \end{macrocode} +% +% The next step consists of defining commands to switch to (and +% from) the Romanian language. +% +% \begin{macro}{\captionsromanian} +% The macro |\captionsromanian| defines all strings used in the +% four standard documentclasses provided with \LaTeX. +% \changes{romanian-1.1}{1992/02/16}{Added \cs{seename}, \cs{alsoname} +% and \cs{prefacename}} +% \changes{romanian-1.1}{1992/02/17}{Translation errors found by +% Robert Juhasz fixed} +% \changes{romanian-1.1}{1993/07/15}{\cs{headpagename} should be +% \cs{pagename}} +% \changes{romanian-1.2f}{1995/07/04}{Added \cs{proofname} for +% AMS-\LaTeX} +% \changes{romanian-1.2g}{1995/11/10}{Added translation of `Proof'} +% \changes{romanian-1.2k}{2000/09/20}{Added \cs{glossaryname}} +% \changes{romanian-1.2l}{2003/06/10}{Added translation for Glossary} +% \begin{macrocode}ls +\addto\captionsromanian{% + \def\prefacename{Prefa\c{t}\u{a}}% + \def\refname{Bibliografie}% + \def\abstractname{Rezumat}% + \def\bibname{Bibliografie}% + \def\chaptername{Capitolul}% + \def\appendixname{Anexa}% + \def\contentsname{Cuprins}% + \def\listfigurename{List\u{a} de figuri}% + \def\listtablename{List\u{a} de tabele}% + \def\indexname{Glosar}% + \def\figurename{Figura}% % sau Plan\c{s}a + \def\tablename{Tabela}% + \def\partname{Partea}% + \def\enclname{Anex\u{a}}% % sau Anexe + \def\ccname{Copie}% + \def\headtoname{Pentru}% + \def\pagename{Pagina}% + \def\seename{Vezi}% + \def\alsoname{Vezi de asemenea}% + \def\proofname{Demonstra\c{t}ie} % + \def\glossaryname{Glosar}% + }% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\dateromanian} +% The macro |\dateromanian| redefines the command |\today| to +% produce Romanian dates. +% \changes{romanian-1.1}{1992/02/17}{Translation errors found by Robert +% Juhasz fixed} +% \changes{romanian-1.2i}{1997/10/01}{Use \cs{edef} to define +% \cs{today} to save memory} +% \changes{romanian-1.2i}{1998/03/28}{use \cs{def} instead of +% \cs{edef}} +% \begin{macrocode} +\def\dateromanian{% + \def\today{\number\day~\ifcase\month\or + ianuarie\or februarie\or martie\or aprilie\or mai\or + iunie\or iulie\or august\or septembrie\or octombrie\or + noiembrie\or decembrie\fi + \space \number\year}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\extrasromanian} +% \begin{macro}{\noextrasromanian} +% The macro |\extrasromanian| will perform all the extra +% definitions needed for the Romanian language. The macro +% |\noextrasromanian| is used to cancel the actions of +% |\extrasromanian| For the moment these macros are empty but they +% are defined for compatibility with the other language definition +% files. +% +% \begin{macrocode} +\addto\extrasromanian{} +\addto\noextrasromanian{} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% The macro |\ldf@finish| takes care of looking for a +% configuration file, setting the main language to be switched on +% at |\begin{document}| and resetting the category code of +% \texttt{@} to its original value. +% \changes{romanian-1.2h}{1996/11/03}{Now use \cs{ldf@finish} to wrap +% up} +% \begin{macrocode} +\ldf@finish{romanian} +% +% \end{macrocode} +% +% \Finale +%% +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +%% +\endinput diff --git a/Master/texmf-dist/source/generic/babel/romanian.ins b/Master/texmf-dist/source/generic/babel/romanian.ins new file mode 100644 index 00000000000..749b4561ea7 --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/romanian.ins @@ -0,0 +1,148 @@ +%% +%% This file will generate fast loadable files and documentation +%% driver files from the doc files in this package when run through +%% LaTeX or TeX. +%% +%% Copyright 1989-2005 Johannes L. Braams and any individual authors +%% listed elsewhere in this file. All rights reserved. +%% +%% This file is part of the Babel system. +%% -------------------------------------- +%% +%% It 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 +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% The Current Maintainer of this work is Johannes Braams. +%% +%% The list of all files belonging to the LaTeX base distribution is +%% given in the file `manifest.bbl. See also `legal.bbl' 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. +%% +%% --------------- start of docstrip commands ------------------ +%% +\def\filedate{1999/04/11} +\def\batchfile{romanian.ins} +\input docstrip.tex + +{\ifx\generate\undefined +\Msg{**********************************************} +\Msg{*} +\Msg{* This installation requires docstrip} +\Msg{* version 2.3c or later.} +\Msg{*} +\Msg{* An older version of docstrip has been input} +\Msg{*} +\Msg{**********************************************} +\errhelp{Move or rename old docstrip.tex.} +\errmessage{Old docstrip in input path} +\batchmode +\csname @@end\endcsname +\fi} + +\declarepreamble\mainpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl 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. +\endpreamble + +\declarepreamble\fdpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl for additional +information. + +In particular, permission is granted to customize the declarations in +this file to serve the needs of your installation. + +However, NO PERMISSION is granted to distribute a modified version +of this file under its original name. + +\endpreamble + +\keepsilent + +\usedir{tex/generic/babel} + +\usepreamble\mainpreamble +\generate{\file{romanian.ldf}{\from{romanian.dtx}{code}} + } +\usepreamble\fdpreamble + +\ifToplevel{ +\Msg{***********************************************************} +\Msg{*} +\Msg{* To finish the installation you have to move the following} +\Msg{* files into a directory searched by TeX:} +\Msg{*} +\Msg{* \space\space All *.def, *.fd, *.ldf, *.sty} +\Msg{*} +\Msg{* To produce the documentation run the files ending with} +\Msg{* '.dtx' and `.fdd' through LaTeX.} +\Msg{*} +\Msg{* Happy TeXing} +\Msg{***********************************************************} +} + +\endinput diff --git a/Master/texmf-dist/source/generic/babel/russianb.dtx b/Master/texmf-dist/source/generic/babel/russianb.dtx new file mode 100644 index 00000000000..0cb758441aa --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/russianb.dtx @@ -0,0 +1,1238 @@ +% \iffalse meta-comment +% +% Copyright 1989-2005 Johannes L. Braams and any individual authors +% listed elsewhere in this file. All rights reserved. +% +% This file is part of the Babel system. +% -------------------------------------- +% +% It 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 +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2003/12/01 or later. +% +% This work has the LPPL maintenance status "maintained". +% +% The Current Maintainer of this work is Johannes Braams. +% +% The list of all files belonging to the Babel system is +% given in the file `manifest.bbl. See also `legal.bbl' 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 +% \CheckSum{1461} +% +% \iffalse +% Tell the \LaTeX\ system who we are and write an entry on the +% transcript. +%<*dtx> +\ProvidesFile{russianb.dtx} +% +%\ProvidesLanguage{russianb} + [2005/03/29 v1.1r Russian support from the babel system] +% +%% File `russianb.dtx' +%% Babel package for LaTeX version 2e +%% Copyright (C) 1989 - 2005 +%% by Johannes Braams, TeXniek +% +%% Russianb Language Definition File +%% Copyright (C) 1995 - 2005 +%% by Olga Lapko cyrtug at mir.msk.su +%% Johannes Braams, TeXniek +% +%% Adapted to the new T2 and X2 Cyrillic encodings +%% by Vladimir Volovich TeX at vvv.vsu.ru +%% Werner Lemberg wl at gnu.org +% +%% Please report errors to: J.L. Braams +%% babel at braams.cistron.nl +% +%<*filedriver> +\documentclass{ltxdoc} +\newcommand\TeXhax{\TeX hax} +\newcommand\babel{\textsf{babel}} +\newcommand\langvar{$\langle \it lang \rangle$} +\newcommand\note[1]{} +\newcommand\Lopt[1]{\textsf{#1}} +\newcommand\file[1]{\texttt{#1}} +\newcommand\pkg[1]{\texttt{#1}} +\begin{document} + \DocInput{russianb.dtx} +\end{document} +% +%\fi +% \GetFileInfo{russianb.dtx} +% +% \changes{russianb-1.1c}{1996/07/11}{Replaced \cs{undefined} with +% \cs{@undefined} and \cs{empty} with \cs{@empty} for consistency +% with \LaTeX} +% \changes{russianb-1.1d}{1996/10/10}{Moved the definition of +% \cs{atcatcode} right to the beginning.} +% \changes{russianb-1.1k}{1999/08/19}{replaced all \cs{penalty}\cs{@M} +% with \cs{nobreak}} +% +% \section{The Russian language} +% +% The file \file{\filename}\footnote{The file described in this section +% has version number \fileversion\ and was last revised on \filedate. +% This file was initially derived from the original version of +% \file{german.sty}, which has some definitions for Russian. Later the +% definitions from \file{russian.sty} version 1.0b (for \LaTeX\ 2.09), +% \file{russian.sty} version v2.5c (for \LaTeXe) and \file{francais.sty} +% version 4.5c and \file{germanb.sty} version 2.5c were added.} defines +% all the language-specific macros for the Russian language. It needs the +% file \file{cyrcod} for success documentation with Russian encodings +% (see below). +% +% For this language the character |"| is made active. In +% table~\ref{tab:russian-quote} an overview is given of its purpose. +% +% \changes{russianb-1.1f}{1998/06/26}{% +% Added definitions of Cyrillic emdash stuff and thinspace} +% +% \begin{table}[htb] +% \begin{center} +% \begin{tabular}{lp{8cm}} +% \verb="|= & disable ligature at this position. \\ +% |"-| & an explicit hyphen sign, allowing hyphenation +% in the rest of the word. \\ +% |"---| & Cyrillic emdash in plain text. \\ +% |"--~| & Cyrillic emdash in compound names (surnames). \\ +% |"--*| & Cyrillic emdash for denoting direct speech. \\ +% |""| & like |"-|, but producing no hyphen sign +% (for compund words with hyphen, e.g.\ |x-""y| +% or some other signs as ``disable/enable''). \\ +% |"~| & for a compound word mark without a breakpoint. \\ +% |"=| & for a compound word mark with a breakpoint, allowing +% hyphenation in the composing words. \\ +% |",| & thinspace for initials with a breakpoint +% in following surname. \\ +% |"`| & for German left double quotes +% (looks like ,\kern-0.08em,). \\ +% |"'| & for German right double quotes (looks like ``). \\%'' +% |"<| & for French left double quotes (looks like $<\!\!<$). \\ +% |">| & for French right double quotes (looks like $>\!\!>$). \\ +% \end{tabular} +% \caption{The extra definitions made +% by \file{russianb}}\label{tab:russian-quote} +% \end{center} +% \end{table} +% +% The quotes in table~\ref{tab:russian-quote} can also be typeset by +% using the commands in table~\ref{tab:rmore-quote}. +% +% \begin{table}[htb] +% \begin{center} +% \begin{tabular}{lp{8cm}} +% |\cdash---| & Cyrillic emdash in plain text. \\ +% |\cdash--~| & Cyrillic emdash in compound names (surnames). \\ +% |\cdash--*| & Cyrillic emdash for denoting direct speech. \\ +% |\glqq| & for German left double quotes +% (looks like ,\kern-0.08em,). \\ +% |\grqq| & for German right double quotes (looks like ``). \\%'' +% |\flqq| & for French left double quotes (looks like $<\!\!<$). \\ +% |\frqq| & for French right double quotes (looks like $>\!\!>$). \\ +% |\dq| & the original quotes character (|"|). \\ +% \end{tabular} +% \caption{More commands which produce quotes, defined +% by \babel}\label{tab:rmore-quote} +% \end{center} +% \end{table} +% +% The French quotes are also available as ligatures `|<<|' and `|>>|' in +% 8-bit Cyrillic font encodings (\texttt{LCY}, \texttt{X2}, \texttt{T2*}) +% and as `|<|' and `|>|' characters in 7-bit Cyrillic font encodings +% (\texttt{OT2} and \texttt{LWN}). +% +% The quotation marks traditionally used in Russian were borrowed from +% other languages (e.g., French and German) so they keep their original +% names. +% +% \StopEventually{} +% +% The macro |\LdfInit| takes care of preventing that this file is loaded +% more than once, checking the category code of the \texttt{@} sign, etc. +% +% \changes{russianb-1.1d}{1996/11/03}{Now use \cs{LdfInit} to perform +% initial checks} +% \changes{russianb-1.1e}{1996/12/29}{Added closing brace to second +% argument of \cs{LdfInit}} +% \begin{macrocode} +%<*code> +\LdfInit{russian}{captionsrussian} +% \end{macrocode} +% +% When this file is read as an option, i.e., by the |\usepackage| +% command, \texttt{russianb} will be an `unknown' language, in which case +% we have to make it known. So we check for the existence of |\l@russian| +% to see whether we have to do something here. +% +% \begin{macrocode} +\ifx\l@russian\@undefined + \@nopatterns{Russian} + \adddialect\l@russian0 +\fi +% \end{macrocode} +% +% \begin{macro}{\latinencoding} +% +% We need to know the encoding for text that is supposed to be which is +% active at the end of the \babel\ package. If the \pkg{fontenc} package +% is loaded later, then\ldots too bad! +% +% \begin{macrocode} +\let\latinencoding\cf@encoding +% \end{macrocode} +% +% \end{macro} +% +% The user may choose between different available Cyrillic +% encodings---e.g., \texttt{X2}, \texttt{LCY}, or \texttt{LWN}.\@ +% Hopefully, \texttt{X2} will eventually replace the two latter encodings +% (\texttt{LCY} and \texttt{LWN}).\@ If the user wants to use another +% font encoding than the default (\texttt{T2A}), he has to load the +% corresponding file \emph{before} \file{russianb.sty}. This may be done +% in the following way: +% +% \begin{verbatim} +% % override the default X2 encoding used in Babel +% \usepackage[LCY,OT1]{fontenc} +% \usepackage[english,russian]{babel} +% \end{verbatim} +% \unskip +% +% Note: for the Russian language, the \texttt{T2A} encoding is better than +% \texttt{X2}, because \texttt{X2} does not contain Latin letters, and +% users should be very careful to switch the language every time they +% want to typeset a Latin word inside a Russian phrase or vice versa. +% +% We parse the |\cdp@list| containing the encodings known to \LaTeX\ in +% the order they were loaded. We set the |\cyrillicencoding| to the +% \emph{last} loaded encoding in the list of supported Cyrillic +% encodings: \texttt{OT2}, \texttt{LWN}, \texttt{LCY}, \texttt{X2}, +% \texttt{T2C}, \texttt{T2B}, \texttt{T2A}, if any. +% +% \begin{macrocode} +\def\reserved@a#1#2{% + \edef\reserved@b{#1}% + \edef\reserved@c{#2}% + \ifx\reserved@b\reserved@c + \let\cyrillicencoding\reserved@c + \fi} +\def\cdp@elt#1#2#3#4{% + \reserved@a{#1}{OT2}% + \reserved@a{#1}{LWN}% + \reserved@a{#1}{LCY}% + \reserved@a{#1}{X2}% + \reserved@a{#1}{T2C}% + \reserved@a{#1}{T2B}% + \reserved@a{#1}{T2A}} +\cdp@list +% \end{macrocode} +% +% Now, if |\cyrillicencoding| is undefined, then the user did not load +% any of supported encodings. So, we have to set |\cyrillicencoding| to +% some default value. We test the presence of the encoding definition +% files in the order from less preferable to more preferable encodings. +% We use the lowercase names (i.e., \file{lcyenc.def} instead of +% \file{LCYenc.def}). +% +% \begin{macrocode} +\ifx\cyrillicencoding\undefined + \IfFileExists{ot2enc.def}{\def\cyrillicencoding{OT2}}\relax + \IfFileExists{lwnenc.def}{\def\cyrillicencoding{LWN}}\relax + \IfFileExists{lcyenc.def}{\def\cyrillicencoding{LCY}}\relax + \IfFileExists{x2enc.def}{\def\cyrillicencoding{X2}}\relax + \IfFileExists{t2cenc.def}{\def\cyrillicencoding{T2C}}\relax + \IfFileExists{t2benc.def}{\def\cyrillicencoding{T2B}}\relax + \IfFileExists{t2aenc.def}{\def\cyrillicencoding{T2A}}\relax +% \end{macrocode} +% +% If |\cyrillicencoding| is still undefined, then the user seems not to +% have a properly installed distribution. A fatal error. +% +% \begin{macrocode} + \ifx\cyrillicencoding\undefined + \PackageError{babel}% + {No Cyrillic encoding definition files were found}% + {Your installation is incomplete.\MessageBreak + You need at least one of the following files:\MessageBreak + \space\space + x2enc.def, t2aenc.def, t2benc.def, t2cenc.def,\MessageBreak + \space\space + lcyenc.def, lwnenc.def, ot2enc.def.}% + \else +% \end{macrocode} +% +% We avoid |\usepackage[\cyrillicencoding]{fontenc}| because we don't +% want to force the switch of |\encodingdefault|. +% +% \begin{macrocode} + \lowercase + \expandafter{\expandafter\input\cyrillicencoding enc.def\relax}% + \fi +\fi +% \end{macrocode} +% +% \begin{verbatim} +% \PackageInfo{babel} +% {Using `\cyrillicencoding' as a default Cyrillic encoding}% +% \end{verbatim} +% \unskip +% +% \begin{macrocode} +\DeclareRobustCommand{\Russian}{% + \fontencoding\cyrillicencoding\selectfont + \let\encodingdefault\cyrillicencoding + \expandafter\set@hyphenmins\russianhyphenmins + \language\l@russian}% +\DeclareRobustCommand{\English}{% + \fontencoding\latinencoding\selectfont + \let\encodingdefault\latinencoding + \expandafter\set@hyphenmins\englishhyphenmins + \language\l@english}% +\let\Rus\Russian +\let\Eng\English +\let\cyrillictext\Russian +\let\cyr\Russian +% \end{macrocode} +% +% Since the \texttt{X2} encoding does not contain Latin letters, we +% should make some redefinitions of \LaTeX\ macros which implicitly +% produce Latin letters. +% +% \begin{macrocode} +\expandafter\ifx\csname T@X2\endcsname\relax\else +% \end{macrocode} +% +% We put |\latinencoding| in braces to avoid problems with +% |\@alph| inside minipages (e.g., footnotes inside minipages) where +% |\@alph| is expanded and we get for example `|\fontencoding OT1|' +% (|\fontencoding| is robust). +% +% \begin{macrocode} + \def\@alph#1{{\fontencoding{\latinencoding}\selectfont + \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\else\@ctrerr\fi}}% + \def\@Alph#1{{\fontencoding{\latinencoding}\selectfont + \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\else\@ctrerr\fi}}% +% \end{macrocode} +% +% Unfortunately, the commands |\AA| and |\aa| are not encoding dependent +% in \LaTeX\ (unlike e.g., |\oe| or |\DH|). They are defined as |\r{A}| and +% |\r{a}|. This leads to unpredictable results when the font encoding +% does not contain the Latin letters `A' and `a' (like \texttt{X2}). +% +% \begin{macrocode} + \DeclareTextSymbolDefault{\AA}{OT1} + \DeclareTextSymbolDefault{\aa}{OT1} + \DeclareTextCommand{\aa}{OT1}{\r a} + \DeclareTextCommand{\AA}{OT1}{\r A} +\fi +% \end{macrocode} +% +% The following block redefines the character class of uppercase Greek +% letters and some accents, if it is equal to 7 (variable family), to +% avoid incorrect results if the font encoding in some math family does +% not contain these characters in places of OT1 encoding. The code was +% taken from |amsmath.dtx|. See comments and further explanation there. +% +% \changes{russianb-1.1n}{2001/02/21}{As this code generates a +% textfont 7 error it is commented out for now.} +% \begin{macrocode} +% \begingroup\catcode`\"=12 +% % uppercase greek letters: +% \def\@tempa#1{\expandafter\@tempb\meaning#1\relax\relax\relax\relax +% "0000\@nil#1} +% \def\@tempb#1"#2#3#4#5#6\@nil#7{% +% \ifnum"#2=7 \count@"1#3#4#5\relax +% \ifnum\count@<"1000 \else \global\mathchardef#7="0#3#4#5\relax \fi +% \fi} +% \@tempa\Gamma\@tempa\Delta\@tempa\Theta\@tempa\Lambda\@tempa\Xi +% \@tempa\Pi\@tempa\Sigma\@tempa\Upsilon\@tempa\Phi\@tempa\Psi +% \@tempa\Omega +% % some accents: +% \def\@tempa#1#2\@nil{\def\@tempc{#1}}\def\@tempb{\mathaccent} +% \expandafter\@tempa\hat\relax\relax\@nil +% \ifx\@tempb\@tempc +% \def\@tempa#1\@nil{#1}% +% \def\@tempb#1{\afterassignment\@tempa\mathchardef\@tempc=}% +% \def\do#1"#2{} +% \def\@tempd#1{\expandafter\@tempb#1\@nil +% \ifnum\@tempc>"FFF +% \xdef#1{\mathaccent"\expandafter\do\meaning\@tempc\space}% +% \fi} +% \@tempd\hat\@tempd\check\@tempd\tilde\@tempd\acute\@tempd\grave +% \@tempd\dot\@tempd\ddot\@tempd\breve\@tempd\bar +% \fi +% \endgroup +% \end{macrocode} +% +% The user should use the \pkg{inputenc} package when any 8-bit Cyrillic +% font encoding is used, selecting one of the Cyrillic input encodings. +% We do not assume any default input encoding, so the user should +% explicitly call the \pkg{inputenc} package by |\usepackage{inputenc}|. +% We also removed |\AtBeginDocument|, so \pkg{inputenc} should be used +% before \babel. +% +% \changes{russianb-1.1l}{1999/08/27}{Made not using inputenc a +% warning instead of an error} +% \begin{macrocode} +\@ifpackageloaded{inputenc}{}{% + \def\reserved@a{LWN}% + \ifx\reserved@a\cyrillicencoding\else + \def\reserved@a{OT2}% + \ifx\reserved@a\cyrillicencoding\else + \PackageWarning{babel}% + {No input encoding specified for Russian language} + \fi\fi} +% \end{macrocode} +% +% Now we define two commands that offer the possibility to switch between +% Cyrillic and Roman encodings. +% +% \begin{macro}{\cyrillictext} +% \begin{macro}{\latintext} +% +% The command |\cyrillictext| will switch from Latin font encoding to the +% Cyrillic font encoding, the command |\latintext| switches back. This +% assumes that the `normal' font encoding is a Latin one. These commands +% are \emph{declarations}, for shorter peaces of text the commands +% |\textlatin| and |\textcyrillic| can be used. +% +% \changes{russianb-1.1o}{2003/10/12}{\cs{latintext} is already +% defined by the core of \babel} +% \begin{macrocode} +%\DeclareRobustCommand{\latintext}{% +% \fontencoding{\latinencoding}\selectfont +% \def\encodingdefault{\latinencoding}} +\let\lat\latintext +% \end{macrocode} +% +% \end{macro} +% \end{macro} +% +% \begin{macro}{\textcyrillic} +% \begin{macro}{\textlatin} +% +% These commands take an argument which is then typeset using the +% requested font encoding. +% \changes{russianb-1.1o}{2003/10/12}{\cs{textlatin} already defined +% by the core of \babel} +% \begin{macrocode} +\DeclareTextFontCommand{\textcyrillic}{\cyrillictext} +%\DeclareTextFontCommand{\textlatin}{\latintext} +% \end{macrocode} +% +% \end{macro} +% \end{macro} +% +% We make the \TeX +% \begin{macrocode} +%\ifx\ltxTeX\undefined\let\ltxTeX\TeX\fi +%\ProvideTextCommandDefault{\TeX}{\textlatin{\ltxTeX}} +% \end{macrocode} +% and \LaTeX\ logos encoding independent. +% \begin{macrocode} +%\ifx\ltxLaTeX\undefined\let\ltxLaTeX\LaTeX\fi +%\ProvideTextCommandDefault{\LaTeX}{\textlatin{\ltxLaTeX}} +% \end{macrocode} +% +% The next step consists of defining commands to switch to (and +% from) the Russian language. +% +% \begin{macro}{\captionsrussian} +% +% The macro |\captionsrussian| defines all strings used in the four +% standard document classes provided with \LaTeX. The two commands |\cyr| +% and |\lat| activate Cyrillic resp.\ Latin encoding. +% +% \begin{macrocode} +\addto\captionsrussian{% +% FIXME: Where is the \prefacename used? + \def\prefacename{% + {\cyr\CYRP\cyrr\cyre\cyrd\cyri\cyrs\cyrl\cyro\cyrv\cyri\cyre}}% +% {\cyr\CYRV\cyrv\cyre\cyrd\cyre\cyrn\cyri\cyre}}% + \def\refname{% + {\cyr\CYRS\cyrp\cyri\cyrs\cyro\cyrk + \ \cyrl\cyri\cyrt\cyre\cyrr\cyra\cyrt\cyru\cyrr\cyrery}}% +% \def\refname{% +% {\cyr\CYRL\cyri\cyrt\cyre\cyrr\cyra\cyrt\cyru\cyrr\cyra}}% + \def\abstractname{% + {\cyr\CYRA\cyrn\cyrn\cyro\cyrt\cyra\cyrc\cyri\cyrya}}% + \def\bibname{% + {\cyr\CYRL\cyri\cyrt\cyre\cyrr\cyra\cyrt\cyru\cyrr\cyra}}% +% \def\bibname{% +% {\cyr\CYRB\cyri\cyrb\cyrl\cyri\cyro +% \cyrg\cyrr\cyra\cyrf\cyri\cyrya}}% +% for reports according to GOST: +% \def\bibname{% +% {\cyr\CYRS\cyrp\cyri\cyrs\cyro\cyrk +% \ \cyri\cyrs\cyrp\cyro\cyrl\cyrsftsn\cyrz\cyro\cyrv\cyra\cyrn +% \cyrn\cyrery\cyrh\ \cyri\cyrs\cyrt\cyro\cyrch\cyrn\cyri +% \cyrk\cyro\cyrv}}% + \def\chaptername{{\cyr\CYRG\cyrl\cyra\cyrv\cyra}}% +% \@ifundefined{chapter}{}{% +% \def\chaptername{{\cyr\CYRG\cyrl\cyra\cyrv\cyra}}}% + \def\appendixname{% + {\cyr\CYRP\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyre}}% +% \end{macrocode} +% +% There are two names for the Table of Contents that are used in Russian +% publications. For books (and reports) the second variant is +% appropriate, but for proceedings the first variant is preferred: +% +% \begin{macrocode} + \@ifundefined{thechapter}% + {\def\contentsname{% + {\cyr\CYRS\cyro\cyrd\cyre\cyrr\cyrzh\cyra\cyrn\cyri\cyre}}}% + {\def\contentsname{% + {\cyr\CYRO\cyrg\cyrl\cyra\cyrv\cyrl\cyre\cyrn\cyri\cyre}}}% + \def\listfigurename{% + {\cyr\CYRS\cyrp\cyri\cyrs\cyro\cyrk + \ \cyri\cyrl\cyrl\cyryu\cyrs\cyrt\cyrr\cyra\cyrc\cyri\cyrishrt}}% +% \def\listfigurename{% +% {\cyr\CYRS\cyrp\cyri\cyrs\cyro\cyrk +% \ \cyrr\cyri\cyrs\cyru\cyrn\cyrk\cyro\cyrv}}% + \def\listtablename{% + {\cyr\CYRS\cyrp\cyri\cyrs\cyro\cyrk + \ \cyrt\cyra\cyrb\cyrl\cyri\cyrc}}% + \def\indexname{% + {\cyr\CYRP\cyrr\cyre\cyrd\cyrm\cyre\cyrt\cyrn\cyrery\cyrishrt + \ \cyru\cyrk\cyra\cyrz\cyra\cyrt\cyre\cyrl\cyrsftsn}}% + \def\authorname{% + {\cyr\CYRI\cyrm\cyre\cyrn\cyrn\cyro\cyrishrt + \ \cyru\cyrk\cyra\cyrz\cyra\cyrt\cyre\cyrl\cyrsftsn}}% + \def\figurename{{\cyr\CYRR\cyri\cyrs.}}% + \def\tablename{{\cyr\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyra}}% + \def\partname{{\cyr\CYRCH\cyra\cyrs\cyrt\cyrsftsn}}% + \def\enclname{{\cyr\cyrv\cyrk\cyrl.}}% + \def\ccname{{\cyr\cyri\cyrs\cyrh.}}% +% \def\ccname{{\cyr\cyri\cyrz}}% + \def\headtoname{{\cyr\cyrv\cyrh.}}% +% \def\headtoname{{\cyr\cyrv}}% + \def\pagename{{\cyr\cyrs.}}% +% \def\pagename{{\cyr\cyrs\cyrt\cyrr.}}% + \def\seename{{\cyr\cyrs\cyrm.}}% + \def\alsoname{{\cyr\cyrs\cyrm.\ \cyrt\cyra\cyrk\cyrzh\cyre}}% +% \end{macrocode} +% \changes{russianb-1.1m}{2000/09/20}{Added \cs{glossaryname}} +% \begin{macrocode} + \def\proofname{{\cyr\CYRD\cyro\cyrk\cyra\cyrz\cyra\cyrt + \cyre\cyrl\cyrsftsn\cyrs\cyrt\cyrv\cyro}}% + \def\glossaryname{Glossary}% <-- Needs translation + } +% \end{macrocode} +% +% \end{macro} +% +% \begin{macro}{\daterussian} +% +% The macro |\daterussian| redefines the command |\today| to produce +% Russian dates. +% +% \begin{macrocode} +\def\daterussian{% + \def\today{\number\day~\ifcase\month\or + \cyrya\cyrn\cyrv\cyra\cyrr\cyrya\or + \cyrf\cyre\cyrv\cyrr\cyra\cyrl\cyrya\or + \cyrm\cyra\cyrr\cyrt\cyra\or + \cyra\cyrp\cyrr\cyre\cyrl\cyrya\or + \cyrm\cyra\cyrya\or + \cyri\cyryu\cyrn\cyrya\or + \cyri\cyryu\cyrl\cyrya\or + \cyra\cyrv\cyrg\cyru\cyrs\cyrt\cyra\or + \cyrs\cyre\cyrn\cyrt\cyrya\cyrb\cyrr\cyrya\or + \cyro\cyrk\cyrt\cyrya\cyrb\cyrr\cyrya\or + \cyrn\cyro\cyrya\cyrb\cyrr\cyrya\or + \cyrd\cyre\cyrk\cyra\cyrb\cyrr\cyrya\fi + \ \number\year~\cyrg.}} +% \end{macrocode} +% +% \end{macro} +% +% \begin{macro}{\extrasrussian} +% +% The macro |\extrasrussian| will perform all the extra definitions +% needed for the Russian language. The macro |\noextrasrussian| is used +% to cancel the actions of |\extrasrussian|. +% +% \changes{russianb-1.1b}{1996/02/20}{Added switch to \texttt{LWN} +% encoding} +% +% The first action we define is to switch on the selected Cyrillic +% encoding whenever we enter `russian'. +% +% \begin{macrocode} +\addto\extrasrussian{\cyrillictext} +% \end{macrocode} +% +% When the encoding definition file was processed by \LaTeX\ the current +% font encoding is stored in |\latinencoding|, assuming that \LaTeX\ uses +% \texttt{T1} or \texttt{OT1} as default. Therefore we switch back to +% |\latinencoding| whenever the Russian language is no longer `active'. +% +% \begin{macrocode} +\addto\noextrasrussian{\latintext} +% \end{macrocode} +% +% \begin{macro}{\verbatim@font} +% +% \changes{russianb-1.1b}{1996/02/20}{Added changing of +% \cs{verbatim@font}} +% +% In order to get both Latin and Cyrillic letters in verbatim text we +% need to change the definition of an internal \LaTeX\ command somewhat: +% +% \begin{macrocode} +%\def\verbatim@font{% +% \let\encodingdefault\latinencoding +% \normalfont\ttfamily +% \expandafter\def\csname\cyrillicencoding-cmd\endcsname##1##2{% +% \ifx\protect\@typeset@protect +% \begingroup\UseTextSymbol\cyrillicencoding##1\endgroup +% \else\noexpand##1\fi}} +% \end{macrocode} +% +% \end{macro} +% +% The category code of the characters `\texttt{:}', `\texttt{;}', +% `\texttt{!}', and `\texttt{?}' is made |\active| to insert a little +% white space. +% +% For Russian (as well as for German) the \texttt{"} character also is +% made active. +% +% Note: It is \emph{very} questionable whether the Russian typesetting +% tradition requires additional spacing before those punctuation signs. +% Therefore, we make the corresponding code optional. If you need it, +% then define the \texttt{frenchpunct} docstrip option in +% \file{babel.ins}. +% +% \changes{russianb-1.1f}{1998/06/26}{% +% Added a hook to insert space +% or not before `double punctuation' (from frenchb).} +% +% Borrowed from french. +% Some users dislike automatic insertion of a space before +% `double punctuation', and prefer to decide themselves whether a +% space should be added or not; so a hook |\NoAutoSpaceBeforeFDP| +% is provided: if this command is added (in file |russianb.cfg|, or +% anywhere in a document) |russianb| will respect your typing, and +% introduce a suitable space before `double punctuation' \emph{if +% and only if} a space is typed in the source file before those +% signs. +% +% The command |\AutoSpaceBeforeFDP| switches back to the +% default behavior of |russianb|. +% +% \changes{russianb-1.1a}{1995/03/07}{Use the new mechanism for dealing +% with active characters} +% +% \begin{macrocode} +%<*frenchpunct> +\initiate@active@char{:} +\initiate@active@char{;} +% +%<*frenchpunct|spanishligs> +\initiate@active@char{!} +\initiate@active@char{?} +% +\initiate@active@char{"} +% \end{macrocode} +% +% The code above is necessary because we need extra active characters. +% The character |"| is used as indicated in +% table~\ref{tab:russian-quote}. +% +% We specify that the Russian group of shorthands should be used. +% +% \begin{macrocode} +\addto\extrasrussian{\languageshorthands{russian}} +% \end{macrocode} +% +% These characters are `turned on' once, later their definition may +% vary. +% +% \begin{macrocode} +\addto\extrasrussian{% +% \bbl@activate{:}\bbl@activate{;}% +% \bbl@activate{!}\bbl@activate{?}% + \bbl@activate{"}} +\addto\noextrasrussian{% +% \bbl@deactivate{:}\bbl@deactivate{;}% +% \bbl@deactivate{!}\bbl@deactivate{?}% + \bbl@deactivate{"}} +% \end{macrocode} +% +% The \texttt{X2} and \texttt{T2*} encodings do not contain +% |spanish_shriek| and |spanish_query| symbols; as a consequence, the +% ligatures `|?`|' and `|!`|' do not work with them (these characters are +% useless for Cyrillic texts anyway). But we define the shorthands to +% emulate these ligatures (optionally). +% +% We do not use |\latinencoding| here (but instead explicitly use +% \texttt{OT1}) because the user may choose \texttt{T2A} to be the primary +% encoding, but it does not contain these characters. +% +% \begin{macrocode} +%<*spanishligs> +\declare@shorthand{russian}{?`}{\UseTextSymbol{OT1}\textquestiondown} +\declare@shorthand{russian}{!`}{\UseTextSymbol{OT1}\textexclamdown} +% +% \end{macrocode} +% +% \begin{macro}{\russian@sh@;@} +% \begin{macro}{\russian@sh@:@} +% \begin{macro}{\russian@sh@!@} +% \begin{macro}{\russian@sh@?@} +% +% We have to reduce the amount of white space before \texttt{;}, +% \texttt{:} and \texttt{!}. This should only happen in horizontal mode, +% hence the test with |\ifhmode|. +% +% \changes{russianb-1.1a}{1995/07/04}{Use new \cs{DefineActiveNoArg}} +% \changes{russianb-1.1a}{1995/07/04}{Use the more general mechanism of +% \cs{declare@shorthand}} +% \changes{russianb-1.1b}{1996/02/08}{Updated to reflect the latest +% french definitions} +% +% \begin{macrocode} +%<*frenchpunct> +\declare@shorthand{russian}{;}{% + \ifhmode +% \end{macrocode} +% +% \changes{russianb-1.1f}{1998/06/26}{% +% \thinspace changed to kern.1em (space bit thinner)} +% \changes{russianb-1.1f}{1998/06/26}{% +% Added a hook to insert space +% or not before `double punctuation' (from frenchb).} +% +% In horizontal mode we check for the presence of a `space', `unskip' if +% it exists and place a |0.1em| kerning. +% +% \begin{macrocode} + \ifdim\lastskip>\z@ + \unskip\nobreak\kern.1em + \else +% \end{macrocode} +% If no space has been typed, we add |\FDP@thinspace| +% which will be +% defined, up to the user's wishes, as an automatic added +% thinspace, or as |\@empty|. +% +% \begin{macrocode} + \FDP@thinspace + \fi + \fi +% \end{macrocode} +% +% Now we can insert a `|;|' character. +% +% \begin{macrocode} + \string;} +% \end{macrocode} +% +% The other definitions are very similar. +% +% \begin{macrocode} +\declare@shorthand{russian}{:}{% + \ifhmode + \ifdim\lastskip>\z@ + \unskip\nobreak\kern.1em + \else + \FDP@thinspace + \fi + \fi + \string:} +% \end{macrocode} +% +% \begin{macrocode} +\declare@shorthand{russian}{!}{% + \ifhmode + \ifdim\lastskip>\z@ + \unskip\nobreak\kern.1em + \else + \FDP@thinspace + \fi + \fi + \string!} +% \end{macrocode} +% +% \begin{macrocode} +\declare@shorthand{russian}{?}{% + \ifhmode + \ifdim\lastskip>\z@ + \unskip\nobreak\kern.1em + \else + \FDP@thinspace + \fi + \fi + \string?} +% \end{macrocode} +% +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% +% \changes{russianb-1.1f}{1998/06/26}{% +% Added a hook to insert space +% or not before `double punctuation' (from frenchb).} +% \begin{macro}{\AutoSpaceBeforeFDP} +% \begin{macro}{\NoAutoSpaceBeforeFDP} +% \begin{macro}{\FDP@thinspace} +% |\FDP@thinspace| is defined as unbreakable +% spaces if |\AutoSpaceBeforeFDP| is activated or as |\@empty| if +% |\NoAutoSpaceBeforeFDP| is in use. +% The default is |\AutoSpaceBeforeFDP|. +% \begin{macrocode} +\def\AutoSpaceBeforeFDP{% + \def\FDP@thinspace{\nobreak\kern.1em}} +\def\NoAutoSpaceBeforeFDP{\let\FDP@thinspace\@empty} +\AutoSpaceBeforeFDP +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\FDPon} +% \begin{macro}{\FDPoff} +% \changes{russianb-1.1f}{1998/06/26}{One more chance to avoid +% spaces before double punctuation} +% +% The next macros allow to switch on/off activeness of double +% punctuation signs. +% +% \begin{macrocode} +\def\FDPon{\bbl@activate{:}% + \bbl@activate{;}% + \bbl@activate{?}% + \bbl@activate{!}} +\def\FDPoff{\bbl@deactivate{:}% + \bbl@deactivate{;}% + \bbl@deactivate{?}% + \bbl@deactivate{!}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\system@sh@:@} +% \begin{macro}{\system@sh@!@} +% \begin{macro}{\system@sh@?@} +% \begin{macro}{\system@sh@;@} +% +% \changes{russianb-1.1a}{1995/07/04}{Added system level shorthands} +% +% When the active characters appear in an environment where their +% Russian behaviour is not wanted they should give an `expected' +% result. Therefore we define shorthands at system level as well. +% +% \begin{macrocode} +\declare@shorthand{system}{:}{\string:} +\declare@shorthand{system}{;}{\string;} +% +%<*frenchpunct&!spanishligs> +\declare@shorthand{system}{!}{\string!} +\declare@shorthand{system}{?}{\string?} +% +% \end{macrocode} +% +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% To be able to define the function of `|"|', we first define a couple of +% `support' macros. +% +% \begin{macro}{\dq} +% +% We save the original double quote character in |\dq| to keep it +% available, the math accent |\"| can now be typed as `|"|'. +% +% \begin{macrocode} +\begingroup \catcode`\"12 +\def\reserved@a{\endgroup + \def\@SS{\mathchar"7019 } + \def\dq{"}} +\reserved@a +% \end{macrocode} +% +% \end{macro} +% +% \changes{russianb-1.1a}{1995/07/04}{Use \cs{ddot} instead of +% \cs{@MATHUMLAUT}} +% +% Now we can define the doublequote macros: german and french quotes. +% We use definitions of these quotes made in babel.sty. +% The french quotes are contained in the \texttt{T2*} encodings. +% +% \begin{macrocode} +\declare@shorthand{russian}{"`}{\glqq} +\declare@shorthand{russian}{"'}{\grqq} +\declare@shorthand{russian}{"<}{\flqq} +\declare@shorthand{russian}{">}{\frqq} +% \end{macrocode} +% +% Some additional commands: +% +% \begin{macrocode} +\declare@shorthand{russian}{""}{\hskip\z@skip} +\declare@shorthand{russian}{"~}{\textormath{\leavevmode\hbox{-}}{-}} +\declare@shorthand{russian}{"=}{\nobreak-\hskip\z@skip} +\declare@shorthand{russian}{"|}{% + \textormath{\nobreak\discretionary{-}{}{\kern.03em}% + \allowhyphens}{}} +% \end{macrocode} +% +% The next two macros for |"-| and |"---| are somewhat different. +% We must check whether the second token is a hyphen character: +% +% \begin{macrocode} +\declare@shorthand{russian}{"-}{% +% \end{macrocode} +% +% If the next token is `|-|', we typeset an emdash, otherwise a hyphen +% sign: +% +% \begin{macrocode} + \def\russian@sh@tmp{% + \if\russian@sh@next-\expandafter\russian@sh@emdash + \else\expandafter\russian@sh@hyphen\fi + }% +% \end{macrocode} +% +% \TeX\ looks for the next token after the first `|-|': the meaning of +% this token is written to |\russian@sh@next| and |\russian@sh@tmp| is +% called. +% +% \begin{macrocode} + \futurelet\russian@sh@next\russian@sh@tmp} +% \end{macrocode} +% +% Here are the definitions of hyphen and emdash. First the hyphen: +% +% \begin{macrocode} +\def\russian@sh@hyphen{% + \nobreak\-\bbl@allowhyphens} +% \end{macrocode} +% +% \changes{russianb-1.1f}{1998/06/26}{% +% Rearranging of cyrillic emdash stuff} +% +% For the emdash definition, there are the two parameters: we must `eat' +% two last hyphen signs of our emdash\dots : +% \begin{macrocode} +\def\russian@sh@emdash#1#2{\cdash-#1#2} +% \end{macrocode} +% \begin{macro}{\cdash} +% \dots\ these two parameters are useful for another macro: +% |\cdash|: +% \begin{macrocode} +%\ifx\cdash\undefined % should be defined earlier +\def\cdash#1#2#3{\def\tempx@{#3}% +\def\tempa@{-}\def\tempb@{~}\def\tempc@{*}% + \ifx\tempx@\tempa@\@Acdash\else + \ifx\tempx@\tempb@\@Bcdash\else + \ifx\tempx@\tempc@\@Ccdash\else + \errmessage{Wrong usage of cdash}\fi\fi\fi} +% \end{macrocode} +% second parameter (or third for |\cdash|) shows what kind of emdash +% to create in next step +% \begin{center} +% \begin{tabular}{@{}p{.1\hsize}@{}p{.9\hsize}@{}} +% |"---| & ordinary (plain) Cyrillic emdash inside text: +% an unbreakable thinspace will be inserted before only in case of +% a \textit{space} before the dash (it is necessary for dashes after +% display maths formulae: there could be lists, enumerations etc.\ +% started with ``--- where $a$ is ...'' i.e., the dash starts a line). +% (Firstly there were planned rather soft rules for user: he may put +% a space before the dash or not. But it is difficult to place this +% thinspace automatically, i.e., by checking modes because after +% display formulae \TeX{} uses horizontal mode. Maybe there is a +% misunderstanding? Maybe there is another way?) After a dash +% a breakable thinspace is always placed; \\ +% \end{tabular} +% \end{center} +% \begin{macrocode} +% What is more grammatically: .2em or .2\fontdimen6\font ? +\def\@Acdash{\ifdim\lastskip>\z@\unskip\nobreak\hskip.2em\fi + \cyrdash\hskip.2em\ignorespaces}% +% \end{macrocode} +% \begin{center} +% \begin{tabular}{@{}p{.1\hsize}@{}p{.9\hsize}@{}} +% |"--~| & emdash in compound names or surnames +% (like Mendeleev--Klapeiron); this dash has no space characters +% around; after the dash some space is added +% |\exhyphenalty| \\ +% \end{tabular} +% \end{center} +% \begin{macrocode} +\def\@Bcdash{\leavevmode\ifdim\lastskip>\z@\unskip\fi + \nobreak\cyrdash\penalty\exhyphenpenalty\hskip\z@skip\ignorespaces}% +% \end{macrocode} +% \begin{center} +% \begin{tabular}{@{}p{.1\hsize}@{}p{.9\hsize}@{}} +% |"--*| & for denoting direct speech (a space like |\enskip| +% must follow the emdash); \\ +% \end{tabular} +% \end{center} +% \begin{macrocode} +\def\@Ccdash{\leavevmode + \nobreak\cyrdash\nobreak\hskip.35em\ignorespaces}% +%\fi +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\cyrdash} +% Finally the macro for ``body'' of the Cyrillic emdash. +% The |\cyrdash| macro will be defined in case this macro hasn't been +% defined in a fontenc file. For T2* fonts, cyrdash will be placed in +% the code of the English emdash thus it uses ligature |---|. +% \begin{macrocode} +% Is there an IF necessary? +\ifx\cyrdash\undefined + \def\cyrdash{\hbox to.8em{--\hss--}} +\fi +% \end{macrocode} +% \end{macro} +% +% \changes{russianb-1.1f}{1998/06/26}{% +% Add macro for thinspace between initials} +% +% Here a really new macro---to place thinspace between initials. +% This macro used instead of |\,| allows hyphenation in the following +% surname. +% +% \changes{russianb-1.1r}{2004/11/21}{Removed the commanet character +% before the next code line, see R3669} +% \begin{macrocode} +\declare@shorthand{russian}{",}{\nobreak\hskip.2em\ignorespaces} +% \end{macrocode} +% +% \changes{russianb-1.1f}{1998/06/26}{% +% Add commands for switch on/off +% doublequote activeness. Borrowed from german.} +% +% \begin{macro}{\mdqon} +% \begin{macro}{\mdqoff} +% All that's left to do now is to define a couple of commands +% for |"|. +% \begin{macrocode} +\def\mdqon{\bbl@activate{"}} +\def\mdqoff{\bbl@deactivate{"}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% The Russian hyphenation patterns can be used with |\lefthyphenmin| +% and |\righthyphenmin| set to~2. +% +% \changes{russianb-1.1a}{1995/07/04}{use \cs{russianhyphenmins} to +% store the correct values} +% \changes{russianb-1.1m}{2000/09/22}{Now use \cs{providehyphenmins} to +% provide a default value} +% \begin{macrocode} +\providehyphenmins{\CurrentOption}{\tw@\tw@} +% temporary hack: +\ifx\englishhyphenmins\undefined + \def\englishhyphenmins{\tw@\thr@@} +\fi +% \end{macrocode} +% +% Now the action |\extrasrussian| has to execute is to make sure that the +% command |\frenchspacing| is in effect. If this is not the case the +% execution of |\noextrasrussian| will switch it off again. +% +% \begin{macrocode} +\addto\extrasrussian{\bbl@frenchspacing} +\addto\noextrasrussian{\bbl@nonfrenchspacing} +% \end{macrocode} +% +% \end{macro} +% +% Next we add a new enumeration style for Russian manuscripts with +% Cyrillic letters, and later on we define some math operator names in +% accordance with Russian typesetting traditions. +% +% \begin{macro}{\Asbuk} +% +% We begin by defining |\Asbuk| which works like |\Alph|, but produces +% (uppercase) Cyrillic letters intead of Latin ones. The letters YO, +% ISHRT, HRDSN, ERY, and SFTSN are skipped, as usual for such +% enumeration. +% +% \begin{macrocode} +\def\Asbuk#1{\expandafter\@Asbuk\csname c@#1\endcsname} +\def\@Asbuk#1{\ifcase#1\or + \CYRA\or\CYRB\or\CYRV\or\CYRG\or\CYRD\or\CYRE\or\CYRZH\or + \CYRZ\or\CYRI\or\CYRK\or\CYRL\or\CYRM\or\CYRN\or\CYRO\or + \CYRP\or\CYRR\or\CYRS\or\CYRT\or\CYRU\or\CYRF\or\CYRH\or + \CYRC\or\CYRCH\or\CYRSH\or\CYRSHCH\or\CYREREV\or\CYRYU\or + \CYRYA\else\@ctrerr\fi} +% \end{macrocode} +% +% \end{macro} +% +% \begin{macro}{\asbuk} +% +% The macro |\asbuk| is similar to |\alph|; it produces lowercase +% Russian letters. +% +% \begin{macrocode} +\def\asbuk#1{\expandafter\@asbuk\csname c@#1\endcsname} +\def\@asbuk#1{\ifcase#1\or + \cyra\or\cyrb\or\cyrv\or\cyrg\or\cyrd\or\cyre\or\cyrzh\or + \cyrz\or\cyri\or\cyrk\or\cyrl\or\cyrm\or\cyrn\or\cyro\or + \cyrp\or\cyrr\or\cyrs\or\cyrt\or\cyru\or\cyrf\or\cyrh\or + \cyrc\or\cyrch\or\cyrsh\or\cyrshch\or\cyrerev\or\cyryu\or + \cyrya\else\@ctrerr\fi} +% \end{macrocode} +% +% \end{macro} +% +% Set up default Cyrillic math alphabets. To use Cyrillic letters in +% math mode user should load the |textmath| package \emph{before} +% loading fontenc package (or \babel). Note, that by default Cyrillic +% letters are taken from upright font in math mode (unlike Latin +% letters). +% \begin{macrocode} +%\RequirePackage{textmath} +\@ifundefined{sym\cyrillicencoding letters}{}{% +\SetSymbolFont{\cyrillicencoding letters}{bold}\cyrillicencoding + \rmdefault\bfdefault\updefault +\DeclareSymbolFontAlphabet\cyrmathrm{\cyrillicencoding letters} +% \end{macrocode} +% And we need a few commands to be able to switch to different variants. +% \begin{macrocode} +\DeclareMathAlphabet\cyrmathbf\cyrillicencoding + \rmdefault\bfdefault\updefault +\DeclareMathAlphabet\cyrmathsf\cyrillicencoding + \sfdefault\mddefault\updefault +\DeclareMathAlphabet\cyrmathit\cyrillicencoding + \rmdefault\mddefault\itdefault +\DeclareMathAlphabet\cyrmathtt\cyrillicencoding + \ttdefault\mddefault\updefault +% +\SetMathAlphabet\cyrmathsf{bold}\cyrillicencoding + \sfdefault\bfdefault\updefault +\SetMathAlphabet\cyrmathit{bold}\cyrillicencoding + \rmdefault\bfdefault\itdefault +} +% \end{macrocode} +% +% Some math functions in Russian math books have other names: e.g., +% \texttt{sinh} in Russian is written as \texttt{sh} etc. So we define a +% number of new math operators. +% +% |\sinh|: +% \begin{macrocode} +\def\sh{\mathop{\operator@font sh}\nolimits} +% \end{macrocode} +% |\cosh|: +% \begin{macrocode} +\def\ch{\mathop{\operator@font ch}\nolimits} +% \end{macrocode} +% |\tan|: +% \begin{macrocode} +\def\tg{\mathop{\operator@font tg}\nolimits} +% \end{macrocode} +% |\arctan|: +% \begin{macrocode} +\def\arctg{\mathop{\operator@font arctg}\nolimits} +% \end{macrocode} +% arcctg: +% \begin{macrocode} +\def\arcctg{\mathop{\operator@font arcctg}\nolimits} +% \end{macrocode} +% The following macro conflicts with |\th| defined in Latin~1 encoding: +% +% |\tanh|: +% \changes{russianb-1.1q}{2004/05/21}{Change definition of \cs{th} +% only for this language} +% \begin{macrocode} +\addto\extrasrussian{% + \babel@save{\th}% + \let\ltx@th\th + \def\th{\textormath{\ltx@th}% + {\mathop{\operator@font th}\nolimits}}% + } +% \end{macrocode} +% |\cot|: +% \begin{macrocode} +\def\ctg{\mathop{\operator@font ctg}\nolimits} +% \end{macrocode} +% |\coth|: +% \begin{macrocode} +\def\cth{\mathop{\operator@font cth}\nolimits} +% \end{macrocode} +% |\csc|: +% \begin{macrocode} +\def\cosec{\mathop{\operator@font cosec}\nolimits} +% \end{macrocode} +% +% And finally some other Russian mathematical symbols: +% \begin{macrocode} +\def\Prob{\mathop{\kern\z@\mathsf{P}}\nolimits} +\def\Variance{\mathop{\kern\z@\mathsf{D}}\nolimits} +\def\nod{\mathop{\cyrmathrm{\cyrn.\cyro.\cyrd.}}\nolimits} +\def\nok{\mathop{\cyrmathrm{\cyrn.\cyro.\cyrk.}}\nolimits} +\def\NOD{\mathop{\cyrmathrm{\CYRN\CYRO\CYRD}}\nolimits} +\def\NOK{\mathop{\cyrmathrm{\CYRN\CYRO\CYRK}}\nolimits} +\def\Proj{\mathop{\cyrmathrm{\CYRP\cyrr}}\nolimits} +% \end{macrocode} +% +% This is for compatibility with older Russian packages. +% \begin{macrocode} +\DeclareRobustCommand{\No}{% + \ifmmode{\nfss@text{\textnumero}}\else\textnumero\fi} +% \end{macrocode} +% +% The macro |\ldf@finish| takes care of looking for a configuration file, +% setting the main language to be switched on at |\begin{document}| and +% resetting the category code of \texttt{@} to its original value. +% +% \changes{russianb-1.1d}{1996/11/03}{Now use \cs{ldf@finish} to wrap +% up} +% +% \begin{macrocode} +\ldf@finish{russian} +% +% \end{macrocode} +% +% \Finale +%% +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +%% +\endinput diff --git a/Master/texmf-dist/source/generic/babel/russianb.ins b/Master/texmf-dist/source/generic/babel/russianb.ins new file mode 100644 index 00000000000..607d861173f --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/russianb.ins @@ -0,0 +1,147 @@ +%% +%% This file will generate fast loadable files and documentation +%% driver files from the doc files in this package when run through +%% LaTeX or TeX. +%% +%% Copyright 1989-2005 Johannes L. Braams and any individual authors +%% listed elsewhere in this file. All rights reserved. +%% +%% This file is part of the Babel system. +%% -------------------------------------- +%% +%% It 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 +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% The Current Maintainer of this work is Johannes Braams. +%% +%% The list of all files belonging to the LaTeX base distribution is +%% given in the file `manifest.bbl. See also `legal.bbl' 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. +%% +%% --------------- start of docstrip commands ------------------ +%% +\def\filedate{1999/03/13} +\def\batchfile{russianb.ins} +\input docstrip.tex + +{\ifx\generate\undefined +\Msg{**********************************************} +\Msg{*} +\Msg{* This installation requires docstrip} +\Msg{* version 2.3c or later.} +\Msg{*} +\Msg{* An older version of docstrip has been input} +\Msg{*} +\Msg{**********************************************} +\errhelp{Move or rename old docstrip.tex.} +\errmessage{Old docstrip in input path} +\batchmode +\csname @@end\endcsname +\fi} + +\declarepreamble\mainpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl 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. +\endpreamble + +\declarepreamble\fdpreamble + +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl for additional +information. + +In particular, permission is granted to customize the declarations in +this file to serve the needs of your installation. + +However, NO PERMISSION is granted to distribute a modified version +of this file under its original name. + +\endpreamble + +\usedir{tex/generic/babel} +\keepsilent + +\usepreamble\mainpreamble + +\generate{\file{russianb.ldf}{\from{russianb.dtx}{code}}} + +\ifToplevel{ +\Msg{***********************************************************} +\Msg{*} +\Msg{* To finish the installation you have to move the following} +\Msg{* files into a directory searched by TeX:} +\Msg{*} +\Msg{* \space\space All *.fd} +\Msg{*} +\Msg{* To produce the documentation run the files ending with} +\Msg{* `.fdd' through LaTeX.} +\Msg{*} +\Msg{* Happy TeXing} +\Msg{***********************************************************} +} + +\endinput diff --git a/Master/texmf-dist/source/generic/babel/samin.dtx b/Master/texmf-dist/source/generic/babel/samin.dtx new file mode 100644 index 00000000000..b3d951204c7 --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/samin.dtx @@ -0,0 +1,232 @@ +% \iffalse meta-comment +% +% Copyright 1989-2005 Johannes L. Braams and any individual authors +% listed elsewhere in this file. All rights reserved. +% +% This file is part of the Babel system. +% -------------------------------------- +% +% It 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 +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2003/12/01 or later. +% +% This work has the LPPL maintenance status "maintained". +% +% The Current Maintainer of this work is Johannes Braams. +% +% The list of all files belonging to the Babel system is +% given in the file `manifest.bbl. See also `legal.bbl' 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 +% \CheckSum{120} +% +% \iffalse +% Tell the \LaTeX\ system who we are and write an entry on the +% transcript. +%<*dtx> +\ProvidesFile{samin.dtx} +% +%\ProvidesLanguage{samin} +%\fi +%\ProvidesFile{samin.dtx} + [2004/02/20 v1.0c North Sami support from the babel system] +%\iffalse +%% Babel package for LaTeX version 2e +%% Copyright (C) 1989 -- 2004 +%% by Johannes Braams, TeXniek +% +%% Please report errors to: J.L. Braams +%% babel at braams.cistron.nl +% +% This file is part of the babel system, it provides the source code for +% the North Sami language definition file. +%<*filedriver> +\documentclass{ltxdoc} +\newcommand*{\TeXhax}{\TeX hax} +\newcommand*{\babel}{\textsf{babel}} +\newcommand*{\langvar}{$\langle \mathit lang \rangle$} +\newcommand*{\note}[1]{} +\newcommand*{\Lopt}[1]{\textsf{#1}} +\newcommand*{\file}[1]{\texttt{#1}} +\begin{document} + \DocInput{samin.dtx} +\end{document} +% +%\fi +% \GetFileInfo{samin.dtx} +% +% \section{The North Sami language} +% +% The file \file{\filename}\footnote{The file described in this +% section has version number \fileversion\ and was last revised on +% \filedate. It was written by Regnor Jernsletten, +% (\texttt{Regnor.Jernsletten@sami.uit.no}) or +% (\texttt{Regnor.Jernsletten@eunet.no}).} +% defines all the language definition macros for the North Sami language. +% +% Several Sami dialects/languages are spoken in Finland, Norway, Sweden +% and on the Kola Peninsula (Russia). The alphabets differ, so there +% will eventually be a need for more \texttt{.dtx} files for e.g. Lule +% and South Sami. Hence the name \file{samin.dtx} (and not +% \file{sami.dtx} or the like) in the North Sami case. +% +% There are currently no hyphenation patterns available for the North +% Sami language, but you might consider using the patterns for Finnish +% (\file{fi8hyph.tex}), Norwegian (\file{nohyph.tex}) or Swedish +% (\file{sehyph.tex}). Add a line for the \texttt{samin} language to +% the \file{language.dat} file, and rebuild the \LaTeX\ format file. +% See the documentation for your \LaTeX\ distribution. +% +% A note on writing North Sami in \LaTeX: The TI encoding and EC fonts +% do not include the T WITH STROKE letter, which you will need a +% workaround for. My suggestion is to place the lines\\ +% |\newcommand{\tx}{\mbox{t\hspace{-.35em}-}}|\\ +% |\newcommand{\txx}{\mbox{T\hspace{-.5em}-}}|\\ +% in the preamble of your documents. They define the commands\\ +% |\txx{}| for LATIN CAPITAL LETTER T WITH STROKE and \\ +% |\tx{}| for LATIN SMALL LETTER T WITH STROKE. +% +% \subsection{The code of \file{samin.dtx}} +% +% \StopEventually{} +% +% The macro |\LdfInit| takes care of preventing that this file is +% loaded more than once, checking the category code of the +% \texttt{@} sign, etc. +% \begin{macrocode} +%<*code> +\LdfInit{samin}{captionssamin} +% \end{macrocode} +% +% When this file is read as an option, i.e. by the |\usepackage| +% command, \texttt{samin} could be an `unknown' language in +% which case we have to make it known. So we check for the +% existence of |\l@samin| to see whether we have to do +% something here. +% +% \begin{macrocode} +\ifx\undefined\l@samin + \@nopatterns{Samin} + \adddialect\l@samin0\fi +% \end{macrocode} +% +% The next step consists of defining commands to switch to (and +% from) the North Sami language. +% +% \begin{macro}{\saminhyphenmins} +% This macro is used to store the correct values of the hyphenation +% parameters |\lefthyphenmin| and |\righthyphenmin|. +% \changes{samin-1.0b}{2000/09/26}{use \cs{providehyphenmins}} +% \begin{macrocode} +\providehyphenmins{samin}{\tw@\tw@} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\captionssamin} +% The macro |\captionssamin| defines all strings used in the +% four standard documentclasses provided with \LaTeX. +% \changes{samin-1.0b}{2000/09/26}{Added \cs{glossaryname}} +% \changes{samin-1.0c}{2000/10/04}{Provided the translation for +% glossary} +% \begin{macrocode} +\def\captionssamin{% + \def\prefacename{Ovdas\'atni}% + \def\refname{\v Cujuhusat}% + \def\abstractname{\v Coahkk\'aigeassu}% + \def\bibname{Girjj\'ala\v svuohta}% + \def\chaptername{Kapihttal}% + \def\appendixname{\v Cuovus}% + \def\contentsname{Sisdoallu}% + \def\listfigurename{Govvosat}% + \def\listtablename{Tabeallat}% + \def\indexname{Registtar}% + \def\figurename{Govus}% + \def\tablename{Tabealla}% + \def\partname{Oassi}% + \def\enclname{Mielddus}% + \def\ccname{Kopia s\'addejuvvon}% + \def\headtoname{Vuost\'aiv\'aldi}% + \def\pagename{Siidu}% + \def\seename{geah\v ca}% + \def\alsoname{geah\v ca maidd\'ai}% + \def\proofname{Duo\dj{}a\v stus}% + \def\glossaryname{S\'atnelistu}% +}% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\datesamin} +% The macro |\datesamin| redefines the command |\today| to +% produce North Sami dates. +% \begin{macrocode} +\def\datesamin{% + \def\today{\ifcase\month\or + o\dj{}\dj{}ajagem\'anu\or + guovvam\'anu\or + njuk\v cam\'anu\or + cuo\ng{}om\'anu\or + miessem\'anu\or + geassem\'anu\or + suoidnem\'anu\or + borgem\'anu\or + \v cak\v cam\'anu\or + golggotm\'anu\or + sk\'abmam\'anu\or + juovlam\'anu\fi + \space\number\day.~b.\space\number\year}% +}% +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\extrassamin} +% \begin{macro}{\noextrassamin} +% The macro |\extrassamin| will perform all the extra +% definitions needed for the North Sami language. The macro +% |\noextrassamin| is used to cancel the actions of +% |\extrassamin|. For the moment these macros are empty but +% they are defined for compatibility with the other +% language definition files. +% +% \begin{macrocode} +\addto\extrassamin{} +\addto\noextrassamin{} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% The macro |\ldf@finish| takes care of looking for a +% configuration file, setting the main language to be switched on +% at |\begin{document}| and resetting the category code of +% \texttt{@} to its original value. +% \begin{macrocode} +\ldf@finish{samin} +% +% \end{macrocode} +% +% \Finale +%\endinput +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +%% diff --git a/Master/texmf-dist/source/generic/babel/samin.ins b/Master/texmf-dist/source/generic/babel/samin.ins new file mode 100644 index 00000000000..e94cf6f90ab --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/samin.ins @@ -0,0 +1,148 @@ +%% +%% This file will generate fast loadable files and documentation +%% driver files from the doc files in this package when run through +%% LaTeX or TeX. +%% +%% Copyright 1989-2005 Johannes L. Braams and any individual authors +%% listed elsewhere in this file. All rights reserved. +%% +%% This file is part of the Babel system. +%% -------------------------------------- +%% +%% It 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 +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% The Current Maintainer of this work is Johannes Braams. +%% +%% The list of all files belonging to the LaTeX base distribution is +%% given in the file `manifest.bbl. See also `legal.bbl' 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. +%% +%% --------------- start of docstrip commands ------------------ +%% +\def\filedate{2000/09/26} +\def\batchfile{samin.ins} +\input docstrip.tex + +{\ifx\generate\undefined +\Msg{**********************************************} +\Msg{*} +\Msg{* This installation requires docstrip} +\Msg{* version 2.3c or later.} +\Msg{*} +\Msg{* An older version of docstrip has been input} +\Msg{*} +\Msg{**********************************************} +\errhelp{Move or rename old docstrip.tex.} +\errmessage{Old docstrip in input path} +\batchmode +\csname @@end\endcsname +\fi} + +\declarepreamble\mainpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl 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. +\endpreamble + +\declarepreamble\fdpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl for additional +information. + +In particular, permission is granted to customize the declarations in +this file to serve the needs of your installation. + +However, NO PERMISSION is granted to distribute a modified version +of this file under its original name. + +\endpreamble + +\keepsilent + +\usedir{tex/generic/babel} + +\usepreamble\mainpreamble +\generate{\file{samin.ldf}{\from{samin.dtx}{code}} + } +\usepreamble\fdpreamble + +\ifToplevel{ +\Msg{***********************************************************} +\Msg{*} +\Msg{* To finish the installation you have to move the following} +\Msg{* files into a directory searched by TeX:} +\Msg{*} +\Msg{* \space\space All *.def, *.fd, *.ldf, *.sty} +\Msg{*} +\Msg{* To produce the documentation run the files ending with} +\Msg{* '.dtx' and `.fdd' through LaTeX.} +\Msg{*} +\Msg{* Happy TeXing} +\Msg{***********************************************************} +} + +\endinput \ No newline at end of file diff --git a/Master/texmf-dist/source/generic/babel/scottish.dtx b/Master/texmf-dist/source/generic/babel/scottish.dtx new file mode 100644 index 00000000000..82613e5cd0b --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/scottish.dtx @@ -0,0 +1,209 @@ +% \iffalse meta-comment +% +% Copyright 1989-2005 Johannes L. Braams and any individual authors +% listed elsewhere in this file. All rights reserved. +% +% This file is part of the Babel system. +% -------------------------------------- +% +% It 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 +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2003/12/01 or later. +% +% This work has the LPPL maintenance status "maintained". +% +% The Current Maintainer of this work is Johannes Braams. +% +% The list of all files belonging to the Babel system is +% given in the file `manifest.bbl. See also `legal.bbl' 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 +% \CheckSum{95} +% +% \iffalse +% Tell the \LaTeX\ system who we are and write an entry on the +% transcript. +%<*dtx> +\ProvidesFile{scottish.dtx} +% +%\ProvidesLanguage{scottish} +%\fi +%\ProvidesFile{scottish.dtx} + [2005/03/31 v1.0g Scottish support from the babel system] +%\iffalse +%% File `scottish.dtx' +%% Babel package for LaTeX version 2e +%% Copyright (C) 1989 -- 2005 +%% by Johannes Braams, TeXniek +% +%% Please report errors to: J.L. Braams +%% babel at braams.cistron.nl +% +% This file is part of the babel system, it provides the source +% code for the Scottish language definition file. +% +% The Gaidhlig or Scottish Gaelic terms were provided by Fraser +% Grant \texttt{FRASER@CERNVM}. +%<*filedriver> +\documentclass{ltxdoc} +\newcommand*{\TeXhax}{\TeX hax} +\newcommand*{\babel}{\textsf{babel}} +\newcommand*{\langvar}{$\langle \mathit lang \rangle$} +\newcommand*{\note}[1]{} +\newcommand*{\Lopt}[1]{\textsf{#1}} +\newcommand*{\file}[1]{\texttt{#1}} +\begin{document} + \DocInput{scottish.dtx} +\end{document} +% +%\fi +% \GetFileInfo{scottish.dtx} +% +% \changes{scottish-1.0b}{1995/06/14}{Corrected typos (PR1652)} +% \changes{scottish-1.0d}{1996/10/10}{Replaced \cs{undefined} with +% \cs{@undefined} and \cs{empty} with \cs{@empty} for consistency +% with \LaTeX, moved the definition of \cs{atcatcode} right to the +% beginning.} +% +% \section{The Scottish language} +% +% The file \file{\filename}\footnote{The file described in this +% section has version number \fileversion\ and was last revised on +% \filedate. A contribution was made by Fraser Grant +% (\texttt{FRASER@CERNVM}).} defines all the language definition +% macros for the Scottish language. +% +% For this language currently no special definitions are needed or +% available. +% +% \StopEventually{} +% +% The macro |\LdfInit| takes care of preventing that this file is +% loaded more than once, checking the category code of the +% \texttt{@} sign, etc. +% \changes{scottish-1.0d}{1996/11/03}{Now use \cs{LdfInit} to perform +% initial checks} +% \begin{macrocode} +%<*code> +\LdfInit{scottish}\captionsscottish +% \end{macrocode} +% +% When this file is read as an option, i.e. by the |\usepackage| +% command, \texttt{scottish} could be an `unknown' language in +% which case we have to make it known. So we check for the +% existence of |\l@scottish| to see whether we have to do something +% here. +% +% \begin{macrocode} +\ifx\l@scottish\@undefined + \@nopatterns{scottish} + \adddialect\l@scottish0\fi +% \end{macrocode} +% The next step consists of defining commands to switch to (and +% from) the Scottish language. +% +% \begin{macro}{\captionsscottish} +% The macro |\captionsscottish| defines all strings used in the +% four standard documentclasses provided with \LaTeX. +% \changes{scottish-1.0c}{1995/07/04}{Added \cs{proofname} for +% AMS-\LaTeX} +% \changes{scottish-1.0g}{2000/09/20}{Added \cs{glossaryname}} +% \begin{macrocode} +\addto\captionsscottish{% + \def\prefacename{Preface}% <-- needs translation + \def\refname{Iomraidh}% + \def\abstractname{Br\`{\i}gh}% + \def\bibname{Leabhraichean}% + \def\chaptername{Caibideil}% + \def\appendixname{Ath-sgr`{\i}obhadh}% + \def\contentsname{Cl\`ar-obrach}% + \def\listfigurename{Liosta Dhealbh }% + \def\listtablename{Liosta Chl\`ar}% + \def\indexname{Cl\`ar-innse}% + \def\figurename{Dealbh}% + \def\tablename{Cl\`ar}% + \def\partname{Cuid}% + \def\enclname{a-staigh}% + \def\ccname{lethbhreac gu}% + \def\headtoname{gu}% + \def\pagename{t.d.}% abrv. `taobh duilleag' + \def\seename{see}% <-- needs translation + \def\alsoname{see also}% <-- needs translation + \def\proofname{Proof}% <-- needs translation + \def\glossaryname{Glossary}% <-- Needs translation +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\datescottish} +% The macro |\datescottish| redefines the command |\today| to +% produce Scottish dates. +% \changes{scottish-1.0e}{1997/10/01}{Use \cs{edef} to define +% \cs{today} to save memory} +% \changes{scottish-1.0e}{1998/03/28}{use \cs{def} instead of +% \cs{edef}} +% \begin{macrocode} +\def\datescottish{% + \def\today{% + \number\day\space \ifcase\month\or + am Faoilteach\or an Gearran\or am M\`art\or an Giblean\or + an C\`eitean\or an t-\`Og mhios\or an t-Iuchar\or + L\`unasdal\or an Sultuine\or an D\`amhar\or + an t-Samhainn\or an Dubhlachd\fi + \space \number\year}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\extrasscottish} +% \begin{macro}{\noextrasscottish} +% The macro |\extrasscottish| will perform all the extra +% definitions needed for the Scottish language. The macro +% |\noextrasscottish| is used to cancel the actions of +% |\extrasscottish|. For the moment these macros are empty but +% they are defined for compatibility with the other language +% definition files. +% +% \begin{macrocode} +\addto\extrasscottish{} +\addto\noextrasscottish{} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% The macro |\ldf@finish| takes care of looking for a +% configuration file, setting the main language to be switched on +% at |\begin{document}| and resetting the category code of +% \texttt{@} to its original value. +% \changes{scottish-1.0d}{1996/11/03}{Now use \cs{ldf@finish} to wrap +% up} +% \begin{macrocode} +\ldf@finish{scottish} +% +% \end{macrocode} +% +% \Finale +%\endinput +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +%% diff --git a/Master/texmf-dist/source/generic/babel/scottish.ins b/Master/texmf-dist/source/generic/babel/scottish.ins new file mode 100644 index 00000000000..5937bb1c446 --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/scottish.ins @@ -0,0 +1,148 @@ +%% +%% This file will generate fast loadable files and documentation +%% driver files from the doc files in this package when run through +%% LaTeX or TeX. +%% +%% Copyright 1989-2005 Johannes L. Braams and any individual authors +%% listed elsewhere in this file. All rights reserved. +%% +%% This file is part of the Babel system. +%% -------------------------------------- +%% +%% It 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 +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% The Current Maintainer of this work is Johannes Braams. +%% +%% The list of all files belonging to the LaTeX base distribution is +%% given in the file `manifest.bbl. See also `legal.bbl' 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. +%% +%% --------------- start of docstrip commands ------------------ +%% +\def\filedate{1999/04/11} +\def\batchfile{scottish.ins} +\input docstrip.tex + +{\ifx\generate\undefined +\Msg{**********************************************} +\Msg{*} +\Msg{* This installation requires docstrip} +\Msg{* version 2.3c or later.} +\Msg{*} +\Msg{* An older version of docstrip has been input} +\Msg{*} +\Msg{**********************************************} +\errhelp{Move or rename old docstrip.tex.} +\errmessage{Old docstrip in input path} +\batchmode +\csname @@end\endcsname +\fi} + +\declarepreamble\mainpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl 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. +\endpreamble + +\declarepreamble\fdpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl for additional +information. + +In particular, permission is granted to customize the declarations in +this file to serve the needs of your installation. + +However, NO PERMISSION is granted to distribute a modified version +of this file under its original name. + +\endpreamble + +\keepsilent + +\usedir{tex/generic/babel} + +\usepreamble\mainpreamble +\generate{\file{scottish.ldf}{\from{scottish.dtx}{code}} + } +\usepreamble\fdpreamble + +\ifToplevel{ +\Msg{***********************************************************} +\Msg{*} +\Msg{* To finish the installation you have to move the following} +\Msg{* files into a directory searched by TeX:} +\Msg{*} +\Msg{* \space\space All *.def, *.fd, *.ldf, *.sty} +\Msg{*} +\Msg{* To produce the documentation run the files ending with} +\Msg{* '.dtx' and `.fdd' through LaTeX.} +\Msg{*} +\Msg{* Happy TeXing} +\Msg{***********************************************************} +} + +\endinput diff --git a/Master/texmf-dist/source/generic/babel/serbian.dtx b/Master/texmf-dist/source/generic/babel/serbian.dtx new file mode 100644 index 00000000000..60179088835 --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/serbian.dtx @@ -0,0 +1,312 @@ +% \iffalse meta-comment +% +% Copyright 1989-2005 Johannes L. Braams and any individual authors +% listed elsewhere in this file. All rights reserved. +% +% This file is part of the Babel system. +% -------------------------------------- +% +% It 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 +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2003/12/01 or later. +% +% This work has the LPPL maintenance status "maintained". +% +% The Current Maintainer of this work is Johannes Braams. +% +% The list of all files belonging to the Babel system is +% given in the file `manifest.bbl. See also `legal.bbl' 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 +% \CheckSum{263} +% \iffalse +% Tell the \LaTeX\ system who we are and write an entry on the +% transcript. +%<*dtx> +\ProvidesFile{serbian.dtx} +% +%\ProvidesLanguage{serbian} +%\fi +%\ProvidesFile{serbian.dtx} + [2005/03/31 v1.0d Serbocroatian support from the babel system] +%\iffalse +% Babel package for LaTeX version 2e +% Copyright (C) 1989 - 2005 +% by Johannes Braams, TeXniek +% +% Please report errors to: J.L. Braams +% babel at braams.cistron.nl +% +% This file is part of the babel system, it provides the source +% code for the Serbocroatian language definition file. A contribution +% was made by Dejan Muhamedagi\'{c} (dejan@yunix.com) and Jankovic +% Slobodan +% +%<*filedriver> +\documentclass{ltxdoc} +\newcommand*\TeXhax{\TeX hax} +\newcommand*\babel{\textsf{babel}} +\newcommand*\langvar{$\langle \it lang \rangle$} +\newcommand*\note[1]{} +\newcommand*\Lopt[1]{\textsf{#1}} +\newcommand*\file[1]{\texttt{#1}} +\begin{document} + \DocInput{serbian.dtx} +\end{document} +% +%\fi +% \GetFileInfo{serbian.dtx} +% \changes{serbian-1.0b}{1998/06/16}{Added suggestions for shorthands +% and so on from Jankovic Slobodan} +% +% \section{The Serbocroatian language} +% +% The file \file{\filename}\footnote{The file described in this +% section has version number \fileversion\ and was last revised on +% \filedate. A contribution was made by Dejan Muhamedagi\'{c} +% (\texttt{dejan@yunix.com}).} defines all the language definition +% macros for the Serbian language, typeset in a latin script. In a +% future version support for typesetting in a cyrillic script may +% be added. +% +% For this language the character |"| is made active. In +% table~\ref{tab:serbian-quote} an overview is given of its +% purpose. One of the reasons for this is that in the Serbian +% language some special characters are used. +% +% \begin{table}[htb] +% \begin{center} +% \begin{tabular}{lp{8cm}} +% |"c| & |\"c|, also implemented for the +% lowercase and uppercase s and z. \\ +% |"d| & |\dj|, also implemented for |"D| \\ +% |"-| & an explicit hyphen sign, allowing hyphenation +% in the rest of the word. \\ +% \verb="|= & disable ligature at this position \\ +% |""| & like |"-|, but producing no hyphen sign +% (for compund words with hyphen, e.g.\ |x-""y|). \\ +% |"`| & for Serbian left double quotes (looks like ,,). \\ +% |"'| & for Serbian right double quotes. \\ +% |"<| & for French left double quotes (similar to $<<$). \\ +% |">| & for French right double quotes (similar to $>>$). \\ +% \end{tabular} +% \caption{The extra definitions made +% by \file{serbian.ldf}}\label{tab:serbian-quote} +% \end{center} +% \end{table} +% +% Apart from defining shorthands we need to make sure taht the +% first paragraph of each section is intended. Furthermore the +% following new math operators are defined (|\tg|, |\ctg|, +% |\arctg|, |\arcctg|, |\sh|, |\ch|, |\th|, |\cth|, |\arsh|, +% |\arch|, |\arth|, |\arcth|, |\Prob|, |\Expect|, |\Variance|). +% +% \StopEventually{} +% +% The macro |\LdfInit| takes care of preventing that this file is +% loaded more than once, checking the category code of the +% \texttt{@} sign, etc. +% \begin{macrocode} +%<*code> +\LdfInit{serbian}\captionsserbian +% \end{macrocode} +% +% When this file is read as an option, i.e. by the |\usepackage| +% command, \texttt{serbian} will be an `unknown' language in which +% case we have to make it known. So we check for the existence of +% |\l@serbian| to see whether we have to do something here. +% +% \begin{macrocode} +\ifx\l@serbian\@undefined + \@nopatterns{Serbian} + \adddialect\l@serbian0\fi +% \end{macrocode} +% +% The next step consists of defining commands to switch to (and +% from) the Serbocroatian language. +% +% \begin{macro}{\captionsserbian} +% The macro |\captionsserbian| defines all strings used +% in the four standard documentclasses provided with \LaTeX. +% \changes{serbian-1.0d}{2000/09/20}{Added \cs{glossaryname}} +% \begin{macrocode} +\addto\captionsserbian{% + \def\prefacename{Predgovor}% + \def\refname{Literatura}% + \def\abstractname{Sa\v{z}etak}% + \def\bibname{Bibliografija}% + \def\chaptername{Glava}% + \def\appendixname{Dodatak}% + \def\contentsname{Sadr\v{z}aj}% + \def\listfigurename{Slike}% + \def\listtablename{Tabele}% + \def\indexname{Indeks}% + \def\figurename{Slika}% + \def\tablename{Tabela}% + \def\partname{Deo}% + \def\enclname{Prilozi}% + \def\ccname{Kopije}% + \def\headtoname{Prima}% + \def\pagename{Strana}% + \def\seename{Vidi}% + \def\alsoname{Vidi tako\dj e}% + \def\proofname{Dokaz}% + \def\glossaryname{Glossary}% <-- Needs translation + }% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\dateserbian} +% The macro |\dateserbian| redefines the command |\today| to +% produce Serbocroatian dates. +% \begin{macrocode} +\def\dateserbian{% + \def\today{\number\day .~\ifcase\month\or + januar\or februar\or mart\or april\or maj\or + juni\or juli\or avgust\or septembar\or oktobar\or novembar\or + decembar\fi \space \number\year}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\extrasserbian} +% \begin{macro}{\noextrasserbian} +% The macro |\extrasserbian| will perform all the extra +% definitions needed for the Serbocroatian language. The macro +% |\noextrasserbian| is used to cancel the actions of +% |\extrasserbian|. +% +% For Serbian the \texttt{"} character is made active. This is done +% once, later on its definition may vary. Other languages in the +% same document may also use the \texttt{"} character for +% shorthands; we specify that the serbian group of shorthands +% should be used. +% +% \changes{serbian-1.0b}{1998/06/16}{Introduced the active \texttt{"}} +% \begin{macrocode} +\initiate@active@char{"} +\addto\extrasserbian{\languageshorthands{serbian}} +\addto\extrasserbian{\bbl@activate{"}} +% \end{macrocode} +% Don't forget to turn the shorthands off again. +% \changes{serbian-1.0c}{1999/12/17}{Deactivate shorthands ouside of +% Serbian} +% \begin{macrocode} +\addto\noextrasserbian{\bbl@deactivate{"}} +% \end{macrocode} +% First we define shorthands to facilitate the occurence of letters +% such as \v{c}. +% \begin{macrocode} +\declare@shorthand{serbian}{"c}{\textormath{\v c}{\check c}} +\declare@shorthand{serbian}{"d}{\textormath{\dj}{\dj}}%% +\declare@shorthand{serbian}{"s}{\textormath{\v s}{\check s}} +\declare@shorthand{serbian}{"z}{\textormath{\v z}{\check z}} +\declare@shorthand{serbian}{"C}{\textormath{\v C}{\check C}} +\declare@shorthand{serbian}{"D}{\textormath{\DJ}{\DJ}}%% +\declare@shorthand{serbian}{"S}{\textormath{\v S}{\check S}} +\declare@shorthand{serbian}{"Z}{\textormath{\v Z}{\check Z}} +% \end{macrocode} +% +% Then we define access to two forms of quotation marks, similar +% to the german and french quotation marks. +% \begin{macrocode} +\declare@shorthand{serbian}{"`}{% + \textormath{\quotedblbase{}}{\mbox{\quotedblbase}}} +\declare@shorthand{serbian}{"'}{% + \textormath{\textquotedblleft{}}{\mbox{\textquotedblleft}}} +\declare@shorthand{serbian}{"<}{% + \textormath{\guillemotleft{}}{\mbox{\guillemotleft}}} +\declare@shorthand{serbian}{">}{% + \textormath{\guillemotright{}}{\mbox{\guillemotright}}} +% \end{macrocode} +% then we define two shorthands to be able to specify hyphenation +% breakpoints that behave a little different from |\-|. +% \changes{serbian-1.0d}{2000/09/20}{Changed definition of \texttt{"-} +% to be the same as for other languages} +% \begin{macrocode} +\declare@shorthand{serbian}{"-}{\nobreak-\bbl@allowhyphens} +\declare@shorthand{serbian}{""}{\hskip\z@skip} +% \end{macrocode} +% And we want to have a shorthand for disabling a ligature. +% \begin{macrocode} +\declare@shorthand{serbian}{"|}{% + \textormath{\discretionary{-}{}{\kern.03em}}{}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\bbl@frenchindent} +% \begin{macro}{\bbl@nonfrenchindent} +% In Serbian the first paragraph of each section should be indented. +% Add this code only in \LaTeX. +% \begin{macrocode} +\ifx\fmtname plain \else + \let\@aifORI\@afterindentfalse + \def\bbl@frenchindent{\let\@afterindentfalse\@afterindenttrue + \@afterindenttrue} + \def\bbl@nonfrenchindent{\let\@afterindentfalse\@aifORI + \@afterindentfalse} + \addto\extrasserbian{\bbl@frenchindent} + \addto\noextrasserbian{\bbl@nonfrenchindent} +\fi +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\mathserbian} +% Some math functions in Serbian math books have other names: +% e.g. |sinh| in Serbian is written as |sh| etc. So we define a +% number of new math operators. +% \begin{macrocode} +\def\sh{\mathop{\operator@font sh}\nolimits} % same as \sinh +\def\ch{\mathop{\operator@font ch}\nolimits} % same as \cosh +\def\th{\mathop{\operator@font th}\nolimits} % same as \tanh +\def\cth{\mathop{\operator@font cth}\nolimits} % same as \coth +\def\arsh{\mathop{\operator@font arsh}\nolimits} +\def\arch{\mathop{\operator@font arch}\nolimits} +\def\arth{\mathop{\operator@font arth}\nolimits} +\def\arcth{\mathop{\operator@font arcth}\nolimits} +\def\tg{\mathop{\operator@font tg}\nolimits} % same as \tan +\def\ctg{\mathop{\operator@font ctg}\nolimits} % same as \cot +\def\arctg{\mathop{\operator@font arctg}\nolimits} % same as \arctan +\def\arcctg{\mathop{\operator@font arcctg}\nolimits} +\def\Prob{\mathop{\mathsf P\hskip0pt}\nolimits} +\def\Expect{\mathop{\mathsf E\hskip0pt}\nolimits} +\def\Variance{\mathop{\mathsf D\hskip0pt}\nolimits} +% \end{macrocode} +% \end{macro} +% +% The macro |\ldf@finish| takes care of looking for a +% configuration file, setting the main language to be switched on +% at |\begin{document}| and resetting the category code of +% \texttt{@} to its original value. +% \begin{macrocode} +\ldf@finish{serbian} +% +% \end{macrocode} +% +% \Finale +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +%% +\endinput diff --git a/Master/texmf-dist/source/generic/babel/serbian.ins b/Master/texmf-dist/source/generic/babel/serbian.ins new file mode 100644 index 00000000000..137084466d2 --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/serbian.ins @@ -0,0 +1,148 @@ +%% +%% This file will generate fast loadable files and documentation +%% driver files from the doc files in this package when run through +%% LaTeX or TeX. +%% +%% Copyright 1989-2005 Johannes L. Braams and any individual authors +%% listed elsewhere in this file. All rights reserved. +%% +%% This file is part of the Babel system. +%% -------------------------------------- +%% +%% It 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 +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% The Current Maintainer of this work is Johannes Braams. +%% +%% The list of all files belonging to the LaTeX base distribution is +%% given in the file `manifest.bbl. See also `legal.bbl' 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. +%% +%% --------------- start of docstrip commands ------------------ +%% +\def\filedate{1999/03/13} +\def\batchfile{serbian.ins} +\input docstrip.tex + +{\ifx\generate\undefined +\Msg{**********************************************} +\Msg{*} +\Msg{* This installation requires docstrip} +\Msg{* version 2.3c or later.} +\Msg{*} +\Msg{* An older version of docstrip has been input} +\Msg{*} +\Msg{**********************************************} +\errhelp{Move or rename old docstrip.tex.} +\errmessage{Old docstrip in input path} +\batchmode +\csname @@end\endcsname +\fi} + +\declarepreamble\mainpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl 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. +\endpreamble + +\declarepreamble\fdpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl for additional +information. + +In particular, permission is granted to customize the declarations in +this file to serve the needs of your installation. + +However, NO PERMISSION is granted to distribute a modified version +of this file under its original name. + +\endpreamble + +\usedir{tex/generic/babel} +\keepsilent + +\usepreamble\mainpreamble + +\generate{\file{serbian.ldf}{\from{serbian.dtx}{code}}} + +\usepreamble\fdpreamble + +\ifToplevel{ +\Msg{***********************************************************} +\Msg{*} +\Msg{* To finish the installation you have to move the following} +\Msg{* files into a directory searched by TeX:} +\Msg{*} +\Msg{* \space\space All *.fd} +\Msg{*} +\Msg{* To produce the documentation run the files ending with} +\Msg{* `.fdd' through LaTeX.} +\Msg{*} +\Msg{* Happy TeXing} +\Msg{***********************************************************} +} + +\endinput diff --git a/Master/texmf-dist/source/generic/babel/slovak.dtx b/Master/texmf-dist/source/generic/babel/slovak.dtx new file mode 100644 index 00000000000..8b47f53b86e --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/slovak.dtx @@ -0,0 +1,417 @@ +% \iffalse meta-comment +% +% Copyright 1989-2005 Johannes L. Braams and any individual authors +% listed elsewhere in this file. All rights reserved. +% +% This file is part of the Babel system. +% -------------------------------------- +% +% It 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 +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2003/12/01 or later. +% +% This work has the LPPL maintenance status "maintained". +% +% The Current Maintainer of this work is Johannes Braams. +% +% The list of all files belonging to the Babel system is +% given in the file `manifest.bbl. See also `legal.bbl' 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 +% \CheckSum{402} +% \iffalse +% Tell the \LaTeX\ system who we are and write an entry on the +% transcript. +%<*dtx> +\ProvidesFile{slovak.dtx} +% +%\ProvidesLanguage{slovak} +%\fi +%\ProvidesFile{slovak.dtx} + [2005/03/31 v1.3a Slovak support from the babel system] +%\iffalse +%% File `slovak.dtx' +%% Babel package for LaTeX version 2e +%% Copyright (C) 1989 - 2005 +%% by Johannes Braams, TeXniek +% +%% Slovak Language Definition File +%% Copyright (C) 1989 - 2001 +%% by Jana Chlebikova +% Department of Artificial Intelligence +% Faculty of Mathematics and Physics +% Mlynska dolina +% 84215 Bratislava +% Slovakia +% (42)(7) 720003 l. 835 +% (42)(7) 725882 +% chlebikj at mff.uniba.cs (Internet) +% and Johannes Braams, TeXniek +% +%% Copyright (C) 2002-2005 +%% by Tobias Schlemmer +% Braunsdorfer Stra\ss e 101 +% 01159 Dresden +% Deutschland +% Tobias.Schlemmer at web.de +% +%% Please report errors to: J.L. Braams babel at braams.cistron.nl +%% Tobias Schlemmer Tobias.Schlemmer at web.de +% +% This file is part of the babel system, it provides the source +% code for the Slovak language definition file. +%<*filedriver> +\documentclass{ltxdoc} +\newcommand*\TeXhax{\TeX hax} +\newcommand*\babel{\textsf{babel}} +\newcommand*\langvar{$\langle \it lang \rangle$} +\newcommand*\note[1]{} +\newcommand*\Lopt[1]{\textsf{#1}} +\newcommand*\file[1]{\texttt{#1}} +\begin{document} + \DocInput{slovak.dtx} +\end{document} +% +%\fi +% \GetFileInfo{slovak.dtx} +% +% \changes{slovak-1.0}{1992/07/15}{First version} +% \changes{slovak-1.2}{1994/02/27}{Update for \LaTeXe} +% \changes{slovak-1.2d}{1994/06/26}{Removed the use of \cs{filedate} +% and moved identification after the loading of \file{babel.def}} +% \changes{slovak-1.2i}{1996/10/10}{Replaced \cs{undefined} with +% \cs{@undefined} and \cs{empty} with \cs{@empty} for consistency +% with \LaTeX, moved the definition of \cs{atcatcode} right to the +% beginning.} +% \changes{slovak-1.3a}{2004/02/20}{Added contributed shorthand +% definitions} +% +% \section{The Slovak language} +% +% The file \file{\filename}\footnote{The file described in this +% section has version number \fileversion\ and was last revised on +% \filedate. It was written by Jana Chlebikova +% (\texttt{chlebik@euromath.dk}) and modified by Tobias Schlemmer +% (\texttt{Tobias.Schlemmer@web.de}).} defines all the +% language-specific macros for the Slovak language. +% +% For this language the macro |\q| is defined. It was used with the +% letters (\texttt{t}, \texttt{d}, \texttt{l}, and \texttt{L}) and +% adds a \texttt{'} to them to simulate a `hook' that should be +% there. The result looks like t\kern-2pt\char'47. Since the the T1 +% font encoding has the corresponding characters it is mapped to |\v|. +% Therefore we recommend using T1 font encoding. If you don't want to +% use this encoding, please, feel free to redefine |\q| in your file. +% I think babel will honour this |;-)|. +% +% For this language the characters |"|, |'| and |^| are ade +% active. In table~\ref{tab:slovak-quote} an overview is given of +% its purpose. Also the vertical placement of the +% umlaut can be controlled this way. +% +% \begin{table}[htb] +% \begin{center} +% \begin{tabular}{lp{8cm}} +% |"a| & |\"a|, also implemented for the other +% lowercase and uppercase vowels. \\ +% |^d| & |\q d|, also implemented for l, t and L. \\ +% |^c| & |\v c|, also implemented for C, D, N, n, T, Z and z. \\ +% |^o| & |\^o|, also implemented for O. \\ +% |'a| & |\'a|, also implemented for the other lowercase and +% uppercase l, r, y and vowels. \\ +% \verb="|= & disable ligature at this position. \\ +% |"-| & an explicit hyphen sign, allowing hyphenation +% in the rest of the word. \\ +% |""| & like |"-|, but producing no hyphen sign +% (for compund words with hyphen, e.g.\ |x-""y|). \\ +% |"~| & for a compound word mark without a breakpoint. \\ +% |"=| & for a compound word mark with a breakpoint, allowing +% hyphenation in the composing words. \\ +% |"`| & for German left double quotes (looks like ,,). \\ +% |"'| & for German right double quotes. \\ +% |"<| & for French left double quotes (similar to $<<$). \\ +% |">| & for French right double quotes (similar to $>>$). \\ +% \end{tabular} +% \caption{The extra definitions made +% by \file{slovak.ldf}}\label{tab:slovak-quote} +% \end{center} +% \end{table} +% +% The quotes in table~\ref{tab:slovak-quote} can also be typeset by +% using the commands in table~\ref{tab:smore-quote}. +% \begin{table}[htb] +% \begin{center} +% \begin{tabular}{lp{8cm}} +% |\glqq| & for German left double quotes (looks like ,,). \\ +% |\grqq| & for German right double quotes (looks like ``). \\ +% |\glq| & for German left single quotes (looks like ,). \\ +% |\grq| & for German right single quotes (looks like `). \\ +% |\flqq| & for French left double quotes (similar to $<<$). \\ +% |\frqq| & for French right double quotes (similar to $>>$).\\ +% |\flq| & for (French) left single quotes (similar to $<$). \\ +% |\frq| & for (French) right single quotes (similar to $>$). \\ +% |\dq| & the original quotes character (|"|). \\ +% |\sq| & the original single quote (|'|). \\ +% \end{tabular} +% \caption{More commands which produce quotes, defined +% by \file{slovak.ldf}}\label{tab:smore-quote} +% \end{center} +% \end{table} +% +% \StopEventually{} +% +% The macro |\LdfInit| takes care of preventing that this file is +% loaded more than once, checking the category code of the +% \texttt{@} sign, etc. +% \changes{slovak-1.2i}{1996/11/03}{Now use \cs{LdfInit} to perform +% initial checks} +% \begin{macrocode} +%<*code> +\LdfInit{slovak}\captionsslovak +% \end{macrocode} +% +% When this file is read as an option, i.e. by the |\usepackage| +% command, \texttt{slovak} will be an `unknown' language in which +% case we have to make it known. So we check for the existence of +% |\l@slovak| to see whether we have to do something here. +% +% \changes{slovak-1.2d}{1994/06/26}{Now use \cs{@nopatterns} to +% produce the warning} +% \begin{macrocode} +\ifx\l@slovak\@undefined + \@nopatterns{Slovak} + \adddialect\l@slovak0\fi +% \end{macrocode} +% +% The next step consists of defining commands to switch to (and +% from) the Slovak language. +% +% \begin{macro}{\captionsslovak} +% The macro |\captionsslovak| defines all strings used in the four +% standard documentclasses provided with \LaTeX. +% \changes{slovak-1.2g}{1995/07/04}{Added \cs{proofname} for +% AMS-\LaTeX} +% \changes{slovak-1.2k}{1999/02/28}{Repaired a few spelling mistakes} +% \changes{slovak-1.2l}{2000/09/20}{Added \cs{glossaryname}} +% \begin{macrocode} +\addto\captionsslovak{% + \def\prefacename{\'Uvod}% + \def\refname{Referencie}% + \def\abstractname{Abstrakt}% + \def\bibname{Literat\'ura}% + \def\chaptername{Kapitola}% + \def\appendixname{Dodatok}% + \def\contentsname{Obsah}% + \def\listfigurename{Zoznam obr\'azkov}% + \def\listtablename{Zoznam tabuliek}% + \def\indexname{Index}% + \def\figurename{Obr\'azok}% + \def\tablename{Tabu\q lka}%%% special letter l with hook + \def\partname{\v{C}as\q t}%%% special letter t with hook + \def\enclname{Pr\'{\i}lohy}% + \def\ccname{CC}% + \def\headtoname{Komu}% + \def\pagename{Strana}% + \def\seename{vi\q d}%%% Special letter d with hook + \def\alsoname{vi\q d tie\v z}%%% Special letter d with hook + \def\proofname{D\^okaz}% + \def\glossaryname{Glossary}% <-- Needs translation + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\dateslovak} +% The macro |\dateslovak| redefines the command |\today| to produce +% Slovak dates. +% \changes{slovak-1.2j}{1997/10/01}{Use \cs{edef} to define +% \cs{today} to save memory} +% \changes{slovak-1.2j}{1998/03/28}{use \cs{def} instead of \cs{edef}} +% \changes{slovak-1.2k}{1999/02/28}{Repaired a spelling mistake} +% \begin{macrocode} +\def\dateslovak{% + \def\today{\number\day.~\ifcase\month\or + janu\'ara\or febru\'ara\or marca\or apr\'{\i}la\or m\'aja\or + j\'una\or j\'ula\or augusta\or septembra\or okt\'obra\or + novembra\or decembra\fi + \space \number\year}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\extrasslovak} +% \begin{macro}{\noextrasslovak} +% The macro |\extrasslovak| will perform all the extra definitions +% needed for the Slovak language. The macro |\noextrasslovak| is +% used to cancel the actions of |\extrasslovak|. +% For Slovak three characters are used to define shorthands, they +% need to be made active. +% \changes{slovak-1.3a}{2004/02/20}{Make three characters available +% for shorthands} +% +% \begin{macrocode} +\addto\extrasslovak{\languageshorthands{slovak}} +\initiate@active@char{^} +\addto\extrasslovak{\bbl@activate{^}} +\addto\noextrasslovak{\bbl@deactivate{^}} +\initiate@active@char{"} +\addto\extrasslovak{\bbl@activate{"}\umlautlow} +\addto\noextrasslovak{\bbl@deactivate{"}\umlauthigh} +\initiate@active@char{'} +\@ifpackagewith{babel}{activeacute}{% + \addto\extrasslovak{\bbl@activate{'}} + \addto\noextrasslovak{\bbl@deactivate{'}}% + }{} +% \end{macrocode} +% +% +% \changes{slovak-1.2e}{1995/05/28}{Use \LaTeX's \cs{v} accent +% command} +% \begin{macrocode} +\addto\extrasslovak{\babel@save\q\let\q\v} +% \end{macrocode} +% +% \changes{slovak-1.2b}{1994/06/04}{Added setting of left- and +% righthyphenmin} +% +% The slovak hyphenation patterns should be used with +% |\lefthyphenmin| set to~2 and |\righthyphenmin| set to~2. +% \changes{slovak-1.2e}{1995/05/28}{Now use \cs{slovakhyphenmins}} +% \changes{slovak-1.2l}{2000/09/22}{Now use \cs{providehyphenmins} to +% provide a default value} +% \begin{macrocode} +\providehyphenmins{\CurrentOption}{\tw@\tw@} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\dq} +% We save the original double quote character in |\dq| to keep +% it available, the math accent |\"| can now be typed as |"|. +% \begin{macrocode} +\begingroup \catcode`\"12 +\def\x{\endgroup + \def\sq{'} + \def\dq{"}} +\x +% \end{macrocode} +% \end{macro} +% +% In order to prevent problems with the active |^| we add a +% shorthand on system level which expands to a `normal |^|. +% \begin{macrocode} +\declare@shorthand{system}{^}{\csname normal@char\string^\endcsname} +% \end{macrocode} +% +% Now we can define the doublequote macros: the umlauts, +% \begin{macrocode} +\declare@shorthand{slovak}{"a}{\textormath{\"{a}\allowhyphens}{\ddot a}} +\declare@shorthand{slovak}{"o}{\textormath{\"{o}\allowhyphens}{\ddot o}} +\declare@shorthand{slovak}{"u}{\textormath{\"{u}\allowhyphens}{\ddot u}} +\declare@shorthand{slovak}{"A}{\textormath{\"{A}\allowhyphens}{\ddot A}} +\declare@shorthand{slovak}{"O}{\textormath{\"{O}\allowhyphens}{\ddot O}} +\declare@shorthand{slovak}{"U}{\textormath{\"{U}\allowhyphens}{\ddot U}} +% \end{macrocode} +% tremas, +% \begin{macrocode} +\declare@shorthand{slovak}{"e}{\textormath{\"{e}\allowhyphens}{\ddot e}} +\declare@shorthand{slovak}{"E}{\textormath{\"{E}\allowhyphens}{\ddot E}} +\declare@shorthand{slovak}{"i}{\textormath{\"{\i}\allowhyphens}% + {\ddot\imath}} +\declare@shorthand{slovak}{"I}{\textormath{\"{I}\allowhyphens}{\ddot I}} +% \end{macrocode} +% other slovak characters +% \begin{macrocode} +\declare@shorthand{slovak}{^c}{\textormath{\v{c}\allowhyphens}{\check{c}}} +\declare@shorthand{slovak}{^d}{\textormath{\q{d}\allowhyphens}{\check{d}}} +\declare@shorthand{slovak}{^l}{\textormath{\q{l}\allowhyphens}{\check{l}}} +\declare@shorthand{slovak}{^n}{\textormath{\v{n}\allowhyphens}{\check{n}}} +\declare@shorthand{slovak}{^o}{\textormath{\^{o}\allowhyphens}{\hat{o}}} +\declare@shorthand{slovak}{^s}{\textormath{\v{s}\allowhyphens}{\check{s}}} +\declare@shorthand{slovak}{^t}{\textormath{\q{t}\allowhyphens}{\check{t}}} +\declare@shorthand{slovak}{^z}{\textormath{\v{z}\allowhyphens}{\check{z}}} +\declare@shorthand{slovak}{^C}{\textormath{\v{C}\allowhyphens}{\check{C}}} +\declare@shorthand{slovak}{^D}{\textormath{\v{D}\allowhyphens}{\check{D}}} +\declare@shorthand{slovak}{^L}{\textormath{\q{L}\allowhyphens}{\check{L}}} +\declare@shorthand{slovak}{^N}{\textormath{\v{N}\allowhyphens}{\check{N}}} +\declare@shorthand{slovak}{^O}{\textormath{\^{O}\allowhyphens}{\hat{O}}} +\declare@shorthand{slovak}{^S}{\textormath{\v{S}\allowhyphens}{\check{S}}} +\declare@shorthand{slovak}{^T}{\textormath{\v{T}\allowhyphens}{\check{T}}} +\declare@shorthand{slovak}{^Z}{\textormath{\v{Z}\allowhyphens}{\check{Z}}} +% \end{macrocode} +% acute accents, +% \begin{macrocode} +\@ifpackagewith{babel}{activeacute}{% + \declare@shorthand{slovak}{'a}{\textormath{\'a\allowhyphens}{^{\prime}a}} + \declare@shorthand{slovak}{'e}{\textormath{\'e\allowhyphens}{^{\prime}e}} + \declare@shorthand{slovak}{'i}{\textormath{\'\i{}\allowhyphens}{^{\prime}i}} + \declare@shorthand{slovak}{'l}{\textormath{\'l\allowhyphens}{^{\prime}l}} + \declare@shorthand{slovak}{'o}{\textormath{\'o\allowhyphens}{^{\prime}o}} + \declare@shorthand{slovak}{'r}{\textormath{\'r\allowhyphens}{^{\prime}r}} + \declare@shorthand{slovak}{'u}{\textormath{\'u\allowhyphens}{^{\prime}u}} + \declare@shorthand{slovak}{'y}{\textormath{\'y\allowhyphens}{^{\prime}y}} + \declare@shorthand{slovak}{'A}{\textormath{\'A\allowhyphens}{^{\prime}A}} + \declare@shorthand{slovak}{'E}{\textormath{\'E\allowhyphens}{^{\prime}E}} + \declare@shorthand{slovak}{'I}{\textormath{\'I\allowhyphens}{^{\prime}I}} + \declare@shorthand{slovak}{'L}{\textormath{\'L\allowhyphens}{^{\prime}l}} + \declare@shorthand{slovak}{'O}{\textormath{\'O\allowhyphens}{^{\prime}O}} + \declare@shorthand{slovak}{'R}{\textormath{\'R\allowhyphens}{^{\prime}R}} + \declare@shorthand{slovak}{'U}{\textormath{\'U\allowhyphens}{^{\prime}U}} + \declare@shorthand{slovak}{'Y}{\textormath{\'Y\allowhyphens}{^{\prime}Y}} + \declare@shorthand{slovak}{''}{% + \textormath{\textquotedblright}{\sp\bgroup\prim@s'}} + }{} +% \end{macrocode} +% german and french quotes, +% \begin{macrocode} +\declare@shorthand{slovak}{"`}{\glqq} +\declare@shorthand{slovak}{"'}{\grqq} +\declare@shorthand{slovak}{"<}{\flqq} +\declare@shorthand{slovak}{">}{\frqq} +% \end{macrocode} +% and some additional commands: +% \begin{macrocode} +\declare@shorthand{slovak}{"-}{\nobreak\-\bbl@allowhyphens} +\declare@shorthand{slovak}{"|}{% + \textormath{\penalty\@M\discretionary{-}{}{\kern.03em}% + \bbl@allowhyphens}{}} +\declare@shorthand{slovak}{""}{\hskip\z@skip} +\declare@shorthand{slovak}{"~}{\textormath{\leavevmode\hbox{-}}{-}} +\declare@shorthand{slovak}{"=}{\nobreak-\hskip\z@skip} +% \end{macrocode} +% +% The macro |\ldf@finish| takes care of looking for a +% configuration file, setting the main language to be switched on +% at |\begin{document}| and resetting the category code of +% \texttt{@} to its original value. +% \changes{slovak-1.2i}{1996/11/03}{Now use \cs{ldf@finish} to wrap up} +% \begin{macrocode} +\ldf@finish{slovak} +% +% \end{macrocode} +% +% \Finale +%% +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +%% +\endinput diff --git a/Master/texmf-dist/source/generic/babel/slovak.ins b/Master/texmf-dist/source/generic/babel/slovak.ins new file mode 100644 index 00000000000..3a007b7c3c7 --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/slovak.ins @@ -0,0 +1,148 @@ +%% +%% This file will generate fast loadable files and documentation +%% driver files from the doc files in this package when run through +%% LaTeX or TeX. +%% +%% Copyright 1989-2005 Johannes L. Braams and any individual authors +%% listed elsewhere in this file. All rights reserved. +%% +%% This file is part of the Babel system. +%% -------------------------------------- +%% +%% It 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 +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% The Current Maintainer of this work is Johannes Braams. +%% +%% The list of all files belonging to the LaTeX base distribution is +%% given in the file `manifest.bbl. See also `legal.bbl' 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. +%% +%% --------------- start of docstrip commands ------------------ +%% +\def\filedate{1999/04/11} +\def\batchfile{slovak.ins} +\input docstrip.tex + +{\ifx\generate\undefined +\Msg{**********************************************} +\Msg{*} +\Msg{* This installation requires docstrip} +\Msg{* version 2.3c or later.} +\Msg{*} +\Msg{* An older version of docstrip has been input} +\Msg{*} +\Msg{**********************************************} +\errhelp{Move or rename old docstrip.tex.} +\errmessage{Old docstrip in input path} +\batchmode +\csname @@end\endcsname +\fi} + +\declarepreamble\mainpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl 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. +\endpreamble + +\declarepreamble\fdpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl for additional +information. + +In particular, permission is granted to customize the declarations in +this file to serve the needs of your installation. + +However, NO PERMISSION is granted to distribute a modified version +of this file under its original name. + +\endpreamble + +\keepsilent + +\usedir{tex/generic/babel} + +\usepreamble\mainpreamble +\generate{\file{slovak.ldf}{\from{slovak.dtx}{code}} + } +\usepreamble\fdpreamble + +\ifToplevel{ +\Msg{***********************************************************} +\Msg{*} +\Msg{* To finish the installation you have to move the following} +\Msg{* files into a directory searched by TeX:} +\Msg{*} +\Msg{* \space\space All *.def, *.fd, *.ldf, *.sty} +\Msg{*} +\Msg{* To produce the documentation run the files ending with} +\Msg{* '.dtx' and `.fdd' through LaTeX.} +\Msg{*} +\Msg{* Happy TeXing} +\Msg{***********************************************************} +} + +\endinput diff --git a/Master/texmf-dist/source/generic/babel/slovene.dtx b/Master/texmf-dist/source/generic/babel/slovene.dtx new file mode 100644 index 00000000000..391f39e7f9d --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/slovene.dtx @@ -0,0 +1,302 @@ +% \iffalse meta-comment +% +% Copyright 1989-2005 Johannes L. Braams and any individual authors +% listed elsewhere in this file. All rights reserved. +% +% This file is part of the Babel system. +% -------------------------------------- +% +% It 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 +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2003/12/01 or later. +% +% This work has the LPPL maintenance status "maintained". +% +% The Current Maintainer of this work is Johannes Braams. +% +% The list of all files belonging to the Babel system is +% given in the file `manifest.bbl. See also `legal.bbl' 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 +% \CheckSum{142} +% \iffalse +% Tell the \LaTeX\ system who we are and write an entry on the +% transcript. +%<*dtx> +\ProvidesFile{slovene.dtx} +% +%\ProvidesLanguage{slovene} +%\fi +%\ProvidesFile{slovene.dtx} + [2005/03/31 v1.2m Slovene support from the babel system] +%\iffalse +%% File `slovene.dtx' +%% Babel package for LaTeX version 2e +%% Copyright (C) 1989 - 2005 +%% by Johannes Braams, TeXniek +% +%% Please report errors to: J.L. Braams +%% babel at braams.cistron.nl +% +% This file is part of the babel system, it provides the source +% code for the Slovenian language definition file. The Slovenian +% words were contributed by Danilo Zavrtanik, University of +% Ljubljana (Slovenia, former Yugoslavia). +% The usage of the active " was introduced by +% Leon \v{Z}lajpah +% Jo\v{z}ef Stefan Institute, +% Jamova 39, Ljubljana, +% Slovenia +% e-mail: leon.zlajpah at ijs.si +% +%<*filedriver> +\documentclass{ltxdoc} +\newcommand*\TeXhax{\TeX hax} +\newcommand*\babel{\textsf{babel}} +\newcommand*\langvar{$\langle \it lang \rangle$} +\newcommand*\note[1]{} +\newcommand*\Lopt[1]{{textsf \1}} +\newcommand*\file[1]{\texttt{#1}} +\begin{document} + \DocInput{slovene.dtx} +\end{document} +% +%\fi +% \GetFileInfo{slovene.dtx} +% +% \changes{slovene-1.0a}{1991/07/15}{Renamed babel.sty in babel.com} +% \changes{slovene-1.1}{1992/02/16}{Brought up-to-date with babel 3.2a} +% \changes{slovene-1.2}{1994/02/27}{Update for \LaTeXe} +% \changes{slovene-1.2d}{1994/06/26}{Removed the use of \cs{filedate} +% and moved identification after the loading of \file{babel.def}} +% \changes{slovene-1.2i}{1995/11/03}{Replaced `Slovanian' with correct +% `Slovenian'} +% \changes{slovene-1.2i}{1996/10/10}{Replaced \cs{undefined} with +% \cs{@undefined} and \cs{empty} with \cs{@empty} for consistency +% with \LaTeX, moved the definition of \cs{atcatcode} right to the +% beginning.} +% +% \section{The Slovenian language} +% +% The file \file{\filename}\footnote{The file described in this +% section has version number \fileversion\ and was last revised on +% \filedate. Contributions were made by Danilo Zavrtanik, +% University of Ljubljana (YU) and Leon \v{Z}lajpah +% (\texttt{leon.zlajpah@ijs.si}).} defines all the +% language-specific macros for the Slovenian language. +% +% For this language the character |"| is made active. In +% table~\ref{tab:slovene-quote} an overview is given of its +% purpose. One of the reasons for this is that in the Slovene +% language some special characters are used. +% +% \begin{table}[htb] +% \begin{center} +% \begin{tabular}{lp{8cm}} +% |"c| & |\"c|, also implemented for the +% lowercase and uppercase s and z. \\ +% |"-| & an explicit hyphen sign, allowing hyphenation +% in the rest of the word. \\ +% |""| & like |"-|, but producing no hyphen sign +% (for compund words with hyphen, e.g.\ |x-""y|). \\ +% |"`| & for Slovene left double quotes (looks like ,,). \\ +% |"'| & for Slovene right double quotes. \\ +% |"<| & for French left double quotes (similar to $<<$). \\ +% |">| & for French right double quotes (similar to $>>$).\\ +% \end{tabular} +% \caption{The extra definitions made +% by \file{slovene.ldf}}\label{tab:slovene-quote} +% \end{center} +% \end{table} +% +% \StopEventually{} +% +% The macro |\LdfInit| takes care of preventing that this file is +% loaded more than once, checking the category code of the +% \texttt{@} sign, etc. +% \changes{slovene-1.2i}{1996/11/03}{Now use \cs{LdfInit} to perform +% initial checks} +% \begin{macrocode} +%<*code> +\LdfInit{slovene}\captionsslovene +% \end{macrocode} +% +% When this file is read as an option, i.e. by the |\usepackage| +% command, \texttt{slovene} will be an `unknown' language in which +% case we have to make it known. So we check for the existence of +% |\l@slovene| to see whether we have to do something here. +% +% \changes{slovene-1.0b}{1991/10/29}{Removed use of \cs{@ifundefined}} +% \changes{slovene-1.1}{1992/02/16}{Added a warning when no +% hyphenation patterns were loaded.} +% \changes{slovene-1.2d}{1994/06/26}{Now use \cs{@nopatterns} to +% produce the warning} +% \begin{macrocode} +\ifx\l@slovene\@undefined + \@nopatterns{Slovene} + \adddialect\l@slovene0\fi +% \end{macrocode} +% +% The next step consists of defining commands to switch to the +% Slovenian language. The reason for this is that a user might want +% to switch back and forth between languages. +% +% \begin{macro}{\captionsslovene} +% The macro |\captionsslovene| defines all strings used in the four +% standard documentclasses provided with \LaTeX. +% \changes{slovene-1.1}{1992/02/16}{Added \cs{seename}, \cs{alsoname} +% and \cs{prefacename}} +% \changes{slovene-1.1}{1993/07/15}{\cs{headpagename} should be +% \cs{pagename}} +% \changes{slovene-1.2b}{1994/06/04}{Added extra translations from +% Josef Leydold, \texttt{leydold@statrix2.wu-wien.ac.at}} +% \changes{slovene-1.2g}{1995/07/04}{Added \cs{proofname} for +% AMS-\LaTeX} +% \changes{slovene-1.2h}{1995/07/25}{Added translation of `Proof'} +% \changes{slovene-1.2m}{2000/09/20}{Added \cs{glossaryname}} +% \begin{macrocode} +\addto\captionsslovene{% + \def\prefacename{Predgovor}% + \def\refname{Literatura}% + \def\abstractname{Povzetek}% + \def\bibname{Literatura}% + \def\chaptername{Poglavje}% + \def\appendixname{Dodatek}% + \def\contentsname{Kazalo}% + \def\listfigurename{Slike}% + \def\listtablename{Tabele}% + \def\indexname{Stvarno kazalo}% used to be Indeks + \def\figurename{Slika}% + \def\tablename{Tabela}% + \def\partname{Del}% + \def\enclname{Priloge}% + \def\ccname{Kopije}% + \def\headtoname{Prejme}% + \def\pagename{Stran}% + \def\seename{glej}% + \def\alsoname{glej tudi}% + \def\proofname{Dokaz}% + \def\glossaryname{Glossary}% <-- Needs translation + }% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\dateslovene} +% The macro |\dateslovene| redefines the command |\today| to +% produce Slovenian dates. +% \changes{slovene-1.2j}{1997/10/01}{Use \cs{edef} to define +% \cs{today} to save memory} +% \changes{slovene-1.2j}{1998/03/28}{use \cs{def} instead of +% \cs{edef}} +% \begin{macrocode} +\def\dateslovene{% + \def\today{\number\day.~\ifcase\month\or + januar\or februar\or marec\or april\or maj\or junij\or + julij\or avgust\or september\or oktober\or november\or december\fi + \space \number\year}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\extrasslovene} +% \begin{macro}{\noextrasslovene} +% The macro |\extrasslovene| performs all the extra definitions +% needed for the Slovenian language. The macro |\noextrasslovene| +% is used to cancel the actions of |\extrasslovene|. +% +% For Slovene the \texttt{"} character is made active. This is done +% once, later on its definition may vary. Other languages in the +% same document may also use the \texttt{"} character for +% shorthands; we specify that the slovenian group of shorthands +% should be used. +% +% \changes{slovene-1.2f}{1995/06/04}{Introduced the active \texttt{"}} +% \begin{macrocode} +\initiate@active@char{"} +\addto\extrasslovene{\languageshorthands{slovene}} +\addto\extrasslovene{\bbl@activate{"}} +% \end{macrocode} +% Don't forget to turn the shorthands off again. +% \changes{slovene-1.2l}{1999/12/17}{Deactivate shorthands ouside of +% Slovene} +% \begin{macrocode} +\addto\noextrasslovene{\bbl@deactivate{"}} +% \end{macrocode} +% First we define shorthands to facilitate the occurence of letters +% such as \v{c}. +% \changes{slovene-1.2i}{1996/09/21}{removed shorthand for \texttt{"L} +% as it is not needed for slovenian} +% \begin{macrocode} +\declare@shorthand{slovene}{"c}{\textormath{\v c}{\check c}} +\declare@shorthand{slovene}{"s}{\textormath{\v s}{\check s}} +\declare@shorthand{slovene}{"z}{\textormath{\v z}{\check z}} +\declare@shorthand{slovene}{"C}{\textormath{\v C}{\check C}} +\declare@shorthand{slovene}{"S}{\textormath{\v S}{\check S}} +\declare@shorthand{slovene}{"Z}{\textormath{\v Z}{\check Z}} +% \end{macrocode} +% +% Then we define access to two forms of quotation marks, similar +% to the german and french quotation marks. +% \changes{slovene-1.2j}{1997/04/03}{Removed empty groups after +% double quote and guillemot characters} +% \begin{macrocode} +\declare@shorthand{slovene}{"`}{% + \textormath{\quotedblbase}{\mbox{\quotedblbase}}} +\declare@shorthand{slovene}{"'}{% + \textormath{\textquotedblleft}{\mbox{\textquotedblleft}}} +\declare@shorthand{slovene}{"<}{% + \textormath{\guillemotleft}{\mbox{\guillemotleft}}} +\declare@shorthand{slovene}{">}{% + \textormath{\guillemotright}{\mbox{\guillemotright}}} +% \end{macrocode} +% then we define two shorthands to be able to specify hyphenation +% breakpoints that behavew a little different from |\-|. +% \begin{macrocode} +\declare@shorthand{slovene}{"-}{\nobreak-\bbl@allowhyphens} +\declare@shorthand{slovene}{""}{\hskip\z@skip} +% \end{macrocode} +% And we want to have a shorthand for disabling a ligature. +% \begin{macrocode} +\declare@shorthand{slovene}{"|}{% + \textormath{\discretionary{-}{}{\kern.03em}}{}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% The macro |\ldf@finish| takes care of looking for a +% configuration file, setting the main language to be switched on +% at |\begin{document}| and resetting the category code of +% \texttt{@} to its original value. +% \changes{slovene-1.2i}{1996/11/03}{Now use \cs{ldf@finish} to wrap +% up} +% \begin{macrocode} +\ldf@finish{slovene} +% +% \end{macrocode} +% +% \Finale +%% +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +%% +\endinput diff --git a/Master/texmf-dist/source/generic/babel/slovene.ins b/Master/texmf-dist/source/generic/babel/slovene.ins new file mode 100644 index 00000000000..86760a5e13f --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/slovene.ins @@ -0,0 +1,148 @@ +%% +%% This file will generate fast loadable files and documentation +%% driver files from the doc files in this package when run through +%% LaTeX or TeX. +%% +%% Copyright 1989-2005 Johannes L. Braams and any individual authors +%% listed elsewhere in this file. All rights reserved. +%% +%% This file is part of the Babel system. +%% -------------------------------------- +%% +%% It 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 +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% The Current Maintainer of this work is Johannes Braams. +%% +%% The list of all files belonging to the LaTeX base distribution is +%% given in the file `manifest.bbl. See also `legal.bbl' 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. +%% +%% --------------- start of docstrip commands ------------------ +%% +\def\filedate{1999/04/11} +\def\batchfile{slovene.ins} +\input docstrip.tex + +{\ifx\generate\undefined +\Msg{**********************************************} +\Msg{*} +\Msg{* This installation requires docstrip} +\Msg{* version 2.3c or later.} +\Msg{*} +\Msg{* An older version of docstrip has been input} +\Msg{*} +\Msg{**********************************************} +\errhelp{Move or rename old docstrip.tex.} +\errmessage{Old docstrip in input path} +\batchmode +\csname @@end\endcsname +\fi} + +\declarepreamble\mainpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl 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. +\endpreamble + +\declarepreamble\fdpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl for additional +information. + +In particular, permission is granted to customize the declarations in +this file to serve the needs of your installation. + +However, NO PERMISSION is granted to distribute a modified version +of this file under its original name. + +\endpreamble + +\keepsilent + +\usedir{tex/generic/babel} + +\usepreamble\mainpreamble +\generate{\file{slovene.ldf}{\from{slovene.dtx}{code}} + } +\usepreamble\fdpreamble + +\ifToplevel{ +\Msg{***********************************************************} +\Msg{*} +\Msg{* To finish the installation you have to move the following} +\Msg{* files into a directory searched by TeX:} +\Msg{*} +\Msg{* \space\space All *.def, *.fd, *.ldf, *.sty} +\Msg{*} +\Msg{* To produce the documentation run the files ending with} +\Msg{* '.dtx' and `.fdd' through LaTeX.} +\Msg{*} +\Msg{* Happy TeXing} +\Msg{***********************************************************} +} + +\endinput diff --git a/Master/texmf-dist/source/generic/babel/sorbian.ins b/Master/texmf-dist/source/generic/babel/sorbian.ins new file mode 100644 index 00000000000..c329cad27b2 --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/sorbian.ins @@ -0,0 +1,149 @@ +%% +%% This file will generate fast loadable files and documentation +%% driver files from the doc files in this package when run through +%% LaTeX or TeX. +%% +%% Copyright 1989-2005 Johannes L. Braams and any individual authors +%% listed elsewhere in this file. All rights reserved. +%% +%% This file is part of the Babel system. +%% -------------------------------------- +%% +%% It 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 +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% The Current Maintainer of this work is Johannes Braams. +%% +%% The list of all files belonging to the LaTeX base distribution is +%% given in the file `manifest.bbl. See also `legal.bbl' 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. +%% +%% --------------- start of docstrip commands ------------------ +%% +\def\filedate{1999/04/11} +\def\batchfile{sorbian.ins} +\input docstrip.tex + +{\ifx\generate\undefined +\Msg{**********************************************} +\Msg{*} +\Msg{* This installation requires docstrip} +\Msg{* version 2.3c or later.} +\Msg{*} +\Msg{* An older version of docstrip has been input} +\Msg{*} +\Msg{**********************************************} +\errhelp{Move or rename old docstrip.tex.} +\errmessage{Old docstrip in input path} +\batchmode +\csname @@end\endcsname +\fi} + +\declarepreamble\mainpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl 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. +\endpreamble + +\declarepreamble\fdpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl for additional +information. + +In particular, permission is granted to customize the declarations in +this file to serve the needs of your installation. + +However, NO PERMISSION is granted to distribute a modified version +of this file under its original name. + +\endpreamble + +\keepsilent + +\usedir{tex/generic/babel} + +\usepreamble\mainpreamble +\generate{\file{lsorbian.ldf}{\from{lsorbian.dtx}{code}} + \file{usorbian.ldf}{\from{usorbian.dtx}{code}} + } +\usepreamble\fdpreamble + +\ifToplevel{ +\Msg{***********************************************************} +\Msg{*} +\Msg{* To finish the installation you have to move the following} +\Msg{* files into a directory searched by TeX:} +\Msg{*} +\Msg{* \space\space All *.def, *.fd, *.ldf, *.sty} +\Msg{*} +\Msg{* To produce the documentation run the files ending with} +\Msg{* '.dtx' and `.fdd' through LaTeX.} +\Msg{*} +\Msg{* Happy TeXing} +\Msg{***********************************************************} +} + +\endinput diff --git a/Master/texmf-dist/source/generic/babel/spanish.dtx b/Master/texmf-dist/source/generic/babel/spanish.dtx new file mode 100644 index 00000000000..232c2436479 --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/spanish.dtx @@ -0,0 +1,2638 @@ +% \iffalse meta-comment +% +% Copyright 1989-2005 Johannes L. Braams and any individual authors +% listed elsewhere in this file. All rights reserved. +% +% This file is part of the Babel system. +% -------------------------------------- +% +% It 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 +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2003/12/01 or later. +% +% This work has the LPPL maintenance status "maintained". +% +% The Current Maintainer of this work is Johannes Braams. +% +% The list of all files belonging to the Babel system is +% given in the file `manifest.bbl. See also `legal.bbl' 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 +% \CheckSum{2195} +% \ProvidesFile{spanish.dtx} +% [2004/02/20 v4.2b Spanish support from the babel system] +%\iffalse +%% File `spanish.dtx' +%% Babel package for LaTeX version 2e +%% Copyright (C) 1989 - 2004 +%% by Johannes Braams, TeXniek +% +%% Spanish Language Definition File +%% Copyright (C) 1997 - 2005 +%% by Javier Bezos (jbezos at wanadoo.es) +%% Apartado 116.035 +%% E-28080 Madrid +%% Espa\~na / Espagne +%% and +%% by CervanTeX (www.cervantex.org) +% +%% Please report errors to: Javier Bezos (preferably) +%% jbezos at wanadoo.es +%% J.L. Braams +%% babel at braams.cistron.nl +% +% This file is part of the babel system, it provides the source +% code for the Spanish language definition file. +% The original version of this file was written by Javier Bezos. +% +%<*filedriver> +\documentclass[spanish,a4paper]{ltxdoc} +\usepackage[activeacute]{babel} + +%\usepackage{ps} + +\newcommand*\TeXhax{\TeX hax} +\newcommand*\babel{\textsf{babel}} +\newcommand*\langvar{$\langle \it lang \rangle$} +\newcommand*\note[1]{} +\newcommand*\Lopt[1]{\textsf{#1}} +\newcommand*\file[1]{\texttt{#1}} + +\setlength{\arrayrulewidth}{2\arrayrulewidth} +\newcommand\toprule{\cline{1-2}\\[-2ex]} +\newcommand\botrule{\\[.6ex]\cline{1-2}} +\newcommand\hmk{$\string|$} + +\newcommand\New[1]{% + \leavevmode\marginpar{\raggedleft\sffamily Nuevo en #1}} + +\newcommand\nm[1]{\unskip\,$^{#1}$} +\newcommand\nt[1]{\quad$^{#1}$\,\ignorespaces} + +\makeatletter + \renewcommand\@biblabel{} +\makeatother + +\newcommand\DOT[1]{\lsc{DOT},~#1} +\newcommand\DTL[1]{\lsc{DTL},~#1} +\newcommand\MEA[1]{\lsc{MEA},~#1} + +\raggedright +\setlength{\parindent}{1em} + +\addtolength{\oddsidemargin}{-2pc} +\addtolength{\textwidth}{4pc} + +\OnlyDescription +\begin{document} + \DocInput{spanish.dtx} +\end{document} +% +%\fi +% +% \begingroup +% +% \catcode`\{=11 +% \catcode`\[=1 +% +% \gdef\ignoringuser[^^A +% \bgroup +% \let\end{userdtx\fi +% \let\end{userdrv\fi +% \aftergroup\endgroup +% \catcode`\{=11 +% \catcode`f=14 ^^A kills \if... and \fi +% \catcode`l=14 ^^A kills \else +% \catcode`o=14 ^^A kills \or +% \catcode`p=14 ^^A kills \repeat +% \iffalse} +% +% \endgroup +% +% \newenvironment{userdtx} +% {\ifx\langdeffile\undefined +% \else\expandafter\ignoringuser +% \fi}{} +% +% \newenvironment{userdrv} +% {\ifx\langdeffile\undefined +% \expandafter\ignoringuser +% \else\fi}{} +% +% \begin{userdtx} +%^^A ======= Beginning of text as typeset by spanish.dtx ========= +% +% \title{Estilo \textsf{spanish}\\ +% para el sistema \babel.\footnote{Este +% archivo est\'a actualmente en la versi\'on +% 4.2b con fecha 12 de septiembre del 2003. ^^A@# +% Esta copia del manual se compuso el~\today.}} +% +% \author{Javier Bezos\footnote{Por favor, env\'{\i}en +% comentarios y sugerencias a \texttt{jbezos@wanadoo.es} +% o a mi direcci\'on postal: Apartado 116.035, E-28080 Madrid, +% Espa'na / Espagne. Han colaborado de una u otra forma muchas +% personas, a las cuales agradezco sus comentarios y sugerencias. +% Para m'as informaci'on sobre los criterios seguidos, v'ease la +% referencia: Javier Bezos, \textit{Tipograf'ia espa'nola con +% \TeX.} Para informaci'on sobre actualizaciones: +% http://www.cervantex.org/}} +% +% \date{12 de septiembre del 2003} ^^A@# +% +% \maketitle +% +% {\small\tableofcontents} +% +%% \section{\textsf{spanish} como lengua principal} +% +% En \babel{} se considera que la 'ultima lengua citada en |\usepackage| y +% |\documentclass|, por este orden, es la lengua principal. Si la +% lengua principal es |spanish|, \New{4.1} se activa el grupo +% |\layoutspanish| que adapta varios elementos +% a los usos tipogr'aficos espa'noles del siguiente modo: +% +% \begin{itemize} +% +% \item[$\diamond$] +% |enumerate| e |itemize|\\[1ex] +% +% El primero usa la siguiente secuencia:\,\footnote{No hay raz'on +% concreta para ella. Es tan s'olo una f'ormula de compromiso.}\\ +% \quad 1.\\ +% \qquad \emph{a})\\ +% \quad\qquad 1)\\ +% \qquad\qquad \emph{a$'$})\\ +% El segundo la siguiente:\\ +% \quad\leavevmode\hbox to 1.2ex +% {\hss\vrule height .95ex width .8ex depth -.15ex\hss}\\ +% \qquad\textbullet\\ +% \quad\qquad $\circ$\\ +% \qquad\qquad $\diamond$ +% +% \New{4.2}Dos 'ordenes permiten otros estilos en +% |itemize|: con |\spanishdashitems| se cambia a rayas en todos los +% niveles, y con |\spanishsignitems|, a \textbullet{} $\circ$ +% $\diamond$ $\triangleright$. +% +% \item[$\diamond$] +% |\alph| y |\Alph|\\[1ex] +% +% Incluyen la e'ne. +% +% \item[$\diamond$] +% |\fnsymbol|\\[1ex] +% +% Se emplean uno, dos, tres... asteriscos (*, **, ***, etc.), +% en lugar de la sucesi'on angloamericana de cruces, barras, +% etc.\footnote{\DOT{162}.} +% +% \item[$\diamond$] +% |\guillemotleft| y |\guillemotright|\\[1ex] +% +% Las comillas latinas para |OT1| son menos angulosas y se generan +% con unas puntas de flecha de |lasy|. +% +% \item[$\diamond$] +% |\roman|\\[1ex] +% +% Como en castellano no se usan n'umeros romanos +% en min'uscula, |\roman| se redefine para que los d'e en +% versalitas.\footnote{\DTL{197}. Los n'umeros romanos con +% versalitas son desconocidos en ingl'es, donde se prefiere +% la min'uscula. En la Europa continental, la situaci'on es +% justamente la opuesta.} +% +% \begin{quote}\small +% \textbf{Nota.} MakeIndex no puede entender la forma en que +% |\roman| escribe el n'umero de p'agina, por lo +% que elimina las l'ineas afectadas. Por ello el archivo |.idx| +% ha de ser convertido antes de procesarlo con MakeIndex. +% Con este paquete se proporciona la utilidad |romanidx.tex| que se +% encarga de ello. Simplemente se compone ese archivo con \LaTeX{} +% y a continuaci'on se responde a las preguntas que se formulan. +% Este proceso no es necesario si no se introdujo ninguna +% entrada de 'indice en p'aginas numeradas con |\roman| (lo cual ser'a +% lo m'as normal). Si un s'imbolo propio de \emph{MakeIndex} generara +% problemas, debe encerrarse entre llaves: \verb={"|}=. +% \end{quote} +% +% \item[$\diamond$] +% |\section|, |\subsection|, etc.\\[1ex] +% +% Los n'umeros en los t'itulos est'an seguidos de un punto +% tanto en el texto como en el 'indice. Adem'as, +% el primer p'arrafo tras el t'itulo no elimina la sangr'ia +% (de nuevo, una costumbre angloamericana). +% +% \end{itemize} +% +% Estos cambios funcionan con las clases est'andar ~---con otras +% tal vez alguno de ellos no tenga efecto--- y persisten durante +% todo el documento (no se pueden desactivar). Ninguno de ellos +% es necesario para componer el documento, aunque naturalmente el +% resultado ser'a distinto. +% +% \begin{itemize} +% +% \item[$\diamond$] +% |\selectspanish*|\\[1ex] +% +% \New{4.1}Si no se desean estos cambios, basta con usar en el +% pre'ambulo |\selectspanish*| (con asterisco) o <> con: +%\begin{verbatim} +% \let\layoutspanish\relax +%\end{verbatim} +% +% \end{itemize} +% +% \section{Descripci'on} +% +% \subsection{Traducciones} +% +% Ciertas 'ordenes se definen para +% proporcionar traducciones al castellano de algunos t'erminos, tal +% y como se describe en el cuadro 1. +% +% \begin{table} +% \center\small +% \caption{Traducciones} +% \vspace{1.5ex} +% \begin{tabular}{l@{\hspace{3em}}l} +% \toprule +% |\refname| & Referencias\\ +% |\abstractname| & Resumen\\ +% |\bibname| & Bibliograf'ia\\ +% |\chaptername| & Cap'itulo\\ +% |\appendixname| & Ap'endice\\ +% |\contentsname| & 'Indice general\nm{a}\\ +% |\listfigurename| & 'Indice de figuras\\ +% |\listtablename| & 'Indice de cuadros\\ +% |\indexname| & 'Indice alfab'etico\\ +% |\figurename| & Figura\\ +% |\tablename| & Cuadro\\ +% |\partname| & Parte\\ +% |\enclname| & Adjunto\\ +% |\ccname| & Copia a\\ +% |\headtoname| & A\\ +% |\pagename| & P'agina\\ +% |\seename| & v'ease\\ +% |\alsoname| & v'ease tambi'en\\ +% |\proofname| & Demostraci'on +% \botrule +% \end{tabular} +% +% \vspace{1.5ex} +% +% \begin{minipage}{6cm}\footnotesize +% \nt{a} Pero s'olo <<'Indice>> en \textsf{article}. +% \end{minipage} +% \end{table} +% +% No existe una terminolog'ia unificada. +% Tal vez \emph{'Indice general} es lo +% que m'as se usa para el 'indice de los cap'itulos, as'i que a +% ello me atengo salvo en |article|, donde se compone como secci'on +% y por tanto resulta algo ostentoso.\footnote{Al contrario que en +% ingl'es, en castellano el 'indice por antonomasia es el general.} +% +% Para el 'indice alfab'etico se ha propuesto \emph{'Indice de +% materias} o \emph{'Indice anal'itico}, aunque +% estos 'indices no solamente suelen incluir +% materias, sino tambi'en nombres; \emph{'Indice alfab'etico} es +% m'as preciso.\footnote{Es la usada en \DOT{300} as'i +% como en la mayor'ia de los libros que consult'e al azar en una +% biblioteca.} +% +% En cuanto a los de cuadros y figuras, tambi'en es posible decir +% \emph{lista}, pero me parece preferible \emph{'indice}, que +% implica la correspondencia con las p'aginas. +% +% Para traducir \emph{table} es mejor \emph{cuadro}, ya que +% \emph{tabla} es un \emph{falso amigo};\,\footnote{V'eanse las +% definiciones del \lsc{DRAE} y \DTL{67 ss.}} esa es la pr'actica +% tradicional. (Por ejemplo, <> +% frente a <>.) +% +% Las traducciones se escriben de min'usculas, salvo la inicial. +% Se evita el anglicismo de comenzar en +% may'usculas los sustantivos.\footnote{\DOT{197}.} +% +% La orden |\today| da la fecha actual. \New{4.2}Aunque al citar +% a'nos posteriores a 1999 la Academia s'olo admite la supresi'on del +% art'iculo en cartas y documentos, en la pr'actica se ha extendido +% esta construcci'on agramatical y as'i se hace aqu'i. Con +% |\spanishdatedel| y |\spanishdatede| se opta por \textit{del} +% (recomendado) o \textit{de} (predeterminado). +% +% \subsection{Abreviaciones} +% +% (Lo que en \babel{} se denomina `shorthands'.) La +% lista completa se puede encontrar en el cuadro 2. En los +% siguientes apartados se dar'an m'as detalles sobre algunas de +% ellas. +% +% \begin{table}[!t] +% \center\small +% \caption{Abreviaciones} +% \vspace{1.5ex} +% \begin{tabular}{l@{\hspace{3em}}l} +% \toprule +% |'a 'e 'i 'o 'u| & 'a 'e 'i 'o 'u\\ +% |'A 'E 'I 'O 'U| & 'A 'E 'I 'O 'U\\ +% |'n 'N| & 'n 'N\nm{a}\\ +% |"u "U| & "u "U\\ +% |"a "A "o "O| & Ordinales: 1"a, 1"A, 1"o, 1"O\\ +%\llap{\textsf{Nuevo en 4.2 }}\relax +% |"er "ER| & Ordinales: 1"er, 1"ER\\ +% |"c "C| & "c "C\nm{b}\\ +% |"rr "RR| & rr, pero -r cuando se divide\\ +% |"y| & El antiguo signo para <>\\ +% |"-| & Como |\-|, pero permite m'as divisiones\\ +% |"=| & Como |-|, pero permite mas divisiones\nm{c}\\ +% |"~| & Gui'on estil'istico\nm{d}\\ +% |~- ~-- ~---| & Como |-|, |--| y |---|, pero sin divisi'on\\ +% |""| & Permite mas divisiones antes y despu'es\nm{e}\\ +% |"/| & Una barra algo m'as baja\\ +% \verb+"|+ & Divide un logotipo\nm{f}\\ +% |"< ">| & "< ">\\ +% |<< >>| & |\begin{quoting}| |\end{quoting}|\nm{g}\\ +% |?` !`| & ?` !`\nm{h}\\ +%\llap{\textsf{Nuevo en 4.2 }}\relax +%|"? "!| & "? "! alineados con la linea base\nm{i} +% \botrule +% \end{tabular} +% +% \vspace{1.5ex} +% +% \begin{minipage}{11cm} +% \footnotesize +% \nt{a} La forma |~n| debe considerarse en extinci'on. +% \nt{b} La cedilla ya no se usa, pero se us'o anta'no. +% \nt{c} |"=| viene a ser lo mismo que |""-""|. +% \nt{d} Esta abreviaci'on tiene un uso distinto +% en otras lenguas. \nt{e} Como en <>. +% \nt{f} Carece de uso en castellano. \nt{g} V'ease sec.~2.7. +% \nt{h} No proporcionadas por este paquete, sino por cada tipo; +% figuran aqu'i como simple recordatorio. \nt{i} 'Utiles en +% r'otulos en may'usculas. +% \end{minipage} +% \end{table} +% +% Para poder usar ap'ostrofos como abreviaciones de acentos +% es necesaria la opci'on |activeacute| en |\usepackage|. +% Puede cambiarse este comportamiento con +% la orden |\es@acuteactive| en el archivo de configuraci'on +% |spanish.cfg|; en ese caso los ap'ostrofos se activan siempre. +% +% \New{4.1} La conjunci'on \textit{y} es de por s'i bastante breve, +% por lo que en espa'nol no se han usado signos sustitutorios +% desde hace varios siglos. Sin +% embargo, existe un signo parecido a un dos dado la vuelta, que +% desapareci'o tras el Renacimento y que se emplea hoy en ediciones +% paleogr'aficas. Se puede <> con |"y|, siempre que se +% haya cargado el paquete |graphics|; de no ser as'i, se usa la letra +% $\tau$, aunque la variante normal de \TeX{} no es demasiado +% apropiada. +% +% Los caracteres usados como abreviaciones se comportan +% como otras 'ordenes de \TeX{} y por tanto se hace caso +% omiso de los espacios que le puedan seguir: \verb*|' a| es lo mismo +% que |'a|. Eso tambi'en implica que tras esos caracteres no +% puede ir una llave de cierre y que deber'a escribirse +% |{... '{}}| en lugar de |{... '}|; en modo matem'atico no hay +% problema y |$x^{a'}$| ($x^{a'}$) es v'alido. \New{4.1} +% +% \begin{itemize} +% +% \item[$\diamond$] +% |\deactivatetilden|\\[1ex] +% +% Esta orden desactiva las abreviaciones |~n| y |~N| debido a +% los problemas que presentan. Puede usarse en el archivo +% de configuraci'on (v'ease m'as abajo). +% +% % \item[$\diamond$] +% |\spanishdeactivate{}|\\[1ex] +% +% \New{4.1}Permite desactivar las abreviaciones correspondientes a los +% caracteres dados. Para evitar entrar en conflicto con otras lenguas, +% al salir de |spanish| se reactivan,\footnote{El punto para +% los decimales no es estrictamente una abreviaci'on y no se +% reactiva.} por lo que si se desea que +% persista hay que a'nadir la orden a |\shorthandsspanish| con +%|\addto|. La orden |\renewcommand\shorthandsspanish{}| es una +% variante optimizada de +%\begin{verbatim} +% \addto\shorthandsspanish{\spanishdeactivate{.'"~<>}} +%\end{verbatim} +% y es lo recomendado si se desea +% prescindir del mecanismo de abreviaciones. +% \end{itemize} +% +% \subsection{Coma decimal} +% +% Tanto el ingl'es como el castellano y otras lenguas tienen sus +% formas tradicionales de representar la coma decimal. En ingl'es +% es algo como $12{\cdot}34$, mientras que en castellano +% es $12$'$34$. Adem'as, los millares se pueden separar por coma en +% ingl'es y punto en castellano.\footnote{Excepto en a'nos, donde +% siempre se escriben las cifras juntas: \emph{1978, 1998}.} +% Tales formas deben ser descartadas, pues se ha llegado a +% una normalizaci'on internacional donde los millares se +% separan por un espacio fino y los decimales con coma.\footnote{% +% La ISO admite el punto en pa'ises donde haya sido esa +% la tradici'on, aunque recomienda que se adapten a la coma.} +% +% Ya que \TeX\ usa la coma como separador en intervalos o expresiones +% similares, lo que a'nade un espacio fino, \textsf{spanish} +% convierte todo punto en modo matem'atico en +% una coma siempre que est'e seguido de una cifra, pero no en otras +% circunstancias: +% \begin{quote}\small\begin{tabbing} +% |$1\,234.567\,890$| \quad \= $1\,234.567\,890$\\ +% |$f(1,2)=12.34.$| \> $f(1,2)=12.34.$\\ +% |$1{.}000$| \> $1{.}000$, pero\\ +% |1.000| \> 1.000, pues no es modo matem'atico. +% \end{tabbing}\end{quote} +% +% Las 'ordenes |\decimalcomma| y |\decimalpoint| +% establecen si se usa una coma, que es el valor predeterminado, +% o un punto, mientras que |\spanishdecimal{}| permite darle +% una definici'on arbitraria.\footnote{Internamente el mecanismo es +% de una abreviaci'on, y se puede desactivar como las otras. +% \textsf{Nuevo 4.2}} +% +% \subsection{Divisi'on de palabras} +% +% \textsf{Spanish} comprueba la +% codificaci'on en el momento en que se usa un acento: si la +% codificaci'on es |OT1| se toman medidas para facilitar +% la divisi'on, que pese a todo nunca ser'a perfecta, mientras que con +% |T1| se accede directamente al car'acter correspondiente. +% +% Para matizar la divisi'on de palabras hay cuatro posibilidades, dos +% de ellas con el m'etodo de abreviaciones: +% \begin{itemize} +% \item la orden |\-| es un gui'on opcional que no permite +% m'as divisiones, +% +% \item |"-| es similar pero permite m'as divisiones, +% +% \item un |-| es un gui'on que no permite m'as divisiones ni +% antes ni despu'es, y +% +% \item |"=| es el equivalente que s'i las permite,\footnote{No +% es una buena idea usar esta orden, pero en +% medidas muy cortas puede resultar necesario.} +% +% \end{itemize} +% Por ejemplo (con las posibles divisiones marcadas con \hmk): +% \begin{quote}\small\begin{tabbing} +% |Zaragoza-Barcelona|\qquad \= Zaragoza-\hmk Barcelona\\ +% |Zaragoza"=Barcelona| \> +% Za\hmk ra\hmk go\hmk za-\hmk Bar\hmk ce\hmk lo\hmk na\\ +% |semi\-abierto| \> semi\hmk abierto\\ +% |semi"-abierto| \> se\hmk mi\hmk abier\hmk to.\footnotemark +% \end{tabbing}\footnotetext{Justo antes y despu'es de +% {\ttfamily\string"\string-} y {\ttfamily\string"\string=} se +% aplican los correspondientes +% valores de {\ttfamily\string\...hyphenmin} lo que implica que la +% divis'on semia\hmk bierto no es posible. +% 'Este es un comportamiento correcto.} +% \end{quote} +% +% Adem'as. hay abreviaciones que evitan +% divisiones: |~-|, que resulta 'util para expresar una serie de +% n'umeros sin que el gui'on los divida (12~-14, |12~-14|), y |~---|, +% que es la forma que debe usarse para abrir incisos con rayas, ya que +% de lo contrario puede haber una divisi'on entre la raya de abrir y +% la palabra que le sigue: +% \begin{quote}\small\begin{tabbing} +% |Los conciertos ~---o academias--- que organiz'o...| +% \end{tabbing}\end{quote} +% Mientras que este gui'on evita toda posible divisi'on en los +% elementos que une, la raya (---) y la semirraya (--) las permiten +% en las palabras que le precedan o le sigan. +% +% La abreviaci'on |"~| se usa cuando se quiere que el gui'on +% tambi'en aparezca al comienzo de la siguiente l'inea. Por ejemplo: +% \begin{quote}\small\begin{tabbing} +% |infra"~rojo| \quad \= in\hmk fra-ro\hmk jo, pero infra-\hmk-rojo. +% \end{tabbing}\end{quote} +% +% Otra abreviaci'on es |"rr| que sirve para el +% 'unico cambio de escritura del castellano en caso de haber divisi'on. +% La \lsc{RAE} indica que al a'nadir un prefijo que termina en vocal a +% una palabra que comienza con \emph{r}, 'esta 'ultima debe +% doblarse a menos que se unan por un gui'on. Por ejemplo: +% \begin{quote}\small\begin{tabbing} +% |extra"rradio| \quad \= ex\hmk trarra\hmk dio, pero extra-\hmk +% radio. +% \end{tabbing}\end{quote} +% No hay acuerdo sobre si esta regla y otras similares han de +% aplicarse o no, aunque la opini'on mayoritaria actual est'a en +% contra. +% +% \subsection{Ordinales} +% +% Las abreviaturas siempre llevan punto, salvo algunas en que +% se sustituye por una barra (y salvo las siglas y s'imbolos, +% naturalmente), que precede a las letras voladitas.\footnote{Puede +% comprobarse en \DTL{196}. V'ease tambi'en \DOT{222 y 227}.} +% Por ello, \textsf{spanish} proporciona la orden +% |\sptext| que facilita la creaci'on de estas abreviaturas. Por +% ejemplo: |adm\sptext{'on}| que da adm\sptext{'on}. Hay seis abreviaciones +% asociadas a ordinales: |"a|, |"A|, |"o|, |"O|, |"er| y |"ER| que equivalen a +% |\sptext{a}|, etc.\footnote{Muchos tipos a'naden +% un peque'no subrayado que debe evitarse, y por tanto no se debe +% escribir los ordinales con \textsf{inputenc}.} +% +% Para ajustar el tama'no lo mejor posible, se usa el de +% 'indices en curso. Esto funciona bien salvo para tama'nos muy +% grandes o muy peque'nos, donde los resultados son meramente +% aceptables. +% +% \New{4.1}En Plain \TeX{} se ejecuta la orden |\sptextfont| para la +% letra voladita, de forma que |{\bf\let\sptextfont\bf 1"o}| da el +% resultado correcto (|\mit| si es para cursiva). Para usar un tipo +% nuevo con |\sptext| hay que definir tambi'en las variantes +% matem'aticas con |\newfam|. +% +% \subsection{Funciones matem'aticas} +% +% Tradicionalmente, se han formado las abreviaciones +% de lo que en \TeX\ se conocen como operadores a partir +% del nombre castellano, lo que implica la presencia del +% acento en l'im (en sus tres formas |\lim|, |\limsup| y |\liminf|), +% m'ax, m'in, 'inf y m'od (en sus dos +% formas |\bmod| y |\pmod|). +% +% Con |spanish| pueden seguirse varias convenciones con ayuda +% de las siguientes 'ordenes: +% \begin{itemize} +% \item[$\diamond$] |\accentedoperators| |\unaccentedoperators|\\[1ex] +% Activa o desactiva los acentos. +% Por omisi'on se acent'uan, como por ejemplo: $\lim_{x\to 0}(1/x)$ +% (|$\lim_{x\to 0}(1/x)$|). +% +% \item[$\diamond$] |\spacedoperators| |\unspacedoperators|\\[1ex] +% Activa o desactiva el espacio entre " y la funci'on. +% Lo habitual ha sido con espacio; as'i pues, por omisi'on +% se espacia. +% \end{itemize} +% +% La i sin punto tambi'en es accesible directamente en modo +% matem'atico con la orden |\dotlessi|, de forma que se puede escribir +% |\acute{\dotlessi}|. Por ejemplo, +% |$V_{\mathbf{cr\acute{\dotlessi}t}}$| da +% $V_{\mathbf{cr\acute{\dotlessi}t}}$. +% +% Tambi'en se a'naden |\sen|, |\arcsen|, |\tg| y |\arctg|, +% que dan las funciones respectivas. Otras funciones trigonom'etricas +% se encuentran almacenadas en el par'ametro |\spanishoperators|, que +% inicialmente incluye cotg, cosec, senh y tgh. La raz'on por la que +% estas funciones se han separado es porque ~---al contrario que sen +% y tg~--- su forma est'a lejos de estar normalizada en el 'ambito +% hispanohablante. De esta +% forma se puede cambiar por otras con, por ejemplo: +%\begin{verbatim} +% \renewcommand{\spanishoperators}{ctg arc\,ctg sh ch th} +%\end{verbatim} +% (separadas con espacio). Cuando se selecciona |spanish| se crean +% 'ordenes con esos nombres +% y que dan esas funciones (siempre con |\nolimits|). Adem'as de +% las letras sin acentuar se aceptan las 'ordenes |\,| y |\acute|, que +% se pasan por alto para formar el nombre. \New{4.2}Por ejemplo, |arc\,ctg| +% se escribe en el documento con +% |\arcctg|, |M\acute{a}x| como |\Max| y |cr\acute{i}t| como |\crit| +% (hay que usar |i| y no |\dotlessi|). +% La orden |\,| responde a |\|(|un|)|spacedoperators|, y |\acute| +% a |\|(|un|)|accentedoperators|. +% +% Conviene que |\spanishoperators| est'e en el pre'ambulo del +% documento en s'i, antes de |\selectspanish| o de +% |\begin{document}|. +% +% \subsection{Entrecomillados} +% +% El entorno |quoting| entrecomilla un +% texto, a'nadiendo comillas de seguir al comienzo de +% cada p'arrafo en su interior.\footnote{Se puede encontrar +% una detallada exposici'on de las comillas en \DTL{44 ss.} De ah'i +% se ha tomado alg'un ejemplo.} +% Tambi'en se pueden emplear las +% abreviaciones |<<| y |>>| que se limitan a llamar a |quoting|, que +% por ser entorno considera sus cambios internos como locales. (Es +% decir, |<< ... >>| implica |{<< ... >>}|.) +% Las abreviaciones |"<| y |">| contin'uan dando sin m'as los +% caracteres de comillas de abrir y cerrar, respectivamente. +% +% Por ejemplo: +%\begin{verbatim} +% <> a las que son de cierre, +% pero se colocan al comienzo de cada p'arrafo cuando se transcribe +% un texto entrecomillado con m'as de un p'arrafo. +% +% En su interior, como de costumbre, se usan inglesas.>> +%\end{verbatim} +% cuyo resultado es: +% \begin{quotation}\small +% <> a las que son de cierre, +% pero se colocan al comienzo de cada p'arrafo cuando se transcribe +% un texto entrecomillado con m'as de un p'arrafo. +% +% En su interior, como de costumbre, se usan inglesas.>> +% \end{quotation} +% +% Este entorno se puede redefinir, como por ejemplo: +%\begin{verbatim} +% \renewenvironment{quoting}{\itshape}{} +%\end{verbatim} +% pero en principio no implica un nuevo p'arrafo, ya que +% est'a pensado para ser usado tambi'en en el texto. +% +% En caso de anidar entornos |quoting|, se modifican las comillas +% de los niveles interiores, que tambi'en se a'naden a las de seguir: +%\begin{verbatim} +% <>. +% +% Pero all'i no se aclar'o nadie.>> +%\end{verbatim} +% +% \begin{quotation}\small +% <>. +% +% Pero all'i no se aclar'o nadie.>> +% \end{quotation} +% +% \begin{itemize} +% \item[$\diamond$] +% |\lquoti| |\rquoti| |\lquotii| |\rquotii| |\lquotiii| +% |\rquotiii|\\[1ex] +% +% Controlan las comillas en |quoting|, seg'un el +% nivel en que nos encontremos. |\lquoti| son las comillas de abrir +% m'as exteriores, |\lquotii| las de segundo nivel, etc., y lo mismo +% para las de cerrar con |\rquoti|... Para las de seguir siempre se +% usan las de cerrar. Los valores predefinidos est'an en el cuadro 3. +% \begin{table} +% \center\small +% \caption{Entrecomillados} +% \vspace{1.5ex} +% \begin{tabular}{l@{\hspace{5em}}l} +% \toprule +% |\lquoti| &|"<|\\ +% |\rquoti| &|">|\\ +% |\lquotii| &|``|\\ +% |\rquotii| &|''|\\ +% |\lquotiii| &|`|\\ +% |\rquotiii| &|'| +% \botrule +% \end{tabular} +% \end{table} +% +% \newenvironment{dialog} +% {\def\lquoti{}\begin{quoting}---\ignorespaces} +% {\def\rquoti{}\end{quoting}} +% +% Las comillas de seguir tambi'en se emplean en di'alogos, incluso +% si no las hay de abrir y cerrar. Con la ayuda del siguiente +% entorno, +%\begin{verbatim} +% \newenvironment{dialog} +% {\def\lquoti{}\begin{quoting}---\ignorespaces} +% {\def\rquoti{}\end{quoting}} +%\end{verbatim} +% podemos obtener +% \begin{quotation}\small +% \begin{dialog}% +% El di'alogo se desarroll'o de esta forma: +% +% <<---Yo no he sido ---grit'o Antonio. +% +% ---Pero has colaborado ---asegur'o Rafael>>. +% +% Pero all'i no se aclar'o nadie. +% \end{dialog} +% \end{quotation} +% +% \item[$\diamond$] +% |\activatequoting \deactivatequoting|\\[1ex] +% +% Las incompatibilidades potenciales de estas abreviaciones son +% enormes. Por ejemplo, en \textsf{ifthen} se cancelan las +% comparaciones entre n'umeros;\,\footnote{Y en |\string\ifnum|, +% etc. usado por los desarrolladores en los paquetes.} tambi'en +% resultan inoperantes |@>>>| y |@<<<| de +% \textsf{amstex}.\footnote{Aunque en +% este caso cabe usar los sin'onimos |@)))| y |@(((|.} +% Por ello, se da posibilidad de cancelarlas y reactivarlas con +% estas 'ordenes, \New{4.2}aunque si se est'a usando con +% \textsf{xmltex} ya se +% desactivan por completo de forma autom'atica. El entorno +% |quoting| siempre permanece disponible.\footnote{Algunos tipos +% disponen de esta ligadura de forma interna para +% generar los caracteres de comillas, por lo que en ellos tambi'en +% podemos usarlos siempre, aunque los ajustes proporcionados por +% \textsf{spanish} se pueden perder; por otra parte, tampoco se +% usan demasiado a menudo.} +% +% \end{itemize} +% +% \subsection{Selecci'on} +% +% Por omisi'on, \babel{} deja <> las lenguas hasta que se +% llega a |\begin{document}| con el fin de evitar conflictos por +% las abreviaciones; a cambio, +% se priva de la posibilidad de usar las lenguas en el pre'ambulo +% en 'ordenes como |\savebox|, |\title|, |\newtheorem|, etc. +% +% La orden |\selectspanish| permite activar |spanish| con sus +% extensiones y abreviaciones antes de +% |\begin{document}|.\footnote{Algunos detalles, que +% apenas afectan a \texttt{spanish}, siguen sin activarse hasta el +% comienzo del documento.} +% De esta forma, podr'iamos decir +%\begin{verbatim} +% \documentclass{book} +% \usepackage[T1]{fontenc} +% \usepackage[spanish]{babel} +% \usepackage[latin1]{inputenc} +% \usepackage[centerlast]{caption2} +% ... % Mas paquetes +% +% \selectspanish +% +% \title{T'itulo} +% \author{Autor} +% \newcommand{\pste}{para"-psicol'ogicamente} +% \newsavebox{\mybox} +% \savebox{\mybox}{m'as cosas} +% ... % Mas definiciones +% +% \begin{document} +%\end{verbatim} +% +% \subsection{Espaciado} +% +% El espaciado espa'nol difiere relativamente poco del ingl'es; +% sin embargo, el espacio tras los signos de +% puntuaci'on debe ser mismo que el que hay entre palabras. O dicho en +% t'erminos de \TeX, |\frenchspacing| est'a activo. +% +% Tambi'en en otros dos sitios hay diferencias. El primero son los +% puntos suspensivos, para los que se define una nueva orden |\...| +% que los da menos espaciados; con ella \TeX{} preserva +% el espacio siguiente. Por ejemplo: +% \begin{quote}\small\begin{tabbing} +% |\... y solo estaba\... ella.|\quad\=\... y solo estaba\... ella. +% \end{tabbing}\end{quote} +% Tambi'en podr'ian escribirse los tres puntos sin m'as |...|, y en +% la pr'actica no hay diferencia, a menos que se cambie el +% valor del espacio tras punto; en ese caso, la forma con barra +% da los valores apropiados \emph{dentro} de una sentencia, y +% los tres puntos \emph{al final} de ella. Esta orden no +% interfiere con el valor original de |\.| (un punto suprascrito). +% +% El segundo sitio es un espacio fino antes del signo |\%| (que +% m'as exactamente es |\,|, con lo cual se puede " con +% su opuesto |\!|, si |\%| no sigue a una cifra). +% +% \subsection{Miscel'anea} +% +% \begin{itemize} +% +% \item[$\bullet$] La orden |\lsc| se puede usar para siglas +% en versalitas. +% Por ejemplo: +% \begin{quote}\small\begin{tabbing} +% |\lsc{RAE}| \quad \= \lsc{RAE}\\ +% |\lsc{ReNFe}| \quad \= \lsc{ReNFe}. +% \end{tabbing}\end{quote} +% Tambi'en puede ser 'util para algunos usos de los n'umeros +% romanos: +% \begin{quote}\small\begin{tabbing} +% |siglo \lsc{XVII}| \quad \= siglo \lsc{XVII}\\ +% |cap'itulo \lsc{II}| \quad \= cap'itulo \lsc{II}. +% \end{tabbing}\end{quote} +% +% Para evitar que con un tipo que carece de versalitas acabe +% apareciendo (por substituci'on) un texto de min'usculas se +% intenta usar en estos casos las versales \emph{reales} +% de un tama'no menor. Queda simplemente aceptable, pero es mejor que +% nada. (\LaTeX\ tiende a sustituir versalitas por versalitas, +% pero hay excepciones, como con las negritas.) +% +% \item[$\bullet$] Se puede escribir |\'i| para |\'{\i}|. +% +% \item[$\bullet$] Hay una abreviaci'on adicional como utilidad +% tipogr'afica m'as que espec'ificamente espa'nola. En ciertos +% tipos, como Times, el extremo inferior de la barra est'a en la +% l'inea de base y expresiones como <> resultan poco +% est'eticas. |"/| produce una barra que, de ser necesario, +% se baja ligeramente. Computer Modern tiene una barra bien +% dise'nada y no es posible ilustrar aqu'i este punto +% pero en todo caso se escribir'ia |am"/pm|.\footnote{En \MEA{141} +% se recurre a una soluci'on que es la 'unica sencilla en +% programas de maquetaci'on: usar un cuerpo menor. Pero con \TeX{} +% es mucho m'as f'acil automatizar las tareas.} +% +% \end{itemize} +% +% \section{Adaptaci'on} +% \subsection{Configuraci'on} +% +% En sus 'ultimas versiones, \babel{} proporciona la posibilidad +% de cargar autom'aticamente un archivo con el mismo nombre que +% el principal, pero con extensi'on |.cfg|. \textsf{Spanish} +% proporciona unas pocas 'ordenes para ser usadas en este archivo: +% \begin{itemize} +% \item[$\diamond$] |\es@activeacute|\\[1ex] +% Activa las abreviaciones con ap'ostrofos, sin que sea +% necesario incluir |activeacute| como opci'on en |\usepackage|. +% +% \item[$\diamond$] |\es@enumerate{}|% +% |{}{}{}|\\[1ex] +% Cambia los valores preestablecidos por |spanish| para +% |enumerate|. \textit{leveln} consiste en una letra, que +% indica qu'e formato tendr'a el n'umero, seguida +% de cualquier texto. La letra tiene que ser: |1| (ar'abigo), +% |a| (min'uscula \emph{cursiva}\,\footnote{La letra es cursiva +% pero no los signos que le puedan seguir. M'as bien deber'ia +% decirse destacada, ya que se usa |\string\emph|. +% V'ease \DTL{11}.}), |A| (versal), +% |i| (romano \emph{versalita}), |I| (romano versal) o +% finalmente |o| (ordinal\,\footnote{Lo normal es no a'nadir ning'un +% signo tras ordinal.}). +% +% Esta orden no est'a pensada para hacer cambios elaborados, sino +% s—lo meros reajustes. Los valores preestablecidos +% equivalen a +%\begin{verbatim} +% \es@enumerate{1.}{a)}{1)}{a$'$)} +%\end{verbatim} +% +% \item[$\diamond$] |\es@itemize{}|% +% |{}{}{}|\\[1ex] +% Lo mismo para |itemize|, s'olo que los argumentos se +% usan de forma literal. Los valores originales de \LaTeX{} son +% similares a +%\begin{verbatim} +% \es@itemize{\textbullet}{\normalfont\bfseries\textendash} +% {\textasteriskcentered}{\textperiodcentered} +%\end{verbatim} +% +% \item[$\diamond$] |\es@operators|\\[1ex] +% Todo lo relativo a operadores se cancela con +%\begin{verbatim} +% \let\es@operators\relax +%\end{verbatim} +% Es buena idea incluirlo si no se van a usar, ya que ahorra memoria. +% +% \end{itemize} +% +% Otros ajustes 'utiles en este contexto son |\spanishoperators|, +% |\selectspanish| y |\deactivatequoting|. +% +% +% Recordemos que todos los cambios +% operados desde este archivo restan compatibilidad al +% documento, por lo que si se distribuye conviene adjuntarlo +% con el entorno |filecontents|. +% +% \subsection{Otros cambios} +% +% \begin{itemize} +% +% \item La orden |\addto| permite +% cambiar alguna de las convenciones internas. Esto resulta +% interesante con las traducciones, ya que las +% formas proporcionadas pueden no ser las deseadas. +% Para ello es necesario que |spanish| no est'e seleccionado. +% Por ejemplo, para cambiar \emph{'Indice de figuras} por +% \emph{Lista de figuras}: +%\begin{verbatim} +% \addto\captionsspanish{% +% \def\listfigurename{Lista de figuras}} +%\end{verbatim} +% +% \item Para volver a eliminar la sangr'ia tras secci'on: +%\begin{verbatim} +% \def\@afterindentfalse{\let\if@afterindent\iffalse} +% \@afterindentfalse +%\end{verbatim} +% +% \item Para que |\roman| proporcione n'umeros romanos en +% min'uscula, seg'un la forma inglesa: +%\begin{verbatim} +% \def\@roman#1{\romannumeral #1} +%\end{verbatim} +% +% \item +% Los extras se encuentran organizados en varios grupos: +% |\textspanish|, |\mathspanish|, +% |\shorthandsspanish| y |\layoutspanish|. Pueden +% cancelarse con: +%\begin{verbatim} +% \renewcommand\textspanish{} +%\end{verbatim} +% +% \end{itemize} +% +% \section{Formatos distintos a \LaTeXe} +% +% El estilo |spanish| funciona con +% otros formatos, aunque con un subconjunto de las funciones +% disponibles en \LaTeXe{}. Con Plain hay que hacer +%\begin{verbatim} +% \input spanish.sty +%\end{verbatim} +% y con \LaTeX2.09, incluir |spanish| entre las opciones de estilo. +% +% Se incluyen: traducciones, casi todas las abreviaciones, coma +% decimal, utilidades para divisi'on de palabras, ordinales en una +% versi'on simplificada (y no muy elegante), funciones matem'aticas, +% entrecomillados en \LaTeX2.09, |\'i| y espaciado. +% La selecci'on de la lengua es inmediata al cargar el archivo. +% +% En cambio no est'an disponibles: entrecomillados en Plain, +% |\lsc| ni las adaptaciones proporcionadas por |\layoutspanish|. +% +% A partir de esta versi'on, el archivo de configuraci'on +% se lee siempre, por lo que aquellos que ya est'an escritos +% espec'ificamante para \LaTeXe{} pueden presentar problemas si se usan +% con otros formatos. Si las versiones que se usan no son muy antiguas, +% se puede comprobar el formato con la variable |\fmtname| que vale +% |LaTeX2e| o |plain|. Por ejemplo +%\begin{verbatim} +% \def\temp{LaTeX2e} +% \ifx\temp\fmtname +% ... +% \fi +%\end{verbatim} +% +% \section{Bibliograf'ias} +% +% El archivo |esbst.tex| que se genera con \textsf{spanish} +% sirve para que la utilidad \textsf{custom-bib} trabaje en +% conjunci'on con \babel. Define una serie de 'ordenes, que pueden +% consultarse en el propio archivo, que se utilizan para las +% traducciones si se selecciona |babel| como lengua al generar un +% estilo bibliogr'afico. +% +% \section{Incompatibilidades con versiones anteriores} +% +% \begin{itemize} +% +% \item En versiones de cierta antig"uedad, el actual |activeacute| +% estaba siempre impl'icito, por lo que ahora la abreviaci'on no se +% reconoce y en su lugar aparecen ap'ostrofos. +% +% \item El t'ermino correspondiente a |\tablename| estaba traducido +% incorrectamente como <>. Como quiera que <> es la +% palabra con que puede aparecer en el propio texto, o bien puede +% haber un art'iculo femenino ante |\tablename|, puede reponerse el +% valor antiguo con: +%\begin{verbatim} +% \addto\captionsspanish{% +% \def\tablename{Tabla}% +% \def\listtablename{\'Indice de tablas}} +%\end{verbatim} +% +% \end{itemize} +% +% \section*{Referencias} +% \addcontentsline{toc}{section}{Referencias} +% +% \begingroup +% \small +% \leftskip1.5cm \parindent-1.5cm +% +% \makebox[1.5cm][l]{\lsc{DRAE}}\textit{Diccionario de la Academia +% Espa'nola}, Madrid, Espasa-Calpe, 21"a ed., 1992. +% +% \makebox[1.5cm][l]{\lsc{DOT}}Jos'e Mart'inez de Sousa, +% \textit{Diccionario de ortograf'ia t'ecnica}, +% Madrid, Germ'an S'anchez Ruip'erez/Pir'amide, 1987. +% (Biblioteca del libro.) +% +% \makebox[1.5cm][l]{\lsc{DTL}}Jos'e Mart'inez de Sousa, +% \textit{Diccionario de tipograf'ia y del libro}, +% Madrid, Paraninfo, 3"a ed., 1992. +% +% \makebox[1.5cm][l]{\lsc{MEA}}Jos'e Mart'inez de Sousa, +% \textit{Manual de edici'on y autoedici'on}, +% Madrid, Pir'amide, 1994. +% +% \leftskip0pt \parindent0pt \vspace{6pt} +% +% {\itshape +% Como normalmente el primer contacto con \TeX{} es por una tesis, +% cito libros que +% est'an relacionados con el tema a los que he tenido acceso. +% Est'an por orden de preferencia; en particular, los dos 'ultimos me +% parecen poco recomendables.} +% +% \parindent-1.5pc \leftskip1.5pc \vspace{3pt} +% +% Umberto Eco, +% \textit{C'omo se hace una tesis}, +% Barcelona, Gedisa, 1982. +% +% Antonia Rigo Arnavat y Gabriel Genesc\`a Due'nas, +% \textit{C'omo presentar una tesis y trabajos de investigaci'on}, +% Barcelona, Eumo-Octaedro, 2002. +% +% Prudenci Comes, +% \textit{Gu'ia para la redacci'on y presentaci'on de trabajos +% cient'ificos, informes t'ecnicos y tesinas}, +% Barcelona, Oikos-Tau, 1971. +% +% Javier Lasso de la Vega, +% \textit{C'omo se hace una tesis doctoral}, +% Madrid, Fundacion Universitaria Espa~nola, 1977. +% +% Jos'e Romera Castillo y otros, +% \textit{Manual de estilo}, +% Madrid, Universidad Nacional de Educaci'on a Distancia, 1996. +% +% Restituto Sierra Bravo, +% \textit{Tesis doctorales y trabajos de investigaci'on cient'ifica}, +% Madrid, Paraninfo, 1986. +% +% \parindent0pc \leftskip0pc \vspace{6pt} +% +% {\itshape +% Para otras cuestiones tipogr'aficas, las referencias +% usadas son, entre otras:} +% +% \parindent-1.5pc \leftskip1.5pc \vspace{3pt} +% +% Javier Bezos, +% \textit{Tipograf'ia espa'nola con \TeX}, documento electr'onico +% disponible en +% \textsf{http://perso.wanadoo.es/jbezos/tipografia.html}. +% +% Ra'ul Cabanes Mart'inez, +% <>, +% \textit{Mundo Electr'onico}, n"o 142, 1984, p'ags.~119~-125. +% +% \textit{The Chicago Manual of Style}, Chicago, University of +% Chicago Press, 14"a~ed., 1993, esp.~p'ags.~333~-335. +% +% Jos'e Fern'andez Castillo, +% \textit{Normas para correctores y compositores tip'ografos}, +% Madrid, Espasa-Calpe, 1959. +% +% IRANOR [AENOR], Normas \lsc{UNE} n'umeros 5010 (<>), 5028 (<>) y 5029 (<>). +% [Obsoletas.] +% +% Real Academia Espa'nola, +% \textit{Esbozo de una nueva gram'atica de la +% lengua espa'nola}, Madrid, Espasa-Calpe, 1973. +% +% V.\ Mart'inez Sicluna, +% \textit{Teor'ia y pr'actica de la tipograf'ia}, +% Barcelona, Gustavo Gili, 1945. +% +% Jos'e Mart'inez de Sousa, +% \textit{Diccionario de ortograf'ia de la lengua espa'nola}, +% Madrid, Paraninfo, 1996. +% +% Juan Mart'inez Val, \textit{Tipograf'ia pr'actica}, Madrid, +% Laberinto, 2002. +% +% Juan Jos'e Morato, \textit{Gu'ia pr'actica del compositor +% tipogr'afico}, Madrid, Hernando, 2"a ed., 1908 (1"a ed., 1900, +% 3"a ed., 1933). +% +% Marion Neubauer, +% <>, +% \textit{Die \TeX nisches Kom\"odie}, parte I, vol. 8, n"o 4, 1996, +% p'ags. 23-40; parte II, vol. 9, n"o 1, 1997, p'ags.~25~-44. +% +% Jos'e Polo, +% \textit{Ortograf'ia y ciencia del lenguaje}, Madrid, Paraninfo, +% 1974. +% +% Pedro Valle, +% \textit{C'omo corregir sin ofender}, Buenos Aires, Lumen, 1998. +% +% Hugh C. Wolfe, <>, +% \textit{Enciclopedia de F'isica}, dir. Rita G. Lerner y George L. +% Trigg, Madrid, Alianza, 1987, t.~2, p'ags.~1423~-1451. +% +% \endgroup +% +% \end{userdtx} +% +% \begin{userdrv} +%^^A ======= Beginning of text as typeset by user.drv ========= +% +% \GetFileInfo{spanish.dtx} +% +% \section{The Spanish language} +% +% The file \file{\filename}\footnote{The file described in this +% section has version number \fileversion\ and was last revised on +% \filedate. The original author from v4.0 on is Javier +% Bezos. Previous versions were by Julio S\'anchez.} defines all the +% language-specific macros for the Spanish language. +% +% Custumization is made following mainly the +% books on the subject by Jos\'e Mart\'\i nez de Sousa. +% By typesetting |spanish.dtx| directly you will get the full +% documentation (regrettably is in Spanish only, but it is +% pretty long). References in this part refers to that document. +% There are several aditional features documented in the Spanish +% version only. +% +% This style provides: +% \begin{itemize} +% \item Translations following the International \LaTeX{} +% conventions, as well as |\today|. +% +% \item Shorthands listed in Table~\ref{tab:spanish-quote-def}. +% Examples in subsection~3.4 are illustrative. Note that +% |"~| has a special meaning in \textsf{spanish} +% different to other languages, and is used mainly in linguistic +% contexts. +% +% \begin{table}[htb] +% \centering +% \begin{tabular}{lp{8cm}} +% |'a| & acute accented a. Also for: e, i, o, u (both +% lowercase and uppercase).\\ +% |'n| & \~n (also uppercase).\\ +% |~n| & \~n (also uppercase). Deprecated.\\ +% |"u| & \"u (also uppercase).\\ +% |"a| & Ordinal numbers (also |"A|, |"o|, |"O|).\\ +% |"c| & \c{c} (also uppercase).\\ +% |"rr| & rr, but -r when hyphenated\\ +% |"-| & Like |\-|, but allowing hyphenation in the rest +% the word.\\ +% |"=| & Like |-|, but allowing hyphenation in the rest +% the word.\\ +% |"~| & The hyphen is repeated at the very beginning of +% the next line if the word is hyphenated at this +% point.\\ +% |""| & Like |"-| but producing no hyphen sign.\\ +% |~-| & Like |-| but with no break after the hyphen. Also for: +% en-dashes (|~--|) and em-dashes (|~---|). \\ +% |"/| & A slash slightly lowered, if necessary.\\ +% \verb+"|+ & disable ligatures at this point.\\ +% |"<| & Left guillemets.\\ +% |">| & Right guillemets.\\ +% |<<| & |\begin{quoting}|. (See text.)\\ +% |>>| & |\end{quoting}|. (See text.) +% \end{tabular} +% \caption{Extra definitions made by file \file{spanish.ldf}} +% \label{tab:spanish-quote-def} +% \end{table} +% +% \item |\deactivatetilden| deactivates the |~n| and |~N| shorthands. +% +% \item \emph{In math mode} a dot followed by a digit is replaced +% by a decimal comma. +% +% \item Spanish ordinals and abbeviations with |\sptext| +% as, for instance, |1\sptext{er}|. The +% preceptive dot is included. +% +% \item Accented functions: l\'\i m, m\'ax, m\'\i n, m\'od. You may +% globally omit the accents with |\unaccentedoperators|. Spaced +% functions: arc\,cos, etc. You may globally kill that space with +% |\unspacedoperators|. |\dotlessi| is provided for use in math mode. +% +% \item A |quoting| environment and a related pair of shorthands |<<| +% and |>>|. The command +% |\deactivatequoting| deactivates these shorthand in case +% you want to use |<| and |>| in some AMS commands and numerical +% comparisons. +% +% \item The command |\selectspanish| selects the |spanish| language +% \emph{and} its shorthands. (Intended for the preamble.) +% +% \item |\frenchspacing| is used. +% +% \item Ellipsis are best typed |...| or, within a sentence, |\...| +% +% \item There is a small space before |\%|. +% +% \item |\lsc| provides lowercase small caps. (See subsection~3.10.) +% \end{itemize} +% +% Just in case |spanish| is the main language, the group +% |\layoutspanish| is activated, which modifies the standard +% classes through the whole document (it cannot be deactivated) +% in the following way: +% \begin{itemize} +% \item Both |enumerate| and |itemize| are adapted to Spanish rules. +% +% \item Both |\alph| and |\Alph| include \textit{\~n} after \textit{n}. +% +% \item Symbol footmarks are one, two, three, etc., asteriscs. +% +% \item |OT1| guillemets are generated with two |lasy| symbols instead +% of small |\ll| and |\gg|. +% +% \item |\roman| is redefined to write small caps roman numerals, since +% lowercase roman numerals are not allowed. However, \textit{MakeIndex} +% rejects entries containing pages in that format. The |.idx| file must +% be preprocessed if the document has this kind of entries with +% the provided |romanidx.tex| tool---just \TeX{} it and follow the +% instructions. +% +% \item There is a dot after section numbers in titles and toc. +% \end{itemize} +% This group is ignored if you write |\selectspanish*| in the +% preamble. +% +% Some additional commands are provided to be used in the +% |spanish.cfg| file: +% \begin{itemize} +% \item With |\es@activeacute| acute accents are always active, +% overriding the default \textsf{babel} behaviour. +% +% \item |\es@enumerate| sets the labels to be used by |enumerate|. The +% same applies to |\es@itemize| and |itemize|. +% +% \item |\es@operators| stores the operator commands. +% All of them are canceled with +%\begin{verbatim} +% \let\es@operators\relax +%\end{verbatim} +% \end{itemize} +% The commands |\deactivatequoting|, |\deactivatetilden| and +% |\selectspanish| may be used in this file, too. +% +% A subset of these commands is provided for +% use in Plain \TeX{} (with |\input spanish.sty|). +% +% \end{userdrv} +% +%\StopEventually{} +% +%^^A ========== End of manual =============== +% +% \begin{userdtx} +% +% \section{The Code} +% +% \end{userdtx} +% +% \begin{userdrv} +% +% \subsection{The Code} +% +% \end{userdrv} +% +% \changes{spanish~4.0f}{99/04/12}{Beginning of changes to follow the +% doc conventions} +% \changes{spanish~4.0d}{99/03/26}{Changed some parts for babel.ins +% to generate the files} +% \changes{spanish~4.0e}{99/04/10}{Adapted to 3.6k with some minor +% changes, since most of features intended for 3.7 are included +% now} +% \changes{spanish~4.0d}{99/03/26}{Restored the test for \cs{LdfInit}. +% It is redundant for LaTeX209 but not for plain} +% \changes{spanish~4.0d}{99/03/29}{With a shoddy piece of work, the +% plain variant works (at last). Instead of inputting +% \file{babel.def} we input \file{switch.def}. To be changed, I +% think, since now \file{plain.def} is read twice} +% \changes{spanish~4.0e}{99/04/10}{Replaced all instances of +% allowhyphens by \cs{bbl@allowhyphens}} +% \changes{spanish~4.0g}{99/05/05}{The code introduced the 99/03/29 +% (see above) has been removed} +% \changes{spanish~4.1a}{99/12/26}{Added \cs{spanishdecimal}.} +% \changes{spanish~4.1b}{00/06/16}{Added the Spanish et sign.} +% \changes{spanish~4.1a}{99/12/29}{Modified \cs{@marginparreset} +% in order to kill the continuing guillemets.} +% \changes{spanish~4.1a}{00/01/09}{\cs{sptext} protected.} +% +% This file provides definition for both \LaTeXe{} and non +% \LaTeXe{} formats. +% +% Identify the |ldf| file. +% +% \changes{spanish~4.0g}{99/05/05}{Replaced \cs{ProvidesFile} +% by \cs{ProvidesLanguage}} +% \changes{spanish~4.0j}{99/09/18}{Renamed spanish.tex as spanish.lpf} +% +% \begin{macrocode} +%<*code> +\ProvidesLanguage{spanish.ldf} + [2005/03/31 v4.2b Spanish support from the babel system] +% \end{macrocode} +% +% The macro |\LdfInit| takes care of preventing that this file is +% loaded more than once, checking the category code of the +% \texttt{@} sign, etc. +% When this file is read as an option, i.e. by the |\usepackage| +% command, \texttt{spanish} will be an `unknown' language in which +% case we have to make it known. So we check for the existence of +% |\l@spanish| to see whether we have to do something here. +% +% \changes{spanish~4.0a}{98/09/23}{All files renamed from spanishb +% to spanish as requested by the Spanish TeX list, since this +% style should replace the current Spanish option. Julio +% Sanchez gave up supporting his files and he has withdrawn +% from his TeX activities. The last distributed version as +% spanishb was 1.1.} +% \changes{spanish~4.0a}{98/09/12}{Introduced \cs{LdfInit} setup} +% \begin{macrocode} +\LdfInit{spanish}\captionsspanish +\ifx\undefined\l@spanish + \@nopatterns{Spanish} + \adddialect\l@spanish0 +\fi +% \end{macrocode} +% +% We define some tools which will be used in that style file: +% (1) we make sure that |~| is active, (2) |\es@delayed| delays +% the expansion of the code in conditionals (in fact, quite similar +% to |\bbl@afterfi|). +% +% \changes{spanish~4.0a}{98/09/12}{Test for 209 moved from sty} +% \changes{spanish~4.1a}{99/12/01}{Introduced the \cs{es@delayed} +% mechanism for ``conflictive'' conditionals.} +% \begin{macrocode} +\edef\es@savedcatcodes{% + \catcode`\noexpand\~=\the\catcode`\~ + \catcode`\noexpand\"=\the\catcode`\"} +\catcode`\~=\active +\catcode`\"=12 +\long\def\es@delayed#1\then#2\else#3\fi{% + #1% + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi + {#2}{#3}} +% \end{macrocode} +% +% Two tests are introduced. The first one tells us if the format is +% \LaTeXe{}, and the second one if the format is plain or any other. +% If both are false, the format is \LaTeX2.09{}. +% +% \begin{macrocode} +\es@delayed +\expandafter\ifx\csname documentclass\endcsname\relax\then + \let\ifes@LaTeXe\iffalse +\else + \let\ifes@LaTeXe\iftrue +\fi +\es@delayed +\expandafter\ifx\csname newenvironment\endcsname\relax\then + \let\ifes@plain\iftrue +\else + \let\ifes@plain\iffalse +\fi +% \end{macrocode} +% +% Translations for captions. +% +% \changes{spanishb~1.1}{98/03/17}{Corrected \cs{indexname} to the +% promised text} +% \changes{spanish~4.1c}{00/10/04}{Added \cs{glossaryname}} +% \begin{macrocode} +\addto\captionsspanish{% + \def\prefacename{Prefacio}% + \def\refname{Referencias}% + \def\abstractname{Resumen}% + \def\bibname{Bibliograf\'{\i}a}% + \def\chaptername{Cap\'{\i}tulo}% + \def\appendixname{Ap\'endice}% + \def\listfigurename{\'Indice de figuras}% + \def\listtablename{\'Indice de cuadros}% + \def\indexname{\'Indice alfab\'etico}% + \def\figurename{Figura}% + \def\tablename{Cuadro}% + \def\partname{Parte}% + \def\enclname{Adjunto}% + \def\ccname{Copia a}% + \def\headtoname{A}% + \def\pagename{P\'agina}% + \def\seename{v\'ease}% + \def\alsoname{v\'ease tambi\'en}% + \def\proofname{Demostraci\'on}% + \def\glossaryname{Glosario}} + +\expandafter\ifx\csname chapter\endcsname\relax + \addto\captionsspanish{\def\contentsname{\'Indice}} +\else + \addto\captionsspanish{\def\contentsname{\'Indice general}} +\fi +% \end{macrocode} +% +% And the date. +% \changes{spanish~4.2a}{03/08/08}{Added the mechanism to +% select \textit{del} or \textit{de}} +% \begin{macrocode} +\def\datespanish{% + \def\today{\the\day~de \ifcase\month\or enero\or febrero\or + marzo\or abril\or mayo\or junio\or julio\or agosto\or + septiembre\or octubre\or noviembre\or diciembre\fi + \ de\ifnum\year>1999\es@yearl\fi~\the\year}} +\def\spanishdatedel{\def\es@yearl{l}} +\def\spanishdatede{\let\es@yearl\@empty} +\spanishdatede +% \end{macrocode} +% +% The basic macros to select the language, in the preamble or the +% config file. Use of |\selectlanguage| should be avoided at this +% early stage because the active chars are not yet +% active. |\selectspanish| makes them active. +% +% \begin{macrocode} +\def\selectspanish{% + \def\selectspanish{% + \def\selectspanish{% + \PackageWarning{spanish}{Extra \string\selectspanish ignored}}% + \es@select}} + +\@onlypreamble\selectspanish + +\def\es@select{% + \let\es@select\@undefined + \selectlanguage{spanish}% + \catcode`\"\active\catcode`\~=\active} +% \end{macrocode} +% +% Instead of joining all the extras directly in |\extrasspanish|, +% we subdivide them in three further groups. +% \changes{spanish~4.0a}{99/11/30}{The extras subdivided into three +% further groups.} +% \changes{spanish~4.2a}{03/08/08}{The dot is deactitated, too} +% \begin{macrocode} +\def\extrasspanish{% + \textspanish + \mathspanish + \ifx\shorthandsspanish\@empty + \spanishdeactivate{."'~<>}% + \languageshorthands{none}% + \else + \shorthandsspanish + \fi} +\def\noextrasspanish{% + \ifx\textspanish\@empty\else + \notextspanish + \fi + \ifx\mathspanish\@empty\else + \nomathspanish + \fi + \ifx\shorthandsspanish\@empty\else + \noshorthandsspanish + \fi + \es@reviveshorthands} +% \end{macrocode} +% +% And the first of these sub-groups is defined. +% +% \begin{macrocode} +\addto\textspanish{% + \babel@save\sptext + \def\sptext{\protect\es@sptext}} +% \end{macrocode} +% +% The definition of |\sptext| is more elaborated than that of +% |\textsuperscript|. With uppercase superscript text +% the scriptscriptsize is used. The mandatory dot is already +% included. There are two versions, depending on the +% format. +% +% \begin{macrocode} +\ifes@LaTeXe %<<<<<< + \newcommand\es@sptext[1]{% + {.\setbox\z@\hbox{8}\dimen@\ht\z@ + \csname S@\f@size\endcsname + \edef\@tempa{\def\noexpand\@tempc{#1}% + \lowercase{\def\noexpand\@tempb{#1}}}\@tempa + \ifx\@tempb\@tempc + \fontsize\sf@size\z@ + \selectfont + \advance\dimen@-1.15ex + \else + \fontsize\ssf@size\z@ + \selectfont + \advance\dimen@-1.5ex + \fi + \math@fontsfalse\raise\dimen@\hbox{#1}}} +\else %<<<<<< + \let\sptextfont\rm + \newcommand\es@sptext[1]{% + {.\setbox\z@\hbox{8}\dimen@\ht\z@ + \edef\@tempa{\def\noexpand\@tempc{#1}% + \lowercase{\def\noexpand\@tempb{#1}}}\@tempa + \ifx\@tempb\@tempc + \advance\dimen@-0.75ex + \raise\dimen@\hbox{$\scriptstyle\sptextfont#1$}% + \else + \advance\dimen@-0.8ex + \raise\dimen@\hbox{$\scriptscriptstyle\sptextfont#1$}% + \fi}} +\fi %<<<<<< +% \end{macrocode} +% +% Now, lowercase small caps. First, we test if there are actual +% small caps for the current font. If not, faked small caps are +% used. The \cs{selectfont} in \cs{es@lsc} could seem redundant, +% but it's not. +% +% \changes{spanishb~1.1}{98/05/11}{\cs{es@lsc} rewritten to +% incorporate the procedure so far available in +% \cs{roman} only} +% \changes{spanish~4.0e}{99/04/10}{Added \cs{leavevmode}} +% \begin{macrocode} +\ifes@LaTeXe %<<<<<< + \addto\textspanish{% + \babel@save\lsc + \def\lsc{\protect\es@lsc}} + + \def\es@lsc#1{% + \leavevmode + \hbox{\scshape\selectfont + \expandafter\ifx\csname\f@encoding/\f@family/\f@series + /n/\f@size\expandafter\endcsname + \csname\curr@fontshape/\f@size\endcsname + \csname S@\f@size\endcsname + \fontsize\sf@size\z@\selectfont + \PackageInfo{spanish}{Replacing undefined sc font\MessageBreak + shape by faked small caps}% + \MakeUppercase{#1}% + \else + \MakeLowercase{#1}% + \fi}} +\fi %<<<<<< +% \end{macrocode} +% +% The |quoting| environment. This part is not available +% in Plain, hence the test. Overriding the default |\everypar| is +% a bit tricky. +% +% \begin{macrocode} +\newif\ifes@listquot + +\ifes@plain\else %<<<<<< + \csname newtoks\endcsname\es@quottoks + \csname newcount\endcsname\es@quotdepth + + \newenvironment{quoting} + {\leavevmode + \advance\es@quotdepth1 + \csname lquot\romannumeral\es@quotdepth\endcsname% + \ifnum\es@quotdepth=\@ne + \es@listquotfalse + \let\es@quotpar\everypar + \let\everypar\es@quottoks + \everypar\expandafter{\the\es@quotpar}% + \es@quotpar{\the\everypar + \ifes@listquot\global\es@listquotfalse\else\es@quotcont\fi}% + \fi + \toks@\expandafter{\es@quotcont}% + \edef\es@quotcont{\the\toks@ + \expandafter\noexpand + \csname rquot\romannumeral\es@quotdepth\endcsname}} + {\csname rquot\romannumeral\es@quotdepth\endcsname} + + \def\lquoti{\guillemotleft{}} + \def\rquoti{\guillemotright{}} + \def\lquotii{``} + \def\rquotii{''} + \def\lquotiii{`} + \def\rquotiii{'} + + \let\es@quotcont\@empty +% \end{macrocode} +% +% If there is a margin par inside quoting, we don't add the +% quotes. |\es@listqout| stores the quotes to be used before +% item labels; otherwise they could appear after the labels. +% +% \begin{macrocode} + \addto\@marginparreset{\let\es@quotcont\@empty} + + \def\es@listquot{% + \csname rquot\romannumeral\es@quotdepth\endcsname + \global\es@listquottrue} +\fi %<<<<<< +% \end{macrocode} +% +% Now, the |\frenchspacing|, followed by |\...| and |\%| +% +% \changes{spanish~4.0e}{99/04/10}{Added ignorespaces to \cs{es@dots}} +% \changes{spanish~4.1d}{01/09/12}{Now there are two versions of +% percent sign} +% \begin{macrocode} +\addto\textspanish{\bbl@frenchspacing} +\addto\notextspanish{\bbl@nonfrenchspacing} + +\addto\textspanish{% + \let\es@save@dot\.% + \babel@save\.% + \def\.{\@ifnextchar.{\es@dots}{\es@save@dot}}} + +\def\es@dots..{\leavevmode\hbox{...}\spacefactor\@M} + +\ifes@LaTeXe %<<<<<< + \addto\textspanish{% + \let\percentsign\%% + \babel@save\%% + \def\%{\unskip\,\percentsign{}}} +\else + \addto\textspanish{% + \let\percentsign\%% + \babel@save\%% + \def\%{\unskip\ifmmode\,\else$\m@th\,$\fi\percentsign{}}} +\fi +% \end{macrocode} +% +% We follow with the math group. +% It's not easy to add an accent in an operator. +% The difficulty is that we must avoid using text (that is, +% |\mbox|) because we have no control on font and size, and +% at time we should access |\i|, which is a text +% command forbidden in math mode. |\dotlessi| must be +% converted to uppercase if necessary in \LaTeXe. There are +% two versions, depending on the format. +% +% \changes{spanishb~1.1}{98/04/01}{dotless math i handling +% rewritten} +% \changes{spanishb~1.1}{98/05/13}{Again rewriten in full. Now +% that character is accesible as \cs{dotlessi}} +% \changes{spanish~4.0c}{98/12/07}{Moved from its original place below. +% Decimal values replaced by hex ones.} +% \changes{spanish~4.0k}{99/10/12}{Minor improvementes in +% \cs{es@dotlessi}. Now it behaves like the dotlessi.sty package} +% \changes{spanish~4.1f}{02/05/17}{\cs{i} not used directly in +% the upper/lowercase list} +% \begin{macrocode} +\addto\mathspanish{% + \babel@save\dotlessi + \def\dotlessi{\protect\es@dotlessi}} + +\let\nomathspanish\relax %% Unused, but called + +\ifes@LaTeXe %<<<<<< + \def\es@texti{\i} + \addto\@uclclist{\dotlessi\es@texti} +\fi %<<<<<< + +\ifes@LaTeXe %<<<<<< + \def\es@dotlessi{% + \ifmmode + {\ifnum\mathgroup=\m@ne + \imath + \else + \count@\escapechar \escapechar=\m@ne + \expandafter\expandafter\expandafter + \split@name\expandafter\string\the\textfont\mathgroup\@nil + \escapechar=\count@ + \@ifundefined{\f@encoding\string\i}% + {\edef\f@encoding{\string?}}{}% + \expandafter\count@\the\csname\f@encoding\string\i\endcsname + \advance\count@"7000 + \mathchar\count@ + \fi}% + \else + \i + \fi} +\else %<<<<<< + \def\es@dotlessi{% + \ifmmode + \mathchar"7010 + \else + \i + \fi} +\fi %<<<<<< +% \end{macrocode} +% +% The switches for accents and spaces in math. +% +%\changes{spanish~4.0b}{98/11/10}{Added missing \cs{nolimits}} +%\changes{spanish~4.0c}{98/11/30}{Merged \cs{es@op@i} and +% \cs{es@op@a} into a single command. The (re)defided commands +% have been changed as suggested by JoseRa Portillo and Juan Luis +% Varona. Now it conforms the UNE 5010 norm. Code is no +% longer duplicated--\cs{operator@font} is defined for lplain +% instead} +%\changes{spanish~4.0c}{98/12/10}{Removed the explicit +% trigonometric declaration. While some functions are +% preceptive (sen, tg) some other are optional and +% defined in \cs{spanishoperators}. This is because there +% is no norm in Spanish and there is quite a chaos in their +% form. Restored the forms of v 1.1} +%\changes{spanish~4.0k}{99/10/13}{Restored the \cs{es@op@i} +% command, because we have to discriminate \cs{dotlessi} and i} +% +% \begin{macrocode} +\def\accentedoperators{% + \def\es@op@ac##1{\acute{##1}}% + \def\es@op@i{\acute{\dotlessi}}} +\def\unaccentedoperators{% + \def\es@op@ac##1{##1}% + \def\es@op@i{i}} +\accentedoperators + +\def\spacedoperators{\let\es@op@sp\,} +\def\unspacedoperators{\let\es@op@sp\@empty} +\spacedoperators +% \end{macrocode} +% +% The operators are stored in |\es@operators|, which in turn is +% included in the math group. Since |\operator@font| is +% defined in \LaTeXe{} only, we defined in the plain variant. +% +% \changes{spanish~4.0g}{99/05/05}{Restored the assignment of +% \cs{operator@font} which was misteriously missing} +% \changes{spanish~4.0i}{99/06/21}{Replaced wrong \cs{spanishoperators} +% by \cs{es@b}} +% \changes{spanish~4.0j}{99/09/17}{Removed an extra line in the lplain +% option} +% \changes{spanish~4.2a}{03/08/08}{Names including \cs{acute} can be +% formed} +% +% \begin{macrocode} +\addto\mathspanish{\es@operators} + +\ifes@LaTeXe\else %<<<<<< + \let\operator@font\rm + \def\@empty{} +\fi %<<<<<< + +\def\es@operators{% + \babel@save\lim + \def\lim{\mathop{\operator@font l\protect\es@op@i m}}% + \babel@save\limsup + \def\limsup{\mathop{\operator@font l\es@op@i m\,sup}}% + \babel@save\liminf + \def\liminf{\mathop{\operator@font l\es@op@i m\,inf}}% + \babel@save\max + \def\max{\mathop{\operator@font m\es@op@ac ax}}% + \babel@save\inf + \def\inf{\mathop{\operator@font \protect\es@op@i nf}}% + \babel@save\min + \def\min{\mathop{\operator@font m\protect\es@op@i n}}% + \babel@save\bmod + \def\bmod{% + \nonscript\mskip-\medmuskip\mkern5mu% + \mathbin{\operator@font m\es@op@ac od}\penalty900\mkern5mu% + \nonscript\mskip-\medmuskip}% + \babel@save\pmod + \def\pmod##1{% + \allowbreak\mkern18mu({\operator@font m\es@op@ac od}\,\,##1)}% + \def\es@a##1 {% + \es@delayed + \if^##1^\then % is it empty? do nothing and continue + \es@a + \else + \es@delayed + \if&##1\then % is it &? do nothing and finish + \else + \begingroup + \let\,\@empty % \, is ignored when def'ing the macro name + \let\acute\@firstofone % same + \edef\es@b{\expandafter\noexpand\csname##1\endcsname}% + \def\,{\noexpand\es@op@sp}% + \def\acute####1{% + \if i####1% + \noexpand\es@op@i + \else + \noexpand\es@op@ac####1% + \fi}% + \edef\es@a{\endgroup + \noexpand\babel@save\expandafter\noexpand\es@b + \def\expandafter\noexpand\es@b{% + \mathop{\noexpand\operator@font##1}\nolimits}}% + \es@a % It restores itself + \es@a + \fi + \fi}% + \let\es@b\spanishoperators + \addto\es@b{ }% + \expandafter\es@a\es@b sen tg arc\,sen arc\,cos arc\,tg & } + +\def\spanishoperators{cotg cosec senh tgh} +% \end{macrocode} +% +% Now comes the text shorthands. They are grouped in +% |\shorthandsspanish| and this style performs some +% operations before the babel shortands are called. +% The goals are to allow espression like |$a^{x'}$| +% and to deactivate the shorthands making them of +% category `other.' After providing a |\'i| shorthand, +% the new macros are defined. +% +% \changes{spanish~4.1a}{99/11/30}{Added basic code for +% spanish shorthands.} +% \changes{spanish~4.1a}{99/12/01}{Debugged and added support +% for the babel groups.} +% \changes{spanish~4.1c}{00/10/04}{Revised so that it +% now uses the babel shorthands} +% \changes{spanish~4.2a}{03/08/08}{Deactivation of dot as +% a special case} +% \begin{macrocode} +\DeclareTextCompositeCommand{\'}{OT1}{i}{\@tabacckludge'{\i}} + +\def\es@set@shorthand#1{% + \expandafter\edef\csname es@savecat\string#1\endcsname + {\the\catcode`#1}% + \initiate@active@char{#1}% + \catcode`#1=\csname es@savecat\string#1\endcsname\relax + \expandafter\let\csname es@math\string#1\expandafter\endcsname + \csname normal@char\string#1\endcsname} + +\def\es@use@shorthand{% + \es@delayed + \ifx\thepage\relax\then + \string + \else{% + \es@delayed + \ifx\protect\@unexpandable@protect\then + \noexpand + \else + \es@use@sh + \fi}% + \fi} + +\def\es@text@sh#1{\csname active@char\string#1\endcsname} +\def\es@math@sh#1{\csname es@math\string#1\endcsname} + +\def\es@use@sh{% + \es@delayed + \if@safe@actives\then + \string + \else{% + \es@delayed + \ifmmode\then + \es@math@sh + \else + \es@text@sh + \fi}% + \fi} + +\gdef\es@activate#1{% + \begingroup + \lccode`\~=`#1 + \lowercase{% + \endgroup + \def~{\es@use@shorthand~}}} + +\def\spanishdeactivate#1{% + \@tfor\@tempa:=#1\do{\expandafter\es@spdeactivate\@tempa}} + +\def\es@spdeactivate#1{% + \if.#1% + \mathcode`\.=\es@period@code + \else + \begingroup + \lccode`\~=`#1 + \lowercase{% + \endgroup + \expandafter\let\expandafter~% + \csname normal@char\string#1\endcsname}% + \catcode`#1\csname es@savecat\string#1\endcsname\relax + \fi} + +\def\es@reviveshorthands{% + \es@restore{"}\es@restore{~}% + \es@restore{<}\es@restore{>}% + \es@quoting} + +\def\es@restore#1{% + \catcode`#1=\active + \begingroup + \lccode`\~=`#1 + \lowercase{% + \endgroup + \bbl@deactivate{~}}} +% \end{macrocode} +% +% But \textsf{spanish} allows two category codes for |'|, +% so both should be taken into account in \cs{bbl@pr@m@s}. +% +% \changes{spanish~4.1c}{00/10/03}{Added support for primes +% which are either `active' or `other'} +% \begin{macrocode} +\begingroup +\catcode`\'=12 +\lccode`~=`' \lccode`'=`' +\lowercase{% +\gdef\bbl@pr@m@s{% + \es@delayed + \ifx~\@let@token\then + \pr@@@s + \else + {\es@delayed + \ifx'\@let@token\then + \pr@@@s + \else + {\es@delayed + \ifx^\@let@token\then + \pr@@@t + \else + \egroup + \fi}% + \fi}% + \fi}} +\endgroup +% \end{macrocode} +% +% \changes{spanishb~1.1}{98/05/15}{Rewritten part} +% \changes{spanish~4.0c}{98/12/07}{Optimized a bit} +% +% \begin{macrocode} +\expandafter\ifx\csname @tabacckludge\endcsname\relax + \let\es@tak\a +\else + \let\es@tak\@tabacckludge +\fi + +\ifes@LaTeXe %<<<<<< + \def\@tabacckludge#1{\expandafter\es@tak\string#1} + \let\a\@tabacckludge +\else\ifes@plain %<<<<<< + \def\@tabacckludge#1{\csname\string#1\endcsname} +\else %<<<<<< + \def\@tabacckludge#1{\csname a\string#1\endcsname} +\fi\fi %<<<<<< + +\expandafter\ifx\csname add@accent\endcsname\relax + \def\add@accent#1#2{\accent#1 #2} +\fi +% \end{macrocode} +% +% Instead of redefining |\'|, we redefine the internal +% macro for the OT1 encoding. +% \changes{spanish~4.1f}{02/05/17}{The spacefactor is restored +% with the method used in LaTeX2e} +% \begin{macrocode} +\ifes@LaTeXe %<<<<<< + \def\es@accent#1#2#3{% + \expandafter\@text@composite + \csname OT1\string#1\endcsname#3\@empty\@text@composite + {\bbl@allowhyphens\add@accent{#2}{#3}\bbl@allowhyphens + \setbox\@tempboxa\hbox{#3% + \global\mathchardef\accent@spacefactor\spacefactor}% + \spacefactor\accent@spacefactor}} +\else %<<<<<< + \def\es@accent#1#2#3{% + \bbl@allowhyphens\add@accent{#2}{#3}\bbl@allowhyphens + \spacefactor\sfcode`#3 } +\fi %<<<<<< +% \end{macrocode} +% +% The shorthands are activated in the aux file. Now, we begin +% the shorthands group. +% +% \changes{spanish~4.0j}{99/09/15}{Added shorthands for \cs{protect} +% following active chars. This way, they work in headers} +% \changes{spanish~4.0l}{99/11/13}{Added the \cs{es@activate} +% command, which makes the shorthands more robust in math mode. +% In particular, any of them may be followed by a closing brace} +% \begin{macrocode} +\addto\shorthandsspanish{\languageshorthands{spanish}} +\let\noshorthandsspanish\relax +% \end{macrocode} +% +% First, decimal comma. +% +% \changes{spanish~4.1c}{00/10/03}{Removed an unnecessary macro.} +% \begin{macrocode} +\def\spanishdecimal#1{\def\es@decimal{{#1}}} +\def\decimalcomma{\spanishdecimal{,}} +\def\decimalpoint{\spanishdecimal{.}} +\decimalcomma + +\es@set@shorthand{.} + +\@namedef{es@math\string.}{% + \@ifnextchar\egroup + {\mathchar\es@period@code\relax}% + {\es@text@sh.}} + +\declare@shorthand{system}{.}{\mathchar\es@period@code\relax} +% \end{macrocode} +% +% \changes{spanish~4.0a}{98/09/10}{After the . is activated, it is +% redefined to avoid errors if followed by a closing brace. +% Changed \cs{edef} by \cs{mathchardef}. Use +% \cs{babel@savevariable}instead of \cs{noextrasspanish}.} +% \changes{spanish~4.0e}{99/04/10}{The catcode is restored in +% the aux file, too} +% \begin{macrocode} +\addto\shorthandsspanish{% + \mathchardef\es@period@code\the\mathcode`\.% + \babel@savevariable{\mathcode`\.}% + \mathcode`\.="8000 % + \es@activate{.}} + +\AtBeginDocument{% + \catcode`\.=12 + \if@filesw + \immediate\write\@mainaux{% + \string\catcode`\string\.=12}% + \fi} + +\declare@shorthand{spanish}{.1}{\es@decimal1} +\declare@shorthand{spanish}{.2}{\es@decimal2} +\declare@shorthand{spanish}{.3}{\es@decimal3} +\declare@shorthand{spanish}{.4}{\es@decimal4} +\declare@shorthand{spanish}{.5}{\es@decimal5} +\declare@shorthand{spanish}{.6}{\es@decimal6} +\declare@shorthand{spanish}{.7}{\es@decimal7} +\declare@shorthand{spanish}{.8}{\es@decimal8} +\declare@shorthand{spanish}{.9}{\es@decimal9} +\declare@shorthand{spanish}{.0}{\es@decimal0} +% \end{macrocode} +% +% Now accents and tools +% +% \changes{spanish~4.0d}{99/03/26}{Removed the tilde settings +% because they are included in babel.def} +% \changes{spanish~4.0b}{98/10/02}{Introduced \cs{es@umlaut} to allow +% further division in words containing g\"u} +% \changes{spanish~4.0c}{98/12/02}{Added missing space at the end +% of \cs{es@umlaut}} +% \begin{macrocode} +\es@set@shorthand{"} +\def\es@umlaut#1{% + \bbl@allowhyphens\add@accent{127}#1\bbl@allowhyphens + \spacefactor\sfcode`#1 } +% \end{macrocode} +% +% We override the default |"| of babel, intended for german. +% +% \begin{macrocode} +\ifes@LaTeXe %<<<<<< + \addto\shorthandsspanish{% + \es@activate{"}% + \es@activate{~}% + \babel@save\bbl@umlauta + \let\bbl@umlauta\es@umlaut + \expandafter\babel@save\csname OT1\string\~\endcsname + \expandafter\def\csname OT1\string\~\endcsname{\es@accent\~{126}}% + \expandafter\babel@save\csname OT1\string\'\endcsname + \expandafter\def\csname OT1\string\'\endcsname{\es@accent\'{19}}} +\else %<<<<<< + \addto\shorthandsspanish{% + \es@activate{"}% + \es@activate{~}% + \babel@save\bbl@umlauta + \let\bbl@umlauta\es@umlaut + \babel@save\~% + \def\~{\es@accent\~{126}}% + \babel@save\'% + \def\'#1{\if#1i\es@accent\'{19}\i\else\es@accent\'{19}{#1}\fi}} +\fi %<<<<<< +% \end{macrocode} +% \changes{spanish~4.0c}{98/11/19}{Subtituted +% \cs{char}\cs{hyphenchar}\cs{font} for some instances of -} +% \changes{spanish~4.0h}{98/06/06}{Added \cs{deactivatetilden}} +% \changes{spanish~4.2a}{03/08/08}{Added raised ?` and !`} +% \changes{spanish~4.2b}{03/09/12}{Added er and ER} +% \begin{macrocode} +\declare@shorthand{spanish}{"a}{\protect\es@sptext{a}} +\declare@shorthand{spanish}{"A}{\protect\es@sptext{A}} +\declare@shorthand{spanish}{"o}{\protect\es@sptext{o}} +\declare@shorthand{spanish}{"O}{\protect\es@sptext{O}} +\declare@shorthand{spanish}{"e}{\protect\es@sptext@r{e}} +\declare@shorthand{spanish}{"E}{\protect\es@sptext@r{E}} + +\def\es@sptext@r#1#2{\es@sptext{#1#2}} + +\declare@shorthand{spanish}{"u}{\"u} +\declare@shorthand{spanish}{"U}{\"U} + +\declare@shorthand{spanish}{"c}{\c{c}} +\declare@shorthand{spanish}{"C}{\c{C}} + +\declare@shorthand{spanish}{"<}{\guillemotleft{}} +\declare@shorthand{spanish}{">}{\guillemotright{}} +\declare@shorthand{spanish}{"-}{\bbl@allowhyphens\-\bbl@allowhyphens} +\declare@shorthand{spanish}{"=}% + {\bbl@allowhyphens\char\hyphenchar\font\hskip\z@skip} +\declare@shorthand{spanish}{"~} + {\bbl@allowhyphens\discretionary{\char\hyphenchar\font}% + {\char\hyphenchar\font}{\char\hyphenchar\font}\bbl@allowhyphens} +\declare@shorthand{spanish}{"r} + {\bbl@allowhyphens\discretionary{\char\hyphenchar\font}% + {}{r}\bbl@allowhyphens} +\declare@shorthand{spanish}{"R} + {\bbl@allowhyphens\discretionary{\char\hyphenchar\font}% + {}{R}\bbl@allowhyphens} +\declare@shorthand{spanish}{"y} + {\@ifundefined{scalebox}% + {\ensuremath{\tau}}% + {\raisebox{1ex}{\scalebox{-1}{\resizebox{.45em}{1ex}{2}}}}} +\declare@shorthand{spanish}{""}{\hskip\z@skip} +\declare@shorthand{spanish}{"/} + {\setbox\z@\hbox{/}% + \dimen@\ht\z@ + \advance\dimen@-1ex + \advance\dimen@\dp\z@ + \dimen@.31\dimen@ + \advance\dimen@-\dp\z@ + \ifdim\dimen@>0pt + \kern.01em\lower\dimen@\box\z@\kern.03em + \else + \box\z@ + \fi} +\declare@shorthand{spanish}{"?} + {\setbox\z@\hbox{?`}% + \leavevmode\raise\dp\z@\box\z@} +\declare@shorthand{spanish}{"!} + {\setbox\z@\hbox{!`}% + \leavevmode\raise\dp\z@\box\z@} + +\es@set@shorthand{~} +\declare@shorthand{spanish}{~n}{\~n} +\declare@shorthand{spanish}{~N}{\~N} +\declare@shorthand{spanish}{~-}{% + \leavevmode + \bgroup + \let\@sptoken\es@dashes % This assignation changes the + \@ifnextchar-% \@ifnextchar behaviour + {\es@dashes}% + {\hbox{\char\hyphenchar\font}\egroup}} +\def\es@dashes-{% + \@ifnextchar-% + {\bbl@allowhyphens\hbox{---}\bbl@allowhyphens\egroup\@gobble}% + {\bbl@allowhyphens\hbox{--}\bbl@allowhyphens\egroup}} + +\def\deactivatetilden{% + \expandafter\let\csname spanish@sh@\string~@n@\endcsname\relax + \expandafter\let\csname spanish@sh@\string~@N@\endcsname\relax} +% \end{macrocode} +% +% The shorthands for |quoting|. +% +% \changes{spanish~4.1d}{01/09/10}{Disabled if in xmltex} +% \begin{macrocode} +\expandafter\ifx\csname XML@catcodes\endcsname\relax + \addto\es@select{% + \catcode`\<\active\catcode`\>=\active + \es@quoting} + + \es@set@shorthand{<} + \es@set@shorthand{>} + + \declare@shorthand{system}{<}{\csname normal@char\string<\endcsname} + \declare@shorthand{system}{>}{\csname normal@char\string>\endcsname} + + \addto\shorthandsspanish{% + \es@activate{<}% + \es@activate{>}} +% \end{macrocode} +% +% \changes{spanish~4.0e}{99/04/10}{\cs{es@quoting} is written to the +% aux file, too} +% \begin{macrocode} + \ifes@LaTeXe %<<<<<< + \AtBeginDocument{% + \es@quoting + \if@filesw + \immediate\write\@mainaux{\string\es@quoting}% + \fi}% + \fi %<<<<<< + + \def\activatequoting{% + \catcode`>=\active \catcode`<=\active + \let\es@quoting\activatequoting} + \def\deactivatequoting{% + \catcode`>=12 \catcode`<=12 + \let\es@quoting\deactivatequoting} + + \declare@shorthand{spanish}{<<}{\begin{quoting}} + \declare@shorthand{spanish}{>>}{\end{quoting}} +\fi + +\let\es@quoting\relax +\let\deactivatequoting\relax +\let\activatequoting\relax +% \end{macrocode} +% +% The acute accents are stored in a macro. If |activeacute| was set +% as an option it's executed. If not is not deleted for a possible +% later use in the |cfg| file. In non \LaTeXe{} formats is always +% executed. +% +% \changes{spanish~4.0l}{99/11/12}{We make a preevaluation of acute; +% in math mode, the shorthand mechanism is bypassed. That's done +% *after* the test of the protection status.} +% \begin{macrocode} +\def\es@activeacute{% + \es@set@shorthand{'}% + \addto\shorthandsspanish{\es@activate{'}}% + \addto\es@reviveshorthands{\es@restore{'}}% + \addto\es@select{\catcode`'=\active}% + \declare@shorthand{spanish}{'a}{\@tabacckludge'a}% + \declare@shorthand{spanish}{'A}{\@tabacckludge'A}% + \declare@shorthand{spanish}{'e}{\@tabacckludge'e}% + \declare@shorthand{spanish}{'E}{\@tabacckludge'E}% + \declare@shorthand{spanish}{'i}{\@tabacckludge'i}% + \declare@shorthand{spanish}{'I}{\@tabacckludge'I}% + \declare@shorthand{spanish}{'o}{\@tabacckludge'o}% + \declare@shorthand{spanish}{'O}{\@tabacckludge'O}% + \declare@shorthand{spanish}{'u}{\@tabacckludge'u}% + \declare@shorthand{spanish}{'U}{\@tabacckludge'U}% + \declare@shorthand{spanish}{'n}{\~n}% + \declare@shorthand{spanish}{'N}{\~N}% + \declare@shorthand{spanish}{''}{\textquotedblright}% + \let\es@activeacute\relax} + +\ifes@LaTeXe %<<<<<< + \@ifpackagewith{babel}{activeacute}{\es@activeacute}{} +\else %<<<<<< + \es@activeacute +\fi %<<<<<<% +% \end{macrocode} +% +% And the customization. By default these macros only +% store the values and do nothing. +% +% \begin{macrocode} +\def\es@enumerate#1#2#3#4{% + \def\es@enum{{#1}{#2}{#3}{#4}}} + +\def\es@itemize#1#2#3#4{% + \def\es@item{{#1}{#2}{#3}{#4}}} +% \end{macrocode} +% +% The part formerly in the |.lld| file comes here. It performs +% layout adaptation of \LaTeX{} to ``orthodox'' Spanish rules. +% \changes{spanish~4.1c}{00/09/30}{The box used in itemize made +% slightly smaller (.1ex).} +% \changes{spanish~4.1d}{02/01/25}{Removed extra \cs{enspace} +% which formatted differently \cs{item} with brackets.} +% \changes{spanish~4.2a}{03/08/08}{Added \cs{spanishsignitems}} +% \changes{spanish~4.2a}{03/08/08}{Mispaced \cs{es@enumerate} +% and \cs{es@itemize} moved into \cs{layoutspanish}} +% \changes{spanish~4.2b}{03/09/12}{If an entry toc has an +% empty \cs{numberline} the dot is not printed} +% \begin{macrocode} +\ifes@LaTeXe %<<<<<< + +\es@enumerate{1.}{a)}{1)}{a$'$} +\def\spanishdashitems{\es@itemize{---}{---}{---}{---}} +\def\spanishsymbitems{% + \es@itemize + {\leavevmode\hbox to 1.2ex + {\hss\vrule height .9ex width .7ex depth -.2ex\hss}}% + {\textbullet}% + {$\m@th\circ$}% + {$\m@th\diamond$}} +\def\spanishsignitems{% + \es@itemize + {\textbullet}% + {$\m@th\circ$}% + {$\m@th\diamond$}% + {$\m@th\triangleright$}} +\spanishsymbitems + +\def\es@enumdef#1#2#3\@@{% + \if#21% + \@namedef{theenum#1}{\arabic{enum#1}}% + \else\if#2a% + \@namedef{theenum#1}{\emph{\alph{enum#1}}}% + \else\if#2A% + \@namedef{theenum#1}{\Alph{enum#1}}% + \else\if#2i% + \@namedef{theenum#1}{\roman{enum#1}}% + \else\if#2I% + \@namedef{theenum#1}{\Roman{enum#1}}% + \else\if#2o% + \@namedef{theenum#1}{\arabic{enum#1}\protect\es@sptext{o}}% + \fi\fi\fi\fi\fi\fi + \toks@\expandafter{\csname theenum#1\endcsname} + \expandafter\edef\csname labelenum#1\endcsname + {\noexpand\es@listquot\the\toks@#3}} + +\addto\layoutspanish{% + \def\es@enumerate##1##2##3##4{% + \es@enumdef{i}##1\@empty\@empty\@@ + \es@enumdef{ii}##2\@empty\@empty\@@ + \es@enumdef{iii}##3\@empty\@empty\@@ + \es@enumdef{iv}##4\@empty\@empty\@@}% + \def\es@itemize##1##2##3##4{% + \def\labelitemi{\es@listquot##1}% + \def\labelitemii{\es@listquot##2}% + \def\labelitemiii{\es@listquot##3}% + \def\labelitemiv{\es@listquot##4}}% + \def\p@enumii{\theenumi}% + \def\p@enumiii{\theenumi\theenumii}% + \def\p@enumiv{\p@enumiii\theenumiii}% + \expandafter\es@enumerate\es@enum + \expandafter\es@itemize\es@item + \DeclareTextCommand{\guillemotleft}{OT1}{% + \ifmmode\ll + \else + \save@sf@q{\penalty\@M + \leavevmode\hbox{\usefont{U}{lasy}{m}{n}% + \char40 \kern-0.19em\char40 }}% + \fi}% + \DeclareTextCommand{\guillemotright}{OT1}{% + \ifmmode\gg + \else + \save@sf@q{\penalty\@M + \leavevmode\hbox{\usefont{U}{lasy}{m}{n}% + \char41 \kern-0.19em\char41 }}% + \fi}% + \def\@fnsymbol##1% + {\ifcase##1\or*\or**\or***\or****\or + *****\or******\else\@ctrerr\fi}% + \def\@alph##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 \~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\@Alph##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 \~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}% + \let\@afterindentfalse\@afterindenttrue + \@afterindenttrue + \def\@seccntformat##1{\csname the##1\endcsname.\quad}% + \def\numberline##1{\hb@xt@\@tempdima{##1\if&##1&\else.\fi\hfil}}% + \def\@roman##1{\protect\es@roman{\number##1}}% + \def\es@roman##1{\protect\es@lsc{\romannumeral##1}}% + \def\esromanindex##1##2{##1{\protect\es@lsc{##2}}}} +% \end{macrocode} +% +% We need to execute the following code when babel has been +% run, in order to see if |spanish| is the main language. +% +% \begin{macrocode} +\AtEndOfPackage{% + \let\es@activeacute\@undefined + \def\bbl@tempa{spanish}% + \ifx\bbl@main@language\bbl@tempa + \AtBeginDocument{\layoutspanish}% + \addto\es@select{% + \@ifstar{\let\layoutspanish\relax}% + {\layoutspanish\let\layoutspanish\relax}}% + \fi + \selectspanish} + +\fi %<<<<<< +% \end{macrocode} +% +% After restoring the catcode of |~| and setting the minimal +% values for hyphenation, the |.ldf| is finished. +% +% \changes{spanish~4.0e}{99/04/11}{Removed duplicated \cs{loadlocalcfg}} +% \changes{spanish~4.0a}{98/09/14}{Moved +% \cs{let}\cs{es@activeacute}\cs{@undefined} +% to \cs{AtEndOfPackage}} +% \changes{spanish~4.0a}{98/09/12}{Introduced \cs{ldf@finish}} +% \changes{spanish~4.1d}{01/06/06}{Removed extra \cs{endinput}} +% \begin{macrocode} +\es@savedcatcodes + +\providehyphenmins{\CurrentOption}{\tw@\tw@} + +\ifes@LaTeXe %<<<<<< + \ldf@finish{spanish} +\else %<<<<<< + \es@select + \ldf@finish{spanish} + \csname activatequoting\endcsname +\fi %<<<<<< + +% +% \end{macrocode} +% That's all in the main file. Now the file with +% \textsf{custom-bib} macros. +% +% \changes{spanish~4.0b}{98/11/09}{Added support for custom-bib} +% \changes{spanish~4.0i}{99/06/21}{the mthesis and phdthesis text +% were reverted. Fixed} +% \changes{spanish~4.0i}{99/06/21}{Added \cs{bbletal}} +% \begin{macrocode} +%<*bblbst> +\def\bbland{y} +\def\bbleditors{directores} \def\bbleds{dirs.\@} +\def\bbleditor{director} \def\bbled{dir.\@} +\def\bbledby{dirigido por} +\def\bbledition{edici\'on} \def\bbledn{ed.\@} +\def\bbletal{y otros} +\def\bblvolume{vol\'umen} \def\bblvol{vol.\@} +\def\bblof{de} +\def\bblnumber{n\'umero} \def\bblno{n\sptext{o}} +\def\bblin{en} +\def\bblpages{p\'aginas} \def\bblpp{p\'ags.\@} +\def\bblpage{p\'gina} \def\bblp{p\'ag.\@} +\def\bblchapter{cap\'itulo} \def\bblchap{cap.\@} +\def\bbltechreport{informe t\'ecnico} +\def\bbltechrep{inf.\@ t\'ec.\@} +\def\bblmthesis{proyecto de fin de carrera} +\def\bblphdthesis{tesis doctoral} +\def\bblfirst {primera} \def\bblfirsto {1\sptext{a}} +\def\bblsecond{segunda} \def\bblsecondo{2\sptext{a}} +\def\bblthird {tercera} \def\bblthirdo {3\sptext{a}} +\def\bblfourth{cuarta} \def\bblfourtho{4\sptext{a}} +\def\bblfifth {quinta} \def\bblfiftho {5\sptext{a}} +\def\bblth{\sptext{a}} +\let\bblst\bblth \let\bblnd\bblth \let\bblrd\bblth +\def\bbljan{enero} \def\bblfeb{febrero} \def\bblmar{marzo} +\def\bblapr{abril} \def\bblmay{mayo} \def\bbljun{junio} +\def\bbljul{julio} \def\bblaug{agosto} \def\bblsep{septiembre} +\def\bbloct{octubre}\def\bblnov{noviembre}\def\bbldec{diciembre} +% +% \end{macrocode} +% +% The |spanish| option writes a macro in the page field of +% \textit{MakeIndex} in entries with small caps number, and they +% are rejected. This program is a preprocessor which moves this +% macro to the entry field. +% +% \begin{macrocode} +%<*indexes> +\makeatletter + +\newcount\es@converted +\newcount\es@processed + +\def\es@encap{`\|} +\def\es@openrange{`\(} +\def\es@closerange{`\)} + +\def\es@split@file#1.#2\@@{#1} +\def\es@split@ext#1.#2\@@{#2} + +\typein[\answer]{^^JArchivo que convertir^^J% + (extension por omision .idx):} + +\@expandtwoargs\in@{.}{\answer} +\ifin@ + \edef\es@input@file{\expandafter\es@split@file\answer\@@} + \edef\es@input@ext{\expandafter\es@split@ext\answer\@@} +\else + \edef\es@input@file{\answer} + \def\es@input@ext{idx} +\fi + +\typein[\answer]{^^JArchivo de destino^^J% + (archivo por omision: \es@input@file.eix,^^J% + extension por omision .eix):} +\ifx\answer\@empty + \edef\es@output{\es@input@file.eix} +\else + \@expandtwoargs\in@{.}{\answer} + \ifin@ + \edef\es@output{\answer} + \else + \edef\es@output{\answer.eix} + \fi +\fi + +\typein[\answer]{% + ^^J?Se ha usado algun esquema especial de controles^^J% + de MakeIndex para encap, open_range o close_range?^^J% + [s/n] (n por omision)} + +\if s\answer + \typein[\answer]{^^JCaracter para 'encap'^^J% + (\string| por omision)} + \ifx\answer\@empty\else + \edef\es@encap{% + `\expandafter\noexpand\csname\expandafter\string\answer\endcsname} + \fi + \typein[\answer]{^^JCaracter para 'open_range'^^J% + (\string( por omision)} + \ifx\answer\@empty\else + \edef\es@openrange{% + `\expandafter\noexpand\csname\expandafter\string\answer\endcsname} + \fi + \typein[\answer]{^^JCaracter para 'close_range'^^J% + (\string) por omision)} + \ifx\answer\@empty\else + \edef\es@closerange{% + `\expandafter\noexpand\csname\expandafter\string\answer\endcsname} + \fi +\fi + +\newwrite\es@indexfile +\immediate\openout\es@indexfile=\es@output + +\newif\ifes@encapsulated + +\def\es@roman#1{\romannumeral#1 } +\edef\es@slash{\expandafter\@gobble\string\\} + +\def\indexentry{% + \begingroup + \@sanitize + \es@indexentry} + +\begingroup + +\catcode`\|=12 \lccode`\|=\es@encap\relax +\catcode`\(=12 \lccode`\(=\es@openrange\relax +\catcode`\)=12 \lccode`\)=\es@closerange\relax + +\lowercase{ +\gdef\es@indexentry#1{% + \endgroup + \advance\es@processed\@ne + \es@encapsulatedfalse + \es@bar@idx#1|\@@ + \es@idxentry}% +} + +\lowercase{ +\gdef\es@idxentry#1{% + \in@{\es@roman}{#1}% + \ifin@ + \advance\es@converted\@ne + \immediate\write\es@indexfile{% + \string\indexentry{\es@b|\ifes@encapsulated\es@p\fi esromanindex% + {\ifx\es@a\@empty\else\es@slash\es@a\fi}}{#1}}% + \else + \immediate\write\es@indexfile{% + \string\indexentry{\es@b\ifes@encapsulated|\es@p\es@a\fi}{#1}}% + \fi} +} + +\lowercase{ +\gdef\es@bar@idx#1|#2\@@{% + \def\es@b{#1}\def\es@a{#2}% + \ifx\es@a\@empty\else\es@encapsulatedtrue\es@bar@eat#2\fi} +} + +\lowercase{ +\gdef\es@bar@eat#1#2|{\def\es@p{#1}\def\es@a{#2}% + \edef\es@t{(}\ifx\es@t\es@p + \else\edef\es@t{)}\ifx\es@t\es@p + \else + \edef\es@a{\es@p\es@a}\let\es@p\@empty% + \fi\fi} +} + +\endgroup + +\input \es@input@file.\es@input@ext + +\immediate\closeout\es@indexfile + +\typeout{*****************} +\typeout{Se ha procesado: \es@input@file.\es@input@ext } +\typeout{Lineas leidas: \the\es@processed} +\typeout{Lineas convertidas: \the\es@converted} +\typeout{Resultado en: \es@output} +\ifnum\es@converted>\z@ + \typeout{Genere el indice a partir de ese archivo} +\else + \typeout{No se ha realizado ningun tipo de conversion} + \typeout{Se puede generar el archivo directamente^^J% + de \es@input@file.\es@input@ext} +\fi +\typeout{*****************} +\@@end +% +% \end{macrocode} +% +% \Finale +% +%% +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +%% +\endinput + + + + + diff --git a/Master/texmf-dist/source/generic/babel/spanish.ins b/Master/texmf-dist/source/generic/babel/spanish.ins new file mode 100644 index 00000000000..025a0f1c792 --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/spanish.ins @@ -0,0 +1,151 @@ +%% +%% This file will generate fast loadable files and documentation +%% driver files from the doc files in this package when run through +%% LaTeX or TeX. +%% +%% Copyright 1989-2005 Johannes L. Braams and any individual authors +%% listed elsewhere in this file. All rights reserved. +%% +%% This file is part of the Babel system. +%% -------------------------------------- +%% +%% It 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 +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% The Current Maintainer of this work is Johannes Braams. +%% +%% The list of all files belonging to the LaTeX base distribution is +%% given in the file `manifest.bbl. See also `legal.bbl' 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. +%% +%% --------------- start of docstrip commands ------------------ +%% +\def\batchfile{spanish.ins} +\def\filedate{2000/10/13} +\input docstrip.tex + +{\ifx\generate\undefined + \Msg{**********************************************} + \Msg{*} + \Msg{* This installation requires docstrip} + \Msg{* version 2.3c or later.} + \Msg{*} + \Msg{* An older version of docstrip has been input} + \Msg{*} + \Msg{**********************************************} + \errhelp{Move or rename old docstrip.tex.} + \errmessage{Old docstrip in input path} + \batchmode + \csname @@end\endcsname +\fi} + +\declarepreamble\mainpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl 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. +\endpreamble + +\declarepreamble\fdpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl for additional +information. + +In particular, permission is granted to customize the declarations in +this file to serve the needs of your installation. + +However, NO PERMISSION is granted to distribute a modified version +of this file under its original name. + +\endpreamble + +\keepsilent + +\usedir{tex/generic/babel} + +\keepsilent + +\usepreamble\mainpreamble +\generate{\file{spanish.ldf}{\from{spanish.dtx}{code}}% + \file{esbst.tex}{\from{spanish.dtx}{bblbst}}% + \file{romanidx.tex}{\from{spanish.dtx}{indexes}}} +\usepreamble\fdpreamble + +\ifToplevel{ +\Msg{***********************************************************} +\Msg{*} +\Msg{* To finish the installation you have to move the following} +\Msg{* files into a directory searched by TeX:} +\Msg{*} +\Msg{* \space\space All *.def, *.fd, *.ldf, *.sty} +\Msg{*} +\Msg{* To produce the documentation run the files ending with} +\Msg{* '.dtx' and `.fdd' through LaTeX.} +\Msg{*} +\Msg{* Happy TeXing} +\Msg{***********************************************************} +} + +\endinput diff --git a/Master/texmf-dist/source/generic/babel/swedish.dtx b/Master/texmf-dist/source/generic/babel/swedish.dtx new file mode 100644 index 00000000000..6beb68787b5 --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/swedish.dtx @@ -0,0 +1,442 @@ +% \iffalse meta-comment +% +% Copyright 1989-2005 Johannes L. Braams and any individual authors +% listed elsewhere in this file. All rights reserved. +% +% This file is part of the Babel system. +% -------------------------------------- +% +% It 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 +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2003/12/01 or later. +% +% This work has the LPPL maintenance status "maintained". +% +% The Current Maintainer of this work is Johannes Braams. +% +% The list of all files belonging to the Babel system is +% given in the file `manifest.bbl. See also `legal.bbl' 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 +% \CheckSum{272} +% \iffalse +% Tell the \LaTeX\ system who we are and write an entry on the +% transcript. +%<*dtx> +\ProvidesFile{swedish.dtx} +% +%\ProvidesLanguage{swedish} +%\fi +%\ProvidesFile{swedish.dtx} + [2005/03/31 v2.3d Swedish support from the babel system] +%\iffalse +%% File `swedish.dtx' +%% Babel package for LaTeX version 2e +%% Copyright (C) 1989 - 2005 +%% by Johannes Braams, TeXniek +% +%% Please report errors to: J.L. Braams +%% babel at braams.cistron.nl +% +% This file is part of the babel system, it provides the source +% code for the Swedish language definition file. A contribution +% was made by Sten Hellman HELLMAN@CERNVM.CERN.CH +% +% Further enhancements for version 2.0 were provided by +% Erik "Osthols +%<*filedriver> +\documentclass{ltxdoc} +\newcommand*\TeXhax{\TeX hax} +\newcommand*\babel{\textsf{babel}} +\newcommand*\langvar{$\langle \it lang \rangle$} +\newcommand*\note[1]{} +\newcommand*\Lopt[1]{\textsf{#1}} +\newcommand*\file[1]{\texttt{#1}} +\begin{document} + \DocInput{swedish.dtx} +\end{document} +% +%\fi +% \GetFileInfo{swedish.dtx} +% +% \changes{swedish-1.0a}{1991/07/15}{Renamed \file{babel.sty} in +% \file{babel.com}} +% \changes{swedish-1.1}{1992/02/16}{Brought up-to-date with babel 3.2a} +% \changes{swedish-1.2}{1994/02/27}{Update for LaTeX2e} +% \changes{swedish-1.3d}{1994/06/26}{Removed the use of \cs{filedate} +% and moved identification after the loading of \file{babel.def}} +% \changes{swedish-1.3e}{1995/05/28}{Update for release 3.5} +% \changes{swedish-2.0}{1996/01/24}{Introduced active double quote} +% \changes{swedish-2.1}{1996/10/10}{Replaced \cs{undefined} with +% \cs{@undefined} and \cs{empty} with \cs{@empty} for consistency +% with \LaTeX, moved the definition of \cs{atcatcode} right to the +% beginning.} +% \changes{swedish-2.3d}{2001/11/16}{Fixed a \cs{changes} entry} +% +% \section{The Swedish language} +% +% The file \file{\filename}\footnote{The file described in this +% section has version number \fileversion\ and was last revised on +% \filedate. Contributions were made by Sten Hellman +% (\texttt{HELLMAN@CERNVM.CERN.CH}) and Erik \"Osthols +% (\texttt{erik\_osthols@yahoo.com}).} defines all the +% language-specific macros for the Swedish language. This +% file has borrowed heavily from |finnish.dtx| and |germanb.dtx|. +% +% For this language the character |"| is made active. In +% table~\ref{tab:swedish-quote} an overview is given of its +% purpose. The vertical placement of the "umlaut" in some letters +% can be controlled this way. +% \begin{table}[htb] +% \begin{center} +% \begin{tabular}{lp{8cm}} +% |"a| & Gives \"a, also implemented for |"A|, |"o| and |"O|. \\ +% |"w|, |"W| & gives {\aa} and {\AA}. \\ +% |"ff| & for |ff| to be hyphenated as |ff-f|. Used for compound +% words, such as \texttt{stra|"|ff{\aa}nge}, which +% should be hyphenated as \texttt{straff-f{\aa}nge}. +% This is also implemented for b, d, f, g, l, m, n, +% p, r, s, and t. \\ +% \verb="|= & disable ligature at this position. This should be +% used for compound words, such as +% ``\texttt{stra|"|ffinr\"attning}'', +% which should not have the ligature ``ffi''. \\ +% |"-| & an explicit hyphen sign, allowing hyphenation +% in the rest of the word, such as e. g. in +% ``x|"-|axeln''. \\ +% |""| & like |"-|, but producing no hyphen sign +% (for words that should break at some sign such as +% \texttt{och/|""|eller}). \\ +% |"~| & for an explicit hyphen without a breakpoint; useful for +% expressions such as ``2|"~|3 veckor'' where no linebreak +% is desirable. \\ +% |"=| & an explicit hyphen sign allowing subsequent hyphenation, +% for expressions such as ``studiebidrag och \newline +% -l{\aa}n''. \\ +% |\-| & like the old |\-|, but allowing hyphenation +% in the rest of the word. \\ +% \end{tabular} +% \caption{The extra definitions made +% by \file{swedish.sty}}\label{tab:swedish-quote} +% \end{center} +% \end{table} +% +% Two variations for formatting of dates are added. \cs{datesymd} +% makes \cs{today} output dates formatted as YYYY-MM-DD, which is +% commonly used in Sweden today. \cs{datesdmy} formats the date as +% D/M YYYY, which is also very common in Sweden. These commands +% should be issued after \cs{begin{document}}. +% +% \StopEventually{} +% +% The macro |\LdfInit| takes care of preventing that this file is +% loaded more than once, checking the category code of the +% \texttt{@} sign, etc. +% \changes{swedish-2.1}{1996/11/03}{Now use \cs{LdfInit} to perform +% initial checks} +% \begin{macrocode} +%<*code> +\LdfInit{swedish}\captionsswedish +% \end{macrocode} +% +% When this file is read as an option, i.e. by the |\usepackage| +% command, \texttt{swedish} will be an `unknown' language in which +% case we have to make it known. So we check for the existence of +% |\l@swedish| to see whether we have to do something here. +% +% \changes{swedish-1.0c}{1991/10/29}{Removed use of \cs{@ifundefined}} +% \changes{swedish-1.1}{1992/02/16}{Added a warning when no hyphenation +% patterns were loaded.} +% \changes{swedish-1.3d}{1994/06/26}{Now use \cs{@nopatterns} to +% producew the warning} +% \begin{macrocode} +\ifx\l@swedish\@undefined + \@nopatterns{Swedish} + \adddialect\l@swedish0\fi +% \end{macrocode} +% +% The next step consists of defining commands to switch to the +% Swedish language. The reason for this is that a user might want +% to switch back and forth between languages. +% +% \begin{macro}{\captionsswedish} +% The macro |\captionsswedish| defines all strings used in the four +% standard documentclasses provided with \LaTeX. +% \changes{swedish-1.0b}{1991/08/21}{removed type in definition of +% \cs{contentsname}} +% \changes{swedish-1.0b}{1991/08/21}{added definition for \cs{enclname}} +% \changes{swedish-1.0b}{1991/08/21}{made definition of \cs{refname} +% pluralis} +% \changes{swedish-1.1}{1992/02/16}{Added \cs{seename}, \cs{alsoname} +% and \cs{prefacename}} +% \changes{swedish-1.1}{1993/07/15}{\cs{headpagename} should be +% \cs{pagename}} +% \changes{swedish-1.1b}{1993/09/16}{Added translations} +% \changes{swedish-1.3d}{1994/07/27}{Changed \cs{aa} to +% \cs{csname}\texttt{ aa}\cs{endcsname}, to make \cs{uppercase} do +% the right thing} +% \changes{swedish-1.3f}{1995/07/04}{Added \cs{proofname} for +% AMS-\LaTeX} +% \begin{macrocode} +\addto\captionsswedish{% + \def\prefacename{F\"orord}% + \def\refname{Referenser}% + \def\abstractname{Sammanfattning}% + \def\bibname{Litteraturf\"orteckning}% + \def\chaptername{Kapitel}% + \def\appendixname{Bilaga}% + \def\contentsname{Inneh\csname aa\endcsname ll}% + \def\listfigurename{Figurer}% + \def\listtablename{Tabeller}% + \def\indexname{Sakregister}% + \def\figurename{Figur}% + \def\tablename{Tabell}% + \def\partname{Del}% +% \end{macrocode} +% \changes{swedish-2.3a}{2000/01/19}{Added full stop after ``Bil''} +% \begin{macrocode} + \def\enclname{Bil.}% + \def\ccname{Kopia f\"or k\"annedom}% + \def\headtoname{Till}% in letter + \def\pagename{Sida}% + \def\seename{se}% +% \end{macrocode} +% \changes{swedish-1.3e}{1995/05/29}{Changed \cs{alsoname} from +% `\texttt{se ocks\aa}'} +% \begin{macrocode} + \def\alsoname{se \"aven}% +% \end{macrocode} +% \changes{swedish-1.3g}{1995/11/03}{Replaced `Proof' by its +% translation} +% \changes{swedish-2.3b}{2000/09/26}{Added \cs{glossaryname}} +% \changes{swedish-2.3c}{2001/03/12}{Provided translation for +% Glossary} +% \begin{macrocode} + \def\proofname{Bevis}% + \def\glossaryname{Ordlista}% + }% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\dateswedish} +% The macro |\dateswedish| redefines the command |\today| to +% produce Swedish dates. +% \changes{swedish-2.2}{1997/10/01}{Use \cs{edef} to define +% \cs{today} to save memory} +% \changes{swedish-2.2}{1998/03/28}{use \cs{def} instead of +% \cs{edef}} +% \begin{macrocode} +\def\dateswedish{% + \def\today{% + \number\day~\ifcase\month\or + januari\or februari\or mars\or april\or maj\or juni\or + juli\or augusti\or september\or oktober\or november\or + december\fi + \space\number\year}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\datesymd} +% \changes{swedish-2.3a}{2000/01/20}{Command added} +% The macro |\datesymd| redefines the command |\today| to +% produce dates in the format YYYY-MM-DD, common in Sweden. +% \begin{macrocode} +\def\datesymd{% + \def\today{\number\year-\two@digits\month-\two@digits\day}% + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\datesdmy} +% \changes{swedish-2.3a}{2000/01/20}{Command added} +% The macro |\datesdmy| redefines the command |\today| to +% produce Swedish dates in the format DD/MM YYYY, also common in +% Sweden. +% \begin{macrocode} +\def\datesdmy{% + \def\today{\number\day/\number\month\space\number\year}% + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\swedishhyphenmins} +% The swedish hyphenation patterns can be used with |\lefthyphenmin| +% set to~2 and |\righthyphenmin| set to~2. +% \changes{swedish-1.3e}{1995/06/02}{use \cs{swedishhyphenmins} to +% store the correct values} +% \begin{macrocode} +\providehyphenmins{swedish}{\tw@\tw@} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\extrasswedish} +% \changes{swedish-1.3e}{1995/05/29}{Added \cs{bbl@frenchspacing}} +% \begin{macro}{\noextrasswedish} +% \changes{swedish-1.3e}{1995/05/29}{Added \cs{bbl@nonfrenchspacing}} +% The macro |\extrasswedish| performs all the extra definitions +% needed for the Swedish language. The macro |\noextrasswedish| is +% used to cancel the actions of |\extrasswedish|. +% +% For Swedish texts |\frenchspacing| should be in effect. We make +% sure this is the case and reset it if necessary. +% +% \begin{macrocode} +\addto\extrasswedish{\bbl@frenchspacing} +\addto\noextrasswedish{\bbl@nonfrenchspacing} +% \end{macrocode} +% +% For Swedish the \texttt{"} character is made active. This is done +% once, later on its definition may vary. +% \changes{swedish-2.0}{1996/01/24}{Added active double quote +% character} +% +% \begin{macrocode} +\initiate@active@char{"} +\addto\extrasswedish{\languageshorthands{swedish}} +\addto\extrasswedish{\bbl@activate{"}} +% \end{macrocode} +% Don't forget to turn the shorthands off again. +% \changes{swedish-2.2b}{1999/12/17}{Deactivate shorthands ouside of +% Swedish} +% \begin{macrocode} +\addto\noextrasswedish{\bbl@deactivate{"}} +% \end{macrocode} +% The ``umlaut'' accent macro |\"| is changed to lower the +% ``umlaut'' dots. The redefinition is done with the help of +% |\umlautlow|. +%^^A PROBLEM: +%^^A What happens to ``umlaut'' +%^^A characters entered using e. g. latin input encoding? They should +%^^A be lowered as well. +% \begin{macrocode} +\addto\extrasswedish{\babel@save\"\umlautlow} +\addto\noextrasswedish{\umlauthigh} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% The code above is necessary because we need an extra active +% character. This character is then used as indicated in +% table~\ref{tab:swedish-quote}. +% +% To be able to define the function of |"|, we first define a +% couple of `support' macros. +% +% \begin{macro}{\dq} +% We save the original double quote character in |\dq| to keep +% it available, the math accent |\"| can now be typed as |"|. +% \begin{macrocode} +\begingroup \catcode`\"12 +\def\x{\endgroup + \def\@SS{\mathchar"7019 } + \def\dq{"}} +\x +% \end{macrocode} +% \end{macro} +% +% Now we can define the doublequote macros: the umlauts and {\aa}. +% \changes{swedish-2.3a}{2000/01/20}{added \cs{allowhyphens}} +% \begin{macrocode} +\declare@shorthand{swedish}{"w}{\textormath{{\aa}\allowhyphens}{\ddot w}} +\declare@shorthand{swedish}{"a}{\textormath{\"{a}\allowhyphens}{\ddot a}} +\declare@shorthand{swedish}{"o}{\textormath{\"{o}\allowhyphens}{\ddot o}} +\declare@shorthand{swedish}{"W}{\textormath{{\AA}\allowhyphens}{\ddot W}} +\declare@shorthand{swedish}{"A}{\textormath{\"{A}\allowhyphens}{\ddot A}} +\declare@shorthand{swedish}{"O}{\textormath{\"{O}\allowhyphens}{\ddot O}} +% \end{macrocode} +% discretionary commands +%^^A PROBLEM: +%^^A Will these allow subsequent hyphenation? Perhaps we need to +%^^A add \cs{allowhyphens} here as well? +% \begin{macrocode} +\declare@shorthand{swedish}{"b}{\textormath{\bbl@disc b{bb}}{b}} +\declare@shorthand{swedish}{"B}{\textormath{\bbl@disc B{BB}}{B}} +\declare@shorthand{swedish}{"d}{\textormath{\bbl@disc d{dd}}{d}} +\declare@shorthand{swedish}{"D}{\textormath{\bbl@disc D{DD}}{D}} +\declare@shorthand{swedish}{"f}{\textormath{\bbl@disc f{ff}}{f}} +\declare@shorthand{swedish}{"F}{\textormath{\bbl@disc F{FF}}{F}} +\declare@shorthand{swedish}{"g}{\textormath{\bbl@disc g{gg}}{g}} +\declare@shorthand{swedish}{"G}{\textormath{\bbl@disc G{GG}}{G}} +\declare@shorthand{swedish}{"l}{\textormath{\bbl@disc l{ll}}{l}} +\declare@shorthand{swedish}{"L}{\textormath{\bbl@disc L{LL}}{L}} +\declare@shorthand{swedish}{"m}{\textormath{\bbl@disc m{mm}}{m}} +\declare@shorthand{swedish}{"M}{\textormath{\bbl@disc M{MM}}{M}} +\declare@shorthand{swedish}{"n}{\textormath{\bbl@disc n{nn}}{n}} +\declare@shorthand{swedish}{"N}{\textormath{\bbl@disc N{NN}}{N}} +\declare@shorthand{swedish}{"p}{\textormath{\bbl@disc p{pp}}{p}} +\declare@shorthand{swedish}{"P}{\textormath{\bbl@disc P{PP}}{P}} +\declare@shorthand{swedish}{"r}{\textormath{\bbl@disc r{rr}}{r}} +\declare@shorthand{swedish}{"R}{\textormath{\bbl@disc R{RR}}{R}} +\declare@shorthand{swedish}{"s}{\textormath{\bbl@disc s{ss}}{s}} +\declare@shorthand{swedish}{"S}{\textormath{\bbl@disc S{SS}}{S}} +\declare@shorthand{swedish}{"t}{\textormath{\bbl@disc t{tt}}{t}} +\declare@shorthand{swedish}{"T}{\textormath{\bbl@disc T{TT}}{T}} +% \end{macrocode} +% and some additional commands: +% \def\indexeqs{=} +% \changes{swedish-2.3a}{2000/01/28}{changed definition of +% \texttt{"\protect\indexeqs}, \cs{-} and \texttt{"~}} +% \begin{macrocode} +\declare@shorthand{swedish}{"-}{\nobreak-\bbl@allowhyphens} +\declare@shorthand{swedish}{"|}{% + \textormath{\nobreak\discretionary{-}{}{\kern.03em}% + \bbl@allowhyphens}{}} +\declare@shorthand{swedish}{""}{\hskip\z@skip} +\declare@shorthand{swedish}{"~}{% + \textormath{\leavevmode\hbox{-}\bbl@allowhyphens}{-}} +\declare@shorthand{swedish}{"=}{\hbox{-}\allowhyphens} +% \end{macrocode} +% +% \begin{macro}{\-} +% Redefinition of |\-|. The new version of |\-| should indicate an +% extra hyphenation position, while allowing other hyphenation +% positions to be generated automatically. The standard behaviour +% of \TeX\ in this respect is very unfortunate for languages such +% as Dutch, Finnish, German and Swedish, where long compound words +% are quite normal and all one needs is a means to indicate an +% extra hyphenation position on top of the ones that \TeX\ can +% generate from the hyphenation patterns. +% \begin{macrocode} +\addto\extrasswedish{\babel@save\-} +\addto\extrasswedish{\def\-{\allowhyphens + \discretionary{-}{}{}\allowhyphens}} +% \end{macrocode} +% \end{macro} +% +% The macro |\ldf@finish| takes care of looking for a +% configuration file, setting the main language to be switched on +% at |\begin{document}| and resetting the category code of +% \texttt{@} to its original value. +% \changes{swedish-2.1}{1996/11/03}{Now use \cs{ldf@finish} to wrap up} +% \begin{macrocode} +\ldf@finish{swedish} +% +% \end{macrocode} +% +%\Finale +%% +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +%% +\endinput diff --git a/Master/texmf-dist/source/generic/babel/swedish.ins b/Master/texmf-dist/source/generic/babel/swedish.ins new file mode 100644 index 00000000000..34916c0021f --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/swedish.ins @@ -0,0 +1,148 @@ +%% +%% This file will generate fast loadable files and documentation +%% driver files from the doc files in this package when run through +%% LaTeX or TeX. +%% +%% Copyright 1989-2005 Johannes L. Braams and any individual authors +%% listed elsewhere in this file. All rights reserved. +%% +%% This file is part of the Babel system. +%% -------------------------------------- +%% +%% It 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 +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% The Current Maintainer of this work is Johannes Braams. +%% +%% The list of all files belonging to the LaTeX base distribution is +%% given in the file `manifest.bbl. See also `legal.bbl' 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. +%% +%% --------------- start of docstrip commands ------------------ +%% +\def\filedate{1999/04/11} +\def\batchfile{swedish.ins} +\input docstrip.tex + +{\ifx\generate\undefined +\Msg{**********************************************} +\Msg{*} +\Msg{* This installation requires docstrip} +\Msg{* version 2.3c or later.} +\Msg{*} +\Msg{* An older version of docstrip has been input} +\Msg{*} +\Msg{**********************************************} +\errhelp{Move or rename old docstrip.tex.} +\errmessage{Old docstrip in input path} +\batchmode +\csname @@end\endcsname +\fi} + +\declarepreamble\mainpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl 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. +\endpreamble + +\declarepreamble\fdpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl for additional +information. + +In particular, permission is granted to customize the declarations in +this file to serve the needs of your installation. + +However, NO PERMISSION is granted to distribute a modified version +of this file under its original name. + +\endpreamble + +\keepsilent + +\usedir{tex/generic/babel} + +\usepreamble\mainpreamble +\generate{\file{swedish.ldf}{\from{swedish.dtx}{code}} + } +\usepreamble\fdpreamble + +\ifToplevel{ +\Msg{***********************************************************} +\Msg{*} +\Msg{* To finish the installation you have to move the following} +\Msg{* files into a directory searched by TeX:} +\Msg{*} +\Msg{* \space\space All *.def, *.fd, *.ldf, *.sty} +\Msg{*} +\Msg{* To produce the documentation run the files ending with} +\Msg{* '.dtx' and `.fdd' through LaTeX.} +\Msg{*} +\Msg{* Happy TeXing} +\Msg{***********************************************************} +} + +\endinput diff --git a/Master/texmf-dist/source/generic/babel/turkish.dtx b/Master/texmf-dist/source/generic/babel/turkish.dtx new file mode 100644 index 00000000000..2ec69bc6bee --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/turkish.dtx @@ -0,0 +1,309 @@ +% \iffalse meta-comment +% +% Copyright 1989-2005 Johannes L. Braams and any individual authors +% listed elsewhere in this file. All rights reserved. +% +% This file is part of the Babel system. +% -------------------------------------- +% +% It 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 +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2003/12/01 or later. +% +% This work has the LPPL maintenance status "maintained". +% +% The Current Maintainer of this work is Johannes Braams. +% +% The list of all files belonging to the Babel system is +% given in the file `manifest.bbl. See also `legal.bbl' 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 +% \CheckSum{179} +% \iffalse +% Tell the \LaTeX\ system who we are and write an entry on the +% transcript. +%<*dtx> +\ProvidesFile{turkish.dtx} +% +%\ProvidesLanguage{turkish} +%\fi +%\ProvidesFile{turkish.dtx} + [2005/03/31 v1.2m Turkish support from the babel system] +%\iffalse +%% File `turkish.dtx' +%% Babel package for LaTeX version 2e +%% Copyright (C) 1989 - 2005 +%% by Johannes Braams, TeXniek +% +%% Please report errors to: J.L. Braams +%% babel at braams.cistron.nl +% +%% Turkish Language Definition File +%% Copyright (C) 1994 - 2005 +%% by Mustafa Burc +%% rz6001@rziris01.rrz.uni-hamburg.de +%% (40) 2503476 +% +% This file is part of the babel system, it provides the source +% code for the Turkish language definition file. +%<*filedriver> +\documentclass{ltxdoc} +\newcommand*\TeXhax{\TeX hax} +\newcommand*\babel{\textsf{babel}} +\newcommand*\langvar{$\langle \it lang \rangle$} +\newcommand*\note[1]{} +\newcommand*\Lopt[1]{\textsf{#1}} +\newcommand*\file[1]{\texttt{#1}} +\begin{document} + \DocInput{turkish.dtx} +\end{document} +% +%\fi +% \GetFileInfo{turkish.dtx} +% +% \changes{turkish-1.2}{1994/02/27}{Update for \LaTeXe} +% \changes{turkish-1.2c}{1994/06/26}{Removed the use of \cs{filedate} +% and moved identification after the loading of \file{babel.def}} +% \changes{turkish-1.2h}{1996/07/13}{Replaced \cs{undefined} with +% \cs{@undefined} and \cs{empty} with \cs{@empty} for consistency +% with \LaTeX} +% \changes{turkish-1.2i}{1996/10/10}{Moved the definition of +% \cs{atcatcode} right to the beginning.} +% +% \section{The Turkish language} +% +% The file \file{\filename}\footnote{The file described in this +% section has version number \fileversion\ and was last revised on +% \filedate.} defines all the language definition macros for the +% Turkish language\footnote{Mustafa Burc, +% \texttt{z6001@rziris01.rrz.uni-hamburg.de} provided the code for +% this file. It is based on the work by Pierre Mackay; Turgut Uyar, +% \texttt{uyar@cs.itu.edu.tr} supplied additional translations in +% version 1.2j and later}. +% +% Turkish typographic rules specify that a little `white space' +% should be added before the characters `\texttt{:}', `\texttt{!}' +% and `\texttt{=}'. In order to insert this white space +% automatically these characters are made `active'. Also +% |\frenhspacing| is set. +% +% \StopEventually{} +% +% The macro |\LdfInit| takes care of preventing that this file is +% loaded more than once, checking the category code of the +% \texttt{@} sign, etc. +% \changes{turkish-1.2i}{1996/11/03}{ow use \cs{LdfInit} to perform +% initial checks} +% \begin{macrocode} +%<*code> +\LdfInit{turkish}\captionsturkish +% \end{macrocode} +% +% When this file is read as an option, i.e. by the |\usepackage| +% command, \texttt{turkish} could be an `unknown' language in which +% case we have to make it known. So we check for the existence of +% |\l@turkish| to see whether we have to do something here. +% +% \changes{turkish-1.2c}{1994/06/26}{Now use \cs{@nopatterns} to +% produce the warning} +% \begin{macrocode} +\ifx\l@turkish\@undefined + \@nopatterns{Turkish} + \adddialect\l@turkish0\fi +% \end{macrocode} +% +% The next step consists of defining commands to switch to (and +% from) the Turkish language. +% +% \begin{macro}{\captionsturkish} +% The macro |\captionsturkish| defines all strings used in the four +% standard documentclasses provided with \LaTeX. +% \changes{turkish-1.1}{1993/07/15}{\cs{headpagename} should be +% \cs{pagename}} +% \changes{turkish-1.2b}{1994/06/04}{Added braces behind \cs{i} in +% strings} +% \changes{turkish-1.2f}{1995/07/04}{Added \cs{proofname} for +% AMS-\LaTeX} +% \changes{turkish-1.2j}{1997/09/29}{Added and modified translations} +% \changes{turkish-1.2k}{1999/04/18}{Incorporated some more +% corrections} +% \changes{turkish-1.2m}{2000/09/20}{Added \cs{glossaryname}} +% \begin{macrocode} +\addto\captionsturkish{% + \def\prefacename{\"Ons\"oz}% + \def\refname{Kaynaklar}% + \def\abstractname{\"Ozet}% + \def\bibname{Kaynak\c ca}% + \def\chaptername{B\"ol\"um}% + \def\appendixname{Ek}% + \def\contentsname{\.I\c cindekiler}% + \def\listfigurename{\c Sekil Listesi}% + \def\listtablename{Tablo Listesi}% + \def\indexname{Dizin}% + \def\figurename{\c Sekil}% + \def\tablename{Tablo}% + \def\partname{K\i s\i m}% + \def\enclname{\.Ili\c sik}% + \def\ccname{Di\u ger Al\i c\i lar}% + \def\headtoname{Al\i c\i}% + \def\pagename{Sayfa}% + \def\subjectname{\.Ilgili}% + \def\seename{bkz.}% + \def\alsoname{ayr\i ca bkz.}% + \def\proofname{Kan\i t}% + \def\glossaryname{Glossary}% <-- Needs translation +}% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\dateturkish} +% The macro |\dateturkish| redefines the command |\today| to +% produce Turkish dates. +% \changes{turkish-1.2b}{1994/06/04}{Added braces behind \cs{i} in +% strings} +% \changes{turkish-1.2d}{1995/01/31}{removed extra closing brace, +% \cs{mont} should be \cs{month}} +% \changes{turkish-1.2j}{1997/10/01}{Use \cs{edef} to define +% \cs{today} to save memory} +% \changes{turkish-1.2j}{1998/03/28}{use \cs{def} instead of +% \cs{edef}} +% \changes{turkish-1.2l}{1999/05/17}{removed dot from the date format} +% \begin{macrocode} +\def\dateturkish{% + \def\today{\number\day~\ifcase\month\or + Ocak\or \c Subat\or Mart\or Nisan\or May\i{}s\or Haziran\or + Temmuz\or A\u gustos\or Eyl\"ul\or Ekim\or Kas\i{}m\or + Aral\i{}k\fi + \space\number\year}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\extrasturkish} +% \changes{turkish-1.2e}{1995/05/15}{Completely rewrote macro} +% \begin{macro}{\noextrasturkish} +% The macro |\extrasturkish| will perform all the extra definitions +% needed for the Turkish language. The macro |\noextrasturkish| is +% used to cancel the actions of |\extrasturkish|. +% +% Turkish typographic rules specify that a little `white space' +% should be added before the characters `\texttt{:}', `\texttt{!}' +% and `\texttt{=}'. In order to insert this white space +% automatically these characters are made |\active|, so they have +% to be treated in a special way. +% \begin{macrocode} +\initiate@active@char{:} +\initiate@active@char{!} +\initiate@active@char{=} +% \end{macrocode} +% We specify that the turkish group of shorthands should be used. +% \begin{macrocode} +\addto\extrasturkish{\languageshorthands{turkish}} +% \end{macrocode} +% These characters are `turned on' once, later their definition may +% vary. +% \begin{macrocode} +\addto\extrasturkish{% + \bbl@activate{:}\bbl@activate{!}\bbl@activate{=}} +% \end{macrocode} +% +% For Turkish texts |\frenchspacing| should be in effect. We +% make sure this is the case and reset it if necessary. +% \changes{turkish-1.2e}{1995/05/15}{now use \cs{bbl@frenchspacing} +% and \cs{bbl@nonfrenchspacing}} +% \begin{macrocode} +\addto\extrasturkish{\bbl@frenchspacing} +\addto\noextrasturkish{\bbl@nonfrenchspacing} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\turkish@sh@!@} +% \begin{macro}{\turkish@sh@=@} +% \begin{macro}{\turkish@sh@:@} +% The definitions for the three active characters were made using +% intermediate macros. These are defined now. The insertion of +% extra `white space' should only happen outside math mode, hence +% the check |\ifmmode| in the macros. +% \changes{turkish-1.2d}{1995/01/31}{Added missing \cs{def}} +% \changes{turkish-1.2e}{1995/05/15}{Use the new mechanism of +% \cs{declare@shorthand}} +%%^^A JLB:: this code breaks during \begin{document} +%%^^A JLB: Needs fixing!! +% \begin{macrocode} +\declare@shorthand{turkish}{:}{% + \ifmmode + \string:% + \else\relax + \ifhmode + \ifdim\lastskip>\z@ + \unskip\penalty\@M\thinspace + \fi + \fi + \string:% + \fi} +\declare@shorthand{turkish}{!}{% + \ifmmode + \string!% + \else\relax + \ifhmode + \ifdim\lastskip>\z@ + \unskip\penalty\@M\thinspace + \fi + \fi + \string!% + \fi} +\declare@shorthand{turkish}{=}{% + \ifmmode + \string=% + \else\relax + \ifhmode + \ifdim\lastskip>\z@ + \unskip\kern\fontdimen2\font + \kern-1.4\fontdimen3\font + \fi + \fi + \string=% + \fi} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% The macro |\ldf@finish| takes care of looking for a +% configuration file, setting the main language to be switched on +% at |\begin{document}| and resetting the category code of +% \texttt{@} to its original value. +% \changes{turkish-1.2i}{1996/11/03}{Now use \cs{ldf@finish} to wrap +% up} +% \begin{macrocode} +\ldf@finish{turkish} +% +% \end{macrocode} +% +% \Finale +%% +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +%% +\endinput diff --git a/Master/texmf-dist/source/generic/babel/turkish.ins b/Master/texmf-dist/source/generic/babel/turkish.ins new file mode 100644 index 00000000000..9e7af81a31a --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/turkish.ins @@ -0,0 +1,148 @@ +%% +%% This file will generate fast loadable files and documentation +%% driver files from the doc files in this package when run through +%% LaTeX or TeX. +%% +%% Copyright 1989-2005 Johannes L. Braams and any individual authors +%% listed elsewhere in this file. All rights reserved. +%% +%% This file is part of the Babel system. +%% -------------------------------------- +%% +%% It 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 +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% The Current Maintainer of this work is Johannes Braams. +%% +%% The list of all files belonging to the LaTeX base distribution is +%% given in the file `manifest.bbl. See also `legal.bbl' 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. +%% +%% --------------- start of docstrip commands ------------------ +%% +\def\filedate{1999/04/11} +\def\batchfile{turkish.ins} +\input docstrip.tex + +{\ifx\generate\undefined +\Msg{**********************************************} +\Msg{*} +\Msg{* This installation requires docstrip} +\Msg{* version 2.3c or later.} +\Msg{*} +\Msg{* An older version of docstrip has been input} +\Msg{*} +\Msg{**********************************************} +\errhelp{Move or rename old docstrip.tex.} +\errmessage{Old docstrip in input path} +\batchmode +\csname @@end\endcsname +\fi} + +\declarepreamble\mainpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl 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. +\endpreamble + +\declarepreamble\fdpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl for additional +information. + +In particular, permission is granted to customize the declarations in +this file to serve the needs of your installation. + +However, NO PERMISSION is granted to distribute a modified version +of this file under its original name. + +\endpreamble + +\keepsilent + +\usedir{tex/generic/babel} + +\usepreamble\mainpreamble +\generate{\file{turkish.ldf}{\from{turkish.dtx}{code}} + } +\usepreamble\fdpreamble + +\ifToplevel{ +\Msg{***********************************************************} +\Msg{*} +\Msg{* To finish the installation you have to move the following} +\Msg{* files into a directory searched by TeX:} +\Msg{*} +\Msg{* \space\space All *.def, *.fd, *.ldf, *.sty} +\Msg{*} +\Msg{* To produce the documentation run the files ending with} +\Msg{* '.dtx' and `.fdd' through LaTeX.} +\Msg{*} +\Msg{* Happy TeXing} +\Msg{***********************************************************} +} + +\endinput diff --git a/Master/texmf-dist/source/generic/babel/ukraineb.dtx b/Master/texmf-dist/source/generic/babel/ukraineb.dtx new file mode 100644 index 00000000000..7f118d5934c --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/ukraineb.dtx @@ -0,0 +1,1158 @@ +% \iffalse meta-comment +% +% Copyright 1989-2005 Johannes L. Braams and any individual authors +% listed elsewhere in this file. All rights reserved. +% +% This file is part of the Babel system. +% -------------------------------------- +% +% It 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 +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2003/12/01 or later. +% +% This work has the LPPL maintenance status "maintained". +% +% The Current Maintainer of this work is Johannes Braams. +% +% The list of all files belonging to the Babel system is +% given in the file `manifest.bbl. See also `legal.bbl' 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 +% \CheckSum{1472} +% +% \iffalse +% Tell the \LaTeX\ system who we are and write an entry on the +% transcript. +%<*dtx> +\ProvidesFile{ukraineb.dtx} +% +%\ProvidesLanguage{ukraineb} + [2005/03/30 v1.1k Ukrainian support from the babel system] +% +%% File `ukraineb.dtx' +%% Babel package for LaTeX version 2e +%% Copyright (C) 1989 - 2005 +%% by Johannes Braams, TeXniek +% +%% ukraineb Language Definition File +%% Copyright (C) 1997 - 2005 +%% by Andrij Shvaika ashv at icmp.lviv.ua +% +%% derived from the Russianb Language Definition File +%% Copyright (C) 1995 - 2005 +%% by Olga Lapko cyrtug at mir.msk.su +%% Johannes Braams, TeXniek +% adapted to the new T2 and X2 Cyrillic encodings +% by Vladimir Volovich TeX at vvv.vsu.ru +% Werner Lemberg wl at gnu.org +% +%% Please report errors to: J.L. Braams +%% babel at braams.cistron.nl +% +%<*filedriver> +\documentclass{ltxdoc} +\newcommand\TeXhax{\TeX hax} +\newcommand\babel{\textsf{babel}} +\newcommand\langvar{$\langle \it lang \rangle$} +\newcommand\note[1]{} +\newcommand\Lopt[1]{\textsf{#1}} +\newcommand\file[1]{\texttt{#1}} +\newcommand\pkg[1]{\texttt{#1}} +\begin{document} + \DocInput{ukraineb.dtx} +\end{document} +% +%\fi +% \GetFileInfo{ukraineb.dtx} +% +% \changes{ukraineb-1.1e}{1999/08/19}{replaced all \cs{penalty}\cs{@M} +% with \cs{nobreak}} +% +% \section{The Ukrainian language} +% +% The file \file{\filename}\footnote{The file described in this +% section has version number \fileversion. +% This file was derived from the \file{russianb.dtx} version 1.1g.} +% defines all the language-specific macros for the Ukrainian +% language. It needs the file \file{cyrcod} for success documentation +% with Ukrainian encodings (see below). +% +% For this language the character |"| is made active. In +% table~\ref{tab:ukrainian-quote} an overview is given of its +% purpose. +% +% \begin{table}[htb] +% \begin{center} +% \begin{tabular}{lp{8cm}} +% \verb="|= & disable ligature at this position. \\ +% |"-| & an explicit hyphen sign, allowing hyphenation +% in the rest of the word. \\ +% |"---| & Cyrillic emdash in plain text. \\ +% |"--~| & Cyrillic emdash in compound names (surnames). \\ +% |"--*| & Cyrillic emdash for denoting direct speech. \\ +% |""| & like |"-|, but producing no hyphen sign +% (for compund words with hyphen, e.g.\ |x-""y| +% or some other signs as ``disable/enable''). \\ +% |"~| & for a compound word mark without a breakpoint. \\ +% |"=| & for a compound word mark with a breakpoint, allowing +% hyphenation in the composing words. \\ +% |",| & thinspace for initials with a breakpoint +% in following surname. \\ +% |"`| & for German left double quotes +% (looks like ,\kern-0.08em,). \\ +% |"'| & for German right double quotes (looks like ``). \\%'' +% |"<| & for French left double quotes (looks like $<\!\!<$). \\ +% |">| & for French right double quotes (looks like $>\!\!>$). \\ +% \end{tabular} +% \caption{The extra definitions made +% by \file{ukraineb}}\label{tab:ukrainian-quote} +% \end{center} +% \end{table} +% +% The quotes in table~\ref{tab:ukrainian-quote} (see, also +% table~\ref{tab:russian-quote}) can also be typeset by using the commands +% in table~\ref{tab:umore-quote} (see, also table~\ref{tab:rmore-quote}). +% +% \begin{table}[htb] +% \begin{center} +% \begin{tabular}{lp{8cm}} +% |\cdash---| & Cyrillic emdash in plain text. \\ +% |\cdash--~| & Cyrillic emdash in compound names (surnames). \\ +% |\cdash--*| & Cyrillic emdash for denoting direct speech. \\ +% |\glqq| & for German left double quotes +% (looks like ,\kern-0.08em,). \\ +% |\grqq| & for German right double quotes (looks like ``). \\%'' +% |\flqq| & for French left double quotes (looks like $<\!\!<$). \\ +% |\frqq| & for French right double quotes (looks like $>\!\!>$). \\ +% |\dq| & the original quotes character (|"|). \\ +% \end{tabular} +% \caption{More commands which produce quotes, defined +% by \babel}\label{tab:umore-quote} +% \end{center} +% \end{table} +% +% The French quotes are also available as ligatures `|<<|' and `|>>|' in +% 8-bit Cyrillic font encodings (\texttt{LCY}, \texttt{X2}, \texttt{T2*}) +% and as `|<|' and `|>|' characters in 7-bit Cyrillic font encodings +% (\texttt{OT2} and \texttt{LWN}). +% +% The quotation marks traditionally used in Ukrainian and Russian +% languages were borrowed from other languages (e.g. French and German) +% so they keep their original names. +% +% \StopEventually{} +% +% The macro |\LdfInit| takes care of preventing that this file is loaded +% more than once, checking the category code of the \texttt{@} sign, etc. +% +% \begin{macrocode} +%<*code> +\LdfInit{ukrainian}{captionsukrainian} +% \end{macrocode} +% +% When this file is read as an option, i.e., by the |\usepackage| +% command, \texttt{ukraineb} will be an `unknown' language, in which case +% we have to make it known. So we check for the existence of |\l@ukrainian| +% to see whether we have to do something here. +% +% \begin{macrocode} +\ifx\l@ukrainian\@undefined + \@nopatterns{Ukrainian} + \adddialect\l@ukrainian0 +\fi +% \end{macrocode} +% +% \begin{macro}{\latinencoding} +% +% We need to know the encoding for text that is supposed to be which is +% active at the end of the \babel\ package. If the \pkg{fontenc} package +% is loaded later, then\ldots too bad! +% +% \begin{macrocode} +\let\latinencoding\cf@encoding +% \end{macrocode} +% +% \end{macro} +% +% The user may choose between different available Cyrillic +% encodings---e.g., \texttt{X2}, \texttt{LCY}, or \texttt{LWN}.\@ +% Hopefully, \texttt{X2} will eventually replace the two latter encodings +% (\texttt{LCY} and \texttt{LWN}).\@ If the user wants to use another +% font encoding than the default (\texttt{T2A}), he has to load the +% corresponding file \emph{before} \file{ukraineb.sty}. This may be done +% in the following way: +% +% \begin{verbatim} +% % override the default X2 encoding used in Babel +% \usepackage[LCY,OT1]{fontenc} +% \usepackage[english,ukrainian]{babel} +% \end{verbatim} +% \unskip +% +% Note: for the Ukrainian language, the \texttt{T2A} encoding is better than +% \texttt{X2}, because \texttt{X2} does not contain Latin letters, and +% users should be very careful to switch the language every time they +% want to typeset a Latin word inside a Ukrainian phrase or vice versa. +% +% We parse the |\cdp@list| containing the encodings known to \LaTeX\ in +% the order they were loaded. We set the |\cyrillicencoding| to the +% \emph{last} loaded encoding in the list of supported Cyrillic +% encodings: \texttt{OT2}, \texttt{LWN}, \texttt{LCY}, \texttt{X2}, +% \texttt{T2C}, \texttt{T2B}, \texttt{T2A}, if any. +% +% \begin{macrocode} +\def\reserved@a#1#2{% + \edef\reserved@b{#1}% + \edef\reserved@c{#2}% + \ifx\reserved@b\reserved@c + \let\cyrillicencoding\reserved@c + \fi} +\def\cdp@elt#1#2#3#4{% + \reserved@a{#1}{OT2}% + \reserved@a{#1}{LWN}% + \reserved@a{#1}{LCY}% + \reserved@a{#1}{X2}% + \reserved@a{#1}{T2C}% + \reserved@a{#1}{T2B}% + \reserved@a{#1}{T2A}} +\cdp@list +% \end{macrocode} +% +% Now, if |\cyrillicencoding| is undefined, then the user did not load +% any of supported encodings. So, we have to set |\cyrillicencoding| to +% some default value. We test the presence of the encoding definition +% files in the order from less preferable to more preferable encodings. +% We use the lowercase names (i.e., \file{lcyenc.def} instead of +% \file{LCYenc.def}). +% +% \begin{macrocode} +\ifx\cyrillicencoding\undefined + \IfFileExists{ot2enc.def}{\def\cyrillicencoding{OT2}}\relax + \IfFileExists{lwnenc.def}{\def\cyrillicencoding{LWN}}\relax + \IfFileExists{lcyenc.def}{\def\cyrillicencoding{LCY}}\relax + \IfFileExists{x2enc.def}{\def\cyrillicencoding{X2}}\relax + \IfFileExists{t2cenc.def}{\def\cyrillicencoding{T2C}}\relax + \IfFileExists{t2benc.def}{\def\cyrillicencoding{T2B}}\relax + \IfFileExists{t2aenc.def}{\def\cyrillicencoding{T2A}}\relax +% \end{macrocode} +% +% If |\cyrillicencoding| is still undefined, then the user seems not to +% have a properly installed distribution. A fatal error. +% +% \begin{macrocode} + \ifx\cyrillicencoding\undefined + \PackageError{babel}% + {No Cyrillic encoding definition files were found}% + {Your installation is incomplete.\MessageBreak + You need at least one of the following files:\MessageBreak + \space\space + x2enc.def, t2aenc.def, t2benc.def, t2cenc.def,\MessageBreak + \space\space + lcyenc.def, lwnenc.def, ot2enc.def.}% + \else +% \end{macrocode} +% +% We avoid |\usepackage[\cyrillicencoding]{fontenc}| because we don't +% want to force the switch of |\encodingdefault|. +% +% \begin{macrocode} + \lowercase + \expandafter{\expandafter\input\cyrillicencoding enc.def\relax}% + \fi +\fi +% \end{macrocode} +% +% \begin{verbatim} +% \PackageInfo{babel} +% {Using `\cyrillicencoding' as a default Cyrillic encoding}% +% \end{verbatim} +% \unskip +% +% \begin{macrocode} +\DeclareRobustCommand{\Ukrainian}{% + \fontencoding\cyrillicencoding\selectfont + \let\encodingdefault\cyrillicencoding + \expandafter\set@hyphenmins\ukrainianhyphenmins + \language\l@ukrainian}% +\DeclareRobustCommand{\English}{% + \fontencoding\latinencoding\selectfont + \let\encodingdefault\latinencoding + \expandafter\set@hyphenmins\englishhyphenmins + \language\l@english}% +\let\Ukr\Ukrainian +\let\Eng\English +\let\cyrillictext\Ukrainian +\let\cyr\Ukrainian +% \end{macrocode} +% +% Since the \texttt{X2} encoding does not contain Latin letters, we +% should make some redefinitions of \LaTeX\ macros which implicitly +% produce Latin letters. +% +% \begin{macrocode} +\expandafter\ifx\csname T@X2\endcsname\relax\else +% \end{macrocode} +% +% We put |\latinencoding| in braces to avoid problems with +% |\@alph| inside minipages (e.g., footnotes inside minipages) where +% |\@alph| is expanded and we get for example `|\fontencoding OT1|' +% (|\fontencoding| is robust). +% +% \begin{macrocode} + \def\@alph#1{{\fontencoding{\latinencoding}\selectfont + \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\else\@ctrerr\fi}}% + \def\@Alph#1{{\fontencoding{\latinencoding}\selectfont + \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\else\@ctrerr\fi}}% +% \end{macrocode} +% +% Unfortunately, the commands |\AA| and |\aa| are not encoding dependent +% in \LaTeX\ (unlike e.g., |\oe| or |\DH|). They are defined as |\r{A}| and +% |\r{a}|. This leads to unpredictable results when the font encoding +% does not contain the Latin letters `A' and `a' (like \texttt{X2}). +% +% \begin{macrocode} + \DeclareTextSymbolDefault{\AA}{OT1} + \DeclareTextSymbolDefault{\aa}{OT1} + \DeclareTextCommand{\aa}{OT1}{\r a} + \DeclareTextCommand{\AA}{OT1}{\r A} +\fi +% \end{macrocode} +% +% The following block redefines the character class of uppercase Greek +% letters and some accents, if it is equal to 7 (variable family), to +% avoid incorrect results if the font encoding in some math family does +% not contain these characters in places of OT1 encoding. The code was +% taken from |amsmath.dtx|. See comments and further explanation there. +% +% \changes{ukraineb-1.1i}{2001/02/21}{As this code generates a +% textfont 7 error it is commented out for now.} +% \begin{macrocode} +% \begingroup\catcode`\"=12 +% % uppercase greek letters: +% \def\@tempa#1{\expandafter\@tempb\meaning#1\relax\relax\relax\relax +% "0000\@nil#1} +% \def\@tempb#1"#2#3#4#5#6\@nil#7{% +% \ifnum"#2=7 \count@"1#3#4#5\relax +% \ifnum\count@<"1000 \else \global\mathchardef#7="0#3#4#5\relax \fi +% \fi} +% \@tempa\Gamma\@tempa\Delta\@tempa\Theta\@tempa\Lambda\@tempa\Xi +% \@tempa\Pi\@tempa\Sigma\@tempa\Upsilon\@tempa\Phi\@tempa\Psi +% \@tempa\Omega +% % some accents: +% \def\@tempa#1#2\@nil{\def\@tempc{#1}}\def\@tempb{\mathaccent} +% \expandafter\@tempa\hat\relax\relax\@nil +% \ifx\@tempb\@tempc +% \def\@tempa#1\@nil{#1}% +% \def\@tempb#1{\afterassignment\@tempa\mathchardef\@tempc=}% +% \def\do#1"#2{} +% \def\@tempd#1{\expandafter\@tempb#1\@nil +% \ifnum\@tempc>"FFF +% \xdef#1{\mathaccent"\expandafter\do\meaning\@tempc\space}% +% \fi} +% \@tempd\hat\@tempd\check\@tempd\tilde\@tempd\acute\@tempd\grave +% \@tempd\dot\@tempd\ddot\@tempd\breve\@tempd\bar +% \fi +% \endgroup +% \end{macrocode} +% +% The user must use the \pkg{inputenc} package when any 8-bit Cyrillic +% font encoding is used, selecting one of the Cyrillic input encodings. +% We do not assume any default input encoding, so the user should +% explicitly call the \pkg{inputenc} package by |\usepackage{inputenc}|. +% We also removed |\AtBeginDocument|, so \pkg{inputenc} should be used +% before \babel. +% +% \changes{ukraineb-1.1f}{1999/08/27}{Made not using inputenc a +% warning instead of an error} +% \begin{macrocode} +\@ifpackageloaded{inputenc}{}{% + \def\reserved@a{LWN}% + \ifx\reserved@a\cyrillicencoding\else + \def\reserved@a{OT2}% + \ifx\reserved@a\cyrillicencoding\else + \PackageWarning{babel}% + {No input encoding specified for Ukrainian language} + \fi\fi} +% \end{macrocode} +% +% Now we define two commands that offer the possibility to switch between +% Cyrillic and Roman encodings. +% +% \begin{macro}{\cyrillictext} +% \begin{macro}{\latintext} +% +% The command |\cyrillictext| will switch from Latin font encoding to the +% Cyrillic font encoding, the command |\latintext| switches back. This +% assumes that the `normal' font encoding is a Latin one. These commands +% are \emph{declarations}, for shorter peaces of text the commands +% |\textlatin| and |\textcyrillic| can be used. +% +% \changes{ukraineb-1.1j}{2003/10/12}{\cs{latintext} is already +% defined by the core of \babel} +% \begin{macrocode} +%\DeclareRobustCommand{\latintext}{% +% \fontencoding{\latinencoding}\selectfont +% \def\encodingdefault{\latinencoding}} +\let\lat\latintext +% \end{macrocode} +% +% \end{macro} +% \end{macro} +% +% \begin{macro}{\textcyrillic} +% \begin{macro}{\textlatin} +% +% These commands take an argument which is then typeset using the +% requested font encoding. +% \changes{ukraineb-1.1j}{2003/10/12}{\cs{latintext} is already +% defined by the core of \babel} +% \begin{macrocode} +\DeclareTextFontCommand{\textcyrillic}{\cyrillictext} +%\DeclareTextFontCommand{\textlatin}{\latintext} +% \end{macrocode} +% +% \end{macro} +% \end{macro} +% +% We make the \TeX +% \begin{macrocode} +%\ifx\ltxTeX\undefined\let\ltxTeX\TeX\fi +%\ProvideTextCommandDefault{\TeX}{\textlatin{\ltxTeX}} +% \end{macrocode} +% and \LaTeX\ logos encoding independent. +% \begin{macrocode} +%\ifx\ltxLaTeX\undefined\let\ltxLaTeX\LaTeX\fi +%\ProvideTextCommandDefault{\LaTeX}{\textlatin{\ltxLaTeX}} +% \end{macrocode} +% +% The next step consists of defining commands to switch to (and +% from) the Ukrainian language. +% +% \begin{macro}{\captionsukrainian} +% +% The macro |\captionsukrainian| defines all strings used in the four +% standard document classes provided with \LaTeX. The two commands |\cyr| +% and |\lat| activate Cyrillic resp.\ Latin encoding. +% \changes{ukraineb-1.1d}{1999/04/03}{replace \cs{CYRUKRI} with +% \cs{CYRII} in \cs{authorname} } +% \changes{ukraineb-1.1g}{2000/09/20}{Added \cs{glossaryname}} +% \changes{ukraineb-1.1h}{2001/02/13}{Added translation for +% `Glossary'} +% \begin{macrocode} +\addto\captionsukrainian{% + \def\prefacename{{\cyr\CYRV\cyrs\cyrt\cyru\cyrp}}% +% \def\prefacename{{\cyr\CYRP\cyre\cyrr\cyre\cyrd\cyrm\cyro\cyrv\cyra}}% + \def\refname{% + {\cyr\CYRL\cyrii\cyrt\cyre\cyrr\cyra\cyrt\cyru\cyrr\cyra}}% +% \def\refname{% +% {\cyr\CYRP\cyre\cyrr\cyre\cyrl\cyrii\cyrk +% \ \cyrp\cyro\cyrs\cyri\cyrl\cyra\cyrn\cyrsftsn}}% + \def\abstractname{% + {\cyr\CYRA\cyrn\cyro\cyrt\cyra\cyrc\cyrii\cyrya}}% +% \def\abstractname{{\cyr\CYRR\cyre\cyrf\cyre\cyrr\cyra\cyrt}}% + \def\bibname{% + {\cyr\CYRB\cyrii\cyrb\cyrl\cyrii\cyro\cyrgup\cyrr\cyra\cyrf\cyrii\cyrya}}% +% \def\bibname{{\cyr\CYRL\cyrii\cyrt\cyre\cyrr\cyra\cyrt\cyru\cyrr\cyra}}% + \def\chaptername{{\cyr\CYRR\cyro\cyrz\cyrd\cyrii\cyrl}}% +% \def\chaptername{{\cyr\CYRG\cyrl\cyra\cyrv\cyra}}% + \def\appendixname{{\cyr\CYRD\cyro\cyrd\cyra\cyrt\cyro\cyrk}}% + \def\contentsname{{\cyr\CYRZ\cyrm\cyrii\cyrs\cyrt}}% + \def\listfigurename{{\cyr\CYRP\cyre\cyrr\cyre\cyrl\cyrii\cyrk + \ \cyrii\cyrl\cyryu\cyrs\cyrt\cyrr\cyra\cyrc\cyrii\cyrishrt}}% + \def\listtablename{{\cyr\CYRP\cyre\cyrr\cyre\cyrl\cyrii\cyrk + \ \cyrt\cyra\cyrb\cyrl\cyri\cyrc\cyrsftsn}}% + \def\indexname{{\cyr\CYRP\cyro\cyrk\cyra\cyrzh\cyrch\cyri\cyrk}}% + \def\authorname{{\cyr\CYRII\cyrm\cyre\cyrn\cyrn\cyri\cyrishrt + \ \cyrp\cyro\cyrk\cyra\cyrzh\cyrch\cyri\cyrk}}% + \def\figurename{{\cyr\CYRR\cyri\cyrs.}}% +% \def\figurename{\cyr\CYRR\cyri\cyrs\cyru\cyrn\cyro\cyrk}}% + \def\tablename{{\cyr\CYRT\cyra\cyrb\cyrl.}}% +% \def\tablename{\cyr\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyrya}}% + \def\partname{{\cyr\CYRCH\cyra\cyrs\cyrt\cyri\cyrn\cyra}}% + \def\enclname{{\cyr\cyrv\cyrk\cyrl\cyra\cyrd\cyrk\cyra}}% + \def\ccname{{\cyr\cyrk\cyro\cyrp\cyrii\cyrya}}% + \def\headtoname{{\cyr\CYRD\cyro}}% + \def\pagename{{\cyr\cyrs.}}% +% \def\pagename{{\cyr\cyrs\cyrt\cyro\cyrr\cyrii\cyrn\cyrk\cyra}}% + \def\seename{{\cyr\cyrd\cyri\cyrv.}}% + \def\alsoname{{\cyr\cyrd\cyri\cyrv.\ \cyrt\cyra\cyrk\cyro\cyrzh}} + \def\proofname{{\cyr\CYRD\cyro\cyrv\cyre\cyrd\cyre\cyrn\cyrn\cyrya}}% + \def\glossaryname{{\cyr\CYRS\cyrl\cyro\cyrv\cyrn\cyri\cyrk\ % + \cyrt\cyre\cyrr\cyrm\cyrii\cyrn\cyrii\cyrv}}% + } +% \end{macrocode} +% +% \end{macro} +% +% \begin{macro}{\dateukrainian} +% +% The macro |\dateukrainian| redefines the command |\today| to produce +% Ukrainian dates. +% +% \begin{macrocode} +\def\dateukrainian{% + \def\today{\number\day~\ifcase\month\or + \cyrs\cyrii\cyrch\cyrn\cyrya\or + \cyrl\cyryu\cyrt\cyro\cyrg\cyro\or + \cyrb\cyre\cyrr\cyre\cyrz\cyrn\cyrya\or + \cyrk\cyrv\cyrii\cyrt\cyrn\cyrya\or + \cyrt\cyrr\cyra\cyrv\cyrn\cyrya\or + \cyrch\cyre\cyrr\cyrv\cyrn\cyrya\or + \cyrl\cyri\cyrp\cyrn\cyrya\or + \cyrs\cyre\cyrr\cyrp\cyrn\cyrya\or + \cyrv\cyre\cyrr\cyre\cyrs\cyrn\cyrya\or + \cyrzh\cyro\cyrv\cyrt\cyrn\cyrya\or + \cyrl\cyri\cyrs\cyrt\cyro\cyrp\cyra\cyrd\cyra\or + \cyrg\cyrr\cyru\cyrd\cyrn\cyrya\fi + \space\number\year~\cyrr.}} +% \end{macrocode} +% +% \end{macro} +% +% \begin{macro}{\extrasukrainian} +% +% The macro |\extrasukrainian| will perform all the extra definitions +% needed for the Ukrainian language. The macro |\noextrasukrainian| +% is used to cancel the actions of |\extrasukrainian|. +% +% The first action we define is to switch on the selected Cyrillic +% encoding whenever we enter `ukrainian'. +% +% \begin{macrocode} +\addto\extrasukrainian{\cyrillictext} +% \end{macrocode} +% +% When the encoding definition file was processed by \LaTeX\ the current +% font encoding is stored in |\latinencoding|, assuming that \LaTeX\ uses +% \texttt{T1} or \texttt{OT1} as default. Therefore we switch back to +% |\latinencoding| whenever the Ukrainian language is no longer `active'. +% +% \begin{macrocode} +\addto\noextrasukrainian{\latintext} +% \end{macrocode} +% +% Next we must allow hyphenation in the Ukrainian words with apostrophe +% whenever we enter `ukrainian'. This solution was proposed by +% Vladimir Volovich +% +% \begin{macrocode} +\addto\extrasukrainian{\lccode`\'=`\'} +\addto\noextrasukrainian{\lccode`\'=0} +% \end{macrocode} +% +% \begin{macro}{\verbatim@font} +% +% In order to get both Latin and Cyrillic letters in verbatim text we +% need to change the definition of an internal \LaTeX\ command somewhat: +% +% \begin{macrocode} +%\def\verbatim@font{% +% \let\encodingdefault\latinencoding +% \normalfont\ttfamily +% \expandafter\def\csname\cyrillicencoding-cmd\endcsname##1##2{% +% \ifx\protect\@typeset@protect +% \begingroup\UseTextSymbol\cyrillicencoding##1\endgroup +% \else\noexpand##1\fi}} +% \end{macrocode} +% +% \end{macro} +% +% The category code of the characters `\texttt{:}', `\texttt{;}', +% `\texttt{!}', and `\texttt{?}' is made |\active| to insert a little +% white space. +% +% For Ukrainian (as well as for Russian and German) the \texttt{"} +% character also is made active. +% +% Note: It is \emph{very} questionable whether the Russian typesetting +% tradition requires additional spacing before those punctuation signs. +% Therefore, we make the corresponding code optional. If you need it, +% then define the \texttt{frenchpunct} docstrip option in +% \file{babel.ins}. +% +% Borrowed from french. +% Some users dislike automatic insertion of a space before +% `double punctuation', and prefer to decide themselves whether a +% space should be added or not; so a hook |\NoAutoSpaceBeforeFDP| +% is provided: if this command is added (in file |ukraineb.cfg|, or +% anywhere in a document) |ukraineb| will respect your typing, and +% introduce a suitable space before `double punctuation' \emph{if +% and only if} a space is typed in the source file before those +% signs. +% +% The command |\AutoSpaceBeforeFDP| switches back to the +% default behavior of |ukraineb|. +% +% \begin{macrocode} +%<*frenchpunct> +\initiate@active@char{:} +\initiate@active@char{;} +% +%<*frenchpunct|spanishligs> +\initiate@active@char{!} +\initiate@active@char{?} +% +\initiate@active@char{"} +% \end{macrocode} +% +% The code above is necessary because we need extra active characters. +% The character |"| is used as indicated in +% table~\ref{tab:ukrainian-quote}. +% +% We specify that the Ukrainian group of shorthands should be used. +% +% \begin{macrocode} +\addto\extrasukrainian{\languageshorthands{ukrainian}} +% \end{macrocode} +% +% These characters are `turned on' once, later their definition may +% vary. +% +% \begin{macrocode} +\addto\extrasukrainian{% +% \bbl@activate{:}\bbl@activate{;}% +% \bbl@activate{!}\bbl@activate{?}% + \bbl@activate{"}} +\addto\noextrasukrainian{% +% \bbl@deactivate{:}\bbl@deactivate{;}% +% \bbl@deactivate{!}\bbl@deactivate{?}% + \bbl@deactivate{"}} +% \end{macrocode} +% +% The \texttt{X2} and \texttt{T2*} encodings do not contain +% |spanish_shriek| and |spanish_query| symbols; as a consequence, the +% ligatures `|?`|' and `|!`|' do not work with them (these characters are +% useless for Cyrillic texts anyway). But we define the shorthands to +% emulate these ligatures (optionally). +% +% We do not use |\latinencoding| here (but instead explicitly use +% \texttt{OT1}) because the user may choose \texttt{T2A} to be the primary +% encoding, but it does not contain these characters. +% +% \begin{macrocode} +%<*spanishligs> +\declare@shorthand{ukrainian}{?`}{\UseTextSymbol{OT1}\textquestiondown} +\declare@shorthand{ukrainian}{!`}{\UseTextSymbol{OT1}\textexclamdown} +% +% \end{macrocode} +% +% \begin{macro}{\ukrainian@sh@;@} +% \begin{macro}{\ukrainian@sh@:@} +% \begin{macro}{\ukrainian@sh@!@} +% \begin{macro}{\ukrainian@sh@?@} +% +% We have to reduce the amount of white space before \texttt{;}, +% \texttt{:} and \texttt{!}. This should only happen in horizontal mode, +% hence the test with |\ifhmode|. +% +% \begin{macrocode} +%<*frenchpunct> +\declare@shorthand{ukrainian}{;}{% + \ifhmode +% \end{macrocode} +% +% In horizontal mode we check for the presence of a `space', `unskip' if +% it exists and place a |0.1em| kerning. +% +% \begin{macrocode} + \ifdim\lastskip>\z@ + \unskip\nobreak\kern.1em + \else +% \end{macrocode} +% If no space has been typed, we add |\FDP@thinspace| +% which will be +% defined, up to the user's wishes, as an automatic added +% thinspace, or as |\@empty|. +% +% \begin{macrocode} + \FDP@thinspace + \fi + \fi +% \end{macrocode} +% +% Now we can insert a `|;|' character. +% +% \begin{macrocode} + \string;} +% \end{macrocode} +% +% The other definitions are very similar. +% +% \begin{macrocode} +\declare@shorthand{ukrainian}{:}{% + \ifhmode + \ifdim\lastskip>\z@ + \unskip\nobreak\kern.1em + \else + \FDP@thinspace + \fi + \fi + \string:} +% \end{macrocode} +% +% \begin{macrocode} +\declare@shorthand{ukrainian}{!}{% + \ifhmode + \ifdim\lastskip>\z@ + \unskip\nobreak\kern.1em + \else + \FDP@thinspace + \fi + \fi + \string!} +% \end{macrocode} +% +% \begin{macrocode} +\declare@shorthand{ukrainian}{?}{% + \ifhmode + \ifdim\lastskip>\z@ + \unskip\nobreak\kern.1em + \else + \FDP@thinspace + \fi + \fi + \string?} +% \end{macrocode} +% +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% +% \begin{macro}{\AutoSpaceBeforeFDP} +% \begin{macro}{\NoAutoSpaceBeforeFDP} +% \begin{macro}{\FDP@thinspace} +% |\FDP@thinspace| is defined as unbreakable +% spaces if |\AutoSpaceBeforeFDP| is activated or as |\@empty| if +% |\NoAutoSpaceBeforeFDP| is in use. +% The default is |\AutoSpaceBeforeFDP|. +% \begin{macrocode} +\def\AutoSpaceBeforeFDP{% + \def\FDP@thinspace{\nobreak\kern.1em}} +\def\NoAutoSpaceBeforeFDP{\let\FDP@thinspace\@empty} +\AutoSpaceBeforeFDP +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\FDPon} +% \begin{macro}{\FDPoff} +% +% The next macros allow to switch on/off activeness of double +% punctuation signs. +% +% \begin{macrocode} +\def\FDPon{\bbl@activate{:}% + \bbl@activate{;}% + \bbl@activate{?}% + \bbl@activate{!}} +\def\FDPoff{\bbl@deactivate{:}% + \bbl@deactivate{;}% + \bbl@deactivate{?}% + \bbl@deactivate{!}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\system@sh@:@} +% \begin{macro}{\system@sh@!@} +% \begin{macro}{\system@sh@?@} +% \begin{macro}{\system@sh@;@} +% +% When the active characters appear in an environment where their +% Ukrainian behaviour is not wanted they should give an `expected' +% result. Therefore we define shorthands at system level as well. +% +% \begin{macrocode} +\declare@shorthand{system}{:}{\string:} +\declare@shorthand{system}{;}{\string;} +% +%<*frenchpunct&!spanishligs> +\declare@shorthand{system}{!}{\string!} +\declare@shorthand{system}{?}{\string?} +% +% \end{macrocode} +% +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% To be able to define the function of `|"|', we first define a couple of +% `support' macros. +% +% \begin{macro}{\dq} +% +% We save the original double quote character in |\dq| to keep it +% available, the math accent |\"| can now be typed as `|"|'. +% +% \begin{macrocode} +\begingroup \catcode`\"12 +\def\reserved@a{\endgroup + \def\@SS{\mathchar"7019 } + \def\dq{"}} +\reserved@a +% \end{macrocode} +% +% \end{macro} +% +% Now we can define the doublequote macros: german and french quotes. +% We use definitions of these quotes made in babel.sty. +% The french quotes are contained in the \texttt{T2*} encodings. +% +% \begin{macrocode} +\declare@shorthand{ukrainian}{"`}{\glqq} +\declare@shorthand{ukrainian}{"'}{\grqq} +\declare@shorthand{ukrainian}{"<}{\flqq} +\declare@shorthand{ukrainian}{">}{\frqq} +% \end{macrocode} +% +% Some additional commands: +% +% \begin{macrocode} +\declare@shorthand{ukrainian}{""}{\hskip\z@skip} +\declare@shorthand{ukrainian}{"~}{\textormath{\leavevmode\hbox{-}}{-}} +\declare@shorthand{ukrainian}{"=}{\nobreak-\hskip\z@skip} +\declare@shorthand{ukrainian}{"|}{% + \textormath{\nobreak\discretionary{-}{}{\kern.03em}% + \allowhyphens}{}} +% \end{macrocode} +% +% The next two macros for |"-| and |"---| are somewhat different. +% We must check whether the second token is a hyphen character: +% +% \begin{macrocode} +\declare@shorthand{ukrainian}{"-}{% +% \end{macrocode} +% +% If the next token is `|-|', we typeset an emdash, otherwise a hyphen +% sign: +% +% \begin{macrocode} + \def\ukrainian@sh@tmp{% + \if\ukrainian@sh@next-\expandafter\ukrainian@sh@emdash + \else\expandafter\ukrainian@sh@hyphen\fi + }% +% \end{macrocode} +% +% \TeX\ looks for the next token after the first `|-|': the meaning of +% this token is written to |\ukrainian@sh@next| and |\ukrainian@sh@tmp| is +% called. +% +% \begin{macrocode} + \futurelet\ukrainian@sh@next\ukrainian@sh@tmp} +% \end{macrocode} +% +% Here are the definitions of hyphen and emdash. First the hyphen: +% +% \begin{macrocode} +\def\ukrainian@sh@hyphen{% + \nobreak\-\bbl@allowhyphens} +% \end{macrocode} +% +% For the emdash definition, there are the two parameters: we must `eat' +% two last hyphen signs of our emdash\dots : +% \begin{macrocode} +\def\ukrainian@sh@emdash#1#2{\cdash-#1#2} +% \end{macrocode} +% \begin{macro}{\cdash} +% \dots\ these two parameters are useful for another macro: +% |\cdash|: +% \begin{macrocode} +%\ifx\cdash\undefined % should be defined earlier +\def\cdash#1#2#3{\def\tempx@{#3}% +\def\tempa@{-}\def\tempb@{~}\def\tempc@{*}% + \ifx\tempx@\tempa@\@Acdash\else + \ifx\tempx@\tempb@\@Bcdash\else + \ifx\tempx@\tempc@\@Ccdash\else + \errmessage{Wrong usage of cdash}\fi\fi\fi} +% \end{macrocode} +% second parameter (or third for |\cdash|) shows what kind of emdash +% to create in next step +% \begin{center} +% \begin{tabular}{@{}p{.1\hsize}@{}p{.9\hsize}@{}} +% |"---| & ordinary (plain) Cyrillic emdash inside text: +% an unbreakable thinspace will be inserted before only in case of +% a \textit{space} before the dash (it is necessary for dashes after +% display maths formulae: there could be lists, enumerations etc.\ +% started with ``--- where $a$ is ...'' i.e., the dash starts a line). +% (Firstly there were planned rather soft rules for user: he may put +% a space before the dash or not. But it is difficult to place this +% thinspace automatically, i.e., by checking modes because after +% display formulae \TeX{} uses horizontal mode. Maybe there is a +% misunderstanding? Maybe there is another way?) After a dash +% a breakable thinspace is always placed; \\ +% \end{tabular} +% \end{center} +% \begin{macrocode} +% What is more grammatically: .2em or .2\fontdimen6\font ? +\def\@Acdash{\ifdim\lastskip>\z@\unskip\nobreak\hskip.2em\fi + \cyrdash\hskip.2em\ignorespaces}% +% \end{macrocode} +% \begin{center} +% \begin{tabular}{@{}p{.1\hsize}@{}p{.9\hsize}@{}} +% |"--~| & emdash in compound names or surnames +% (like Mendeleev--Klapeiron); this dash has no space characters +% around; after the dash some space is added +% |\exhyphenalty| \\ +% \end{tabular} +% \end{center} +% \begin{macrocode} +\def\@Bcdash{\leavevmode\ifdim\lastskip>\z@\unskip\fi + \nobreak\cyrdash\penalty\exhyphenpenalty\hskip\z@skip\ignorespaces}% +% \end{macrocode} +% \begin{center} +% \begin{tabular}{@{}p{.1\hsize}@{}p{.9\hsize}@{}} +% |"--*| & for denoting direct speech (a space like |\enskip| +% must follow the emdash); \\ +% \end{tabular} +% \end{center} +% \begin{macrocode} +\def\@Ccdash{\leavevmode + \nobreak\cyrdash\nobreak\hskip.35em\ignorespaces}% +%\fi +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\cyrdash} +% Finally the macro for ``body'' of the Cyrillic emdash. +% The |\cyrdash| macro will be defined in case this macro hasn't been +% defined in a fontenc file. For T2* fonts, cyrdash will be placed in +% the code of the English emdash thus it uses ligature |---|. +% \begin{macrocode} +% Is there an IF necessary? +\ifx\cyrdash\undefined + \def\cyrdash{\hbox to.8em{--\hss--}} +\fi +% \end{macrocode} +% \end{macro} +% +% Here a really new macro---to place thinspace between initials. +% This macro used instead of |\,| allows hyphenation in the following +% surname. +% +% \begin{macrocode} +%\declare@shorthand{ukrainian}{",}{\nobreak\hskip.2em\ignorespaces} +% \end{macrocode} +% +% \begin{macro}{\mdqon} +% \begin{macro}{\mdqoff} +% All that's left to do now is to define a couple of commands +% for |"|. +% \begin{macrocode} +\def\mdqon{\bbl@activate{"}} +\def\mdqoff{\bbl@deactivate{"}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% The Ukrainian hyphenation patterns can be used with |\lefthyphenmin| +% and |\righthyphenmin| set to~2. +% \changes{ukraineb-1.1g}{2000/09/22}{Now use \cs{providehyphenmins} to +% provide a default value} +% \begin{macrocode} +\providehyphenmins{\CurrentOption}{\tw@\tw@} +% temporary hack: +\ifx\englishhyphenmins\undefined + \def\englishhyphenmins{\tw@\thr@@} +\fi +% \end{macrocode} +% +% Now the action |\extrasukrainian| has to execute is to make sure that the +% command |\frenchspacing| is in effect. If this is not the case the +% execution of |\noextrasukrainian| will switch it off again. +% +% \begin{macrocode} +\addto\extrasukrainian{\bbl@frenchspacing} +\addto\noextrasukrainian{\bbl@nonfrenchspacing} +% \end{macrocode} +% +% \end{macro} +% +% Next we add a new enumeration style for Ukrainian manuscripts with +% Cyrillic letters, and later on we define some math operator names in +% accordance with Ukrainian and Russian typesetting traditions. +% +% \begin{macro}{\Asbuk} +% +% We begin by defining |\Asbuk| which works like |\Alph|, but produces +% (uppercase) Cyrillic letters intead of Latin ones. The letters CYRGUP, +% and SFTSN are skipped, as usual for such enumeration. +% +% \begin{macrocode} +\def\Asbuk#1{\expandafter\@Asbuk\csname c@#1\endcsname} +\def\@Asbuk#1{\ifcase#1\or + \CYRA\or\CYRB\or\CYRV\or\CYRG\or\CYRD\or\CYRE\or\CYRIE\or + \CYRZH\or\CYRZ\or\CYRI\or\CYRII\or\CYRYI\or\CYRISHRT\or + \CYRK\or\CYRL\or\CYRM\or\CYRN\or\CYRO\or\CYRP\or\CYRR\or + \CYRS\or\CYRT\or\CYRU\or\CYRF\or\CYRH\or\CYRC\or\CYRCH\or + \CYRSH\or\CYRSHCH\or\CYRYU\or\CYRYA\else\@ctrerr\fi} +% \end{macrocode} +% +% \end{macro} +% +% \begin{macro}{\asbuk} +% +% The macro |\asbuk| is similar to |\alph|; it produces lowercase +% Ukrainian letters. +% +% \begin{macrocode} +\def\asbuk#1{\expandafter\@asbuk\csname c@#1\endcsname} +\def\@asbuk#1{\ifcase#1\or + \cyra\or\cyrb\or\cyrv\or\cyrg\or\cyrd\or\cyre\or\cyrie\or + \cyrzh\or\cyrz\or\cyri\or\cyrii\or\cyryi\or\cyrishrt\or + \cyrk\or\cyrl\or\cyrm\or\cyrn\or\cyro\or\cyrp\or\cyrr\or + \cyrs\or\cyrt\or\cyru\or\cyrf\or\cyrh\or\cyrc\or\cyrch\or + \cyrsh\or\cyrshch\or\cyryu\or\cyrya\else\@ctrerr\fi} +% \end{macrocode} +% +% \end{macro} +% +% Set up default Cyrillic math alphabets. The math groups for cyrillic +% letters are defined in the encoding definition files. First, declare +% a new alphabet for symbols, |\cyrmathrm|, based on the symbol font +% for Cyrillic letters defined in the encoding definition file. Note, +% that by default Cyrillic letters are taken from upright font in math +% mode (unlike Latin letters). +% \begin{macrocode} +%\RequirePackage{textmath} +\@ifundefined{sym\cyrillicencoding letters}{}{% +\SetSymbolFont{\cyrillicencoding letters}{bold}\cyrillicencoding + \rmdefault\bfdefault\updefault +\DeclareSymbolFontAlphabet\cyrmathrm{\cyrillicencoding letters} +% \end{macrocode} +% And we need a few commands to be able to switch to different variants. +% \begin{macrocode} +\DeclareMathAlphabet\cyrmathbf\cyrillicencoding + \rmdefault\bfdefault\updefault +\DeclareMathAlphabet\cyrmathsf\cyrillicencoding + \sfdefault\mddefault\updefault +\DeclareMathAlphabet\cyrmathit\cyrillicencoding + \rmdefault\mddefault\itdefault +\DeclareMathAlphabet\cyrmathtt\cyrillicencoding + \ttdefault\mddefault\updefault +% +\SetMathAlphabet\cyrmathsf{bold}\cyrillicencoding + \sfdefault\bfdefault\updefault +\SetMathAlphabet\cyrmathit{bold}\cyrillicencoding + \rmdefault\bfdefault\itdefault +} +% \end{macrocode} +% +% Some math functions in Ukrainian and Russian math books have other +% names: e.g., \texttt{sinh} in Russian is written as \texttt{sh} etc. +% So we define a number of new math operators. +% +% |\sinh|: +% \begin{macrocode} +\def\sh{\mathop{\operator@font sh}\nolimits} +% \end{macrocode} +% |\cosh|: +% \begin{macrocode} +\def\ch{\mathop{\operator@font ch}\nolimits} +% \end{macrocode} +% |\tan|: +% \begin{macrocode} +\def\tg{\mathop{\operator@font tg}\nolimits} +% \end{macrocode} +% |\arctan|: +% \begin{macrocode} +\def\arctg{\mathop{\operator@font arctg}\nolimits} +% \end{macrocode} +% arcctg: +% \begin{macrocode} +\def\arcctg{\mathop{\operator@font arcctg}\nolimits} +% \end{macrocode} +% The following macro conflicts with |\th| defined in Latin~1 encoding: +% +% |\tanh|: +% \changes{ukraineb-1.1k}{2004/05/21}{Change definition of \cs{th} +% only for this language} +% \begin{macrocode} +\addto\extrasrussian{% + \babel@save{\th}% + \let\ltx@th\th + \def\th{\textormath{\ltx@th}% + {\mathop{\operator@font th}\nolimits}}% + } +% \end{macrocode} +% |\cot|: +% \begin{macrocode} +\def\ctg{\mathop{\operator@font ctg}\nolimits} +% \end{macrocode} +% |\coth|: +% \begin{macrocode} +\def\cth{\mathop{\operator@font cth}\nolimits} +% \end{macrocode} +% |\csc|: +% \begin{macrocode} +\def\cosec{\mathop{\operator@font cosec}\nolimits} +% \end{macrocode} +% +% And finally some other Ukrainian and Russian mathematical symbols: +% \begin{macrocode} +\def\Prob{\mathop{\kern\z@\mathsf{P}}\nolimits} +\def\Variance{\mathop{\kern\z@\mathsf{D}}\nolimits} +\def\nsd{\mathop{\cyrmathrm{\cyrn.\cyrs.\cyrd.}}\nolimits} +\def\nsk{\mathop{\cyrmathrm{\cyrn.\cyrs.\cyrk.}}\nolimits} +\def\NSD{\mathop{\cyrmathrm{\CYRN\CYRS\CYRD}}\nolimits} +\def\NSK{\mathop{\cyrmathrm{\CYRN\CYRS\CYRK}}\nolimits} + \def\nod{\mathop{\cyrmathrm{\cyrn.\cyro.\cyrd.}}\nolimits} % ?????? + \def\nok{\mathop{\cyrmathrm{\cyrn.\cyro.\cyrk.}}\nolimits} % ?????? + \def\NOD{\mathop{\cyrmathrm{\CYRN\CYRO\CYRD}}\nolimits} % ?????? + \def\NOK{\mathop{\cyrmathrm{\CYRN\CYRO\CYRK}}\nolimits} % ?????? +\def\Proj{\mathop{\cyrmathrm{\CYRP\cyrr}}\nolimits} +% \end{macrocode} +% +% This is for compatibility with older Ukrainian packages. +% \begin{macrocode} +\DeclareRobustCommand{\No}{% + \ifmmode{\nfss@text{\textnumero}}\else\textnumero\fi} +% \end{macrocode} +% +% The macro |\ldf@finish| takes care of looking for a configuration file, +% setting the main language to be switched on at |\begin{document}| and +% resetting the category code of \texttt{@} to its original value. +% +% \begin{macrocode} +\ldf@finish{ukrainian} +% +% \end{macrocode} +% +% \Finale +%% +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +%% +\endinput diff --git a/Master/texmf-dist/source/generic/babel/ukraineb.ins b/Master/texmf-dist/source/generic/babel/ukraineb.ins new file mode 100644 index 00000000000..73b35f110d3 --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/ukraineb.ins @@ -0,0 +1,147 @@ +%% +%% This file will generate fast loadable files and documentation +%% driver files from the doc files in this package when run through +%% LaTeX or TeX. +%% +%% Copyright 1989-2005 Johannes L. Braams and any individual authors +%% listed elsewhere in this file. All rights reserved. +%% +%% This file is part of the Babel system. +%% -------------------------------------- +%% +%% It 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 +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% The Current Maintainer of this work is Johannes Braams. +%% +%% The list of all files belonging to the LaTeX base distribution is +%% given in the file `manifest.bbl. See also `legal.bbl' 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. +%% +%% --------------- start of docstrip commands ------------------ +%% +\def\filedate{1999/03/13} +\def\batchfile{ukraineb.ins} +\input docstrip.tex + +{\ifx\generate\undefined +\Msg{**********************************************} +\Msg{*} +\Msg{* This installation requires docstrip} +\Msg{* version 2.3c or later.} +\Msg{*} +\Msg{* An older version of docstrip has been input} +\Msg{*} +\Msg{**********************************************} +\errhelp{Move or rename old docstrip.tex.} +\errmessage{Old docstrip in input path} +\batchmode +\csname @@end\endcsname +\fi} + +\declarepreamble\mainpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl 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. +\endpreamble + +\declarepreamble\fdpreamble + +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl for additional +information. + +In particular, permission is granted to customize the declarations in +this file to serve the needs of your installation. + +However, NO PERMISSION is granted to distribute a modified version +of this file under its original name. + +\endpreamble + +\usedir{tex/generic/babel} +\keepsilent + +\usepreamble\mainpreamble + +\generate{\file{ukraineb.ldf}{\from{ukraineb.dtx}{code}}} + +\ifToplevel{ +\Msg{***********************************************************} +\Msg{*} +\Msg{* To finish the installation you have to move the following} +\Msg{* files into a directory searched by TeX:} +\Msg{*} +\Msg{* \space\space All *.fd} +\Msg{*} +\Msg{* To produce the documentation run the files ending with} +\Msg{* `.fdd' through LaTeX.} +\Msg{*} +\Msg{* Happy TeXing} +\Msg{***********************************************************} +} + +\endinput diff --git a/Master/texmf-dist/source/generic/babel/user.drv b/Master/texmf-dist/source/generic/babel/user.drv new file mode 100644 index 00000000000..9b45647aa69 --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/user.drv @@ -0,0 +1,170 @@ +%% +%% This is file `user.drv', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% babel.dtx (with options: `driver,user') +%% +%% This file was generated from file(s) of the Babel system. +%% --------------------------------------------------------- +%% +%% Copyright (C) 2004 Johannes Braams. All rights reserved. +%% +%% To produce the documentation in the way you like you are allowed +%% to change this driver file. +%% +%% +%% File 'babel.dtx' +%%\ProvidesFile{babel.dtx}[2005/05/21 v3.8g The Babel package] +%% Babel package for LaTeX2e. +%% Copyright (C) 1989 -- 2005 by Johannes Braams, +%% TeXniek +%% all rights reserved. +%% Please report errors to: J.L. Braams +%% babel at braams.cistron.nl +\ifx\ProvidesFile\@undefined + \def\ProvidesFile#1[#2 #3 #4]{% + \wlog{File: #1 #4 #3 <#2>}% + \let\ProvidesFile\@undefined + } +\fi +\ProvidesFile{user.drv} + [2005/05/21 v3.8g % +] +\documentclass{ltxdoc} +\usepackage{url,t1enc,supertabular} +\usepackage[icelandic,english]{babel} +\DoNotIndex{\!,\',\,,\.,\-,\:,\;,\?,\/,\^,\`,\@M} +\DoNotIndex{\@,\@ne,\@m,\@afterheading,\@date,\@endpart} +\DoNotIndex{\@hangfrom,\@idxitem,\@makeschapterhead,\@mkboth} +\DoNotIndex{\@oddfoot,\@oddhead,\@restonecolfalse,\@restonecoltrue} +\DoNotIndex{\@starttoc,\@unused} +\DoNotIndex{\accent,\active} +\DoNotIndex{\addcontentsline,\advance,\Alph,\arabic} +\DoNotIndex{\baselineskip,\begin,\begingroup,\bf,\box,\c@secnumdepth} +\DoNotIndex{\catcode,\centering,\char,\chardef,\clubpenalty} +\DoNotIndex{\columnsep,\columnseprule,\crcr,\csname} +\DoNotIndex{\day,\def,\dimen,\discretionary,\divide,\dp,\do} +\DoNotIndex{\edef,\else,\@empty,\end,\endgroup,\endcsname,\endinput} +\DoNotIndex{\errhelp,\errmessage,\expandafter,\fi,\filedate} +\DoNotIndex{\fileversion,\fmtname,\fnum@figure,\fnum@table,\fontdimen} +\DoNotIndex{\gdef,\global} +\DoNotIndex{\hbox,\hidewidth,\hfil,\hskip,\hspace,\ht,\Huge,\huge} +\DoNotIndex{\ialign,\if@twocolumn,\ifcase,\ifcat,\ifhmode,\ifmmode} +\DoNotIndex{\ifnum,\ifx,\immediate,\ignorespaces,\input,\item} +\DoNotIndex{\kern} +\DoNotIndex{\labelsep,\Large,\large,\labelwidth,\lccode,\leftmargin} +\DoNotIndex{\lineskip,\leavevmode,\let,\list,\ll,\long,\lower} +\DoNotIndex{\m@ne,\mathchar,\mathaccent,\markboth,\month,\multiply} +\DoNotIndex{\newblock,\newbox,\newcount,\newdimen,\newif,\newwrite} +\DoNotIndex{\nobreak,\noexpand,\noindent,\null,\number} +\DoNotIndex{\onecolumn,\or} +\DoNotIndex{\p@,par, \parbox,\parindent,\parskip,\penalty} +\DoNotIndex{\protect,\ps@headings} +\DoNotIndex{\quotation} +\DoNotIndex{\raggedright,\raise,\refstepcounter,\relax,\rm,\setbox} +\DoNotIndex{\section,\setcounter,\settowidth,\scriptscriptstyle} +\DoNotIndex{\sfcode,\sl,\sloppy,\small,\space,\spacefactor,\strut} +\DoNotIndex{\string} +\DoNotIndex{\textwidth,\the,\thechapter,\thefigure,\thepage,\thepart} +\DoNotIndex{\thetable,\thispagestyle,\titlepage,\tracingmacros} +\DoNotIndex{\tw@,\twocolumn,\typeout,\uppercase,\usecounter} +\DoNotIndex{\vbox,\vfil,\vskip,\vspace,\vss} +\DoNotIndex{\widowpenalty,\write,\xdef,\year,\z@,\z@skip} +\makeatletter +\gdef\dlqq{{\setbox\tw@=\hbox{,}\setbox\z@=\hbox{''}% + \dimen\z@=\ht\z@ \advance\dimen\z@-\ht\tw@ + \setbox\z@=\hbox{\lower\dimen\z@\box\z@}\ht\z@=\ht\tw@ + \dp\z@=\dp\tw@ \box\z@\kern-.04em}} +\makeatother +\font\manual=logo10 % font used for the METAFONT logo, etc. +\newcommand*\MF{{\manual META}\-{\manual FONT}} +\newcommand*\TeXhax{\TeX hax} +\newcommand*\babel{\textsf{babel}} +\newcommand*\Babel{\textsf{Babel}} +\newcommand*\m[1]{\mbox{$\langle$\it#1\/$\rangle$}} +\newcommand*\langvar{\m{lang}} +\newcommand*\note[1]{} +\newcommand*\bsl{\protect\bslash} +\newcommand*\Lopt[1]{\textsf{#1}} +\newcommand*\Lenv[1]{\textsf{#1}} +\newcommand*\file[1]{\texttt{#1}} +\newcommand*\cls[1]{\texttt{#1}} +\newcommand*\pkg[1]{\texttt{#1}} +\newcommand*\langdeffile[1]{% + \DocInput{#1}} +\DisableCrossrefs +\setcounter{StandardModuleDepth}{1} +\OnlyDescription +\begin{document} +\DocInput{babel.dtx} +^^A% \changes{babel~3.6i}{1997/02/22}{Added kannada} +\clearpage +\langdeffile{esperanto.dtx} +\langdeffile{interlingua.dtx} +\langdeffile{dutch.dtx} +\langdeffile{english.dtx} +\langdeffile{germanb.dtx} +\langdeffile{ngermanb.dtx} +\langdeffile{breton.dtx} +\langdeffile{welsh.dtx} +\langdeffile{irish.dtx} +\langdeffile{scottish.dtx} +\langdeffile{greek.dtx} +\langdeffile{frenchb.dtx} +\langdeffile{italian.dtx} +\langdeffile{latin.dtx} +\langdeffile{portuges.dtx} +\langdeffile{spanish.dtx} +\langdeffile{catalan.dtx} +\langdeffile{galician.dtx} +\langdeffile{basque.dtx} +\langdeffile{romanian.dtx} +\langdeffile{danish.dtx} +\langdeffile{icelandic.dtx} +\langdeffile{norsk.dtx} +\langdeffile{swedish.dtx} +\langdeffile{samin.dtx} +\langdeffile{finnish.dtx} +\langdeffile{magyar.dtx} +\langdeffile{estonian.dtx} +\langdeffile{croatian.dtx} +\langdeffile{czech.dtx} +\langdeffile{polish.dtx} +\langdeffile{serbian.dtx} +\langdeffile{slovak.dtx} +\langdeffile{slovene.dtx} +\langdeffile{russianb.dtx} +\langdeffile{bulgarian.dtx} +\langdeffile{ukraineb.dtx} +\langdeffile{lsorbian.dtx} +\langdeffile{usorbian.dtx} +\langdeffile{turkish.dtx} +\langdeffile{hebrew.dtx} +\DocInput{hebinp.dtx} +\DocInput{hebrew.fdd} +\DocInput{heb209.dtx} +\langdeffile{bahasa.dtx} +\clearpage +\DocInput{bbplain.dtx} +\end{document} +%% +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +\endinput +%% +%% End of file `user.drv'. diff --git a/Master/texmf-dist/source/generic/babel/usorbian.dtx b/Master/texmf-dist/source/generic/babel/usorbian.dtx new file mode 100644 index 00000000000..e4a9ebe26df --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/usorbian.dtx @@ -0,0 +1,360 @@ +% \iffalse meta-comment +% +% Copyright 1989-2005 Johannes L. Braams and any individual authors +% listed elsewhere in this file. All rights reserved. +% +% This file is part of the Babel system. +% -------------------------------------- +% +% It 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 +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2003/12/01 or later. +% +% This work has the LPPL maintenance status "maintained". +% +% The Current Maintainer of this work is Johannes Braams. +% +% The list of all files belonging to the Babel system is +% given in the file `manifest.bbl. See also `legal.bbl' 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 +% \CheckSum{298} +% \iffalse +% Tell the \LaTeX\ system who we are and write an entry on the +% transcript. +%<*dtx> +\ProvidesFile{usorbian.dtx} +% +%\ProvidesLanguage{usorbian} +%\fi +%\ProvidesFile{usorbian.dtx} + [2005/03/31 v1.0i Upper Sorbian support from the babel system] +%\iffalse +%% File `usorbian.dtx' +%% Babel package for LaTeX version 2e +%% Copyright (C) 1989 - 2005 +%% by Johannes Braams, TeXniek +% +%% Upper Sorbian Language Definition File +%% Copyright (C) 1994 - 2004 +%% by Eduard Werner +% Werner, Eduard", +% Serbski institut z. t., +% Dw\'orni\v{s}\'cowa 6 +% 02625 Budy\v{s}in/Bautzen +% Germany", +% (??)3591 497223", +% edi at kaihh.hanse.de", +% +%% Please report errors to: Eduard Werner edi at kaihh.hanse.de +%% +% This file is part of the babel system, it provides the source +% code for the Upper Sorbian definition file. +%<*filedriver> +\documentclass{ltxdoc} +\newcommand*\TeXhax{\TeX hax} +\newcommand*\babel{\textsf{babel}} +\newcommand*\langvar{$\langle \it lang \rangle$} +\newcommand*\note[1]{} +\newcommand*\Lopt[1]{\textsf{#1}} +\newcommand*\file[1]{\texttt{#1}} +\newfont{\logo}{logo10} +\newcommand*\MF{{\logo METAFONT}} +\begin{document} + \DocInput{usorbian.dtx} +\end{document} +% +%\fi +% \GetFileInfo{usorbian.dtx} +% +% \changes{usorbian-0.1}{1994/10/10}{First version} +% \changes{usorbian-0.1b}{1994/10/18}{Made it possible to run through +% \LaTeX; added \cs{MF} and removed extra \cs{end{macro}}} +% \changes{usorbian-1.0d}{1996/07/13}{Replaced \cs{undefined} with +% \cs{@undefined} and \cs{empty} with \cs{@empty} for consistency +% with \LaTeX} +% \changes{usorbian-1.0e}{1996/10/10}{Moved the definition of +% \cs{atcatcode} right to the beginning.} +% +% \section{The Upper Sorbian language} +% +% The file \file{\filename}\footnote{The file described in this +% section has version number \fileversion\ and was last revised on +% \filedate. It was written by Eduard Werner +% (\texttt{edi@kaihh.hanse.de}).} It defines all the +% language-specific macros for Upper Sorbian. +% +% \StopEventually{} +% +% The macro |\LdfInit| takes care of preventing that this file is +% loaded more than once, checking the category code of the +% \texttt{@} sign, etc. +% \changes{usorbian-1.0e}{1996/11/03}{Now use \cs{LdfInit} to perform +% initial checks} +% \begin{macrocode} +%<*code> +\LdfInit{usorbian}\captionsusorbian +% \end{macrocode} +% +% When this file is read as an option, i.e. by the |\usepackage| +% command, \texttt{usorbian} will be an `unknown' languagein which +% case we have to make it known. So we check for the existence of +% |\l@usorbian| to see whether we have to do something here. +% +% \begin{macrocode} +\ifx\l@usorbian\@undefined + \@nopatterns{Usorbian} + \adddialect\l@usorbian0\fi +% \end{macrocode} +% +% The next step consists of defining commands to switch to (and +% from) the Upper Sorbian language. +% +% \begin{macro}{\captionsusorbian} +% The macro |\captionsusorbian| defines all strings used in the four +% standard documentclasses provided with \LaTeX. +% \changes{usorbian-0.1c}{1994/11/27}{Removed two typos (Kapitel and +% Dodatki)} +% \changes{usorbian-1.0b}{1995/07/04}{Added \cs{proofname} for +% AMS-\LaTeX} +% \changes{usorbian-1.0i}{2000/09/22}{Added \cs{glossaryname}} +% \begin{macrocode} +\addto\captionsusorbian{% + \def\prefacename{Zawod}% + \def\refname{Referency}% + \def\abstractname{Abstrakt}% + \def\bibname{Literatura}% + \def\chaptername{Kapitl}% + \def\appendixname{Dodawki}% + \def\contentsname{Wobsah}% + \def\listfigurename{Zapis wobrazow}% + \def\listtablename{Zapis tabulkow}% + \def\indexname{Indeks}% + \def\figurename{Wobraz}% + \def\tablename{Tabulka}% + \def\partname{D\'z\v el}% + \def\enclname{P\v r\l oha}% + \def\ccname{CC}% + \def\headtoname{Komu}% + \def\pagename{Strona}% + \def\seename{hl.}% + \def\alsoname{hl.~te\v z} + \def\proofname{Proof}% <-- needs translation + \def\glossaryname{Glossary}% <-- Needs translation + }% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\newdateusorbian} +% The macro |\newdateusorbian| redefines the command |\today| to +% produce Upper Sorbian dates. +% \changes{usorbian-1.0g}{1997/10/01}{Use \cs{edef} to define +% \cs{today} to save memory} +% \changes{usorbian-1.0g}{1998/03/28}{use \cs{def} instead of +% \cs{edef}} +% \begin{macrocode} +\def\newdateusorbian{% + \def\today{\number\day.~\ifcase\month\or + januara\or februara\or m\v erca\or apryla\or meje\or junija\or + julija\or awgusta\or septembra\or oktobra\or + nowembra\or decembra\fi + \space \number\year}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\olddateusorbian} +% The macro |\olddateusorbian| redefines the command |\today| to +% produce old-style Upper Sorbian dates. +% \changes{usorbian-1.0g}{1997/10/01}{Use \cs{edef} to define +% \cs{today} to save memory} +% \changes{usorbian-1.0g}{1998/03/28}{use \cs{def} instead of +% \cs{edef}} +% \begin{macrocode} +\def\olddateusorbian{% + \def\today{\number\day.~\ifcase\month\or + wulkeho r\'o\v zka\or ma\l eho r\'o\v zka\or nal\v etnika\or + jutrownika\or r\'o\v zownika\or sma\v znika\or pra\v znika\or + \v znjenca\or po\v znjenca\or winowca\or nazymnika\or + hodownika\fi \space \number\year}} +% \end{macrocode} +% \end{macro} +% +% The default will be the new-style dates. +% \begin{macrocode} +\let\dateusorbian\newdateusorbian +% \end{macrocode} +% +% \begin{macro}{\extrasusorbian} +% The macro |\extrasusorbian| will perform all the extra +% definitions needed for the Upper Sorbian language. It's pirated +% from |germanb.sty|. The macro |\noextrasusorbian| is used to +% cancel the actions of |\extrasusorbian|. +% +% Because for Upper Sorbian (as well as for Dutch) the \texttt{"} +% character is made active. This is done once, later on its +% definition may vary. +% \begin{macrocode} +\initiate@active@char{"} +\addto\extrasusorbian{\languageshorthands{usorbian}} +\addto\extrasusorbian{\bbl@activate{"}} +% \end{macrocode} +% Don't forget to turn the shorthands off again. +% \changes{usorbian-1.0h}{1999/12/17}{Deactivate shorthands ouside of +% Upper Sorbian} +% \begin{macrocode} +\addto\noextrasusorbian{\bbl@deactivate{"}} +% \end{macrocode} +% +% In order for \TeX\ to be able to hyphenate German Upper Sorbian +% words which contain `\ss' we have to give the character a nonzero +% |\lccode| (see Appendix H, the \TeX book). +% \begin{macrocode} +\addto\extrasusorbian{\babel@savevariable{\lccode`\^^Y}% + \lccode`\^^Y`\^^Y} +% \end{macrocode} +% The umlaut accent macro |\"| is changed to lower the umlaut dots. +% The redefinition is done with the help of |\umlautlow|. +% \begin{macrocode} +\addto\extrasusorbian{\babel@save\"\umlautlow} +\addto\noextrasusorbian{\umlauthigh} +% \end{macrocode} +% The Upper Sorbian hyphenation patterns can be used with +% |\lefthyphenmin| and |\righthyphenmin| set to~2. +% \changes{usorbian-1.0i}{2000/09/22}{Now use \cs{providehyphenmins} to +% provide a default value} +% \begin{macrocode} +\providehyphenmins{\CurrentOption}{\tw@\tw@} +% \end{macrocode} +% \end{macro} +% +% \changes{usorbian-1.0a}{1995/05/27}{Removed stuff that has been +% moved to \file{babel.def}} +% +% \begin{macro}{\dq} +% We save the original double quote character in |\dq| to keep it +% available, the math accent |\"| can now be typed as |"|. Also we +% store the original meaning of the command |\"| for future use. +% \begin{macrocode} +\begingroup \catcode`\"12 +\def\x{\endgroup + \def\@SS{\mathchar"7019 } + \def\dq{"}} +\x +% \end{macrocode} +% \end{macro} +% +% Now we can define the doublequote macros: the umlauts, +% \begin{macrocode} +\declare@shorthand{usorbian}{"a}{\textormath{\"{a}}{\ddot a}} +\declare@shorthand{usorbian}{"o}{\textormath{\"{o}}{\ddot o}} +\declare@shorthand{usorbian}{"u}{\textormath{\"{u}}{\ddot u}} +\declare@shorthand{usorbian}{"A}{\textormath{\"{A}}{\ddot A}} +\declare@shorthand{usorbian}{"O}{\textormath{\"{O}}{\ddot O}} +\declare@shorthand{usorbian}{"U}{\textormath{\"{U}}{\ddot U}} +% \end{macrocode} +% tremas, +% \begin{macrocode} +\declare@shorthand{usorbian}{"e}{\textormath{\"{e}}{\ddot e}} +\declare@shorthand{usorbian}{"E}{\textormath{\"{E}}{\ddot E}} +\declare@shorthand{usorbian}{"i}{\textormath{\"{\i}}{\ddot\imath}} +\declare@shorthand{usorbian}{"I}{\textormath{\"{I}}{\ddot I}} +% \end{macrocode} +% usorbian es-zet (sharp s), +% \begin{macrocode} +\declare@shorthand{usorbian}{"s}{\textormath{\ss{}}{\@SS{}}} +\declare@shorthand{usorbian}{"S}{SS} +% \end{macrocode} +% german and french quotes, +% \changes{usorbian-1.0f}{1997/04/03}{Removed empty groups after +% double quote and guillemot characters} +% \begin{macrocode} +\declare@shorthand{usorbian}{"`}{% + \textormath{\quotedblbase}{\mbox{\quotedblbase}}} +\declare@shorthand{usorbian}{"'}{% + \textormath{\textquotedblleft}{\mbox{\textquotedblleft}}} +\declare@shorthand{usorbian}{"<}{% + \textormath{\guillemotleft}{\mbox{\guillemotleft}}} +\declare@shorthand{usorbian}{">}{% + \textormath{\guillemotright}{\mbox{\guillemotright}}} +% \end{macrocode} +% discretionary commands +% \changes{usorbian-1.0c}{1996/01/24}{Now use \cs{bbl@disc}} +% \begin{macrocode} +\declare@shorthand{usorbian}{"c}{\textormath{\bbl@disc ck}{c}} +\declare@shorthand{usorbian}{"C}{\textormath{\bbl@disc CK}{C}} +\declare@shorthand{usorbian}{"f}{\textormath{\bbl@disc f{ff}}{f}} +\declare@shorthand{usorbian}{"F}{\textormath{\bbl@disc F{FF}}{F}} +\declare@shorthand{usorbian}{"l}{\textormath{\bbl@disc l{ll}}{l}} +\declare@shorthand{usorbian}{"L}{\textormath{\bbl@disc L{LL}}{L}} +\declare@shorthand{usorbian}{"m}{\textormath{\bbl@disc m{mm}}{m}} +\declare@shorthand{usorbian}{"M}{\textormath{\bbl@disc M{MM}}{M}} +\declare@shorthand{usorbian}{"n}{\textormath{\bbl@disc n{nn}}{n}} +\declare@shorthand{usorbian}{"N}{\textormath{\bbl@disc N{NN}}{N}} +\declare@shorthand{usorbian}{"p}{\textormath{\bbl@disc p{pp}}{p}} +\declare@shorthand{usorbian}{"P}{\textormath{\bbl@disc P{PP}}{P}} +\declare@shorthand{usorbian}{"t}{\textormath{\bbl@disc t{tt}}{t}} +\declare@shorthand{usorbian}{"T}{\textormath{\bbl@disc T{TT}}{T}} +% \end{macrocode} +% and some additional commands: +% \begin{macrocode} +\declare@shorthand{usorbian}{"-}{\nobreak\-\bbl@allowhyphens} +\declare@shorthand{usorbian}{"|}{% + \textormath{\nobreak\discretionary{-}{}{\kern.03em}% + \allowhyphens}{}} +\declare@shorthand{usorbian}{""}{\hskip\z@skip} +% \end{macrocode} +% +% \begin{macro}{\mdqon} +% \begin{macro}{\mdqoff} +% \begin{macro}{\ck} +% All that's left to do now is to define a couple of commands +% for reasons of compatibility with \file{german.sty}. +% \changes{usorbian-1.0g}{1998/06/07}{Now use \cs{shorthandon} and +% \cs{shorthandoff}} +% \begin{macrocode} +\def\mdqon{\shorthandon{"}} +\def\mdqoff{\shorthandoff{"}} +\def\ck{\allowhyphens\discretionary{k-}{k}{ck}\allowhyphens} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% The macro |\ldf@finish| takes care of looking for a +% configuration file, setting the main language to be switched on +% at |\begin{document}| and resetting the category code of +% \texttt{@} to its original value. +% \changes{usorbian-1.0e}{1996/11/03}{Now use \cs{ldf@finish} to wrap +% up} +% \begin{macrocode} +\ldf@finish{usorbian} +% +% \end{macrocode} +% +% \Finale +%% +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +%% +\endinput diff --git a/Master/texmf-dist/source/generic/babel/welsh.dtx b/Master/texmf-dist/source/generic/babel/welsh.dtx new file mode 100644 index 00000000000..95965fcfaed --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/welsh.dtx @@ -0,0 +1,207 @@ +% \iffalse meta-comment +% +% Copyright 1989-2005 Johannes L. Braams and any individual authors +% listed elsewhere in this file. All rights reserved. +% +% This file is part of the Babel system. +% -------------------------------------- +% +% It 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 +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2003/12/01 or later. +% +% This work has the LPPL maintenance status "maintained". +% +% The Current Maintainer of this work is Johannes Braams. +% +% The list of all files belonging to the Babel system is +% given in the file `manifest.bbl. See also `legal.bbl' 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 +% \CheckSum{97} +% +% \iffalse +% Tell the \LaTeX\ system who we are and write an entry on the +% transcript. +%<*dtx> +\ProvidesFile{welsh.dtx} +% +%\ProvidesLanguage{welsh} +%\fi +%\ProvidesFile{welsh.dtx} + [2005/03/31 v1.0d Welsh support from the babel system] +%\iffalse +%% File `welsh.dtx' +%% Babel package for LaTeX version 2e +%% Copyright (C) 1989 -- 2005 +%% by Johannes Braams, TeXniek +% +%% Please report errors to: J.L. Braams +%% babel at braams.cistron.nl +% +% This file is part of the babel system, it provides the source +% code for the Welsh language definition file. +%<*filedriver> +\documentclass{ltxdoc} +\newcommand*{\TeXhax}{\TeX hax} +\newcommand*{\babel}{\textsf{babel}} +\newcommand*{\langvar}{$\langle \mathit lang \rangle$} +\newcommand*{\note}[1]{} +\newcommand*{\Lopt}[1]{\textsf{#1}} +\newcommand*{\file}[1]{\texttt{#1}} +\begin{document} + \DocInput{welsh.dtx} +\end{document} +% +%\fi +% \GetFileInfo{welsh.dtx} +% +% \section{The Welsh language} +% +% The file \file{\filename}\footnote{The file described in this +% section has version number \fileversion\ and was last revised on +% \filedate.} defines all the language definition macros for the +% Welsh language. +% +% For this language currently no special definitions are needed or +% available. +% +% \StopEventually{} +% +% The macro |\ldf@init| takes care of preventing that this file is +% loaded more than once, checking the category code of the +% \texttt{@} sign, etc. +% \begin{macrocode} +%<*code> +\LdfInit{welsh}{captionswelsh} +% \end{macrocode} +% +% When this file is read as an option, i.e. by the |\usepackage| +% command, \texttt{welsh} could be an `unknown' language in +% which case we have to make it known. So we check for the +% existence of |\l@welsh| to see whether we have to do +% something here. +% +% \begin{macrocode} +\ifx\undefined\l@welsh + \@nopatterns{welsh} + \adddialect\l@welsh0\fi +% \end{macrocode} +% The next step consists of defining commands to switch to (and +% from) the Welsh language. +% +% \begin{macro}{\welshhyphenmins} +% This macro is used to store the correct values of the hyphenation +% parameters |\lefthyphenmin| and |\righthyphenmin|. +% \changes{welsh-1.0c}{2000/09/22}{Now use \cs{providehyphenmins} to +% provide a default value} +% \begin{macrocode} +\providehyphenmins{\CurrentOption}{\tw@\thr@@} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\captionswelsh} +% The macro |\captionswelsh| defines all strings used in the +% four standard documentclasses provided with \LaTeX. +% \changes{welsh-1.0c}{2000/09/20}{Added \cs{glossaryname}} +% \changes{welsh-1.0d}{2005/03/31}{Provided the translation for +% Glossary} +% \begin{macrocode} +\def\captionswelsh{% + \def\prefacename{Rhagair}% + \def\refname{Cyfeiriadau}% + \def\abstractname{Crynodeb}% + \def\bibname{Llyfryddiaeth}% + \def\chaptername{Pennod}% + \def\appendixname{Atodiad}% + \def\contentsname{Cynnwys}% + \def\listfigurename{Rhestr Ddarluniau}% + \def\listtablename{Rhestr Dablau}% + \def\indexname{Mynegai}% + \def\figurename{Darlun}% + \def\tablename{Taflen}% + \def\partname{Rhan}% + \def\enclname{amgae\"edig}% + \def\ccname{cop\"\i au}% + \def\headtoname{At}% % `at' on letters meaning `to ( a person)' + % `to (a place)' is `i' in Welsh + \def\pagename{tudalen}% + \def\seename{gweler}% + \def\alsoname{gweler hefyd}% + \def\proofname{Prawf}% + \def\glossaryname{Rhestr termau}% + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\datewelsh} +% The macro |\datewelsh| redefines the command |\today| to +% produce welsh dates. +% \changes{welsh-1.0b}{1997/10/01}{Use \cs{edef} to define +% \cs{today} to save memory} +% \changes{welsh-1.0b}{1998/03/28}{use \cs{def} instead of +% \cs{edef}} +% \changes{welsh-1.0d}{2005/03/31}{removed `a viz' from the definition +% of \cs{today}} +% \begin{macrocode} +\def\datewelsh{% + \def\today{\ifnum\day=1\relax 1\/$^{\mathrm{a\tilde{n}}}$\else + \number\day\fi\space\ifcase\month\or + Ionawr\or Chwefror\or Mawrth\or Ebrill\or + Mai\or Mehefin\or Gorffennaf\or Awst\or + Medi\or Hydref\or Tachwedd\or Rhagfyr\fi + \space\number\year}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\extraswelsh} +% \begin{macro}{\noextraswelsh} +% The macro |\extraswelsh| will perform all the extra +% definitions needed for the welsh language. The macro +% |\noextraswelsh| is used to cancel the actions of +% |\extraswelsh|. For the moment these macros are empty but +% they are defined for compatibility with the other +% language definition files. +% +% \begin{macrocode} +\addto\extraswelsh{} +\addto\noextraswelsh{} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% The macro |\ldf@finish| takes care of looking for a +% configuration file, setting the main language to be switched on +% at |\begin{document}| and resetting the category code of +% \texttt{@} to its original value. +% \begin{macrocode} +\ldf@finish{welsh} +% +% \end{macrocode} +% +% \Finale +%\endinput +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +%% diff --git a/Master/texmf-dist/source/generic/babel/welsh.ins b/Master/texmf-dist/source/generic/babel/welsh.ins new file mode 100644 index 00000000000..a807ec6272b --- /dev/null +++ b/Master/texmf-dist/source/generic/babel/welsh.ins @@ -0,0 +1,148 @@ +%% +%% This file will generate fast loadable files and documentation +%% driver files from the doc files in this package when run through +%% LaTeX or TeX. +%% +%% Copyright 1989-2005 Johannes L. Braams and any individual authors +%% listed elsewhere in this file. All rights reserved. +%% +%% This file is part of the Babel system. +%% -------------------------------------- +%% +%% It 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 +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% The Current Maintainer of this work is Johannes Braams. +%% +%% The list of all files belonging to the LaTeX base distribution is +%% given in the file `manifest.bbl. See also `legal.bbl' 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. +%% +%% --------------- start of docstrip commands ------------------ +%% +\def\filedate{1999/04/11} +\def\batchfile{welsh.ins} +\input docstrip.tex + +{\ifx\generate\undefined +\Msg{**********************************************} +\Msg{*} +\Msg{* This installation requires docstrip} +\Msg{* version 2.3c or later.} +\Msg{*} +\Msg{* An older version of docstrip has been input} +\Msg{*} +\Msg{**********************************************} +\errhelp{Move or rename old docstrip.tex.} +\errmessage{Old docstrip in input path} +\batchmode +\csname @@end\endcsname +\fi} + +\declarepreamble\mainpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl 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. +\endpreamble + +\declarepreamble\fdpreamble +This is a generated file. + +Copyright 1989-2005 Johannes L. Braams and any individual authors +listed elsewhere in this file. All rights reserved. + +This file was generated from file(s) of the Babel system. +--------------------------------------------------------- + +It 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 + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2003/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +The Current Maintainer of this work is Johannes Braams. + +This file may only be distributed together with a copy of the Babel +system. You may however distribute the Babel system without +such generated files. + +The list of all files belonging to the Babel distribution is +given in the file `manifest.bbl'. See also `legal.bbl for additional +information. + +In particular, permission is granted to customize the declarations in +this file to serve the needs of your installation. + +However, NO PERMISSION is granted to distribute a modified version +of this file under its original name. + +\endpreamble + +\keepsilent + +\usedir{tex/generic/babel} + +\usepreamble\mainpreamble +\generate{\file{welsh.ldf}{\from{welsh.dtx}{code}} + } +\usepreamble\fdpreamble + +\ifToplevel{ +\Msg{***********************************************************} +\Msg{*} +\Msg{* To finish the installation you have to move the following} +\Msg{* files into a directory searched by TeX:} +\Msg{*} +\Msg{* \space\space All *.def, *.fd, *.ldf, *.sty} +\Msg{*} +\Msg{* To produce the documentation run the files ending with} +\Msg{* '.dtx' and `.fdd' through LaTeX.} +\Msg{*} +\Msg{* Happy TeXing} +\Msg{***********************************************************} +} + +\endinput diff --git a/Master/texmf-dist/source/generic/borceux/compatibility/OldDiagram b/Master/texmf-dist/source/generic/borceux/compatibility/OldDiagram new file mode 100644 index 00000000000..5b10a593c38 --- /dev/null +++ b/Master/texmf-dist/source/generic/borceux/compatibility/OldDiagram @@ -0,0 +1,291 @@ +\catcode`\@=11 + +\newcommand{\earv}[1]{\ear[#1]} +\newcommand{\Earv}[2]{\Ear[#2]{#1}} +\newcommand{\eaRv}[2]{\eaR[#2]{#1}} +\newcommand{\edotarv}[1]{\edotar[#1]} +\newcommand{\Edotarv}[2]{\Edotar[#2]{#1}} +\newcommand{\edotaRv}[2]{\edotaR[#2]{#1}} +\newcommand{\emonov}[1]{\emono[#1]} +\newcommand{\Emonov}[2]{\Emono[#2]{#1}} +\newcommand{\emonOv}[2]{\emonO[#2]{#1}} +\newcommand{\eepiv}[1]{\eepi[#1]} +\newcommand{\Eepiv}[2]{\Eepi[#2]{#1}} +\newcommand{\eepIv}[2]{\eepI[#2]{#1}} +\newcommand{\ebimov}[1]{\ebimo[#1]} +\newcommand{\Ebimov}[2]{\Ebimo[#2]{#1}} +\newcommand{\ebimOv}[2]{\ebimO[#2]{#1}} +\newcommand{\eisov}[1]{\eiso[#1]} +\newcommand{\Eisov}[2]{\Eiso[#2]{#1}} +\newcommand{\eisOv}[2]{\eisO[#2]{#1}} +\newcommand{\eeqlrv}[1]{\eeql[#1]} +\newcommand{\ebiarv}[1]{\ebiar[#1]} +\newcommand{\Ebiarv}[3]{\Ear[#3]{#1}{#2}} +\newcommand{\eadjarv}[1]{\eadjar[#1]} +\newcommand{\Eadjarv}[3]{\Ear[#3]{#1}{#2}} + +\newcommand{\warv}[1]{\war[#1]} +\newcommand{\Warv}[2]{\War[#2]{#1}} +\newcommand{\waRv}[2]{\waR[#2]{#1}} +\newcommand{\wdotarv}[1]{\wdotar[#1]} +\newcommand{\Wdotarv}[2]{\Wdotar[#2]{#1}} +\newcommand{\wdotaRv}[2]{\wdotaR[#2]{#1}} +\newcommand{\wmonov}[1]{\wmono[#1]} +\newcommand{\Wmonov}[2]{\Wmono[#2]{#1}} +\newcommand{\wmonOv}[2]{\wmonO[#2]{#1}} +\newcommand{\wepiv}[1]{\wepi[#1]} +\newcommand{\Wepiv}[2]{\Wepi[#2]{#1}} +\newcommand{\wepIv}[2]{\wepI[#2]{#1}} +\newcommand{\wbimov}[1]{\wbimo[#1]} +\newcommand{\Wbimov}[2]{\Wbimo[#2]{#1}} +\newcommand{\wbimOv}[2]{\wbimO[#2]{#1}} +\newcommand{\wisov}[1]{\wiso[#1]} +\newcommand{\Wisov}[2]{\Wiso[#2]{#1}} +\newcommand{\wisOv}[2]{\wisO[#2]{#1}} +\newcommand{\weqlrv}[1]{\weql[#1]} +\newcommand{\wbiarv}[1]{\wbiar[#1]} +\newcommand{\Wbiarv}[3]{\War[#3]{#1}{#2}} +\newcommand{\wadjarv}[1]{\wadjar[#1]} +\newcommand{\Wadjarv}[3]{\War[#3]{#1}{#2}} + +\newcommand{\narv}[1]{\nar[#1]} +\newcommand{\Narv}[2]{\Nar[#2]{#1}} +\newcommand{\naRv}[2]{\naR[#2]{#1}} +\newcommand{\ndotarv}[1]{\ndotar[#1]} +\newcommand{\Ndotarv}[2]{\Ndotar[#2]{#1}} +\newcommand{\ndotaRv}[2]{\ndotaR[#2]{#1}} +\newcommand{\nmonov}[1]{\nmono[#1]} +\newcommand{\Nmonov}[2]{\Nmono[#2]{#1}} +\newcommand{\nmonOv}[2]{\nmonO[#2]{#1}} +\newcommand{\nepiv}[1]{\nepi[#1]} +\newcommand{\Nepiv}[2]{\Nepi[#2]{#1}} +\newcommand{\nepIv}[2]{\nepI[#2]{#1}} +\newcommand{\nbimov}[1]{\nbimo[#1]} +\newcommand{\Nbimov}[2]{\Nbimo[#2]{#1}} +\newcommand{\nbimOv}[2]{\nbimO[#2]{#1}} +\newcommand{\nisov}[1]{\niso[#1]} +\newcommand{\Nisov}[2]{\Niso[#2]{#1}} +\newcommand{\nisOv}[2]{\nisO[#2]{#1}} +\newcommand{\neqlrv}[1]{\neql[#1]} +\newcommand{\nbiarv}[1]{\nbiar[#1]} +\newcommand{\Nbiarv}[3]{\Nar[#3]{#1}{#2}} +\newcommand{\nadjarv}[1]{\nadjar[#1]} +\newcommand{\Nadjarv}[3]{\Nar[#3]{#1}{#2}} + +\newcommand{\sarv}[1]{\sar[#1]} +\newcommand{\Sarv}[2]{\Sar[#2]{#1}} +\newcommand{\saRv}[2]{\saR[#2]{#1}} +\newcommand{\sdotarv}[1]{\sdotar[#1]} +\newcommand{\Sdotarv}[2]{\Sdotar[#2]{#1}} +\newcommand{\sdotaRv}[2]{\sdotaR[#2]{#1}} +\newcommand{\smonov}[1]{\smono[#1]} +\newcommand{\Smonov}[2]{\Smono[#2]{#1}} +\newcommand{\smonOv}[2]{\smonO[#2]{#1}} +\newcommand{\sepiv}[1]{\sepi[#1]} +\newcommand{\Sepiv}[2]{\Sepi[#2]{#1}} +\newcommand{\sepIv}[2]{\sepI[#2]{#1}} +\newcommand{\sbimov}[1]{\sbimo[#1]} +\newcommand{\Sbimov}[2]{\Sbimo[#2]{#1}} +\newcommand{\sbimOv}[2]{\sbimO[#2]{#1}} +\newcommand{\sisov}[1]{\siso[#1]} +\newcommand{\Sisov}[2]{\Siso[#2]{#1}} +\newcommand{\sisOv}[2]{\sisO[#2]{#1}} +\newcommand{\seqlrv}[1]{\seql[#1]} +\newcommand{\sbiarv}[1]{\sbiar[#1]} +\newcommand{\Sbiarv}[3]{\Sar[#3]{#1}{#2}} +\newcommand{\sadjarv}[1]{\sadjar[#1]} +\newcommand{\Sadjarv}[3]{\Sar[#3]{#1}{#2}} + +\newcommand{\searv}[1]{\sear[#1]} +\newcommand{\Searv}[2]{\Sear[#2]{#1}} +\newcommand{\seaRv}[2]{\seaR[#2]{#1}} + +\newcommand{\nearv}[1]{\near[#1]} +\newcommand{\Nearv}[2]{\Near[#2]{#1}} +\newcommand{\neaRv}[2]{\neaR[#2]{#1}} + +\newcommand{\swarv}[1]{\swar[#1]} +\newcommand{\Swarv}[2]{\Swar[#2]{#1}} +\newcommand{\swaRv}[2]{\swaR[#2]{#1}} + +\newcommand{\nwarv}[1]{\nwar[#1]} +\newcommand{\Nwarv}[2]{\Nwar[#2]{#1}} +\newcommand{\nwaRv}[2]{\nwaR[#2]{#1}} + +\newcommand{\necurve}[1]{\necurvar[#1]} +\newcommand{\nwcurve}[1]{\nwcurvar[#1]} +\newcommand{\securve}[1]{\securvar[#1]} +\newcommand{\swcurve}[1]{\swcurvar[#1]} +\newcommand{\encurve}[1]{\encurvar[#1]} +\newcommand{\escurve}[1]{\escurvar[#1]} +\newcommand{\wncurve}[1]{\wncurvar[#1]} +\newcommand{\wscurve}[1]{\wscurvar[#1]} + +\newcommand{\Freear}[8]{\begin{picture}(0,0)% +\put(#400,#500){\vector(#6,#7){#800}}% +\truex{#200}\truey{#300}% +\put(\value{x},\value{y}){$#1$}\end{picture}}% +\newcommand{\freear}[5]{\Freear{}{0}{0}{#1}{#2}{#3}{#4}{#5}}% + +\newcommand{\DIAG}[1]{% +\diagramtrue% +\SCALE=\defaultscale% +\setlength{\unitlength}{655sp}% +\initialize{\mbox{$#1$}}}% + +\newcommand{\N}[1]% +{\raisebox{0pt}[7pt][0pt]{$#1$}}% + +\let\B=\bold + +\def\newmovename(#1,#2)#3{\hspace{#1pt}% +\raisebox{#2pt}[5pt][2pt]{\raisebox{#2pt}{$#3$}}% +\hspace{-#1pt}}% +\def\newmovearrow(#1,#2)#3{\makebox[0pt]{% +\hspace{#1pt}\hspace{#1pt}% +\raisebox{#2pt}[0pt][0pt]{\raisebox{#2pt}{$#3$}}}}% +\def\newmovevertex(#1,#2)#3{% +\mbox{\hspace{#1pt}% +\raisebox{#2pt}{\raisebox{#2pt}{$#3$}}% +\hspace{-#1pt}}}% +\newcommand{\oldmovename}[3]{\newmovename(#2,#3){#1}} +\newcommand{\oldmovearrow}[3]{\newmovearrow(#2,#3){#1}} +\newcommand{\oldmovevertex}[3]{\newmovevertex(#2,#3){#1}} +\renewcommand{\movename}{\@ifnextchar({\newmovename}{\oldmovename}} +\renewcommand{\movearrow}{\@ifnextchar({\newmovearrow}{\oldmovearrow}} +\renewcommand{\movevertex}{\@ifnextchar({\newmovevertex}{\oldmovevertex}} + +\newcount\A\newcount\B +\newcommand{\Diag}[2]{\A=0\B=0\DIAG{#2}} +\newcommand{\Diagv}[4]{\A=#2\B=#3\DIAG{#4}} +\newcommand{\diaGv}[2]{\advance\B by -#1\diagv{\A}{\B}{#2}} +\newcommand{\diaG}{\diagv{\A}{\B}{0}} +\newcommand{\move}[3]{\movename(#2,#3){#1}} + +% SPECIAL SYMBOLS + +% adjoint symbol +\newcommand{\adj}{\begin{picture}(9,6)% +\put(1,3){\line(1,0){6}}\put(7,0){\line(0,1){6}}% +\end{picture}}% + +% commutative diagram symbol +\newcommand{\com}{\begin{picture}(12,8)% +\put(6,4){\oval(8,8)[b]}\put(6,4){\oval(8,8)[r]}% +\put(6,8){\line(-1,0){2}}\end{picture}}% + +% natural transformation with names [1],[2],[3] +\newcommand{\Nat}[3]{\raisebox{-2pt}% +{\begin{picture}(34,15)% +\put(2,10){\line(1,0){30}}% +\put(32,10){\ehead}% +\put(2,0){\line(1,0){30}}% +\put(32,0){\ehead}% +\put(13,2){$\Downarrow$}% +\put(20,3){$\scriptstyle{#2}$}% +\put(4,11){$\scriptstyle{#1}$}% +\put(4,1){$\scriptstyle{#3}$}% +\end{picture}}}% + +% natural transformation +\newcommand{\nat}{\raisebox{-2pt}% +{\begin{picture}(34,10)% +\put(2,10){\line(1,0){30}}% +\put(32,10){\ehead}% +\put(2,0){\line(1,0){30}}% +\put(32,0){\ehead}% +\put(13,2){$\Downarrow$}% +\end{picture}}}% + +% pair of natural transformations with names [1],[2],[3],[4],[5] +\newcommand{\Binat}[5]{\raisebox{-7.5pt}% +{\begin{picture}(34,25)% +\put(2,20){\line(1,0){30}}% +\put(32,20){\ehead}% +\put(2,10){\line(1,0){30}}% +\put(32,10){\ehead}% +\put(2,0){\line(1,0){30}}% +\put(32,0){\ehead}% +\put(13,12){$\Downarrow$}% +\put(13,2){$\Downarrow$}% +\put(20,13){$\scriptstyle{#2}$}% +\put(20,3){$\scriptstyle{#4}$}% +\put(4,21){$\scriptstyle{#1}$}% +\put(4,11){$\scriptstyle{#3}$}% +\put(4,1){$\scriptstyle{#5}$}% +\end{picture}}}% + +% pair of natural transformations +\newcommand{\binat}{\raisebox{-7.5pt}% +{\begin{picture}(34,20)% +\put(2,20){\line(1,0){30}}% +\put(32,20){\ehead}% +\put(2,10){\line(1,0){30}}% +\put(32,10){\ehead}% +\put(2,0){\line(1,0){30}}% +\put(32,0){\ehead}% +\put(13,12){$\Downarrow$}% +\put(13,2){$\Downarrow$}% +\end{picture}}}% + +% display natural transformation with names [1],[2],[3] +\newcommand{\Dnat}[3]{\raisebox{-2pt}% +{\begin{picture}(54,15)% +\put(2,10){\line(1,0){50}}% +\put(52,10){\ehead}% +\put(2,0){\line(1,0){50}}% +\put(52,0){\ehead}% +\put(23,2){$\Downarrow$}% +\put(30,1){$\textstyle{#2}$}% +\put(4,11){$\textstyle{#1}$}% +\put(4,1){$\textstyle{#3}$}% +\end{picture}}}% + +% display natural transformation +\newcommand{\dnat}{\raisebox{-2pt}% +{\begin{picture}(54,10)% +\put(2,10){\line(1,0){50}}% +\put(52,10){\ehead}% +\put(2,0){\line(1,0){50}}% +\put(52,0){\ehead}% +\put(23,2){$\Downarrow$}% +\end{picture}}}% + +% display pair of natural transformations with names [1],[2],[3],[4],[5] +\newcommand{\Dbinat}[5]{\raisebox{-7.5pt}% +{\begin{picture}(54,25)% +\put(2,20){\line(1,0){50}}% +\put(52,20){\ehead}% +\put(2,10){\line(1,0){50}}% +\put(52,10){\ehead}% +\put(2,0){\line(1,0){50}}% +\put(52,0){\ehead}% +\put(23,12){$\Downarrow$}% +\put(23,2){$\Downarrow$}% +\put(30,11){$\textstyle{#2}$}% +\put(30,1){$\textstyle{#4}$}% +\put(4,21){$\textstyle{#1}$}% +\put(4,11){$\textstyle{#3}$}% +\put(4,1){$\textstyle{#5}$}% +\end{picture}}}% + +% display pair of natural transformations +\newcommand{\dbinat}{\raisebox{-7.5pt}% +{\begin{picture}(54,20)% +\put(2,20){\line(1,0){50}}% +\put(52,20){\ehead}% +\put(2,10){\line(1,0){50}}% +\put(52,10){\ehead}% +\put(2,0){\line(1,0){50}}% +\put(52,0){\ehead}% +\put(23,12){$\Downarrow$}% +\put(23,2){$\Downarrow$}% +\end{picture}}}% + +\setdisplayarrowlength{20} + +\typeout{\string\displayarrowlength has been put to value 20 +by the file OldDiagram} + + +\catcode`\@=12 \ No newline at end of file diff --git a/Master/texmf-dist/source/generic/borceux/compatibility/OldMaxiDiagram b/Master/texmf-dist/source/generic/borceux/compatibility/OldMaxiDiagram new file mode 100644 index 00000000000..a1fc33b66a7 --- /dev/null +++ b/Master/texmf-dist/source/generic/borceux/compatibility/OldMaxiDiagram @@ -0,0 +1,209 @@ +\catcode`\@=11 + +\newcommand{\earv}[1]{\ear[#1]} +\newcommand{\Earv}[2]{\Ear[#2]{#1}} +\newcommand{\eaRv}[2]{\eaR[#2]{#1}} +\newcommand{\edotarv}[1]{\edotar[#1]} +\newcommand{\Edotarv}[2]{\Edotar[#2]{#1}} +\newcommand{\edotaRv}[2]{\edotaR[#2]{#1}} +\newcommand{\emonov}[1]{\emono[#1]} +\newcommand{\Emonov}[2]{\Emono[#2]{#1}} +\newcommand{\emonOv}[2]{\emonO[#2]{#1}} +\newcommand{\eepiv}[1]{\eepi[#1]} +\newcommand{\Eepiv}[2]{\Eepi[#2]{#1}} +\newcommand{\eepIv}[2]{\eepI[#2]{#1}} +\newcommand{\ebimov}[1]{\ebimo[#1]} +\newcommand{\Ebimov}[2]{\Ebimo[#2]{#1}} +\newcommand{\ebimOv}[2]{\ebimO[#2]{#1}} +\newcommand{\eisov}[1]{\eiso[#1]} +\newcommand{\Eisov}[2]{\Eiso[#2]{#1}} +\newcommand{\eisOv}[2]{\eisO[#2]{#1}} +\newcommand{\eeqlrv}[1]{\eeql[#1]} +\newcommand{\ebiarv}[1]{\ebiar[#1]} +\newcommand{\Ebiarv}[3]{\Ear[#3]{#1}{#2}} +\newcommand{\eadjarv}[1]{\eadjar[#1]} +\newcommand{\Eadjarv}[3]{\Ear[#3]{#1}{#2}} +\newcommand{\etriarv}[1]{\etriar[#1]} +\newcommand{\Etriarv}[4]{\Etriar[#4]{#1}{#2}{#3}} +\newcommand{\etriaRv}[4]{\etriaR[#4]{#1}{#2}{#3}} +\newcommand{\etriadjarv}[1]{\etriadjar[#1]} +\newcommand{\Etriadjarv}[4]{\Etriadjar[#4]{#1}{#2}{#3}} +\newcommand{\etriadjaRv}[4]{\etriadjaR[#4]{#1}{#2}{#3}} +\newcommand{\equadriarv}[1]{\equadriar[#1]} +\newcommand{\equadriadjarv}[1]{\equadriadjar[#1]} +\newcommand{\equintiarv}[1]{\equintiar[#1]} +\newcommand{\equintiadjarv}[1]{\equintiadjar[#1]} + +\newcommand{\warv}[1]{\war[#1]} +\newcommand{\Warv}[2]{\War[#2]{#1}} +\newcommand{\waRv}[2]{\waR[#2]{#1}} +\newcommand{\wdotarv}[1]{\wdotar[#1]} +\newcommand{\Wdotarv}[2]{\Wdotar[#2]{#1}} +\newcommand{\wdotaRv}[2]{\wdotaR[#2]{#1}} +\newcommand{\wmonov}[1]{\wmono[#1]} +\newcommand{\Wmonov}[2]{\Wmono[#2]{#1}} +\newcommand{\wmonOv}[2]{\wmonO[#2]{#1}} +\newcommand{\wepiv}[1]{\wepi[#1]} +\newcommand{\Wepiv}[2]{\Wepi[#2]{#1}} +\newcommand{\wepIv}[2]{\wepI[#2]{#1}} +\newcommand{\wbimov}[1]{\wbimo[#1]} +\newcommand{\Wbimov}[2]{\Wbimo[#2]{#1}} +\newcommand{\wbimOv}[2]{\wbimO[#2]{#1}} +\newcommand{\wisov}[1]{\wiso[#1]} +\newcommand{\Wisov}[2]{\Wiso[#2]{#1}} +\newcommand{\wisOv}[2]{\wisO[#2]{#1}} +\newcommand{\weqlrv}[1]{\weql[#1]} +\newcommand{\wbiarv}[1]{\wbiar[#1]} +\newcommand{\Wbiarv}[3]{\War[#3]{#1}{#2}} +\newcommand{\wadjarv}[1]{\wadjar[#1]} +\newcommand{\Wadjarv}[3]{\War[#3]{#1}{#2}} +\newcommand{\wtriarv}[1]{\wtriar[#1]} +\newcommand{\Wtriarv}[4]{\Wtriar[#4]{#1}{#2}{#3}} +\newcommand{\wtriaRv}[4]{\wtriaR[#4]{#1}{#2}{#3}} +\newcommand{\wtriadjarv}[1]{\wtriadjar[#1]} +\newcommand{\Wtriadjarv}[4]{\Wtriadjar[#4]{#1}{#2}{#3}} +\newcommand{\wtriadjaRv}[4]{\wtriadjaR[#4]{#1}{#2}{#3}} +\newcommand{\wquadriarv}[1]{\wquadriar[#1]} +\newcommand{\wquadriadjarv}[1]{\wquadriadjar[#1]} +\newcommand{\wquintiarv}[1]{\wquintiar[#1]} +\newcommand{\wquintiadjarv}[1]{\wquintiadjar[#1]} + +\newcommand{\narv}[1]{\nar[#1]} +\newcommand{\Narv}[2]{\Nar[#2]{#1}} +\newcommand{\naRv}[2]{\naR[#2]{#1}} +\newcommand{\ndotarv}[1]{\ndotar[#1]} +\newcommand{\Ndotarv}[2]{\Ndotar[#2]{#1}} +\newcommand{\ndotaRv}[2]{\ndotaR[#2]{#1}} +\newcommand{\nmonov}[1]{\nmono[#1]} +\newcommand{\Nmonov}[2]{\Nmono[#2]{#1}} +\newcommand{\nmonOv}[2]{\nmonO[#2]{#1}} +\newcommand{\nepiv}[1]{\nepi[#1]} +\newcommand{\Nepiv}[2]{\Nepi[#2]{#1}} +\newcommand{\nepIv}[2]{\nepI[#2]{#1}} +\newcommand{\nbimov}[1]{\nbimo[#1]} +\newcommand{\Nbimov}[2]{\Nbimo[#2]{#1}} +\newcommand{\nbimOv}[2]{\nbimO[#2]{#1}} +\newcommand{\nisov}[1]{\niso[#1]} +\newcommand{\Nisov}[2]{\Niso[#2]{#1}} +\newcommand{\nisOv}[2]{\nisO[#2]{#1}} +\newcommand{\neqlrv}[1]{\neql[#1]} +\newcommand{\nbiarv}[1]{\nbiar[#1]} +\newcommand{\Nbiarv}[3]{\Nar[#3]{#1}{#2}} +\newcommand{\nadjarv}[1]{\nadjar[#1]} +\newcommand{\Nadjarv}[3]{\Nar[#3]{#1}{#2}} +\newcommand{\ntriarv}[1]{\ntriar[#1]} +\newcommand{\Ntriarv}[4]{\Ntriar[#4]{#1}{#2}{#3}} +\newcommand{\ntriaRv}[4]{\ntriaR[#4]{#1}{#2}{#3}} +\newcommand{\ntriadjarv}[1]{\ntriadjar[#1]} +\newcommand{\Ntriadjarv}[4]{\Ntriadjar[#4]{#1}{#2}{#3}} +\newcommand{\ntriadjaRv}[4]{\ntriadjaR[#4]{#1}{#2}{#3}} +\newcommand{\nquadriarv}[1]{\nquadriar[#1]} +\newcommand{\nquadriadjarv}[1]{\nquadriadjar[#1]} +\newcommand{\nquintiarv}[1]{\nquintiar[#1]} +\newcommand{\nquintiadjarv}[1]{\nquintiadjar[#1]} + +\newcommand{\sarv}[1]{\sar[#1]} +\newcommand{\Sarv}[2]{\Sar[#2]{#1}} +\newcommand{\saRv}[2]{\saR[#2]{#1}} +\newcommand{\sdotarv}[1]{\sdotar[#1]} +\newcommand{\Sdotarv}[2]{\Sdotar[#2]{#1}} +\newcommand{\sdotaRv}[2]{\sdotaR[#2]{#1}} +\newcommand{\smonov}[1]{\smono[#1]} +\newcommand{\Smonov}[2]{\Smono[#2]{#1}} +\newcommand{\smonOv}[2]{\smonO[#2]{#1}} +\newcommand{\sepiv}[1]{\sepi[#1]} +\newcommand{\Sepiv}[2]{\Sepi[#2]{#1}} +\newcommand{\sepIv}[2]{\sepI[#2]{#1}} +\newcommand{\sbimov}[1]{\sbimo[#1]} +\newcommand{\Sbimov}[2]{\Sbimo[#2]{#1}} +\newcommand{\sbimOv}[2]{\sbimO[#2]{#1}} +\newcommand{\sisov}[1]{\siso[#1]} +\newcommand{\Sisov}[2]{\Siso[#2]{#1}} +\newcommand{\sisOv}[2]{\sisO[#2]{#1}} +\newcommand{\seqlrv}[1]{\seql[#1]} +\newcommand{\sbiarv}[1]{\sbiar[#1]} +\newcommand{\Sbiarv}[3]{\Sar[#3]{#1}{#2}} +\newcommand{\sadjarv}[1]{\sadjar[#1]} +\newcommand{\Sadjarv}[3]{\Sar[#3]{#1}{#2}} +\newcommand{\Striarv}[4]{\Striar[#4]{#1}{#2}{#3}} +\newcommand{\striaRv}[4]{\striaR[#4]{#1}{#2}{#3}} +\newcommand{\striadjarv}[1]{\striadjar[#1]} +\newcommand{\Striadjarv}[4]{\Striadjar[#4]{#1}{#2}{#3}} +\newcommand{\striadjaRv}[4]{\striadjaR[#4]{#1}{#2}{#3}} +\newcommand{\squadriarv}[1]{\squadriar[#1]} +\newcommand{\squadriadjarv}[1]{\squadriadjar[#1]} +\newcommand{\squintiarv}[1]{\squintiar[#1]} +\newcommand{\squintiadjarv}[1]{\nquintiadjar[#1]} + +\newcommand{\searv}[1]{\sear[#1]} +\newcommand{\Searv}[2]{\Sear[#2]{#1}} +\newcommand{\seaRv}[2]{\seaR[#2]{#1}} + +\newcommand{\nearv}[1]{\near[#1]} +\newcommand{\Nearv}[2]{\Near[#2]{#1}} +\newcommand{\neaRv}[2]{\neaR[#2]{#1}} + +\newcommand{\swarv}[1]{\swar[#1]} +\newcommand{\Swarv}[2]{\Swar[#2]{#1}} +\newcommand{\swaRv}[2]{\swaR[#2]{#1}} + +\newcommand{\nwarv}[1]{\nwar[#1]} +\newcommand{\Nwarv}[2]{\Nwar[#2]{#1}} +\newcommand{\nwaRv}[2]{\nwaR[#2]{#1}} + +\newcommand{\necurve}[1]{\necurvar[#1]} +\newcommand{\nwcurve}[1]{\nwcurvar[#1]} +\newcommand{\securve}[1]{\securvar[#1]} +\newcommand{\swcurve}[1]{\swcurvar[#1]} +\newcommand{\encurve}[1]{\encurvar[#1]} +\newcommand{\escurve}[1]{\escurvar[#1]} +\newcommand{\wncurve}[1]{\wncurvar[#1]} +\newcommand{\wscurve}[1]{\wscurvar[#1]} + +\newcommand{\Freear}[8]{\begin{picture}(0,0)% +\put(#400,#500){\vector(#6,#7){#800}}% +\truex{#200}\truey{#300}% +\put(\value{x},\value{y}){$#1$}\end{picture}}% +\newcommand{\freear}[5]{\Freear{}{0}{0}{#1}{#2}{#3}{#4}{#5}}% + +\newcommand{\DIAG}[1]{% +\diagramtrue% +\SCALE=\defaultscale% +\setlength{\unitlength}{655sp}% +\initialize{\mbox{$#1$}}}% + +\newcommand{\N}[1]% +{\raisebox{0pt}[7pt][0pt]{$#1$}}% + +\let\B=\bold + +\def\newmovename(#1,#2)#3{\hspace{#1pt}% +\raisebox{#2pt}[5pt][2pt]{\raisebox{#2pt}{$#3$}}% +\hspace{-#1pt}}% +\def\newmovearrow(#1,#2)#3{\makebox[0pt]{% +\hspace{#1pt}\hspace{#1pt}% +\raisebox{#2pt}[0pt][0pt]{\raisebox{#2pt}{$#3$}}}}% +\def\newmovevertex(#1,#2)#3{% +\mbox{\hspace{#1pt}% +\raisebox{#2pt}{\raisebox{#2pt}{$#3$}}% +\hspace{-#1pt}}}% +\newcommand{\oldmovename}[3]{\newmovename(#2,#3){#1}} +\newcommand{\oldmovearrow}[3]{\newmovearrow(#2,#3){#1}} +\newcommand{\oldmovevertex}[3]{\newmovevertex(#2,#3){#1}} +\renewcommand{\movename}{\@ifnextchar({\newmovename}{\oldmovename}} +\renewcommand{\movearrow}{\@ifnextchar({\newmovearrow}{\oldmovearrow}} +\renewcommand{\movevertex}{\@ifnextchar({\newmovevertex}{\oldmovevertex}} + +\newcount\A\newcount\B +\newcommand{\Diag}[2]{\A=0\B=0\DIAG{#2}} +\newcommand{\Diagv}[4]{\A=#2\B=#3\DIAG{#4}} +\newcommand{\diaGv}[2]{\advance\B by -#1\diagv{\A}{\B}{#2}} +\newcommand{\diaG}{\diagv{\A}{\B}{0}} +\newcommand{\move}[3]{\movename(#2,#3){#1}} + +\setdisplayarrowlength{20} + +\typeout{\string\displayarrowlength has been put to value 20 +by the file OldMaxiDiagram} + +\catcode`\@=12 \ No newline at end of file diff --git a/Master/texmf-dist/source/generic/borceux/compatibility/OldMicroDiagram b/Master/texmf-dist/source/generic/borceux/compatibility/OldMicroDiagram new file mode 100644 index 00000000000..26bd21b6920 --- /dev/null +++ b/Master/texmf-dist/source/generic/borceux/compatibility/OldMicroDiagram @@ -0,0 +1,90 @@ +\catcode`\@=11 + +\newcommand{\earv}[1]{\ear[#1]} +\newcommand{\Earv}[2]{\Ear[#2]{#1}} +\newcommand{\eaRv}[2]{\eaR[#2]{#1}} + +\newcommand{\warv}[1]{\war[#1]} +\newcommand{\Warv}[2]{\War[#2]{#1}} +\newcommand{\waRv}[2]{\waR[#2]{#1}} + +\newcommand{\narv}[1]{\nar[#1]} +\newcommand{\Narv}[2]{\Nar[#2]{#1}} +\newcommand{\naRv}[2]{\naR[#2]{#1}} + +\newcommand{\sarv}[1]{\sar[#1]} +\newcommand{\Sarv}[2]{\Sar[#2]{#1}} +\newcommand{\saRv}[2]{\saR[#2]{#1}} + +\newcommand{\searv}[1]{\sear[#1]} +\newcommand{\Searv}[2]{\Sear[#2]{#1}} +\newcommand{\seaRv}[2]{\seaR[#2]{#1}} + +\newcommand{\nearv}[1]{\near[#1]} +\newcommand{\Nearv}[2]{\Near[#2]{#1}} +\newcommand{\neaRv}[2]{\neaR[#2]{#1}} + +\newcommand{\swarv}[1]{\swar[#1]} +\newcommand{\Swarv}[2]{\Swar[#2]{#1}} +\newcommand{\swaRv}[2]{\swaR[#2]{#1}} + +\newcommand{\nwarv}[1]{\nwar[#1]} +\newcommand{\Nwarv}[2]{\Nwar[#2]{#1}} +\newcommand{\nwaRv}[2]{\nwaR[#2]{#1}} + +\newcommand{\necurve}[1]{\necurvar[#1]} +\newcommand{\nwcurve}[1]{\nwcurvar[#1]} +\newcommand{\securve}[1]{\securvar[#1]} +\newcommand{\swcurve}[1]{\swcurvar[#1]} +\newcommand{\encurve}[1]{\encurvar[#1]} +\newcommand{\escurve}[1]{\escurvar[#1]} +\newcommand{\wncurve}[1]{\wncurvar[#1]} +\newcommand{\wscurve}[1]{\wscurvar[#1]} + +\newcommand{\Freear}[8]{\begin{picture}(0,0)% +\put(#400,#500){\vector(#6,#7){#800}}% +\truex{#200}\truey{#300}% +\put(\value{x},\value{y}){$#1$}\end{picture}}% +\newcommand{\freear}[5]{\Freear{}{0}{0}{#1}{#2}{#3}{#4}{#5}}% + +\newcommand{\DIAG}[1]{% +\diagramtrue% +\SCALE=\defaultscale% +\setlength{\unitlength}{655sp}% +\initialize{\mbox{$#1$}}}% + +\newcommand{\N}[1]% +{\raisebox{0pt}[7pt][0pt]{$#1$}}% + +\let\B=\bold + +\def\newmovename(#1,#2)#3{\hspace{#1pt}% +\raisebox{#2pt}[5pt][2pt]{\raisebox{#2pt}{$#3$}}% +\hspace{-#1pt}}% +\def\newmovearrow(#1,#2)#3{\makebox[0pt]{% +\hspace{#1pt}\hspace{#1pt}% +\raisebox{#2pt}[0pt][0pt]{\raisebox{#2pt}{$#3$}}}}% +\def\newmovevertex(#1,#2)#3{% +\mbox{\hspace{#1pt}% +\raisebox{#2pt}{\raisebox{#2pt}{$#3$}}% +\hspace{-#1pt}}}% +\newcommand{\oldmovename}[3]{\newmovename(#2,#3){#1}} +\newcommand{\oldmovearrow}[3]{\newmovearrow(#2,#3){#1}} +\newcommand{\oldmovevertex}[3]{\newmovevertex(#2,#3){#1}} +\renewcommand{\movename}{\@ifnextchar({\newmovename}{\oldmovename}} +\renewcommand{\movearrow}{\@ifnextchar({\newmovearrow}{\oldmovearrow}} +\renewcommand{\movevertex}{\@ifnextchar({\newmovevertex}{\oldmovevertex}} + +\newcount\A\newcount\B +\newcommand{\Diag}[2]{\A=0\B=0\DIAG{#2}} +\newcommand{\Diagv}[4]{\A=#2\B=#3\DIAG{#4}} +\newcommand{\diaGv}[2]{\advance\B by -#1\diagv{\A}{\B}{#2}} +\newcommand{\diaG}{\diagv{\A}{\B}{0}} +\newcommand{\move}[3]{\movename(#2,#3){#1}} + +\setdisplayarrowlength{20} + +\typeout{\string\displayarrowlength has been put to value 20 +by the file OldMicroDiagram} + +\catcode`\@=12 \ No newline at end of file diff --git a/Master/texmf-dist/source/generic/borceux/compatibility/OldMiniDiagram b/Master/texmf-dist/source/generic/borceux/compatibility/OldMiniDiagram new file mode 100644 index 00000000000..af151407181 --- /dev/null +++ b/Master/texmf-dist/source/generic/borceux/compatibility/OldMiniDiagram @@ -0,0 +1,107 @@ +\catcode`\@=11 + +\newcommand{\earv}[1]{\ear[#1]} +\newcommand{\Earv}[2]{\Ear[#2]{#1}} +\newcommand{\eaRv}[2]{\eaR[#2]{#1}} +\newcommand{\ebiarv}[1]{\ebiar[#1]} +\newcommand{\Ebiarv}[3]{\Ear[#3]{#1}{#2}} +\newcommand{\eadjarv}[1]{\eadjar[#1]} +\newcommand{\Eadjarv}[3]{\Ear[#3]{#1}{#2}} + +\newcommand{\warv}[1]{\war[#1]} +\newcommand{\Warv}[2]{\War[#2]{#1}} +\newcommand{\waRv}[2]{\waR[#2]{#1}} +\newcommand{\wbiarv}[1]{\wbiar[#1]} +\newcommand{\Wbiarv}[3]{\War[#3]{#1}{#2}} +\newcommand{\wadjarv}[1]{\wadjar[#1]} +\newcommand{\Wadjarv}[3]{\War[#3]{#1}{#2}} + +\newcommand{\narv}[1]{\nar[#1]} +\newcommand{\Narv}[2]{\Nar[#2]{#1}} +\newcommand{\naRv}[2]{\naR[#2]{#1}} +\newcommand{\nbiarv}[1]{\nbiar[#1]} +\newcommand{\Nbiarv}[3]{\Nar[#3]{#1}{#2}} +\newcommand{\nadjarv}[1]{\nadjar[#1]} +\newcommand{\Nadjarv}[3]{\Nar[#3]{#1}{#2}} + +\newcommand{\sarv}[1]{\sar[#1]} +\newcommand{\Sarv}[2]{\Sar[#2]{#1}} +\newcommand{\saRv}[2]{\saR[#2]{#1}} +\newcommand{\sbiarv}[1]{\sbiar[#1]} +\newcommand{\Sbiarv}[3]{\Sar[#3]{#1}{#2}} +\newcommand{\sadjarv}[1]{\sadjar[#1]} +\newcommand{\Sadjarv}[3]{\Sar[#3]{#1}{#2}} + +\newcommand{\searv}[1]{\sear[#1]} +\newcommand{\Searv}[2]{\Sear[#2]{#1}} +\newcommand{\seaRv}[2]{\seaR[#2]{#1}} + +\newcommand{\nearv}[1]{\near[#1]} +\newcommand{\Nearv}[2]{\Near[#2]{#1}} +\newcommand{\neaRv}[2]{\neaR[#2]{#1}} + +\newcommand{\swarv}[1]{\swar[#1]} +\newcommand{\Swarv}[2]{\Swar[#2]{#1}} +\newcommand{\swaRv}[2]{\swaR[#2]{#1}} + +\newcommand{\nwarv}[1]{\nwar[#1]} +\newcommand{\Nwarv}[2]{\Nwar[#2]{#1}} +\newcommand{\nwaRv}[2]{\nwaR[#2]{#1}} + +\newcommand{\necurve}[1]{\necurvar[#1]} +\newcommand{\nwcurve}[1]{\nwcurvar[#1]} +\newcommand{\securve}[1]{\securvar[#1]} +\newcommand{\swcurve}[1]{\swcurvar[#1]} +\newcommand{\encurve}[1]{\encurvar[#1]} +\newcommand{\escurve}[1]{\escurvar[#1]} +\newcommand{\wncurve}[1]{\wncurvar[#1]} +\newcommand{\wscurve}[1]{\wscurvar[#1]} + +\newcommand{\Freear}[8]{\begin{picture}(0,0)% +\put(#400,#500){\vector(#6,#7){#800}}% +\truex{#200}\truey{#300}% +\put(\value{x},\value{y}){$#1$}\end{picture}}% +\newcommand{\freear}[5]{\Freear{}{0}{0}{#1}{#2}{#3}{#4}{#5}}% + +\newcommand{\DIAG}[1]{% +\diagramtrue% +\SCALE=\defaultscale% +\setlength{\unitlength}{655sp}% +\initialize{\mbox{$#1$}}}% + +\newcommand{\N}[1]% +{\raisebox{0pt}[7pt][0pt]{$#1$}}% + +\let\B=\bold + +\def\newmovename(#1,#2)#3{\hspace{#1pt}% +\raisebox{#2pt}[5pt][2pt]{\raisebox{#2pt}{$#3$}}% +\hspace{-#1pt}}% +\def\newmovearrow(#1,#2)#3{\makebox[0pt]{% +\hspace{#1pt}\hspace{#1pt}% +\raisebox{#2pt}[0pt][0pt]{\raisebox{#2pt}{$#3$}}}}% +\def\newmovevertex(#1,#2)#3{% +\mbox{\hspace{#1pt}% +\raisebox{#2pt}{\raisebox{#2pt}{$#3$}}% +\hspace{-#1pt}}}% +\newcommand{\oldmovename}[3]{\newmovename(#2,#3){#1}} +\newcommand{\oldmovearrow}[3]{\newmovearrow(#2,#3){#1}} +\newcommand{\oldmovevertex}[3]{\newmovevertex(#2,#3){#1}} +\renewcommand{\movename}{\@ifnextchar({\newmovename}{\oldmovename}} +\renewcommand{\movearrow}{\@ifnextchar({\newmovearrow}{\oldmovearrow}} +\renewcommand{\movevertex}{\@ifnextchar({\newmovevertex}{\oldmovevertex}} + +\newcount\A\newcount\B +\newcommand{\Diag}[2]{\A=0\B=0\DIAG{#2}} +\newcommand{\Diagv}[4]{\A=#2\B=#3\DIAG{#4}} +\newcommand{\diaGv}[2]{\advance\B by -#1\diagv{\A}{\B}{#2}} +\newcommand{\diaG}{\diagv{\A}{\B}{0}} +\newcommand{\move}[3]{\movename(#2,#3){#1}} + +\setdisplayarrowlength{20} + +\typeout{\string\displayarrowlength has been put to value 20 +by the file OldMiniDiagram} + + +\catcode`\@=12 \ No newline at end of file diff --git a/Master/texmf-dist/source/generic/borceux/compatibility/OldMultipleArrows b/Master/texmf-dist/source/generic/borceux/compatibility/OldMultipleArrows new file mode 100644 index 00000000000..1b97736a068 --- /dev/null +++ b/Master/texmf-dist/source/generic/borceux/compatibility/OldMultipleArrows @@ -0,0 +1,49 @@ + % COMPATIBILITY WITH OLDER VERSIONS + +\newcommand{\etriarv}[1]{\etriar[#1]} +\newcommand{\Etriarv}[4]{\Etriar[#4]{#1}{#2}{#3}} +\newcommand{\etriaRv}[4]{\etriaR[#4]{#1}{#2}{#3}} +\newcommand{\etriadjarv}[1]{\etriadjar[#1]} +\newcommand{\Etriadjarv}[4]{\Etriadjar[#4]{#1}{#2}{#3}} +\newcommand{\etriadjaRv}[4]{\etriadjaR[#4]{#1}{#2}{#3}} +\newcommand{\equadriarv}[1]{\equadriar[#1]} +\newcommand{\equadriadjarv}[1]{\equadriadjar[#1]} +\newcommand{\equintiarv}[1]{\equintiar[#1]} +\newcommand{\equintiadjarv}[1]{\equintiadjar[#1]} + +\newcommand{\wtriarv}[1]{\wtriar[#1]} +\newcommand{\Wtriarv}[4]{\Wtriar[#4]{#1}{#2}{#3}} +\newcommand{\wtriaRv}[4]{\wtriaR[#4]{#1}{#2}{#3}} +\newcommand{\wtriadjarv}[1]{\wtriadjar[#1]} +\newcommand{\Wtriadjarv}[4]{\Wtriadjar[#4]{#1}{#2}{#3}} +\newcommand{\wtriadjaRv}[4]{\wtriadjaR[#4]{#1}{#2}{#3}} +\newcommand{\wquadriarv}[1]{\wquadriar[#1]} +\newcommand{\wquadriadjarv}[1]{\wquadriadjar[#1]} +\newcommand{\wquintiarv}[1]{\wquintiar[#1]} +\newcommand{\wquintiadjarv}[1]{\wquintiadjar[#1]} + +\newcommand{\ntriarv}[1]{\ntriar[#1]} +\newcommand{\Ntriarv}[4]{\Ntriar[#4]{#1}{#2}{#3}} +\newcommand{\ntriaRv}[4]{\ntriaR[#4]{#1}{#2}{#3}} +\newcommand{\ntriadjarv}[1]{\ntriadjar[#1]} +\newcommand{\Ntriadjarv}[4]{\Ntriadjar[#4]{#1}{#2}{#3}} +\newcommand{\ntriadjaRv}[4]{\ntriadjaR[#4]{#1}{#2}{#3}} +\newcommand{\nquadriarv}[1]{\nquadriar[#1]} +\newcommand{\nquadriadjarv}[1]{\nquadriadjar[#1]} +\newcommand{\nquintiarv}[1]{\nquintiar[#1]} +\newcommand{\nquintiadjarv}[1]{\nquintiadjar[#1]} + +\newcommand{\Striarv}[4]{\Striar[#4]{#1}{#2}{#3}} +\newcommand{\striaRv}[4]{\striaR[#4]{#1}{#2}{#3}} +\newcommand{\striadjarv}[1]{\striadjar[#1]} +\newcommand{\Striadjarv}[4]{\Striadjar[#4]{#1}{#2}{#3}} +\newcommand{\striadjaRv}[4]{\striadjaR[#4]{#1}{#2}{#3}} +\newcommand{\squadriarv}[1]{\squadriar[#1]} +\newcommand{\squadriadjarv}[1]{\squadriadjar[#1]} +\newcommand{\squintiarv}[1]{\squintiar[#1]} +\newcommand{\squintiadjarv}[1]{\nquintiadjar[#1]} + +\setdisplayarrowlength{20} + +\typeout{\string\displayarrowlength has been put to value 20 +by the file OldMultipleArrows} diff --git a/Master/texmf-dist/source/generic/german/betatest/00readme.1st b/Master/texmf-dist/source/generic/german/betatest/00readme.1st new file mode 100644 index 00000000000..2013a24b454 --- /dev/null +++ b/Master/texmf-dist/source/generic/german/betatest/00readme.1st @@ -0,0 +1,7 @@ +The version 2.5e (1998-07-14) of the `german' collection +has been moved to the parent directory language/german/. + +Future beta versions will be located _here_ again. + +Walter Schmidt + diff --git a/Master/texmf-dist/source/generic/german/german.MISSING b/Master/texmf-dist/source/generic/german/german.MISSING new file mode 100644 index 00000000000..acfad9e270d --- /dev/null +++ b/Master/texmf-dist/source/generic/german/german.MISSING @@ -0,0 +1,10 @@ +If you need the style option/package "german.sty", you can find the +newest version on CTAN in + + tex-archive/languages/german/ + + +The participating hosts in the Comprehensive TeX Archive Network +(CTAN) are: + ftp.dante.de (Germany) + ftp.tex.ac.uk (England) diff --git a/Master/texmf-dist/source/generic/german/german.dtx b/Master/texmf-dist/source/generic/german/german.dtx new file mode 100644 index 00000000000..50500e75a06 --- /dev/null +++ b/Master/texmf-dist/source/generic/german/german.dtx @@ -0,0 +1,2331 @@ +% \iffalse meta-comment +%<*!hyphcfg> +%<*!driver> +% \begin{macrocode} +% +% Copyright (C) 1987-1990 by H.Partl +% Copyright (C) 1991-1997 by B.Raichle and DANTE e.V. +% Copyright (C) 1998 by B.Raichle +% All rights reserved. +% +% Please read the documentation file `gerdoc.tex' for more +% information of how to use this macro file and how to install +% the pattern files necessary for german hyphenation. +% +% \end{macrocode} +% +% INSTALLATION GUIDE: +% +% The distribution of the `german' package consists of a set of +% files, which are packed and documented in _one_ `docstrip archive +% file' called `german.dtx'. This archive file can be unpacked to +% create the necessary files containing the macros, implementation +% documentation, and other files. +% +% To unpack this archive file you need: +% +% * `german.ins' (containing docstrip installation instructions) +% +% * `german.dtx' (it is the file you are currently reading) +% +% * `docstrip.tex' version 2.4 or newer +% (You can find this file in the LaTeX2e release; +% `docstrip' can be used with plainTeX, too!) +% +% Then run `german.ins' through plainTeX or LaTeX to unpack the +% archive file: +% +% tex german.ins +% or +% latex german.ins +% +% This will create a set of files which contain the macro code or +% code to produce the implementation documentation of the `german' +% bundle of files. +% +% --------------- start of docstrip archive file ------------------ +% +% To get the formatted code documentation do the following steps +% +% latex german.dtx +% latex german.dtx +% makeindex -s gind.ist german.idx +% makeindex -s gglo.ist -o german.gls german.glo +% latex german.dtx +% +% +% +%<*driver> +\ifx\documentclass\undefined % LaTeX2e or 2.09? + \documentstyle[newdoc,german]{article} + \ifx\LaTeXe\undefined + \newcommand{\LaTeXe}{% + \mbox{\LaTeX\kern.15em\(2_{\textstyle\varepsilon}\)}}\fi + \newcommand{\emph}[1]{{\em #1}} + \newcommand{\textit}[1]{{\it #1}} + \newcommand{\textbf}[1]{{\bf #1}} + \newcommand{\texttt}[1]{{\tt #1}} + \newcommand{\cs}[1]{{\tt\symbol{92}#1}} + \MakeShortverb{\|}\CodelineIndex +\else + \documentclass[a4paper]{ltxdoc} + \usepackage{german} + \EnableCrossrefs + %\DisableCrossrefs % Say \DisableCrossrefs if index is ready + \CodelineIndex \RecordChanges +\fi +\begin{document} +\setcounter{StandardModuleDepth}{0} +\DocInput{german.dtx} +\PrintIndex \PrintChanges +\end{document} +% +%<*!driver> +% +% \fi +% \CheckSum{2166} +% +% \CharacterTable +% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +% Digits \0\1\2\3\4\5\6\7\8\9 +% Exclamation \! Double quote \" Hash (number) \# +% Dollar \$ Percent \% Ampersand \& +% Acute accent \' Left paren \( Right paren \) +% Asterisk \* Plus \+ Comma \, +% Minus \- Point \. Solidus \/ +% Colon \: Semicolon \; Less than \< +% Equals \= Greater than \> Question mark \? +% Commercial at \@ Left bracket \[ Backslash \\ +% Right bracket \] Circumflex \^ Underscore \_ +% Grave accent \` Left brace \{ Vertical bar \| +% Right brace \} Tilde \~} +% +% \DoNotIndex{\',\(,\),\-,\.,\/,\{,\},\^,\`,\|,\ ,\@,\x,\Z} +% \DoNotIndex{\@M,\@m,\m@ne,\z@,\z@skip,\@ne,\tw@,sixt@@n} +% \DoNotIndex{\count@,\dimen@,\advance,\day,\month,year,\relax} +% \DoNotIndex{\begin,\end,\bgroup,\egroup,\begingroup,\endgroup} +% \DoNotIndex{\bf,\em,\it,\rm,\tt,\textbf,\textit,\texttt,\emph} +% \DoNotIndex{\expandafter,\noexpand,\string,\the,\ifhmode,\ifmmode} +% \DoNotIndex{\ifcase,\or,\else,\fi,\if,\ifdim,\ifnum,\ifx} +% \DoNotIndex{\do,\afterassignment,\number,\escapechar,\space} +% \DoNotIndex{\def,\edef,\let,\newcommand,\undefined,\active} +% \DoNotIndex{\accent,\box,\dp,\ht,\wd,\char,\chardef,\discretionary} +% \DoNotIndex{\catcode,\csname,\endcsname,\hbox,\hskip,\kern} +% \DoNotIndex{\font,\fontdimen,\scriptscriptstyle,\textstyle} +% \DoNotIndex{\lccode,\lowercase,\sfcode,\spacefactor,\penalty} +% \DoNotIndex{\mathchar,\mathchardef,\mathaccent,\varepsilon,\m@th} +% \DoNotIndex{\empty,\@empty,\leavevmode,\makeatletter,\mbox} +% \DoNotIndex{\errhelp,\errmessage,\message,\wlog,\write,\immediate} +% \DoNotIndex{\lower,\raise,\sfcode,\spacefactor,\setbox,\toks} +% \DoNotIndex{\documentclass,\documentstyle,\LaTeX,\LaTeXe,\TeX} +% \DoNotIndex{\ProvidesPackage,\usepackage,\CodelineIndex,\cs} +% \DoNotIndex{\input,\endinput,\DocInput} +% +% +% \title{Die Makropakete "`german"' und "`ngerman"' f"ur \LaTeXe, \LaTeX~2.09, +% Plain-\TeX{} und andere darauf basierende Formate} +% \date{8.~Juli 1998} +% \author{Bernd Raichle \\ +% E-mail: \texttt{raichle@Informatik.Uni-Stuttgart.DE}} +% \maketitle +% +% Dieses Dokument beschreibt Interna, Einschr"ankungen und einige +% Tricks und Kniffe, die bei der Implementierung der Makropakete +% "`german"' und "`ngerman"' verwendet werden. +% Wie diese Pakete installiert +% und verwendet werden, ist in der "`Kurzbeschreibung -- +% \texttt{german.sty} (Version~2.5)"' zu finden. Diese ist in der +% Datei \texttt{gerdoc.tex} zu finden, die mit der Datei +% \texttt{german.dtx} bzw. den Makropaketen mitgeliefert wird +% und ist f"ur den Endanwender gedacht. +% +% Das vorliegende Dokument ist \emph{nicht} f"ur den Endanwender +% gedacht. Es beschreibt die Implementierung und ist zum einen f"ur +% den zuk"unftige Verwalter dieser Pakete gedacht, zum anderen +% f"ur alle Makro-Schreiber, die Ideen und Verbesserungsvorschl"age +% direkt am Code austesten wollen. +% +% Der Code der beiden Pakete "`german"' und "`ngerman"' ist weitgehend +% identisch. Wo im folgenden nur von "`german"' die Rede ist, sind +% \emph{beide} Pakete gemeint; auf Unterschiede wird stets explizit +% hingewiesen. Mit || gekennzeichnete Codezeilen geh"oren zu +% "`german"', mit || gekennzeichnete zu "`ngerman"'. +% +% \changes{2.5e (beta 1)}{98/05/05}{Es kann wahlweise "`german"' oder "`ngerman"' +% erzeugt werden, indem \textsc{DocStrip} mit den Optionen \texttt{old} +% oder \texttt{new} aufgerufen wird.} +% \StopEventually{} +% +% \tableofcontents +% +% \ifx\emergencystretch\undefined \else +% \setlength{\emergencystretch}{2em} +% \fi +% \hbadness=2000 +% +% \section{Identifikation des Pakets} +% +% Damit diese Datei problemlos mehrmals eingelesen werden kann, wird +% hier getestet, ob die Datei bereits geladen wurde. Dadurch wird +% verhindert, da"s Makros, Z"ahler, etc.\ noch einmal und damit +% unn"otig definiert werden und in einigen F"allen auch +% zus"atzliche Ressourcen belegen. Damit auch Nutzer mit +% vorgeladenen, alten "`german"'-Versionen in den Genu"s dieser +% neuen Version kommen, wird nicht wie in "alteren Versionen die +% Existenz der Anweisung Befehl |\mdqon| "uberpr"uft, sondern auf +% eine Versionsnummer abgetestet. Diese Versionsnummer besteht aus +% der Jahreszahl und einer pro Jahr fortlaufenden Nummer. +% +% Die \textit{control sequence} f"ur die Versionsnummer sollte mit +% keinem anderen Paket kollidieren. Daher wird der Pr"afix +% \texttt{grmn@} bzw. \texttt{ngrm@} im Namen verwendet. Da AMS-\TeX{} ein aktives +% At-Zeichen verwendet, wird dieses hier explizit mit |\string| +% deaktiviert, bis wir den |\catcode| "andern. +% +% \changes{2.5c}{96/02/26}{Total falsche Logik zur Verhinderung +% mehrmaligen Lesen des Styles korrigiert, \cs{ifdim} durch +% \cs{ifnum} ersetzt, \cs{grmn@VersionNo} mu"s mit \cs{csname} +% erzeugt werden, da \cs{catcode} des At-Zeichens noch unbekannt +% ist, Versionsnummer sollte in allen F"allen gesetzt werden.} +% \changes{2.5c}{96/04/21}{Mit AMS-\TeX{} aktives At-Zeichen +% in \cs{grmn@VersionNo} explizit mit \cs{string} deaktivieren +% (found by \texttt{Michael.Schgraffer@uibk.ac.at}, 95/10/10).} +% \changes{2.5e (beta 2)}{98/05/12}{Abgefragte Versionsnummer korrigiert; +% 9805 statt 9701)} +% \begin{macrocode} +%\expandafter\ifx\csname grmn\string @VersionNo\endcsname\relax +%\expandafter\ifx\csname ngrm\string @VersionNo\endcsname\relax +\else +% \ifnum\number\csname grmn\string @VersionNo\endcsname<9806\relax +% \ifnum\number\csname ngrm\string @VersionNo\endcsname<9806\relax +% \else \germanTeX \expandafter\expandafter\expandafter\endinput +% \else \ngermanTeX \expandafter\expandafter\expandafter\endinput + \fi\fi +% \end{macrocode} +% +% Ist "`german"' noch nicht geladen oder wurde bisher eine "altere +% Version verwendet, so wird der Rest dieser Datei abgearbeitet. +% Zuerst wird die Versionsnummer gesetzt. Da diese gr"o"ser als 255 +% ist, wird dazu |\mathchardef| verwendet. +% \begin{macrocode} +%\expandafter\mathchardef\csname grmn\string @VersionNo\endcsname +%\expandafter\mathchardef\csname ngrm\string @VersionNo\endcsname +=9806\relax % = v2.5e +% \end{macrocode} +% +% +% Die Style-Option "`german"' soll sowohl von Plain-\TeX\ als auch +% von den unterschiedlichen \LaTeX-Versionen verwendet werden +% k"onnen. Deshalb wird f"ur die Ausgabe das Primitiv |\message| +% verwendet. +% \changes{2.5e (beta 2)}{98/05/12}{Meldungen korrigiert und vereinfacht.} +% +% \begin{macrocode} +\message{v2.5e 1998-07-08} +% \end{macrocode} +% +% F"ur \LaTeXe\ wird die Style-Option als Paket deklariert. Da +% andere Style-Optionen den Befehl |\ProvidesPackage| meist nur auf +% \texttt{undefined} abtesten, wird hier eine auf den ersten Blick +% komisch anmutende Konstruktion mit einer Gruppe verwendet. Sie +% verhindert aber, da"s ein vorher undefiniertes |\ProvidesPackage| +% danach die Bedeutung |\relax| hat. Dieser Gruppierungstrick wird +% noch einige Male verwendet. +% +% \begin{macrocode} +\begingroup\expandafter\expandafter\expandafter\endgroup +\expandafter\ifx\csname ProvidesPackage\endcsname\relax\else +% \ProvidesPackage{german}[1998/07/08 v2.5e % +% \ProvidesPackage{ngerman}[1998/07/08 v2.5e % + Support for writing german texts (br)] +\fi +% \end{macrocode} +% +% Da diese Datei auch mit einem simplen |\input| geladen werden +% kann, andererseits aber auf interne Befehle zugegriffen werden +% mu"s, wird der \textit{category code} des Zeichens~\texttt{@} +% gerettet, bevor er auf "`letter"' ge"andert wird. +% +% \begin{macrocode} +\chardef\atcode=\catcode`\@ +\catcode`\@=11 % \makeatletter +% \end{macrocode} +% +% +% \section{Kompatibilit"atsmakros} +% +% \subsection{Low-Level-Makros} +% +% Einige Makros aus dem \LaTeX-Format sind sehr hilfreich und werden, +% falls sie nicht definiert wurden, hier definiert. +% \changes{2.5c}{95/01/24}{Im Makro \cs{@ifundefined} wurde in den +% Namen der beiden Hilfsmakros in v2.5a/b das \texttt{dq} +% vergessen.} +% \begin{macrocode} +\expandafter\ifx\csname @ifundefined\endcsname\relax + \def\@ifundefined#1{% + \expandafter\ifx\csname #1\endcsname\relax + \expandafter\grmn@dqfirst\else\expandafter\grmn@dqsecond\fi} +\fi +% \end{macrocode} +% Die Makros |\grmn@dqfirst|\label{grmndqfirst} und |\grmn@dqsecond| +% werden sp"ater nochmals verwendet. +% \begin{macrocode} +\def\grmn@dqfirst#1#2{#1} +\def\grmn@dqsecond#1#2{#2} +% \end{macrocode} +% +% \subsection{Kompatibilit"atsmakros f"ur NFSS, Version~2} +% +% Das neue Schriftauswahlschema~NFSS hat in Version~2 den neuen +% Schriftparameter |\fontencoding|. NFSS~2 wurde offiziell im +% ersten \LaTeXe-Release vom 1.~Juni 1994 eingef"uhrt, jedoch im +% n"achsten Release vom 1.~Dezember 1995 durch Fehlerberichtigungen, +% Erweiterungen und neu eingef"uhrte Befehle verbessert. +% +% Im folgenden wird angenommen, da"s NFSS~2 vorhanden ist, wenn der +% Befehl |\DeclareTextSymbol| definiert ist. +% +% \begin{macrocode} +\begingroup\expandafter\expandafter\expandafter\endgroup +\expandafter\ifx\csname DeclareTextSymbol\endcsname\relax +% \end{macrocode} +% +% \subsubsection{Makros f"ur Textzeichen -- ohne NFSS~2} +% +% Der symbolische Name |\SS| f"ur ein SS mu"s f"ur \LaTeX~2.09 und +% Plain-\TeX{} definiert werden, falls er noch nicht bekannt ist. +% \changes{2.5d}{97/04/13}{F"ur \texttt{\symbol{`\"}S} wird +% \cs{SS} verwendet, das in \LaTeXe{} bereits definiert ist.} +% \begin{macrocode} +\@ifundefined{SS}{\def\SS{SS}}{} +% \end{macrocode} +% +% +% Die nachfolgenden Abschnitte beschreiben die notwendigen +% Deklarationen f"ur NFSS~2. +% \begin{macrocode} +\else +% \end{macrocode} +% +% \subsubsection{Deklarationsmakros} +% +% Die neueren NFSS~2-Versionen haben einige Befehle, die f"ur Symbole +% und Akzentmakros Defaultwerte f"ur diejenigen Schriften deklarieren, +% f"ur die keine expliziten Symboldeklarationen angegeben wurden. +% Diese Befehle werden f"ur "altere NFSS~2-Versionen in einer sehr +% stark vereinfachten Realisierung nachfolgend definiert. +% \emph{In diesen Definitionen werden einige Interna aus +% \LaTeXe/NFSS~2 verwendet, so da"s dieser Teil der Style-Option +% zuk"unftig m"oglicherweise zu Fehlern f"uhren kann! Dieser Teil ist +% als schlechtes Beispiel zu betrachten -- es zeigt, wie man solche +% Dinge m"oglichst nicht realisieren sollte. Jedoch sind diese +% Definitionen notwendig, damit diese Style-Option auch mit diesen +% "alteren Versionen laufen kann.} +% \textbf{Es ist daher immer ratsam, eine alte \LaTeXe-Release durch +% die neueste Version zu ersetzen.} +% Aus diesem Grund wird hier ein Hinweis f"ur den Benutzer dieses +% alten Release ausgegeben. In der n"achsten Version wird +% German-Style abbrechen oder den sehr viel einfacheren Code +% f"ur \LaTeX~2.09 verwenden. +% +% \changes{2.5c}{96/04/28}{Warnung und Hinweis auf Update bei +% Benutzung der veralteten \LaTeXe-Release vom Juni~1994.} +% \begin{macrocode} +% \changes{2.5e (beta 1) }{98/05/04}{Formulierung ge"andert.} +\begingroup\expandafter\expandafter\expandafter\endgroup +\expandafter\ifx\csname ProvideTextCommandDefault\endcsname\relax + \immediate\write17{} + \immediate\write17{% +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!} + \immediate\write17{% +!! Dies ist eine zu alte LaTeX2e-Version, die nicht} + \immediate\write17{% +!! alle fuer german/ngerman notwendigen Deklarationen} + \immediate\write17{% +!! zur Verfuegung stellt. Dennoch koennen Sie diese} + \immediate\write17{% +!! Pakete, eventuell mit kleinen Fehlern, verwenden.} + \immediate\write17{!!} + \immediate\write17{% +!! Bitte installieren Sie eine neuere LaTeX2e-Version,} + \immediate\write17{% +!! da zukuenftige Versionen der Pakete diese} + \immediate\write17{% +!! LaTeX2e-Version nicht mehr unterstuetzen werden!} + \immediate\write17{% +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!} + \immediate\write17{} +\fi +% \end{macrocode} +% +% Weiterhin wird angenommen, da"s der Befehl |\providecommand| +% verf"ugbar ist. Dieser Befehl k"onnte in einer zuk"unftigen +% NFSS~2-Version, die f"ur Plain-\TeX\ angepa"st wurde, nicht mehr +% verf"ugbar sein. +% +% |\UseTextSymbol{|\meta{encoding}|}{|\meta{symbol}|}| schaltet die +% angegebene Schriftkodierung zur Ausgabe dieses Zeichens um. +% \begin{macrocode} +\@ifundefined{UseTextSymbol}{% + \def\UseTextSymbol#1#2{{\fontencoding{#1}\selectfont #2}} +}{} +% \end{macrocode} +% +% |\UseTextAccent{|\meta{encoding}|}{|\meta{accent}|}{|\meta{base}|}| +% verwendet das Akzentzeichen aus der Schrift mit der angegebenen, +% eventuell vom aktuellen Wert abweichenden Kodierung. +% \begin{macrocode} +\@ifundefined{UseTextAccent}{% + \def\UseTextAccent#1#2#3{% + {\let\@curr@enc\f@encoding + \fontencoding{#1}\selectfont + #2{\fontencoding\@curr@enc\selectfont #3}}}% +}{} +% \end{macrocode} +% +% |\ProvideTextCommand{|\meta{csname}|}{|\meta{encoding}|}[|^^A +% \meta{number}|][|\meta{default}|]{|\meta{definition}|}| definiert +% einen Befehl, der nur f"ur die angegebene Kodierung verwendet wird, +% falls dieser Befehl noch nicht f"ur diese Kodierung definiert +% wurde. +% \begin{macrocode} +\@ifundefined{ProvideTextCommand}{% + \def\ProvideTextCommand#1#2{% + %%% misses \RobustTextCommand{#1}{...etc.etc...}!! + \expandafter\providecommand\csname #2\string#1\endcsname}% +}{} +% \end{macrocode} +% +% |\ProvideTextCommandDefault{|\meta{command}|}{|\meta{definition}|}| +% definiert nun eine Defaultdefinition f"ur alle Kodierungen, f"ur +% die keine explizite Definition angegeben wurde. Leider w"urde eine +% einigerma"sen komplette Realisierung einer Re-Implementierung der +% neueren NFSS~2-Versionen entsprechen, so da"s hier einfach nur eine +% Definition f"ur die Kodierung~\glq U\grq{} get"atigt wird, die f"ur +% unbekannte Kodierungen verwendet wird. +% \begin{macrocode} +\@ifundefined{ProvideTextCommandDefault}{% + \def\ProvideTextCommandDefault#1{% + \ProvideTextCommand{#1}{U}}% +}{} +% \end{macrocode} +% +% Mit |\DeclareTextCompositeCommand{|\meta{command}|}{|^^A +% \meta{encoding}|}{|\meta{char}|}{|\meta{definition}|}| kann f"ur die +% Umlaut- und Trema-Kombinationen sehr bequem eine Definition +% angegeben werden. Bevor hier f"ur die "alteren NFSS~2-Versionen +% eine eigene L"osung "`gestrickt"' wird, verl"a"st sich die +% nachfolgende Definition auf einige \LaTeXe/NFSS~2-Interna! +% \begin{macrocode} +\@ifundefined{DeclareTextCompositeCommand}{% + \def\DeclareTextCompositeCommand#1#2#3#4{% + % define a `dummy' text composite + \DeclareTextComposite{#1}{#2}{#3}{`\Z}% + % then redefine this command including the new command + \expandafter\def\csname\expandafter\string\csname + #2\endcsname\string#1-\string#3\endcsname##1##2{#4}}% +}{} +% \end{macrocode} +% +% Damit ist gesichert, da"s bei Vorliegen von \LaTeXe/NFSS~2 die +% wichtigsten Deklarationen unabh"angig von der \LaTeXe-Version +% verf"ugbar sind. Dies vereinfacht die nachfolgenden Deklarationen. +% +% \subsubsection{Makros f"ur Textzeichen} +% +% Neben den zuvor aufgezeigten Makros definieren die neueren +% NFSS~2-Versionen noch symbolische Namen f"ur viele der in den +% Schriften vorhandenen Lettern. Im folgenden werden zum einen f"ur +% die "alteren Versionen die anschlie"send verwendeten symbolischen +% Namen nachdefiniert und zum anderen werden Definitionen, die in +% "alteren \LaTeXe/NFSS~2-Versionen fehlen, f"ur die +% Kodierung~\texttt{OT1} und Defaults f"ur einige Lettern +% nachgereicht. +% +% \paragraph{Spezielle Behandlung von Babel~v3.5:} +% +% Babel Version~3.5 definiert f"ur Nicht-\LaTeXe-Formate die +% wichtigsten NFSS~2-Anweisung zur Deklaration der symbolischen Namen. +% Dadurch meint der Code des German-Style, da"s selbst f"ur diese +% Formate ein vollst"andiges \LaTeXe{} mit NFSS~2 vorl"age. Leider +% fehlten in "alteren Babel-Versionen wichtige Standarddeklarationen, +% was zur Folge hat, da"s es bei deren Verwendung zu Fehlern wie +% z.\,B.\ Endlosschleifen kommen kann. Eine Endlosschleife wird dabei +% durch Deklaration eines Defaults mit +% \cs{Provide\-Text\-Command\-Default} verursacht, wenn das Symbol +% bisher noch nicht deklariert wurde. In Babel Version~3.6 +% werden daher jetzt die Symbole \cs{ss}, \cs{i}, +% \cs{textquotedblright} und \cs{textquoteright} deklariert, die in +% Version~3.5 fehlten. +% +% In den folgenden Deklarationen werden NFSS~2-Interna verwendet: +% Es wird beispielsweise angenommen, da"s die Existenz des Makros +% \texttt{\symbol{`\\}OT1\symbol{`\\}ss} -- ein Makro! -- anzeigt, +% da"s \cs{ss} f"ur NFSS~2 deklariert wurde. Ist dies f"ur die vier +% Symbole \cs{ss}, \cs{i}, \cs{textquotedblright} und +% \cs{textquoteright} der Fall, werden sie hier nachdeklariert. +% Dabei wird dies in der Protokolldatei vermerkt, um eventuell +% diese Ursache f"ur auftretende Fehler leichter erkennen zu k"onnen. +% \cs{textquotedblright} und \cs{textquoteright} werden sp"ater noch +% deklariert, so da"s dies hier noch nicht notwendig ist. +% +% \changes{2.5d}{97/04/13}{Die fehlenden Deklarationen f"ur \cs{ss} und +% \cs{i}, werden f"ur Babel~v3.5, falls ben"otigt, nachdeklariert. +% F"ur \cs{textquotedblright} und \cs{textquoteright} hier nicht +% notwendig, da dies hier ein paar Zeilen sp"ater gemacht wird.} +% \begin{macrocode} +\@ifundefined{OT1\string\ss}{% +% \wlog{german: Re-declaration of \string\ss\space for OT1!}% +% \wlog{ngerman: Re-declaration of \string\ss\space for OT1!}% + \DeclareTextSymbol{\ss}{OT1}{25}}{} +\@ifundefined{OT1\string\i}{% +% \wlog{german: Re-declaration of \string\i\space for OT1!}% +% \wlog{ngerman: Re-declaration of \string\i\space for OT1!}% + \DeclareTextSymbol{\i}{OT1}{16}}{} +% \end{macrocode} +% +% \paragraph{Defaults f"ur Symbole:} +% +% F"ur die Makros |\"|, |\ss|, |\i| und |\SS| sollte ein Default +% definiert sein. +% \changes{2.5d}{97/04/13}{F"ur \texttt{\symbol{`\"}S} wird +% \cs{SS} verwendet, das in \LaTeXe{} bereits definiert ist.} +% \begin{macrocode} +\ProvideTextCommandDefault{\"}{\UseTextAccent{OT1}{\"}} +\ProvideTextCommandDefault{\ss}{\UseTextSymbol{OT1}\ss} +\ProvideTextCommandDefault{\i}{\UseTextSymbol{OT1}\i} +\ProvideTextCommandDefault{\SS}{SS} +% \end{macrocode} +% +% Dann sollte auch sichergestellt sein, da"s symbolische Namen f"ur +% die Zeichen definiert sind, die in den Makros f"ur die +% Anf"uhrungszeichen verwendet werden. Die Defaults werden jeweils +% aus den Schriften in Kodierung~\texttt{OT1} genommen. +% +% Zuerst die Zeichen f"ur die Anf"uhrungszeichen "`\ldots"' und +% \glq\ldots\grq: +% \begin{macrocode} +\@ifundefined{textquotedblleft}{% + \ProvideTextCommandDefault{\textquotedblleft}{% + \UseTextSymbol{OT1}\textquotedblleft}% + \DeclareTextSymbol{\textquotedblleft}{OT1}{92}% +% \end{macrocode} +% (oder |\DeclareTextCommand{\textquotedblleft}{OT1}{``}|) +% \begin{macrocode} + \DeclareTextSymbol{\textquotedblleft}{T1}{16}% +}{} +\@ifundefined{textquotedblright}{% + \ProvideTextCommandDefault{\textquotedblright}{% + \UseTextSymbol{OT1}\textquotedblright}% + \DeclareTextSymbol{\textquotedblright}{OT1}{`\"}% +% \end{macrocode} +% (oder |\DeclareTextCommand{\textquotedblright}{OT1}{''}|) +% \begin{macrocode} + \DeclareTextSymbol{\textquotedblright}{T1}{17}% + %% \DeclareTextSymbol{\textquotedbl}{T1}{`\"}% +}{} +\@ifundefined{textquoteleft}{% + \ProvideTextCommandDefault{\textquoteleft}{% + \UseTextSymbol{OT1}\textquoteleft}% + \DeclareTextSymbol{\textquoteleft}{OT1}{`\`}% + \DeclareTextSymbol{\textquoteleft}{T1}{`\`}% +}{} +\@ifundefined{textquoteright}{% + \ProvideTextCommandDefault{\textquoteright}{% + \UseTextSymbol{OT1}\textquoteright}% + \DeclareTextSymbol{\textquoteright}{OT1}{`\'}% + \DeclareTextSymbol{\textquoteright}{T1}{`\'}% +}{} +\@ifundefined{quotesinglbase}{% + \DeclareTextSymbol{\quotesinglbase}{T1}{13}}{} +\@ifundefined{quotedblbase}{% + \DeclareTextSymbol{\quotedblbase}{T1}{18}}{} +% \end{macrocode} +% Danach die Anf"uhrungszeichen in franz"osischer Form ">\ldots"< und +% \frq\ldots\flq: +% \begin{macrocode} +\@ifundefined{guillemotleft}{% + \DeclareTextSymbol{\guillemotleft}{T1}{19}}{} +\@ifundefined{guillemotright}{% + \DeclareTextSymbol{\guillemotright}{T1}{20}}{} +\@ifundefined{guilsinglleft}{% + \DeclareTextSymbol{\guilsinglleft}{T1}{14}}{} +\@ifundefined{guilsinglright}{% + \DeclareTextSymbol{\guilsinglright}{T1}{15}}{} +% \end{macrocode} +% +% Damit sind die wichtigsten Makros so definiert, da"s die +% nachfolgenden Definitionen nur noch wenige F"alle unterscheiden +% m"ussen und damit "ubersichtlicher definiert werden k"onnen. +% +% Die nun folgenden Definitionen sind nicht nur f"ur NFSS~2 +% verwendbar, so da"s das \texttt{if}-NFSS~2 vorl"aufig beendet werden +% kann. +% \begin{macrocode} +\fi +% \end{macrocode} +% +% \section{Low-Level-Befehle f"ur die Style-Option} +% +% Die Style-Option verwendet Low-Level-Befehle zur Implementierung +% von An"-f"uhrungs"-zeichen, der Umlaute u.\,a. Einige dieser +% Befehle sind auch f"ur Benutzer verf"ugbar. +% +% \subsection{Verschiedenes} +% +% \LaTeX\ verwendet den Befehl |\protect|, um \emph{fragile} +% Kommandos zu sch"utzen. Dieser Befehl mu"s f"ur Plain-\TeX\ +% nachdefiniert werden. Folgendes Code-St"uck definiert diesen +% Befehl als |\relax|, falls er noch undefiniert ist, +% andernfalls wird |\protect| nicht ge"andert. +% \begin{macrocode} +\expandafter\let\expandafter\protect\csname protect\endcsname +% \end{macrocode} +% +% Mit |\allowhyphens| kann man \TeX\ signalisieren, da"s ein +% trennbarer Wortteil endet (durch den |\penalty1000|- oder +% |\nobreak|-Befehl) und ein neuer beginnt (durch den |\hskip|-Befehl, +% der \textit{glue} ein"-f"ugt). Dieser Trick ist in Anhang~D des +% \TeX{}book beschrieben, die Interna dazu in Anhang~H. +%\begin{verbatim} +%\def\allowhyphens{\nobreak \hskip 0pt plus 0pt\relax} +%\end{verbatim} +% entspricht der nachfolgenden Definition: +% \begin{macrocode} +\def\allowhyphens{\penalty\@M \hskip\z@skip} +% \end{macrocode} +% +% Neben den Umlauten mu"s auch daf"ur gesorgt werden, da"s am und nach +% dem Buchstaben~{\ss} getrennt werden kann, \TeX{} also diesen Letter +% als Wortbestandteil erkennt. Dazu mu"s dem Letter ein +% Lowercase-Code |\lccode| gr"o"ser als Null zugewiesen sein. +% |\ss|~entspricht f"ur Schriften in Kodierung~\texttt{OT1} dem +% Letter auf Position~|^^Y|. Um W"orter mit diesem Letter komplett +% trennbar zu machen, reicht es daher aus, wenn man den |\lccode| +% dieser Letter auf einen Wert ungleich Null setzt. F"ur ein |\ss| +% aus anderen Schriften mu"s dies in der entsprechenden Makrodatei +% getan werden, in dem die Schrift und der Befehl~|\ss| redefiniert +% wird. +% \begin{macrocode} +\lccode`\^^Y=`\^^Y +% \end{macrocode} +% +% \subsection{Anf"uhrungszeichen} +% +% Die deutschen Anf"uhrungszeichen werden f"ur Schriften, die keine +% geeigneten Lettern besitzen, durch Box-Manipulationen aus den im +% englischsprachigen Raum gebr"auchlichen Anf"uhrungszeichen erzeugt. +% +% |\set@low@box| verschiebt das Zeichen im Argument, normalerweise `` +% bzw.\ '', auf die H"ohe des Kommas in dieser Schrift. Achtung: Da +% das Makro den Inhalt der Box 0, 2 und ein L"angenregister "andert, +% sollte dieses Makro nur innerhalb einer Gruppe aufgerufen werden. +% \begin{macrocode} +\def\set@low@box#1{\setbox\tw@\hbox{,}\setbox\z@\hbox{#1}% + \setbox\z@\hbox{\dimen@\ht\z@ \advance\dimen@ -\ht\tw@ + \lower\dimen@\box\z@}% + \ht\z@\ht\tw@ \dp\z@\dp\tw@} +% \end{macrocode} +% +% Normalerweise wird der aktuelle |\spacefactor| nicht durch +% An"-f"uhrungs"-zeichen ge"-"andert, so da"s bei aktiviertem +% |\nonfrenchspacing| nach einem Satzzeichen und direkt nachfolgenden +% Anf"uhrungszeichen ein gr"o"serer Wortzwischenraum gelassen wird. +% Da \TeX\ den |\spacefactor| nach einem Box-Befehl auf~1000 setzt, +% mu"s man diesen Wert von Hand vorher retten und danach wieder +% setzen, um dieses Verhalten nicht zu "andern. +% \begin{macrocode} +\def\save@sf@q#1{{\ifhmode + \edef\@SF{\spacefactor\the\spacefactor}\else + \let\@SF\empty \fi \leavevmode #1\@SF}} +% \end{macrocode} +% +% \subsection{Umlaute} +% +% Wird ein Umlaut mit Hilfe des |\accent|-Primitivs erzeugt, werden +% bei den meisten Schriften die Umlautpunkte zu hoch gesetzt. Die +% Umlautpunkte entsprechen dadurch eher einem Trema. Das Makro +% |\umlaut| ersetzt das \TeX-Primitiv, um Umlaute mit etwas tieferen +% Umlautpunkten zu erzeugen. Die Funktionsweise beruht auf dem +% folgenden kleinen Trick: Das |\accent|-Primitiv hat die Eigenschaft, +% die aktuelle \textit{x-height} und die Gr"o"se des Buchstabens zu +% verwenden, um die vertikale Positionierung und in Abh"angigkeit +% des \textit{slant} der Schrift die horizontale Verschiebung der +% Punkte zu bestimmen. Um die Punkte etwas tiefer zu setzen, kann +% nun entweder die H"ohe des Buchstabens verkleinert oder die +% \textit{x-height} der Schrift tempor"ar vergr"o"sert werden. Da das +% |\accent|-Primitiv keine Box als Argument erlaubt, wird der zweite +% Weg gew"-"ahlt. Dabei mu"s beachtet werden, da"s "Anderungen der +% |\fontdimen| immer global ausgef"uhrt werden, so da"s man den +% urspr"unglichen Wert retten und danach wieder explizit +% zur"uckschreiben mu"s! +% \changes{2.5c}{95/01/24}{Abfrage auf L"angenregister \cs{grmnU@D} +% hatte wegen eines At-Zeichens zuviel auf \cs{grmn@U@D} getestet.} +% \begin{macrocode} +\expandafter\ifx\csname grmnU@D\endcsname\relax + \csname newdimen\endcsname\grmnU@D +\fi +\def\newumlaut#1{{\grmnU@D 1ex% + {\setbox\z@\hbox{\char127}\dimen@-.45ex\advance\dimen@\ht\z@ + \ifdim 1ex<\dimen@ \fontdimen5\font\dimen@ \fi}% + \accent127\fontdimen5\font\grmnU@D #1}\allowhyphens} +% \end{macrocode} +% +% F"ur Tremata wird das urspr"ungliche |\accent|-Primitive verwendet. +% Da die Style-Option das |\"|-Makro "andert, mu"s hier die originale +% Definition selbst verwendet werden, wobei durch das |\allowhyphens| +% nach dem Akzentprimitiv die Trennung im Rest des Wortes wieder +% erlaubt ist. F"ur \LaTeXe\ kann durch die ge"anderten Interna das +% |\"|-Makro direkt verwendet werden, wobei auch hier ein +% |\allowhyphens| die Trennung im nachfolgenden Wortteil wieder +% erlaubt. +% \begin{macrocode} +\begingroup\expandafter\expandafter\expandafter\endgroup +\expandafter\ifx\csname DeclareTextSymbol\endcsname\relax + \def\highumlaut#1{{\accent127 #1}\allowhyphens} +\else + \def\highumlaut#1{\"{#1}\allowhyphens} +\fi +% \end{macrocode} +% +% \subsection{Aktivierter Double\-quote} +% +% Die Style-Option "`german"' verwendet ein aktiviertes +% Doublequote-Zeichen. Mit den Makros |\mdqon| und |\mdqoff| werden +% hierzu Befehle zum Hin- und Herschalten definiert. +% \begin{macrocode} +\def\mdqon{\catcode`\"\active} +\def\mdqoff{\catcode`\"12\relax} +% \end{macrocode} +% +% Der Mechanismus der die Double\-quote-Eingabe\-notation realisiert, +% verwendet folgende weitere symbolische Namen f"ur Makros und +% spezielle Zeichen. +% \changes{2.5d}{97/04/12}{"Uberbleibsel \cs{@UMLAUT}-Definition +% als \cs{\protect\dq} aus Vor-NFSS2-Zeiten entfernt.} +% \changes{2.5d}{97/04/13}{\cs{@SS} in \cs{@MATHss} umbenannt.} +% \changes{2.5d}{97/05/01}{In \cs{@MATHss} ein eigentlich +% "uberfl"ussiges \cs{mathord} eingef"ugt, das aber daf"ur sorgt, +% da"s Leerzeichen danach nicht ignoriert werden.} +% \begin{macrocode} +\begingroup \mdqoff +\def\x{\endgroup + \def\@MATHUMLAUT{\ddot}% = \mathaccent"707F + \def\@MATHss{\mathord{\mathchar"7019}}% TODO: correct? + \def\dq{"}}% TODO: or \textquotedbl? +\x +% \end{macrocode} +% +% Da das Zeichen aktiviert wird, mu"s es f"ur bestimmte Kontexte +% explizit wieder deaktiviert werden. Plain-\TeX\ und \LaTeX\ +% verwenden f"ur Umgebungen, wie \texttt{verbatim}, die Befehle +% |\dospecials| und |\@sanitize|, die Listen mit diesen speziellen +% Zeichen darstellen. Der Double\-quote wird an diese Listen +% angeh"angt. +% \begin{macrocode} +\begingroup + \def\do{\noexpand\do\noexpand}% + \edef\x{\endgroup + \def\noexpand\dospecials{\dospecials\do\"}}% +\x +% \end{macrocode} +% |\@sanitize| ist nur f"ur \LaTeX\ definiert, so da"s dessen +% Existenz explizit abgefragt wird. +% \begin{macrocode} +\begingroup\expandafter\expandafter\expandafter\endgroup +\expandafter\ifx\csname @sanitize\endcsname\relax \else + \begingroup + \def\@makeother{\noexpand\@makeother\noexpand}% + \edef\x{\endgroup + \def\noexpand\@sanitize{\@sanitize\@makeother\"}}% + \x +\fi +% \end{macrocode} +% +% \subsection{Kompatibilit"at mit "alteren Versionen} +% +% "Altere Versionen der Style-Option "`german"' definieren die +% Befehle |\3| und |\ck|, die nicht mehr verwendet werden sollten. +% Damit alte Dokumente mit diesen Kommandos nicht ge"andert werden +% m"ussen, existieren diese Befehle auch noch f"ur Version~2.x. +% In "`ngerman"' wird |\ck| so definiert, da"s ein "`ck"' mit Trennstelle +% davor erzeugt wird; au"erdem wird eine Warnung ausgegeben. +% \changes{2.5e (beta 1)}{98/05/04}{ge"anderte Definition von \cs{ck} +% in "`ngerman"'} +% \begin{macrocode} +\let\grmn@original@three=\3 % \3 may be defined or undefined. +%<*old> +\def\ck{\penalty\@M\discretionary{k-}{}{c}k\allowhyphens} +% +%<*new> +\def\ck{% + \ifnum\grmn@dqwarninglevel>\@ne + \grmn@dq@warning@obsolete{\string\ck}{ck}% + \fi + \penalty\@M\-\allowhyphens ck} +% +% \end{macrocode} +% +% +% \section{Anf"uhrungszeichen} +% +% Die Makros |\glqq|, |\grqq|, |\glq|, |\grq|, |\flqq|, |\frqq|, +% |\flq| und |\frq| f"ur die Anf"uhrungzeichen k"onnen mit NFSS +% Version~2 (also mit \LaTeXe) abh"angig von der Kodierung der +% Schrift definiert werden. +% \begin{macrocode} +\begingroup\expandafter\expandafter\expandafter\endgroup +\expandafter\ifx\csname DeclareTextSymbol\endcsname\relax +% \end{macrocode} +% +% \subsection{\ldots~ohne NFSS Version~2} +% +% Ohne NFSS Version~2 werden die Makros aus den "`alten"' Versionen +% dieser Style-Option verwendet. Da diese Makros auf alle Zeichen +% "uber symbolische Befehle oder Ligaturen zugreifen, sollten die +% Ergebnisse f"ur die meisten Schriften korrekt sein, jedoch wird +% wegen der nicht expandierbaren Tokens in den Makros kein Kerning +% zwischen dem Anf"uhrungszeichen und umgebenden Text durchgef"uhrt +% (und keine Ligaturen gebildet, auch wenn diese in bisher keiner +% mir bekannten und f"ur \TeX{} verf"ugbaren Schrift vorhanden sind). +% +% Zuerst einmal die Makros f"ur die Anf"uhrungszeichen "`\ldots"' und +% \glq\ldots\grq. Die Namen |\@glqq|, |\@grqq|, etc.\ der zu +% sch"utzenden internen Makros aus "alteren Version des German-Style +% werden eigentlich nicht mehr ben"otigt, werden hier aber zur +% Kompatibilit"at dennoch definiert. +% \changes{2.5d}{97/04/13}{Verwende Trick von \LaTeXe{} mit +% dem Leerzeichen im Namen des zu sch"utzenden Makros.} +% \begin{macrocode} +\expandafter\def\csname glqq \endcsname{% + \save@sf@q{\set@low@box{''\/}\box\z@\kern-.04em\allowhyphens}} +\edef\glqq{\noexpand\protect + \expandafter\noexpand\csname glqq \endcsname} +\let\@glqq=\glqq +\expandafter\def\csname grqq \endcsname{% + \save@sf@q{\kern-.07em``\kern.07em}}% ('') +\edef\grqq{\noexpand\protect + \expandafter\noexpand\csname grqq \endcsname} +\let\@grqq=\grqq +\expandafter\def\csname glq \endcsname{% + \save@sf@q{\set@low@box{'\/}\box\z@\kern-.04em\allowhyphens}} +\edef\glq{\noexpand\protect + \expandafter\noexpand\csname glq \endcsname} +\let\@glq=\glq +\expandafter\def\csname grq\endcsname{% + \save@sf@q{\kern-.0125em`\kern.07em}} +\edef\grq{\noexpand\protect + \expandafter\noexpand\csname grq \endcsname} +\let\@grq=\grq +% \end{macrocode} +% Danach folgen die Definitionen f"ur die franz"osische Form der +% Anf"uhrungszeichen "<\ldots"> und {\flq}\ldots{\frq}. Da die +% Definition auch f"ur Plain-\TeX\ verwendbar sein soll, k"onnte man +% das Aussehen durch eine etwas andere Definition noch verbessern. +% Auch hier werden die Namen der zu sch"utzenden internen Makros aus +% "alteren Version obwohl nicht notwendig zur Kompatibilit"at +% definiert. +% \changes{2.5c}{96/02/26}{Im Code f"ur die franz"osischen +% Anf"uhrungszeichen \cs{m@th} eingef"ugt.} +% \changes{2.5c}{96/04/28}{Die Boxen f"ur \cs{flqq}, \cs{frqq}, +% \cs{flq} und \cs{frq} werden mit \cs{raise.2ex} etwas zu tief +% gesetzt, deshalb wird jetzt \cs{raise.27ex} aus +% \texttt{french.sty} verwendet.} +% \changes{2.5d}{97/04/13}{Verwende Trick von \LaTeXe{} mit +% dem Leerzeichen im Namen des zu sch"utzenden Makros.} +% \changes{2.5d}{97/05/01}{In \cs{flqq} und \cs{frqq} um \cs{ll} +% bzw.\ \cs{gg} ein \cs{mathrel} eingef"ugt (klammern oder ein +% ein leeres Klammerpaar danach w"urde Abst"ande "andern). +% Damit kann das leere Klammerpaar in dern entsprechenden +% Doublequote-Notation f"ur die franz"osischen Anf"uhrungszeichen +% entfernt werden.} +% \begin{macrocode} +\expandafter\def\csname flqq \endcsname{% + \relax\ifmmode \mathrel{\ll}\else \save@sf@q{\penalty\@M + \raise .27ex\hbox{$\m@th\scriptscriptstyle \ll $}% + \allowhyphens}\fi} +\edef\flqq{\noexpand\protect + \expandafter\noexpand\csname flqq \endcsname} +\let\@flqq=\flqq +\expandafter\def\csname frqq \endcsname{% + \relax\ifmmode \mathrel{\gg}\else \save@sf@q{\penalty\@M + \raise .27ex\hbox{$\m@th\scriptscriptstyle \gg $}% + \allowhyphens}\fi} +\edef\frqq{\noexpand\protect + \expandafter\noexpand\csname frqq \endcsname} +\let\@frqq=\frqq +\expandafter\def\csname flq \endcsname{% + \relax\ifmmode <\else \save@sf@q{\penalty\@M + \raise .27ex\hbox{$\m@th\scriptscriptstyle <$}\allowhyphens}\fi} +\edef\flq{\noexpand\protect + \expandafter\noexpand\csname flq \endcsname} +\let\@flq=\flq +\expandafter\def\csname frq \endcsname{% + \relax\ifmmode >\else \save@sf@q{\penalty\@M + \raise .27ex\hbox{$\m@th\scriptscriptstyle >$}\allowhyphens}\fi} +\edef\frq{\noexpand\protect + \expandafter\noexpand\csname frq \endcsname} +\let\@frq=\frq +% \end{macrocode} +% Leider verhindert das |\nobreak| in |\allowhyphens| eine Trennung +% an einem Wortzwischenraum, der nach dem Anf"uhrungszeichen folgen +% kann. Da die obige Definition sowohl f"ur ">\ldots"< als auch f"ur +% "<\ldots"> verwendbar sein mu"s, kann man ohne weitere Tricks +% nichts an dieser Einschr"ankung "andern. +% +% +% Die nachfolgenden Abschnitte beschreiben die notwendigen +% Definitionen f"ur NFSS~2. +% \begin{macrocode} +\else +% \end{macrocode} +% +% \subsection{\ldots~mit NFSS Version~2} +% +% Das Makro |\glqq| entspricht dem in neueren \LaTeXe-Releases +% definiertem Symbol |\quotedblbase|. Die Definitionen dieses +% Symbols werden auch f"ur die \texttt{OT1}-kodierten Schriften +% erweitert, so da"s man eine relativ einfache Definition erh"alt. +% \begin{macrocode} +\DeclareRobustCommand{\glqq}{% + \ifmmode\hbox{\quotedblbase}\else\quotedblbase\fi} +\ProvideTextCommandDefault{\quotedblbase}{% + \UseTextSymbol{OT1}\quotedblbase} +\ProvideTextCommand{\quotedblbase}{OT1}{% + \save@sf@q{\set@low@box{\textquotedblright\/}\box\z@ + \kern-.04em\allowhyphens}} +% \end{macrocode} +% +% Leider existiert f"ur |\grqq| kein entsprechendes Pendant, so da"s +% man hier auf die "`alte"' Version zur"uckgreifen mu"s. Jedoch wird +% f"ur \texttt{T1}-kodierte Schriften keine \cs{kern}-Anweisungen +% eingef"ugt, da diese insbesondere bei den EC-Fonts und dessen +% Testversionen ab DC-Fonts Version~1.2 das Anf"uhrungszeichen zu +% weit nach links plazieren und dieses dadurch den davorstehenden +% Letter "uber"-schreiben k"onnte. +% \changes{2.5c}{96/02/26}{F"ur \texttt{T1}-kodierte Schriften, +% insbesondere den DC-Fonts~v1.2 d"urfen bei \cs{grqq} keine +% expliziten \cs{kern} eingef"ugt werden. Deshalb separate +% Deklarationen f"ur T1- und OT1-kodierte Schriften.} +% \begin{macrocode} +\ProvideTextCommand{\grqq}{T1}{\textquotedblleft} +\ProvideTextCommand{\grqq}{OT1}{% + \save@sf@q{\kern-.07em% + \ifmmode\hbox{\textquotedblleft}\else\textquotedblleft\fi + \kern.07em\relax}} +\ProvideTextCommandDefault{\grqq}{\UseTextSymbol{OT1}\grqq} +% \end{macrocode} +% Entsprechend werden die Symbole |\glq| und |\grq| definiert\,\ldots +% \begin{macrocode} +\DeclareRobustCommand{\glq}{% + \ifmmode\hbox{\quotesinglbase}\else\quotesinglbase\fi} +\ProvideTextCommandDefault{\quotesinglbase}{% + \UseTextSymbol{OT1}\quotesinglbase} +\ProvideTextCommand{\quotesinglbase}{OT1}{% + \save@sf@q{\set@low@box{\textquoteright\/}\box\z@ + \kern-.04em\allowhyphens}} +% \end{macrocode} +% \changes{2.5c}{96/04/27}{F"ur \texttt{T1}-kodierte Schriften +% bin ich mir momentan nicht sicher, ob f"ur \cs{grq} explizite +% \cs{kern} eingef"ugt werden sollten; die DC-Fonts~v1.2 haben +% Kerning f"ur ein als schlie"sendes Quote verwendetes Backquote, +% deshalb kein \cs{kern}.} +% \begin{macrocode} +\ProvideTextCommand{\grq}{T1}{\textquoteleft} +\ProvideTextCommand{\grq}{OT1}{% + \save@sf@q{\kern-.0125em% + \ifmmode\hbox{\textquoteleft}\else\textquoteleft\fi + \kern.07em\relax}} +\ProvideTextCommandDefault{\grq}{\UseTextSymbol{OT1}\grq} +% \end{macrocode} +% \ldots\,und auch die franz"osische Form der Anf"uhrungszeichen. +% \changes{2.5c}{96/02/26}{Im Code f"ur die franz"osischen +% Anf"uhrungszeichen \cs{m@th} eingef"ugt.} +% \changes{2.5c}{96/04/28}{Die Boxen f"ur \cs{flqq}, \cs{frqq}, +% \cs{flq} und \cs{frq} werden mit \cs{raise.2ex} etwas zu tief +% gesetzt, deshalb wird jetzt \cs{raise.27ex} aus +% \texttt{french.sty} verwendet.} +% \changes{2.5d}{97/05/01}{\cs{mathrel} bzw.\ \cs{mathbin} in +% \cs{flqq}, \cs{frqq}, \cs{flq} und \cs{frq} eingef"ugt.} +% \begin{macrocode} +\DeclareRobustCommand{\flqq}{% + \ifmmode\mathrel{\hbox{\guillemotleft}}\else\guillemotleft\fi} +\ProvideTextCommandDefault{\guillemotleft}{% + \UseTextSymbol{OT1}\guillemotleft} +\ProvideTextCommand{\guillemotleft}{OT1}{% + \ifmmode \ll \else \save@sf@q{\penalty\@M + \raise .27ex\hbox{$\m@th\scriptscriptstyle \ll $}% + \allowhyphens}\fi} +\DeclareRobustCommand{\frqq}{% + \ifmmode\mathrel{\hbox{\guillemotright}}\else\guillemotright\fi} +\ProvideTextCommandDefault{\guillemotright}{% + \UseTextSymbol{OT1}\guillemotright} +\ProvideTextCommand{\guillemotright}{OT1}{% + \ifmmode \gg \else \save@sf@q{\penalty\@M + \raise .27ex\hbox{$\m@th\scriptscriptstyle \gg $}% + \allowhyphens}\fi} +% \end{macrocode} +% \begin{macrocode} +\DeclareRobustCommand{\flq}{% + \ifmmode\mathbin{\hbox{\guilsinglleft}}\else\guilsinglleft\fi} +\ProvideTextCommandDefault{\guilsinglleft}{% + \UseTextSymbol{OT1}\guilsinglleft} +\ProvideTextCommand{\guilsinglleft}{OT1}{% + \ifmmode <\else \save@sf@q{\penalty\@M + \raise .27ex\hbox{$\m@th\scriptscriptstyle <$}\allowhyphens}\fi} +\DeclareRobustCommand{\frq}{% + \ifmmode\mathbin{\hbox{\guilsinglright}}\else\guilsinglright\fi} +\ProvideTextCommandDefault{\guilsinglright}{% + \UseTextSymbol{OT1}\guilsinglright} +\ProvideTextCommand{\guilsinglright}{OT1}{% + \ifmmode >\else \save@sf@q{\penalty\@M + \raise .27ex\hbox{$\m@th\scriptscriptstyle >$}\allowhyphens}\fi} +% \end{macrocode} +% +% Damit w"aren die Makros f"ur die Anf"uhrungszeichen definiert +% und die Unterscheidung mit/ohne NFSS Version~2 wird f"ur's erste +% nicht mehr ben"otigt. +% \begin{macrocode} +\fi +% \end{macrocode} +% +% +% \section{Anpassung der Umlautmakros} +% +% Wie schon bei der Definition des Befehls |\umlaut| erw"ahnt, +% mu"s das Akzentmakro f"ur die Umlaute angepa"st werden. +% +% Um sp"ater zwischen der Original- und der neuen Definition +% umschalten zu k"onnen, werden die internen Umschaltbefehle +% |\umlauthigh| und |\umlautlow| definiert. Da NFSS Version~2 +% schon wieder eine Sonderrolle -- im positiven Sinne -- spielen +% mu"s, ist wieder eine Unterscheidung der Versionen n"otig. +% \begin{macrocode} +\begingroup\expandafter\expandafter\expandafter\endgroup +\expandafter\ifx\csname DeclareTextSymbol\endcsname\relax +% \end{macrocode} +% +% F"ur Versionen ohne NFSS Version~2 wird relativ einfach zwischen +% den beiden Versionen gewechselt. Wenn man Schriften mit ge"anderten +% Kodierungen verwenden will, mu"s dieses Makro ebenso angepa"st +% werden. +% \begin{macrocode} +\def\umlauthigh{\def\"##1{{\accent127 ##1}}} +\def\umlautlow{\def\"{\protect\newumlaut}} +% \end{macrocode} +% \begin{macrocode} +\else +% \end{macrocode} +% +% F"ur NFSS Version~2 ist das ganze etwas komplizierter. +% Da die Befehle |\DeclareText...| nicht mehr nach der Pr"aambel +% verwendet werden d"urfen, wird der neue symbolische Name +% |\grmn@OTumlaut| f"ur das Umlautmakro f"ur Schriften in +% Kodierung~\texttt{OT1} definiert. Beim Umschalten wird dann die +% Definition dieses Makro ver"andert. +% \begin{macrocode} +\def\umlauthigh{\def\grmn@OTumlaut##1{{\accent 127 ##1}}} +\def\umlautlow{\def\grmn@OTumlaut{\protect\newumlaut}} +\umlauthigh +% \end{macrocode} +% F"ur Schriften in Kodierung \texttt{OT1} und~\texttt{T1} werden hier +% Standarddefinitionen angegeben, in der das neue Makro verwendet +% wird. +% \begin{macrocode} +\DeclareTextAccent{\"}{T1}{4} +\DeclareTextAccent{\"}{OT1}{127} +\DeclareTextCompositeCommand{\"}{OT1}{a}{\grmn@OTumlaut{a}}% +\DeclareTextCompositeCommand{\"}{OT1}{o}{\grmn@OTumlaut{o}}% +\DeclareTextCompositeCommand{\"}{OT1}{u}{\grmn@OTumlaut{u}}% +\DeclareTextCompositeCommand{\"}{OT1}{A}{\grmn@OTumlaut{A}}% +\DeclareTextCompositeCommand{\"}{OT1}{O}{\grmn@OTumlaut{O}}% +\DeclareTextCompositeCommand{\"}{OT1}{U}{\grmn@OTumlaut{U}}% +\DeclareTextComposite{\"}{T1}{a}{228} +% \end{macrocode} +% +% Da diese Definitionen in einer "alteren Patch-Datei am Beginn eines +% Dokuments ge"andert werden, werden diese "Anderungen einfach +% nochmals mit den oben angegebenen Anweisungen "uberschrieben, +% obwohl dies eigentlich nur f"ur diese veraltete \LaTeXe-Version +% mit dieser Patch-Datei notwendig w"are. Dies sollte in einer +% der n"achsten Version des German-Style entfernt werden! +% \begin{macrocode} +\begingroup\expandafter\expandafter\expandafter\endgroup +\expandafter\ifx\csname AtBeginDocument\endcsname\relax \else + \AtBeginDocument{% + \DeclareTextAccent{\"}{T1}{4}% % from `ltpatch.tex' + \DeclareTextAccent{\"}{OT1}{127}% % from `ltpatch.tex' + % \DeclareTextCommand{\"}{OT1}{\newumlaut}% from `ltpatch.tex' + % % has to be removed + \DeclareTextCompositeCommand{\"}{OT1}{a}{\grmn@OTumlaut{a}}% + \DeclareTextCompositeCommand{\"}{OT1}{o}{\grmn@OTumlaut{o}}% + \DeclareTextCompositeCommand{\"}{OT1}{u}{\grmn@OTumlaut{u}}% + \DeclareTextCompositeCommand{\"}{OT1}{A}{\grmn@OTumlaut{A}}% + \DeclareTextCompositeCommand{\"}{OT1}{O}{\grmn@OTumlaut{O}}% + \DeclareTextCompositeCommand{\"}{OT1}{U}{\grmn@OTumlaut{U}}% + \DeclareTextComposite{\"}{T1}{a}{228}% % from `ltpatch.tex' + } +\fi +% \end{macrocode} +% \begin{macrocode} +\fi +% \end{macrocode} +% +% +% \section{Mechanismus f"ur Doublequote-Notation} +% +% Die Eingabenotation |"x| f"ur Umlaute, spezielle Trennungen +% u.\,a., die die Style-Option "`german"' anbietet, wird durch den +% \textit{active character} Double\-quote realisiert. Dieses aktive +% Zeichen liest das folgende Token als sein Argument und entscheidet +% abh"angig von diesem Argument, welche Kommandos zur Realisierung +% verwendet werden sollen. +% +% Nach dieser Beschreibung scheint die Makrodefinition, die diesem +% aktiven Zeichen zugewiesen wird, relativ einfach zu realisieren zu +% sein: +%\begin{verbatim} +%\catcode`\"=\active +%\def "#1{\ifx#1a\newumlaut{a}\else ...etc.etc... \fi} +%\end{verbatim} +% Leider gibt es bei dieser einfachen Implementierung einige +% Fehlerm"oglichkeiten: Zum einen "uberliest \TeX\ vor jedem nicht +% begrenztem Argument eines Makros alle Leerzeichen, so da"s die +% beiden Eingaben |" a| und~|"a| nicht unterscheidbar sind. +% Zum zweiten erzeugen die Gruppenklammern |{| und~|}| +% als Argument Fehler, da bei einer "offnenden Klammer eine komplette +% Liste gelesen wird und eine schlie"sende Klammer zu einem Fehler +% f"uhrt. +% +% Will man diese Probleme mit der etwas "`schlaueren"' L"osung +%\begin{verbatim} +%\catcode`\"=\active +%\def "{\afterassignment\do@activedq \let\next= } +%\def\do@activedq{\ifx\next\bgroup \def\next{\dq\bgroup}\else +% \ifx\next\egroup \def\next{\dq\egroup}\else +% \expandafter\ifx\space\next \def\next{\dq\space}\else +% \ifx a\next \def\next{\newumlaut{a}}\else +% ...etc.etc... \fi\fi\fi...\fi \next} +%\end{verbatim} +% vermeiden, handelt man sich ein anderes, schwerwiegenderes Problem +% ein: In \TeX\ kann man ganzzahlige Konstanten auch in hexadezimaler +% Notation eingeben. Dazu wird einfach der hexadezimalen Zahl ein +% normales Double\-quote-Zeichen vorangestellt (Bsp.: |"FF| f"ur die +% Konstante~255). Mit der "`schlaueren"' L"osung meldet \TeX\ jedoch +% beim Einlesen aller hexadezimalen Konstanten bei aktiviertem +% Double\-quote eine fehlende Zahl. Der Grund ist einfach: +% Primitive, wie |\afterassignment| oder |\futurelet|, sind +% nicht expandierbar und nichtexpandierbare Token beenden das +% Scan\-nen einer Zahl. +% +% Um diesen schwerwiegenden Nachteil der "`schlaueren"' L"osung +% zu vermeiden (die "ahnlich in Version~2.3c/d verwendet wurde, wobei +% schon in den Versionen 2.2--2.3b ein |\protect| mit Bedeutung +% |\relax| diesen Fehler erzeugt hat), mu"s man wohl oder "ubel die +% erste L"osung verwenden und deren Nachteile in Kauf nehmen. +% +% Auf einen anderen Punkt mu"s auch geachtet werden: Damit \TeX\ f"ur +% die resultierenden Umlaute und An"-f"uhrungs"-zeichen ein Kerning +% durch"-f"uhrt und Ligaturen bildet, d"urfen vor und nach diesen +% Zeichen keine nichtexpandierbaren Token, wie Gruppenklammern, +% |\relax|, etc., in der Eingabe "`stehenbleiben"'. Dies mu"s +% insbesondere auch f"ur die F"alle gelten, in denen der +% Double\-quote eine hexadezimale Konstante einleitet! +% +% +% \subsection{Fehler bei undefinierten +% \protect\texttt{\char34x}-Kombinationen} +% +% F"ur Argumente des Double\-quote-Makros, f"ur die keine Bedeutung +% definiert wurde, sollte eine Fehlermeldung an den Benutzer +% ausgegeben werden. Dies verhindert zum einen, da"s einfache +% Tippfehler "uber"-sehen werden, zum anderen gibt es in sp"ateren +% Versionen, in denen f"ur weitere Argumente Bedeutungen definiert +% werden, weniger Fehler in alten Dokumenten. +% +% Mit dem (undokumentierten) Befehl |\dqwarninglevel| kann festgelegt +% werden, bei welchen Befehlen Warnungen ausgegeben werden: +% 0~bedeutet momentan keine Warnung, 1~nur f"ur undefinierte +% Kombinationen (Default) und 2~auch Warnungen f"ur die Befehle f"ur +% drei gleiche Konsonanten. +% +% Es bietet sich an, den Level~2 daf"ur zu verwenden, vor +% durch die Rechtschreibreform obsolet gewordenen Befehlen zu +% warnen, n"amlich Dreier"=Kombinationen und zus"atzlich die +% Befehle zur |ck|"~Trennung: |"ck| und |\ck|. +% \changes{2.5e (beta 1)}{98/05/04}{Level~2 f"ur neue Rechtschreibung.} +% \begin{macrocode} +\def\dqwarninglevel#1{\chardef\grmn@dqwarninglevel=#1\relax} +% \dqwarninglevel{1} +% \dqwarninglevel{2} +% \end{macrocode} +% +% Neuere \LaTeX-Versionen verwenden den in \TeX~3 vorhandenen +% Parameter |\inputlineno|, um mit jeder Fehlermeldung auch die +% Zeilennummer auszugeben. Da dies allgemein sinnvoll ist, wird das +% dazu benutzte \LaTeX-Makro definiert, falls es bei Verwendung von +% Plain-\TeX\ oder einer alten \LaTeX-Version noch nicht definiert +% ist und \TeX~3 verwendet wird (|\inputlineno| mu"s existieren +% und einen positiven Wert haben). +% \changes{2.5d}{97/05/01}{\cs{@empty} ist in Plain-\TeX{} nicht +% definiert, daher \cs{on@line} besser direkt definieren.} +% \begin{macrocode} +\expandafter\ifx\csname on@line\endcsname\relax + \ifx\inputlineno\undefined \def\on@line{}% + \else + \ifnum\inputlineno<\z@ \def\on@line{}% + \else \def\on@line{ on input line \the\inputlineno}% +\fi\fi\fi +% \end{macrocode} +% +% F"ur die Ausgabe von Warnungen und Fehlermeldungen werden +% weitere Makros definiert. +% \changes{2.5e (beta 1)}{98/05/04}{Neue Warnbefehle nur f"ur "`ngerman"'.} +% \begin{macrocode} +\def\grmn@dq@error#1{% + \errhelp{Use `` for a simple double quote character.}% +% \errmessage{german: The command \dq\string#1 is undefined}} +% \errmessage{ngerman: The command \dq\string#1 is undefined}} +\def\grmn@dq@warning#1{% + \immediate\write\sixt@@n +% {german: \dq\string#1 is possibly wrong\on@line.}} +% {ngerman: \dq\string#1 is possibly wrong\on@line.}} +% \end{macrocode} +% Der Befehl |\grmn@dq@warning@obsolete| l"ot den +% |\grmn@dq@warning|"~Befehl nur in den F"allen ab, bei denen +% der "`Warning"=Level"' auf zwei steht, also bei denen der Anwender +% auf den veralteten Befehl hingewiesen werden soll. +% Da der erste Parameter sowohl ein Befehlsname |\ck| als auch eine +% |"|"~Kombination sein kann, mu"s der Aufrufer daf"ur Sorge tragen, +% da"s die Parameter richtig geschrieben werden k"onnen. Als +% Beispiel sollte |"f| als |\dq f| und |\ck| als |\string\ck| +% "ubergeben werden). +% \begin{macrocode} +%<*new> +\def\grmn@dq@warning@obsolete#1#2{% + \immediate\write\sixt@@n + {ngerman: #1 is now obsolete, please use #2 instead\on@line.}} +% +% \end{macrocode} +% F"ur die Dreier"=Kombinationen sind die |"|"~Befehle +% "uberfl"ussig geworden. Das Makro, abgeleitet aus +% |\grmn@dqdisc|, gibt daher eine Warnung aus und +% setzt die Buchstaben. Da drei gleiche Buchstaben nach dem +% zweiten getrennt werden d"urfen, wird die entsprechende +% Trennhilfe eingef"ugt (|"-|). +% \begin{macrocode} +%<*new> +\def\grmn@dqobsolete@three#1{#1#1% + \ifnum\grmn@dqwarninglevel>\@ne + \grmn@dq@warning@obsolete{\dq#1#1}{#1#1#1}% + \fi + \penalty\@M\-\allowhyphens} +% +% \end{macrocode} +% Dasselbe wird nun f"ur die Kombination |"ck| gemacht, +% wobei hier die Trennhilfe vor den Buchstaben |ck| wie +% im |\ck|"~Befehl gesetzt wird. +% \begin{macrocode} +%<*new> +\def\grmn@dqobsolete@ck#1#2{% + \ifnum\grmn@dqwarninglevel>\@ne + \grmn@dq@warning@obsolete{\dq#1#2}{#1#2}% + \fi + \penalty\@M\-\allowhyphens#1} +% +% \end{macrocode} +% +% +% \subsection{Definition der Double\-quote-Befehle} +% +% Jeder definierte Double\-quote-Befehl wird in einem eigenen Makro +% abgelegt, in dessen Name das Argument, also das einzelne Zeichen +% nach dem Double\-quote, als Schl"ussel verwendet wird. +% +% Das Makro |\grmn@dq@macro| hat zwei Argumente und erzeugt unter +% Verwendung des zweiten Arguments diesen Makronamen. Das erste +% Argument, ein einzelnes Token, wird vor diesen Makronamen gesetzt. +% Diese zuerst etwas komisch anmutende Kombination von Argumenten +% verhindert, da"s bei der Verwendung dieses Makros Unmengen von +% \cs{expandafter}-Anweisungen notwendig werden. Der Befehl +% \cs{string} verhindert, da"s aktive Zeichen als Argumente +% (z.\,B.\ eine Tilde) Fehler erzeugen. +% \begin{macrocode} +\def\grmn@dq@macro#1#2{% + \expandafter#1\csname @grmn@@\string #2dq\endcsname} +% \end{macrocode} +% +% Neue Befehlskombinationen k"onnen mit dem Befehl |\def@dqmacro| +% definiert werden. Argument~1 ist dabei das Zeichen im Befehl, +% Argument 2 und~3 die Expansionen, die jeweils f"ur Text- und +% Mathematik"-modus verwendet werden sollen. +% \begin{macrocode} +\def\def@dqmacro#1#2#3{% + \grmn@dqredefcheck{#1}% + \grmn@dq@macro\def{#1}{{#2}{#3}}} +% \end{macrocode} +% +% Ein Synonym f"ur einen schon zuvor definierten Befehl kann man mit +% |\let@dqmacro| definieren. +% \begin{macrocode} +\def\let@dqmacro#1#2{\begingroup + \grmn@dqredefcheck{#1}% + \edef\x{\endgroup \let + \grmn@dq@macro\noexpand{#1}\grmn@dq@macro\noexpand{#2}}% + \x} +% \end{macrocode} +% +% Wird ein zuvor definierter Befehl erneut definiert oder +% umdefiniert, sollte dies zumindest in der Protokolldatei erscheinen, +% um gemeldete Fehler, die darauf zur"uckzuf"uhren sind, einfacher +% erkennen zu k"onnen. Hier wird f"ur das Makro |\grmn@dqredefcheck|, +% das diese Zeile in die Protokolldatei schreibt, ein Dummy definiert, +% die sp"ater durch die end"-g"ultige Makrodefinition ersetzt wird. +% \begin{macrocode} +\def\grmn@dqredefcheck#1{} +% \end{macrocode} +% +% +% \subsection{Makros f"ur den aktiven Double\-quote} +% +% Das Makro |\@active@dq| wird sp"ater an das aktive +% Double\-quote-Zeichen gebunden. Dieses liest das n"achste Zeichen +% (mit den zuvor schon genannten Einschr"ankungen), pr"uft ab, ob +% hier"-f"ur eine Bedeutung definiert wurde und gibt in diesem Falle +% einen Fehler aus. +% \begin{macrocode} +\def\@active@dq#1{% + \grmn@dq@macro\ifx{#1}\relax + \ifnum\grmn@dqwarninglevel>\z@ \grmn@dq@error{#1}\fi + \expandafter\grmn@@normal@dq + \else + \expandafter\grmn@@active@dq + \fi {#1}} +% \end{macrocode} +% +% Leitet der Double\-quote eine hexadezimale Konstante ein, folgt +% also eine Ziffer oder ein Gro"sbuchstabe im Bereich~\mbox{A--F}, so +% soll "`nichts"' unternommen werden. Um diese speziellen Befehle zu +% erkennen, werden den zugeordneten \emph{control sequences} sp"ater +% die Bedeutung eines |\noexpand| zugeordnet. +% \changes{2.5b}{95/01/20}{Einziger Bugfix f"ur v2.5a: In +% \cs{grmn@@active@dq} wurde \cs{grmn@@normal@dq} (expandiert zu +% zwei einfachen Quotes) statt \cs{grmn@normal@dq} (expandiert zu +% einem Double\-quote) aufgerufen, so da"s es zu Fehlern bei +% Hexzahlen kam.} +% \begin{macrocode} +\def\grmn@@active@dq#1{% + \grmn@dq@macro\ifx{#1}\noexpand + \expandafter\grmn@normal@dq + \else + \expandafter\grmn@@@active@dq + \fi {#1}} +% \end{macrocode} +% +% F"ur die F"alle, in denen Anf"uhrungszeichen erzeugt werden sollen, +% werden zwei weitere Befehle aufgerufen: |\grmn@normal@dq| wird f"ur +% die hexadezimalen Konstanten verwendet, in denen ein Double\-quote +% ben"otigt wird. |\grmn@@normal@dq| wird dagegen im Fehlerfalle +% verwendet und gibt zwei einzelne Quotes aus, um Endlosschleifen bei +% der Expansion zu vermeiden. +% \begin{macrocode} +\def\grmn@@normal@dq#1{``#1} +\def\grmn@normal@dq#1{\dq #1} +% \end{macrocode} +% +% +% \subsection{Sch"utzen von zerbrechlichen Bedeutungen} +% +% Da die Double\-quote-Befehle auch zu zerbrechlichen Bedeutungen +% expandieren k"onnen, mu"s ein |\protect| o.\,"a.\ so +% eingef"ugt werden, da"s einerseits keine nicht expandierbaren Token +% eingef"ugt werden. Andererseits kann, wie im Falle einer Tilde, +% auch das Argument selbst expandierbar sein und mu"s zum mehrfachem +% Lesen und Schreiben entsprechend gesch"utzt werden. (Beispielsweise +% wird der Inhalt von \LaTeX{}s \texttt{aux}-Datei wieder in die +% \texttt{toc}-Datei geschrieben, bevor diese end"-g"ultig eingelesen +% wird.) +% +% Aufgrund letzterem folgt jetzt ein Hack mit \textit{category codes}, +% um beim Schreiben auf eine Datei keine zus"atzlichen Zeichen +% ein"-f"ugen zu m"ussen, wie dies noch in Version~2.4a gemacht +% wurde. +% +% Im folgenden ben"otigt dieser Hack geschweifte Klammern mit +% \textit{category code} "`other"'. Als tempor"arer Ersatz f"ur +% die \TeX-Klammern werden die runden Klammern verwendet. Au"serdem +% wird der in \LaTeXe\ verwendete Trick mit einem Leerzeichen im +% Makronamen verwendet, um diese speziellen Klammern f"ur "`interne"' +% Expansionen, wie beim Primitiv |\marks|, wieder korrekt +% einlesen zu k"onnen. +% \begin{macrocode} +\begingroup + \catcode`\(=1\lccode`\(=`\{\catcode`\{=12 + \catcode`\)=2\lccode`\)=`\}\catcode`\}=12 + \catcode`\ =11\relax% <= do not delete this and the +\lowercase(\endgroup% <=== following percent characters! +% \end{macrocode} +% +% Zuerst wird das m"oglicherweise expandierbare Argument durch den +% Befehl |\string| vor Expansion beim Schreiben auf eine Datei +% oder Erzeugen eines Mark gesch"utzt. Ist das Argument leer, so +% wird die nachfolgende geschweifte Klammer zu einer Klammer mit +% \textit{category code} "`other"'. Hierin liegt der Grund, wieso +% f"ur diese Definitionen die \textit{category codes} der +% geschweiften Klammern ge"-"andert wurden. +% \begin{macrocode} +\def\grmn@@@active@dq#1(% +\expandafter\grmn@@@@active@dq\expandafter{\string#1})% +% \end{macrocode} +% +% Nachdem das Argument gesch"utzt wurde, wird f"ur die F"alle, in +% denen |\protect| eine besondere Bedeutung hat, dieses +% eingef"ugt. Hat das |\protect| "`nur"' die Bedeutung eines +% |\relax| oder eines leeren Makros, so wird es nicht +% eingef"ugt, um Kerning und Ligaturbildung nicht zu verhindern. +% +% Die Makros \verb*:\active@dq : und \verb*:\dq@prtct :, die ein +% Leerzeichen im Namen haben, sind die "`internen"' Versionen des +% aktiven Double\-quote-Makros und eines Makros, das das Argument +% sch"utzt. Werden diese auf eine Datei geschrieben und wieder +% eingelesen, so werden beim Lesen die entsprechenden Makros ohne +% diese Leerzeichen am Ende des Namens expandiert. +% \begin{macrocode} +\def\grmn@@@@active@dq(% +\ifx\protect\relax\else\ifx\protect\empty\else% +\expandafter\expandafter\expandafter\protect% +\fi\fi% +\active@dq \dq@prtct )% +% \end{macrocode} +% +% Zuerst zum einfacheren Makropaar \verb*:\dq@prtct : und +% |\dq@prtct|, das das nachfolgende Argument beim wiederholten +% Einlesen von und Schreiben auf eine Datei sch"utzen soll. Beim +% Wiedereinlesen, bei dem das Makro |\dq@prtct| verwendet wird, sollen +% alle Zeichen (normalerweise nur Leerzeichen, in seltenen F"allen +% aber auch die Zeichen des Makros |\dq@prtct|) bis zur "offnenden +% Klammer ignoriert werden. Anschlie"send soll dieses Argument wieder +% gesch"utzt werden, wobei gleich noch ein |\dq@prtct| vorangestellt +% wird, um das Argument bei einem erneuten Schreiben wiederum zu +% sch"utzen. +% \begin{macrocode} +\def\dq@prtct#1#(\@dq@prtct)% +\def\@dq@prtct#1(\string\dq@prtct{\string#1})% +% \end{macrocode} +% Das Makro \verb*:\dq@prtct : k"onnte auf den ersten Blick einfacher +% definiert werden, da das Argument schon zuvor in +% |\grmn@@@active@dq| gesch"utzt wurde. Jedoch kann der Fall +% auftreten, da"s zuerst (mit |\protect|\(=\)|\relax|) expandiert und +% dann erst auf eine Datei geschrieben wird. Da auch in diesen +% F"allen zumindest die Zeichenkette |\dq@prtct| in diese Datei +% geschrieben werden mu"s, wird dies hier einfach getan\ldots +% \begin{macrocode} +\def\dq@prtct #1{#2}(\string\dq@prtct{\string#2})% +% \end{macrocode} +% +% Jetzt folgt noch das Makropaar \verb*:\active@dq : und +% |\active@dq|. F"ur die interne Variante \verb*:\active@dq : dieses +% Paars mu"s die zuvor eingef"ugte Zeichenkette |\dq@prtct| "uberlesen +% und die geschweiften Klammern mit \textit{category code} "`other"' +% durch "`richtige"' Klammern ersetzt werden. +% \begin{macrocode} +\def\active@dq #1{#2}(\grmn@active@@dq(#2))% +% \end{macrocode} +% +% Da die ge"anderten \textit{category codes} nicht mehr ben"otigt +% werden, wird das Argument des |\lowercase|-Befehl beendet und +% die Gruppe mit diesen "Anderungen geschlossen. +% \begin{macrocode} +)% +% \end{macrocode} +% +% Wird |\active@dq| von einer Datei eingelesen, m"ussen alle Token +% bis zur "offnenden Klammer (z.\,B.\ die Zeichenkette |\dq@prtct|) +% "uber"-lesen werden. Anschlie"send kann der Doublequote-Mechanismus +% "`angeschmissen"' werden, als ob ein normales Double\-quote gelesen +% worden w"are. Wir k"onnten auch |\grm@active@@dq| aufrufen, was +% jedoch den Nachteil h"atte, da"s nicht erneut Tokens gesch"utzt +% werden, falls dies notwendig sein m"u"ste. +% \changes{2.5c}{96/04/21}{In \cs{active@dq}, das nur in einer +% wiedereingelesen Datei auftauchen sollte, das urspr"ungliche +% \cs{grmn@active@@dq} durch \cs{@active@dq} ersetzt, um +% Protection-Mechanismus erneut zu durchlaufen.} +% \begin{macrocode} +\def\active@dq#1#{\@active@dq}% +% \end{macrocode} +% +% Zum Schlu"s bleibt nur noch die Auswahl der f"ur diese +% Double\-quote-Kombination abgelegte Definition abh"angig vom +% momentanen Modus. +% \begin{macrocode} +\def\grmn@active@@dq#1{% + \csname grmn@dq\ifmmode second\else first\fi + \expandafter\expandafter\expandafter\expandafter + \grmn@dq@macro\endcsname{#1}} +% \end{macrocode} +% Die Makros |\grmn@dqfirst| und |\grmn@dqsecond|, die hier verwendet +% werden, sind schon zuvor in Abschnitt~\ref{grmndqfirst} definiert +% worden. +% +% +% \subsection{Liste der Standard-Doublequote-Befehle} +% +% Bisher melden alle |"x|-Befehle einen Fehler, da noch kein +% einziger Double\-quote-Befehl definiert wurde. Da zumindest die +% Double\-quote-Kombinationen, die eine hexadezimale Konstante +% darstellen k"onnten, "`durchgelassen"' werden sollten, werden diese +% als erste definiert. Wie schon in den zuvor beschriebenen Makros +% erl"autert, wird den zugeordneten \textit{control sequences} die +% Bedeutung eines |\noexpand| zugeordnet, um diese spezielle +% Bedeutung zu markieren. +% \begin{macrocode} +\grmn@dq@macro\let{0}=\noexpand +\let@dqmacro{1}{0}\let@dqmacro{2}{0}\let@dqmacro{3}{0} +\let@dqmacro{4}{0}\let@dqmacro{5}{0}\let@dqmacro{6}{0} +\let@dqmacro{7}{0}\let@dqmacro{8}{0}\let@dqmacro{9}{0} +\let@dqmacro{A}{0}\let@dqmacro{B}{0}\let@dqmacro{C}{0} +\let@dqmacro{D}{0}\let@dqmacro{E}{0}\let@dqmacro{F}{0} +% \end{macrocode} +% Einige der gerade definierten Kombinationen werden sp"ater +% redefiniert. Darunter fallen die folgenden Gro"sbuchstaben: A, C, +% E und~F, denen dann die Bedeutungen Umlaut-A, +% \mbox{CK/K-K}-Trennung, Trema-E und \mbox{FF/FF-F}-Trennung +% zugewiesen wird. Deshalb kann es zu Problemen mit hexadezimalen +% Konstanten im Bereich |"A0|--|"FF| kommen. +% +% In "alteren Versionen der Style-Option "`german"' konnte man mit +% |"{}| ein normales Double\-quote erzeugen. Dies sollte aus +% Kompatibilit"at zu "alteren Texten, die dies ausnutzen, auch +% weiterhin m"oglich sein, auch wenn dies der Grund f"ur die zuvor +% beschriebenen Tricks mit den "Anderungen der \textit{category +% codes} ist. +% \changes{2.5d}{97/05/01}{Leeres Klammerpaar nach \cs{dq} f"ur +% \texttt{\protect\dq\symbol{`\{}\symbol{`\}}} entfernt.} +% \changes{2.5d}{97/05/01}{Leeres Klammerpaar nach \cs{dq} f"ur +% \texttt{\protect\dq\symbol{`\{}\symbol{`\}}} wieder eingef"ugt, +% da es dadurch mehrfach gelesen und geschrieben werden kann.} +% \begin{macrocode} +\def@dqmacro{}{\dq{}}{\dq{}} +% \end{macrocode} +% +% Die Definition der Kombinationen, die Umlaute erzeugen, ist +% entsprechend einfach, +% \changes{2.5d}{97/04/12}{"Uberbleibsel \cs{@UMLAUT} aus +% Vor-NFSS2-Zeiten durch \cs{\protect\dq} ersetzt.} +% \begin{macrocode} +\def@dqmacro{a}{\"a}{\@MATHUMLAUT a} +\def@dqmacro{o}{\"o}{\@MATHUMLAUT o} +\def@dqmacro{u}{\"u}{\@MATHUMLAUT u} +\def@dqmacro{A}{\"A}{\@MATHUMLAUT A} +\def@dqmacro{O}{\"O}{\@MATHUMLAUT O} +\def@dqmacro{U}{\"U}{\@MATHUMLAUT U} +% \end{macrocode} +% genauso wie diejenige f"ur den Buchstaben~\ss. Leider verhindert +% das leere Klammerpaar nach dem Token |\ss| in dieser Definition, die +% f"ur Plain-\TeX\ notwendig ist, da"s nach dem~\ss\ Ligaturen +% gebildet werden oder Kerning eingef"ugt werden kann. Dies soll in +% der n"achsten Version verbessert werden. +% \changes{2.5d}{97/04/13}{\cs{@SS} in \cs{@MATHss} umbenannt.} +% \changes{2.5d}{97/04/13}{F"ur \LaTeXe{} werden die leeren +% Klammerpaare nach \cs{ss} und \cs{@MATHss} entfernt.} +% \changes{2.5d}{97/04/13}{F"ur \texttt{\symbol{`\"}S} wird +% \cs{SS} verwendet, das in \LaTeXe{} bereits definiert ist +% (Hinweis von Jaakob Kind +% \texttt{j.kind@stochastik.rwth-aachen.de}, August 1996).} +% \changes{2.5d}{97/05/01}{Expansion von \cs{@MATHss} ist nach +% Einf"ugung eines \cs{mathord} ok, daher leeres Klammerpaar +% auch f"ur \LaTeX~2.09 und Plain-\TeX{} entfernt.} +% \begin{macrocode} +\begingroup\expandafter\expandafter\expandafter\endgroup +\expandafter\ifx\csname DeclareTextSymbol\endcsname\relax + \def@dqmacro{s}{\ss{}}{\@MATHss} +\else + \def@dqmacro{s}{\ss}{\@MATHss} +\fi +\def@dqmacro{S}{\SS}{\SS} +\let@dqmacro{z}{s} +\def@dqmacro{Z}{SZ}{SZ} +% \end{macrocode} +% Spezielle Kombinationen f"ur Tremata sind, bis auf die Ausnahme +% des~"`i"' ohne \mbox{I-Punkt}, ebenso einfach\ldots +% \begin{macrocode} +\def@dqmacro{e}{\highumlaut e}{\@MATHUMLAUT e} +\def@dqmacro{E}{\highumlaut E}{\@MATHUMLAUT E} +\def@dqmacro{i}{\highumlaut{\i}}{\@MATHUMLAUT\imath} +\def@dqmacro{I}{\highumlaut I}{\@MATHUMLAUT I} +% \end{macrocode} +% \ldots\,wie die Definitionen f"ur die Anf"uhrungszeichen. Die hier +% eigentlich f"ur Plain-\TeX\ notwendigen leeren Klammerpaare, die +% Kerning und Ligaturbildung verhindern, konnten entfernt werden, +% nachdem sichergestellt ist, da"s nach vollst"andiger Expansion der +% Makros am Ende keine \textit{control sequence} verbleibt. +% \changes{2.5d}{97/04/13}{F"ur \LaTeXe{} werden die leeren +% Klammerpaare nach \cs{glqq}, \cs{grqq}, \cs{flqq} und +% \cs{frqq} entfernt.} +% \changes{2.5d}{97/05/01}{Leere Klammernpaare ebenso f"ur +% \LaTeX~2.09 und Plain-\TeX{} entfernen, nachdem daf"ur gesorgt +% wurde, da"s bei vollst"andiger Expansion am Ende keine cs +% verbleibt.} +% \begin{macrocode} +\def@dqmacro{`}{\glqq}{\glqq} +\def@dqmacro{'}{\grqq}{\grqq} +\def@dqmacro{<}{\flqq}{\flqq} +\def@dqmacro{>}{\frqq}{\frqq} +% \end{macrocode} +% +% Bei den Definitionen der Trennhilfen mu"s nur auf die +% Einschr"ankungen des Mathematik"-modus geachtet werden. +% \begin{macrocode} +\def@dqmacro{-}{\penalty\@M\-\allowhyphens}% + {\penalty\@M\-\allowhyphens} +\def@dqmacro{|}{\penalty\@M\discretionary{-}{}{\kern.03em}% + \allowhyphens}{} +\def@dqmacro{"}{\hskip\z@skip}{\hskip\z@skip} +% \end{macrocode} +% \begin{macrocode} +\def@dqmacro{~}{\leavevmode\hbox{-}}{-} +\def@dqmacro{=}{\penalty\@M-\hskip\z@skip}% + {\penalty\@M-\hskip\z@skip} +% \end{macrocode} +% +% Die restlichen Standard-Doublequote-Befehle werden je nach alter und +% neuer Rechtschreibung verschieden definiert. +% +% Mit "`german"' sollen +% Dreifachkonsonanten nur im Fall der Silbentrennung erzeugt werden: +% Um die Definitionen f"ur die Ausnahmen der Silbentrennung zu +% vereinfachen, wird das Makro |\grmn@dqdisc| verwendet, das die +% gemeinsamen Code-Teile enth"alt. +% \begin{macrocode} +%<*old> +\def\grmn@dqdisc#1#2{\penalty\@M + \ifnum\grmn@dqwarninglevel>\@ne \grmn@dq@warning{#1}\fi + \discretionary{#2-}{}{#1}\allowhyphens} +% \end{macrocode} +% Auch bei diesen Definitionen mu"s der Mathematikmodus separat +% gehandhabt werden. Wie man hier bemerken sollte, liest das +% Double\-quote-Makro nur das n"achste Zeichen und pr"uft nicht nach, +% ob nach der Kombination~|"c| auch ein~\texttt{k} folgt. Dies +% ist bis auf die Kombination~|"f| f"ur die meisten Schriften +% nicht notwendig, da in diesen keine Ligaturen definiert sind. +% \begin{macrocode} +\def@dqmacro{c}{\grmn@dqdisc ck}{c} +\def@dqmacro{C}{\grmn@dqdisc CK}{C} +% \end{macrocode} +% \begin{macrocode} +\def@dqmacro{l}{\grmn@dqdisc l{ll}}{l} +\def@dqmacro{L}{\grmn@dqdisc L{LL}}{L} +\def@dqmacro{m}{\grmn@dqdisc m{mm}}{m} +\def@dqmacro{M}{\grmn@dqdisc M{MM}}{M} +\def@dqmacro{n}{\grmn@dqdisc n{nn}}{n} +\def@dqmacro{N}{\grmn@dqdisc N{NN}}{N} +\def@dqmacro{p}{\grmn@dqdisc p{pp}}{p} +\def@dqmacro{P}{\grmn@dqdisc P{PP}}{P} +\def@dqmacro{r}{\grmn@dqdisc r{rr}}{r} +\def@dqmacro{R}{\grmn@dqdisc R{RR}}{R} +\def@dqmacro{t}{\grmn@dqdisc t{tt}}{t} +\def@dqmacro{T}{\grmn@dqdisc T{TT}}{T} +\def@dqmacro{F}{\grmn@dqdisc F{FF}}{F} +% \end{macrocode} +% +% \changes{2.5c}{96/04/21}{Bei \texttt{{\protect\dq}ff} sollte +% ff-Ligatur nicht unterdr"uckt werden (Bugfix von Joachim Schrod, +% ehemals f"ur Version 2.4, jedoch hier mit dem Trick des +% initialisierten \cs{grmn@dqnextff} erg"anzt).} +% \changes{2.5d}{97/04/13}{Fehler f"ur \texttt{{\protect\dq}f}, falls +% danach kein weiteres~f folgt, beseitigt (Hinweis von Carsten +% J"ager \texttt{jaeger@Physiology.RWTH-Aachen.DE}, M"arz 1997).} +% +% In den meisten Schriften ist f"ur \texttt{ff} eine Ligatur +% definiert, die auch in Wortfugen bei Ausfall des +% dritten~\glq f\grq{} verwendet werden sollte. Die hier verwendeten +% Makros sind zerbrechlich (\emph{fragile}, jedoch mit einer nicht +% ganz sauberen Abhilfe, siehe unten), was aber nur in +% nicht-\LaTeX-basierten Formaten zu Problemen f"uhren wird. F"ur +% diese Formate mu"s |\protect| in Primitiven wie |\edef|, |\write|, +% |\mark|, etc.\ entsprechend definiert werden! +% \begin{macrocode} +\def@dqmacro{f}{\grmn@dqdiscff}{f} +\def\grmn@dqdiscff{\penalty\@M + \ifnum\grmn@dqwarninglevel>\@ne \grmn@dq@warning f\fi + \afterassignment\grmn@dqinsertff \let\grmn@dqnextff= } +\def\grmn@dqinsertff{% + \if f\grmn@dqnextff + \expandafter\grmn@dqfirst\else\expandafter\grmn@dqsecond\fi + {\relax\discretionary{ff-}{f}{ff}\allowhyphens}{f\grmn@dqnextff}} +% \end{macrocode} +% +% F"ur die zuvor schon erw"ahnten F"alle, in denen |\protect| nicht +% entsprechend definiert wird, initialisieren wir |\grmn@dqnextff| auf +% den typischen Wert~\glq f\grq. Da die Makros f"ur die ff-Ligatur +% entsprechend definiert sind, vermeiden wir, wenn auch etwas +% kryptisch, in den Nur-Expansions"-f"allen eine Fehlermeldung und +% erhalten meist auch eine ff-Ligatur. Dazu haben wir au"serdem noch +% im Makro |\grmn@dqinsertff| ein |\relax| f"ur |\afterassignment| in +% den nur-expandierten Makrotext vor das |\discretionary| eingef"ugt. +% \begin{macrocode} +\let\grmn@dqnextff=f +% +% \end{macrocode} +% +% Mit "`ngerman"' sollen die Makros dasjenige Ergebnis erzugen, +% das offenbar gemeint ist, aber es soll gleichzeitig eine Warnung ins +% Protokoll geschrieben werden: +% \changes{2.5e (beta 1)}{98/05/04}{Die Befehle f"ur Dreifachkonsonanten +% werden in "`ngerman"' sinnvoll definiert.} +% \begin{macrocode} +%<*new> +\def@dqmacro{c}{\grmn@dqobsolete@ck ck}{c} +\def@dqmacro{C}{\grmn@dqobsolete@ck CK}{C} +\def@dqmacro{l}{\grmn@dqobsolete@three l}{l} +\def@dqmacro{L}{\grmn@dqobsolete@three L}{L} +\def@dqmacro{m}{\grmn@dqobsolete@three m}{m} +\def@dqmacro{M}{\grmn@dqobsolete@three M}{M} +\def@dqmacro{n}{\grmn@dqobsolete@three n}{n} +\def@dqmacro{N}{\grmn@dqobsolete@three N}{N} +\def@dqmacro{p}{\grmn@dqobsolete@three p}{p} +\def@dqmacro{P}{\grmn@dqobsolete@three P}{P} +\def@dqmacro{r}{\grmn@dqobsolete@three r}{r} +\def@dqmacro{R}{\grmn@dqobsolete@three R}{R} +\def@dqmacro{t}{\grmn@dqobsolete@three t}{t} +\def@dqmacro{T}{\grmn@dqobsolete@three T}{T} +\def@dqmacro{F}{\grmn@dqobsolete@three F}{F} +\def@dqmacro{f}{\grmn@dqobsolete@three f}{f} +% +% \end{macrocode} +% +% +% \subsection{Definition der Double\-quote-Befehle (cont.)} +% +% Wie schon bei der vorl"aufigen Definition des Makros +% |\grmn@dqredefcheck| er"-w"ahnt, sollten alle weiteren +% Definitionen von Double\-quote-Befehlen zumindest in der +% Protokolldatei erscheinen. Dann k"onnen von Benutzer gemeldete +% Fehler, wenn auch die Protokolldatei mitgeschickt wird, schneller +% eingegrenzt werden. Deshalb wird dieses Makro hier so definiert, +% da"s es bei jeder Verwendung von |\def@dqmacro| und |\let@dqmacro| +% eine Zeile in die Protokolldatei schreibt -- mit Informationen, +% welche Kombination definiert wird und ob eine alte Definition +% "uber"-schrieben wird. +% \changes{2.5d}{97/05/01}{\cs{immediate}\cs{write}\cs{m@ne} durch +% \cs{wlog} ersetzt.} +% \begin{macrocode} +\def\grmn@dqredefcheck#1{% +% \wlog{german: \grmn@dq@macro\ifx{#1}\relax \else re\fi +% \wlog{ngerman: \grmn@dq@macro\ifx{#1}\relax \else re\fi + defining dq-command for `\string#1'\on@line.}}% +% \end{macrocode} +% +% +% \section{Unterst"utzung f"ur Dokumente in verschiedenen Sprachen} +% +% Die Style-Option "`german"' unterst"utzt die Einbindung von +% Textteilen in deutscher Sprache in Dokumente, die auch in englisch +% oder franz"osisch geschrieben sind. Die folgenden Befehle sind +% dagegen nur bedingt f"ur "`mehrsprachige"' Texte geeignet, in denen +% zwei oder mehr Sprachen gleichrangig gesetzt werden. +% +% +% \subsection{Datumsangaben} +% \begin{macrocode} +%\def\month@german{\ifcase\month \or +%\def\month@ngerman{\ifcase\month \or + Januar\or Februar\or M\"arz\or April\or Mai\or Juni\or + Juli\or August\or September\or Oktober\or November\or Dezember\fi} +%\def\dategerman{\def\today{\number\day.~\month@german +%\def\datengerman{\def\today{\number\day.~\month@ngerman + \space\number\year}} +%\def\dateaustrian{\def\today{\number\day.~\ifnum 1=\month +%\def\datenaustrian{\def\today{\number\day.~\ifnum 1=\month +% J\"anner\else \month@german\fi \space\number\year}} +% J\"anner\else \month@ngerman\fi \space\number\year}} +% \end{macrocode} +% \begin{macrocode} +\def\month@english{\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} +\def\dateUSenglish{\def\today{\month@english + \space\number\day, \number\year}} +\def\dateenglish{\def\today{\number\day \ifcase\day \or + st\or nd\or rd\or th\or th\or th\or th\or th\or th\or th\or% 1..10 + th\or th\or th\or th\or th\or th\or th\or th\or th\or th\or% 11..20 + st\or nd\or rd\or th\or th\or th\or th\or th\or th\or th\or% 21..30 + st\fi + ~\month@english \space\number\year}} +% \end{macrocode} +% \begin{macrocode} +\def\datefrench{\def\today{\number\day \ifnum1=\day \/$^{\rm er}$\fi + \space\ifcase\month \or + janvier\or f\'evrier\or mars\or avril\or mai\or juin\or + juillet\or ao\^ut\or septembre\or + octobre\or novembre\or d\'ecembre\fi + \space\number\year}} +% \end{macrocode} +% +% \subsection{Textteile in "Uberschriften, etc.} +% +% Ab der \LaTeX~2.09-Release vom Dezember~1991 sind alle konstanten +% Textteile in den Standard-Styles und Style-Optionen durch Makros +% |\...name| ersetzt, so da"s man mit einigen Einschr"ankungen +% durch Redefinition dieser Makros eine Sprachanpassung erreichen +% kann. Will man diese Anpassung auch bei eigenen Styles und +% Style-Optionen erreichen, so sollte man die entsprechenden +% Textteile durch die entsprechenden Makros ersetzen, wobei man +% eine Default-Definition dieser Makros mitliefern sollte. +% +% Als Beispiel mu"s die Definition +%\begin{verbatim} +%\def\tableofcontents{\section*{Contents% +% \@mkboth{CONTENTS}{CONTENTS}}% +% \@starttoc{toc}} +%\end{verbatim} +% die in den alten \LaTeX-Releases vor Dezember~1991 in +% \texttt{article.sty} zu finden ist, durch +%\begin{verbatim} +%\def\contentsname{Contents} +%\def\tableofcontents{\section*{\contentsname +% \@mkboth{\uppercase{\contentsname}}% +% {\uppercase{\contentsname}}}% +% \@starttoc{toc}} +%\end{verbatim} +% ersetzt werden, um die englische "Uberschrift "`Contents"' f"ur +% das Inhaltsverzeichnis entsprechend anpassen zu k"onnen. +% +% F"ur die Standard-Klassen und Pakete von \LaTeXe\ wurde dies von +% Anfang an gemacht, so da"s hier keine "Anderungen notwendig sind. +% +% Die folgenden Makros |\captions|\meta{Sprache} definieren alle in +% den \LaTeX-Standard-Klassen und \mbox{-Paketen} verwendeten +% Textteile. +% \begin{macrocode} +%\def\captionsgerman{% +%\def\captionsngerman{% + \def\prefacename{Vorwort}% + \def\refname{Literatur}% + \def\abstractname{Zusammenfassung}% + \def\bibname{Literaturverzeichnis}% + \def\chaptername{Kapitel}% + \def\appendixname{Anhang}% + \def\contentsname{Inhaltsverzeichnis}% % oder nur: Inhalt + \def\listfigurename{Abbildungsverzeichnis}% + \def\listtablename{Tabellenverzeichnis}% + \def\indexname{Index}% + \def\figurename{Abbildung}% + \def\tablename{Tabelle}% % oder: Tafel + \def\partname{Teil}% + \def\enclname{Anlage(n)}% % oder: Beilage(n) + \def\ccname{Verteiler}% % oder: Kopien an + \def\headtoname{An}% + \def\pagename{Seite}% + \def\seename{siehe}% + \def\alsoname{siehe auch}} +%\let\captionsaustrian=\captionsgerman +%\let\captionsnaustrian=\captionsngerman +% \end{macrocode} +% \begin{macrocode} +\def\captionsenglish{% + \def\prefacename{Preface}% + \def\refname{References}% + \def\abstractname{Abstract}% + \def\bibname{Bibliography}% + \def\chaptername{Chapter}% + \def\appendixname{Appendix}% + \def\contentsname{Contents}% + \def\listfigurename{List of Figures}% + \def\listtablename{List of Tables}% + \def\indexname{Index}% + \def\figurename{Figure}% + \def\tablename{Table}% + \def\partname{Part}% + \def\enclname{encl}% + \def\ccname{cc}% + \def\headtoname{To}% + \def\pagename{Page}% + \def\seename{see}% + \def\alsoname{see also}} +\let\captionsUSenglish=\captionsenglish +% \end{macrocode} +% \begin{macrocode} +\def\captionsfrench{% + \def\prefacename{Pr\'eface}% + \def\refname{R\'ef\'erences}% + \def\abstractname{R\'esum\'e}% + \def\bibname{Bibliographie}% + \def\chaptername{Chapitre}% + \def\appendixname{Annexe}% + \def\contentsname{Table des mati\`eres}% + \def\listfigurename{Liste des figures}% + \def\listtablename{Liste des tableaux}% + \def\indexname{Index}% + \def\figurename{Figure}% + \def\tablename{Tableau}% + \def\partname{Partie}% + \def\enclname{P.~J.}% + \def\ccname{Copie \`a}% + \def\headtoname{A}% + \def\pagename{Page}% + \def\seename{voir}% + \def\alsoname{voir aussi}}% +% \end{macrocode} +% +% \subsection{Weitere sprachabh"angige Parameter} +% +% Die Sprache eines Dokuments bestimmt neben den Datumsangaben und +% den Textteilen in "Uberschriften auch noch weitere Parameter, wie +% z.\,B.\ ob nach einem Satzzeichen, wie Punkten und Kommas, ein +% gr"o"serer Wortzwischenraum eingef"ugt werden soll. Au"serdem +% sollten auch die den Trennmustern zugeordneten Parameter +% \texttt{\string\left\-hyphen\-min} und +% \texttt{\string\right\-hyphen\-min} auf entsprechende Werte gesetzt +% werden. +% +% Nach der neuen Rechtschreibung w"are |\lefthyphenmin=1| zul"assig. +% Dies wird allerdings von den Trennmustern \texttt{gnhyph01.tex} +% nicht unterst"utzt. +% +% \changes{2.5c}{96/04/28}{\cs{(no)extras(US)english} als +% expandierbare Makros statt als \cs{relax} definiert, damit +% k"onnen diese Makros einfacher erg"anzt werden.} +% \begin{macrocode} +\def\extrasUSenglish{} +\let\noextrasUSenglish=\extrasUSenglish +\let\extrasenglish=\extrasUSenglish +\let\noextrasenglish=\extrasenglish +% \end{macrocode} +% \changes{2.5c}{96/02/26}{Explizite Zuweisung an \cs{uchyph} +% hinzugef"ugt (found by R. Wonneberger, David M. Jones, +% 93/02/11).} +% \begin{macrocode} +%\def\extrasgerman{\frenchspacing \uchyph\@ne +%\def\extrasngerman{\frenchspacing \uchyph\@ne + \lefthyphenmin\tw@ \righthyphenmin\tw@} +%\def\noextrasgerman{% +%\def\noextrasngerman{% + \ifnum\sfcode`\.=\@m \else \noexpand\nonfrenchspacing \fi + \uchyph\the\uchyph\relax + \lefthyphenmin\the\lefthyphenmin + \righthyphenmin\the\righthyphenmin} +%\let\extrasaustrian=\extrasgerman +%\let\extrasnaustrian=\extrasngerman +%\let\noextrasaustrian=\noextrasgerman +%\let\noextrasnaustrian=\noextrasngerman +% \end{macrocode} +% \begin{macrocode} +\def\extrasfrench{\frenchspacing} +\def\noextrasfrench{% + \ifnum\sfcode`\.=\@m \else \noexpand\nonfrenchspacing \fi} +% \end{macrocode} +% +% +% \subsection{Default-Werte f"ur Trennmusterwerte deklarieren} +% +% Jeder Sprache und deren zugeordnetem Satz von Trennmustern sollte +% eine Nummer f"ur den \TeX-Parameter |\language| beim Erzeugen +% der Formatdatei zugewiesen worden sein. Diese Nummer ist f"ur +% jede Sprache in der \textit{control sequence} +% |\l@|\(\langle\)Sprache\(\rangle\) abgespeichert. +% +% Die Style-Option "`german"' verwendet die Sprachen +% \texttt{USenglish}, \texttt{english}, \texttt{german}, +% \texttt{austrian} und \texttt{french}. Sind f"ur diese Sprachen +% keine Nummern abgespeichert worden, werden diese hier als Dialekt +% einer schon definierten Sprache oder als~\(255\) definiert, so da"s +% nicht getrennt wird. +% +% Ist f"ur \texttt{german} bzw.\ dessen "`Dialekt"' \texttt{austrian} +% kein Wert definiert, wird eine entsprechende Meldung auf dem +% Benutzerterminal ausgegeben. F"ur die anderen Sprache erscheint +% diese Meldung nur in der Protokolldatei. +% +% "`german"' und "`ngerman"' unterscheiden sich +% durch die Bezeichner f"ur die jeweils unterst"utzten die Sprachen: +% F"ur die neue Rechtschreibung +% werden \texttt{ngerman} und \texttt{naustrian} an Stelle von +% \texttt{german} und \texttt{austrian} verwendet. +% +% +% \begin{macrocode} +\@ifundefined{l@USenglish}{% + \@ifundefined{l@english}{\chardef\l@USenglish=255 }% + {\chardef\l@USenglish=\l@english}% +% \wlog{german -- \string\language\space number for USenglish % +% \wlog{ngerman -- \string\language\space number for USenglish % + undefined, default \number\l@USenglish\space used.}% +}{} +% \end{macrocode} +% \begin{macrocode} +\@ifundefined{l@english}{% + \chardef\l@english=\l@USenglish +% \wlog{german -- \string\language\space number for UKenglish % +% \wlog{ngerman -- \string\language\space number for UKenglish % + undefined, default \number\l@english\space used.}% +}{} +% \end{macrocode} +% \begin{macrocode} +%<*old> +\@ifundefined{l@german}{% + \@ifundefined{l@austrian}{% + \chardef\l@german=255 % + \message{german -- \string\language\space number for German % + undefined, default \number\l@german\space used,}% + \message{german -- Please read \string"gerdoc.tex\string" how % + to install hyphenation patterns.}% + }{% + \chardef\l@german=\l@austrian + \wlog{german -- \string\language\space number for German % + undefined, default \number\l@german\space used.}% + }% +}{} +% +%<*new> +\@ifundefined{l@ngerman}{% + \@ifundefined{l@naustrian}{% + \chardef\l@ngerman=255 % + \message{ngerman -- \string\language\space number for ngerman % + undefined, default \number\l@ngerman\space used,}% + \message{ngerman -- Please read \string"gerdoc.tex\string" how % + to install hyphenation patterns.}% + }{% + \chardef\l@ngerman=\l@naustrian + \wlog{ngerman -- \string\language\space number for ngerman % + undefined, default \number\l@ngerman\space used.}% + }% +}{} +% +% \end{macrocode} +% \begin{macrocode} +%<*old> +\@ifundefined{l@austrian}{% + \chardef\l@austrian=\l@german + \wlog{german -- \string\language\space number for Austrian % + undefined, default \number\l@austrian\space used.}% +}{} +% +%<*new> +\@ifundefined{l@naustrian}{% + \chardef\l@naustrian=\l@ngerman + \wlog{ngerman -- \string\language\space number for naustrian % + undefined, default \number\l@naustrian\space used.}% +}{} +% +% \end{macrocode} +% \begin{macrocode} +\@ifundefined{l@french}{% + \chardef\l@french=255 +% \wlog{german -- \string\language\space number for French % +% \wlog{ngerman -- \string\language\space number for French % + undefined, default \number\l@french\space used.}% +}{} +% \end{macrocode} +% +% +% \subsection{Wechsel der Trennmuster, Datumsangabe und +% "Uberschriften} +% +% Ein Wechsel der Sprache mit |\selectlanguage{|\meta{Sprache}|}| +% schaltet einfach die Datumsangabe, Textteile, Trennmuster und +% andere Parameter f"ur die angegebene \meta{Sprache} um. +% +% F"ur die n"achste Version ist endlich eine Anpassung an das +% Babel-System geplant. Au"serdem fehlen momentan noch +% Standard-Makros, um die aktuelle Sprache abzufragen und abh"angig +% von dieser entsprechend reagieren zu k"onnen. +% +% Das Makro |\originalTeX| enth"alt alle Anweisungen, um die +% Parameter"-anpassungen r"uck"-g"angig machen zu k"onnen, die man +% beim Umschalten auf die momentane Sprache ge"-"andert hat. Dieses +% Makro mu"s immer expandierbar sein; darf also nicht als |\relax| +% definiert werden. Zu Beginn sind keine Anweisungen notwendig. +% (Anmerkung: Wegen Problemen mit dem Paket \texttt{bibgerm}, das +% einige der internen Makros von "`german"' umdefiniert, wurde der +% Name des Makros ge"andert -- dies sollte in einer endg"ultigen +% L"osung wieder verbessert werden, um beispielsweise kompatibel zu +% Babel zu werden.) +% \changes{2.5c}{96/02/26}{\cs{grmn@originalTeX} mu"s +% \cs{original@TeX} hei"sen, damit einige andere Pakete, wie +% `bibgerm' kompatibel bleiben. `bibgerm' sollte endlich verbessert +% und "`sauberer"' programmiert werden (die zus"atzlichen Strings +% kann man auch in die Makros \cs{extras\ldots} einf"ugen).} +% \changes{2.5c}{96/04/21}{\cs{original@TeX} hei"st in Babel +% \cs{originalTeX}, das in `german.sty' eine andere Bedeutung +% hat (TODO). +% Da ich in \cs{selectlanguage} den Leerzeichen-Trick verwende +% (um `bibgerman' zu "`hintergehen"'), hei"st \cs{original@TeX} +% bis zur endg"ultigen L"osung wieder \cs{grmn@originalTeX}.} +% \begin{macrocode} +\def\grmn@originalTeX{} +% \end{macrocode} +% +% \changes{2.5c}{96/04/21}{\cs{languagename} neu mit Babels +% Funktionalit"at eingef"uhrt, Hinweis auf m"ogliche other-Tokens.} +% +% Das Makro |\languagename| enth"alt den Namen der momentan +% eingeschalteten Sprache. Der Name ist eine Folge von +% Character-Tokens, die entweder einen |\catcode| von 11 (letter) oder +% 12 (other) besitzen k"onnen. Die Ursache f"ur Other-Tokens ist das +% Primitiv |\string|, das in |\selectlanguage| verwendet wird, um aus +% einer als Argument angegebenen \textit{control sequence} das +% Escape-Zeichen abzuspalten. (Die Dokumentation von Babel~3.5 gibt +% einen Test der aktuellen Sprache mit |\languagename| an, der wegen +% der Other-Tokens nicht immer funktionieren wird!) +% +% \begin{macrocode} +\def\languagename{} +% \end{macrocode} +% +% Mit dem Makro |\selectlanguage| wird auf die Sprache umgeschaltet. +% Dabei werden, nachdem abgefragt wurde, ob die Sprache definiert +% wurde, zuerst mit |\originalTeX| alle "Anderungen r"uck"-g"angig +% gemacht, bevor das Datum, die "Uberschriften, sonstige Parameter +% und die Trennmuster umgeschalten werden. +% (Anmerkung: |\originalTeX| hei"st im Moment noch +% |\grmn@originalTeX|, dies mu"s aber noch in der n"achsten Version +% ge"andert werden, um kompatibler zu Babel zu sein.) +% +% \changes{2.5c}{96/04/21}{Der Trick aus \LaTeXe{} mit dem +% abschlie"senden Leerzeichen im Namen des zu sch"utzenden Makros +% wird auch f"ur \cs{selectlanguage } verwendet. Da damit die +% Neudefinition im Paket `bibgerm' wirkungslos wird, verwende ich +% hier einen tempor"aren Patch (in Form des \cs{bibs\ldots}) f"ur +% dieses Paket. Besser w"are es aber, wenn `bibgerm' die +% zus"atzlichen Definitionen an \cs{extras\ldots} anh"angen w"urde.} +% \begin{macrocode} +\expandafter\def\csname selectlanguage \endcsname#1{\relax + \expandafter\ifx\csname l@#1\endcsname\relax + \errhelp{Your command will be ignored, type to proceed}% + \errmessage{You haven't defined the language #1 yet}% + \else + \grmn@originalTeX + \edef\languagename{#1}% + \edef\grmn@originalTeX{\csname noextras#1\endcsname + \def\noexpand\grmn@originalTeX{}}% + \csname date#1\endcsname + \csname captions#1\endcsname + \csname extras#1\endcsname\relax + % Diese Zeile ist fuer `bibgerm' ... + \csname bibs#1\endcsname + % ... sie wird in spaeteren `german.sty'-Versionen nicht + % mehr vorhanden sein. Also nicht darauf verlassen! + \language \csname l@#1\endcsname\relax + \fi} +% \end{macrocode} +% +% Das Makro |\selectlanguage| ist \emph{fragile}. Deshalb wird es +% implizit mit einem |\protect| gesch"utzt. Da dadurch so oder so +% zwei Makros notwendig sind, k"onnen wir in dieses zweite Makro +% gleich noch weitere Funktionalit"at stecken (die aber vollst"andig +% expandierbar sein mu"s!): +% In "alteren Versionen dieser Style-Option mu"ste man die Sprache als +% \textit{control sequence}, z.\,B.\ |\german|, eingeben, w"ahrend man +% in den aktuellen Versionen nur noch den Namen, also |german|, +% verwenden sollte. Damit beides aus Kompatibilit"ats"-gr"unden +% m"oglich ist, wird hier einfach die \textit{control sequence} +% umgewandelt und das Escape-Zeichen, normalerweise ein Back\-slash, +% mit einem kleinen Kniff entfernt. +% \changes{2.5c}{96/04/21}{Der Trick aus \LaTeXe{} mit dem +% abschlie"senden Leerzeichen im Namen des zu sch"utzenden Makros +% wird auch f"ur \cs{selectlanguage} verwendet.} +% \begin{macrocode} +\begingroup\catcode`\ =11\relax% <= do not delete this and the +\toks0={\endgroup% <=== following percent characters! +\def\selectlanguage#1{\protect\selectlanguage {% +\ifnum\escapechar=\expandafter`\string#1\empty% +\else\string#1\empty\fi}}}% +\the\toks0\relax% +% \end{macrocode} +% +% +% In "alteren \texttt{.aux}-Dateien kann immer noch die alte interne +% Form \cs{p@select\-language} auftauchen. Daher wird diese hier +% nochmals definiert, um diese eigentlich unn"otigen Fehlermeldungen +% zu vermeiden. Au"serdem fr"agt \texttt{bibgerm.sty} die Existenz +% dieses Makros ab und, falls es nicht existiert, definiert +% \texttt{bibgerm.sty} ein eigenes Makro \cs{select\-language} mit der +% alten Definition aus \texttt{german.sty} Version~2.3. Dies mu"s +% auf alle F"alle vermieden werden! +% +% \changes{2.5c}{96/04/23}{\cs{p@selectlanguage} aus Kompatibilit"at +% mit v2.5b und noch "alteren Versionen wieder eingef"uhrt.} +% +% \begin{macrocode} +\def\p@selectlanguage{\selectlanguage} +% \end{macrocode} +% +% +% \changes{2.5c}{96/04/21}{\cs{iflanguage} neu eingef"uhrt.} +% \changes{2.5e (beta 1)}{98/05/04}{\cs{iflanguage} ge"andert.} +% +% Das Makro |\iflanguage| kann dazu benutzt werden, abh"angig von +% der aktuellen Sprache Aktionen auszuf"uhren. Das Makro hat drei +% Argumente. Das erste Argument ist die Sprache in Form einer +% Folge von Character-Tokens, das zweite und dritte Argument enth"alt +% die Aktionen, falls dies die aktuelle Sprache ist bzw.\ falls nicht. +% +% Mit dem folgenden |\iflanguage| kann man in den "`then"'- und +% "`else"'"~Argumenten auch Makros verwenden, deren Parameter +% hinter dem |\iflanguage|-Befehl folgen. Diese Implementation, +% abgeschaut von |\@ifundefined|, erm"oglicht +% Konstrukte wie |Sto\iflanguage{german}{"}{f}ffetzen|. +% +% |\iflanguage| kann sich in sp"ateren Version noch geringf"ugig +% "andern, falls dies im Babel-Paket geschehen sollte. +% +% \begin{macrocode} +\def\iflanguage#1{% + \ifx\csname l@#1\endcsname\relax + \expandafter\grmn@dqsecond + \else \ifnum\csname l@#1\endcsname=\language + \expandafter\expandafter\expandafter\grmn@dqfirst + \else + \expandafter\expandafter\expandafter\grmn@dqsecond + \fi\fi +} +% \end{macrocode} +% +% +% \subsection{Kompatibilit"at mit \protect\TeX~2} +% +% In \TeX\ Version 2.x konnte man Trennmuster f"ur nur eine einzige +% Sprache in einer Format"-datei laden und verwenden. Deshalb fehlen +% in dieser alten \TeX-Version, die von einigen, wenn auch wenigen +% Personen immer noch verwendet wird/werden mu"s, die Parameter +% |\language|, \texttt{\string\left\-hyphen\-min}, +% \texttt{\string\right\-hyphen\-min} und das Primitiv +% \texttt{\string\set\-language}. Um diese Style-Option mit dieser +% alten Version verwenden zu k"onnen, werden diese f"ur \TeX\ +% Version~2 einfach ohne Funktionalit"at nachimplementiert. +% +% Die Parameter sind einfache Z"ahler, die mit |\newcount| allokiert +% werden k"onnen und mit sinnvollen, wenn auch nie von \TeX\ selbst +% verwendete Werten initialisiert werden. Da |\newcount| in +% Plain-\TeX\ als "`outer"' deklariert ist, mu"s hier der Trick mit +% |\csname| verwendet werden. +% \begin{macrocode} +\expandafter\ifx\csname language\endcsname\relax + \csname newcount\endcsname\language + \language=0 \fi +\expandafter\ifx\csname lefthyphenmin\endcsname\relax + \csname newcount\endcsname\lefthyphenmin + \lefthyphenmin=2 \fi +\expandafter\ifx\csname righthyphenmin\endcsname\relax + \csname newcount\endcsname\righthyphenmin + \righthyphenmin=3 \fi +% \end{macrocode} +% +% F"ur das in \TeX~3 neu hinzugekommene Primitiv +% \texttt{\string\set\-language} k"onnte man eine relativ einfache +% Definition verwenden. Da jedoch Makros die Existenz dieses Befehls +% abpr"ufen und es dann mit der Bedeutung, die es in \TeX~3 besitzt, +% verwenden k"onnten, sollte es das Verhalten, insbesondere dessen +% Einschr"ankungen, dieses neuen Primitivs nachbilden. +% Da |\setlanguage| in "alteren Versionen dieser Style-Option zu +% Wechseln der Sprache verwendet wurde, kann man gleich in der +% Fehlermeldung auf das neue Makro |\selectlanguage| hinweisen. +% \begin{macrocode} +\expandafter\ifx\csname setlanguage\endcsname\relax + \def\setlanguage{\relax + \ifhmode \else + \errhelp{Use \selectlanguage to switch languages.}% + \errmessage{\setlanguage allowed only in horizontal mode}% + \fi + \begingroup\afterassignment\endgroup\count@=} +\fi +% \end{macrocode} +% +% \subsection{Ein-/Ausschalten der deutschen Befehle} +% \changes{2.5e (beta 3)}{98/05/28}{In {\tt ngerman.sty} wird nun +% \cs{ngermanTeX} definiert.} +% +% \begin{macrocode} +\begingroup \mdqon +\def\x{\endgroup + \def\originalTeX{\mdqoff \let"\dq \umlauthigh + \let\3\grmn@original@three + \selectlanguage{USenglish}}% +% \def\germanTeX{\mdqon \let"\@active@dq \umlautlow +% \def\ngermanTeX{\mdqon \let"\@active@dq \umlautlow + \let\grmn@original@three\3\let\3\ss +% \selectlanguage{german}}}% +% \selectlanguage{ngerman}}}% +\x +% \end{macrocode} +% +% Zum Schlu"s bleibt nur noch das R"ucksetzen des \textit{category +% codes} des Zeichens~\texttt{@} und das Einschalten der deutschen +% Befehle, das gleichzeitig die deutschen Trennmuster aktiviert, +% falls sie geladen wurden. +% \begin{macrocode} +\catcode`\@=\atcode % return to previous catcode +%\germanTeX +%\ngermanTeX +% \end{macrocode} +% +%\iffalse +% +% +%\fi +% +% \section{Beispieldatei \texttt{hyphen.cfg} zum Laden der +% Trennmuster} +% +% In \texttt{gerdoc.tex}, der Dokumentation zum German-Style, sind +% die Schritte zur Installation der Trennmuster genauer erl"autert. +% Zur Vereinfachung f"ur den Benutzer wird die Beispieldatei +% \texttt{hyphxmpl.cfg} zur Verf"ugung gestellt, die entweder direkt +% oder mit wenigen "Anderungen als Datei \texttt{hyphen.cfg} +% f"ur \LaTeXe{} verwendet werden kann. +% +% \begin{macrocode} +%<+hyphcfg>%% ---------------------------------------------- +%<+hyphcfg>%% Beispielkonfigurationsdatei fuer: `hyphen.cfg' +%<+hyphcfg>%% Naeheres siehe Dokumentation `gerdoc.tex'. +%<+hyphcfg>%% Copyleft 1995-1998 by Bernd Raichle. +%<+hyphcfg> +%<+hyphcfg>%% Konfigurationsdatei -- Trennmuster: `hyphen.cfg' +%<+hyphcfg>\message{== Loading hyphenation patterns:} +%<+hyphcfg> +%<+hyphcfg>%% american english +%<+hyphcfg>\chardef\l@USenglish=\language +%<+hyphcfg>%% british english als "Dialekt" +%<+hyphcfg>\chardef\l@english=\l@USenglish +%<+hyphcfg>\input hyphen +%<+hyphcfg> +%<+hyphcfg>%% german +%<+hyphcfg>\newlanguage\l@german \language=\l@german +%<+hyphcfg>%% oesterreichisch als "Dialekt" +%<+hyphcfg>\chardef\l@austrian=\l@german +%<+hyphcfg>\input ghyph31 +%<+hyphcfg> +%<+hyphcfg>%% new german +%<+hyphcfg>\newlanguage\l@ngerman \language=\l@ngerman +%<+hyphcfg>%% oesterreichisch (neu) als "Dialekt" +%<+hyphcfg>\chardef\l@naustrian=\l@ngerman +%<+hyphcfg>\input gnhyph01 +%<+hyphcfg> +%<+hyphcfg>%% weitere Sprachen nach folgendem Schema: +%<+hyphcfg>% \newlanguage\l@SPRACHE \language=\l@SPRACHE +%<+hyphcfg>% \chardef\l@DIALEKT=\l@SPRACHE +%<+hyphcfg>% \input SPRACHhyphen +%<+hyphcfg> +%<+hyphcfg>%% Default-Trennmuster: USenglish +%<+hyphcfg>\language=\l@USenglish \lefthyphenmin=2 \righthyphenmin=3 +%<+hyphcfg>\message{done.} +% \end{macrocode} +% +% Ich hoffe, das Lesen dieses dokumentierten Quellcodes hat einige +% Einblicke in die Implementierung der Style-Option "`german"' +% gegeben. Da ich sie haupt"-s"achlich als eigene Ged"achtnisst"utze +% geschrieben habe, kaum Korrekturen vorgenommen habe, ist sie +% unvoll"-st"andig, ent"-h"alt viele \mbox{Tipp-}, Ausdrucks- und +% sonstige Fehler. Man m"oge "uber diese hinwegsehen oder mir +% entsprechende Korrekturen zukommen lassen. Wichtiger ist mir +% jedoch, da"s der Makro-Code m"oglichst wenig Fehler enth"alt, soda"s +% jede Meldung eines Fehlers und jeder Verbesserungsvorschlag immer +% willkommen ist. Daf"ur schon jetzt meinen Dank! +% \pagebreak +% +% \Finale +\endinput +%% End of german.dtx diff --git a/Master/texmf-dist/source/generic/german/german.ins b/Master/texmf-dist/source/generic/german/german.ins new file mode 100644 index 00000000000..c68647ad303 --- /dev/null +++ b/Master/texmf-dist/source/generic/german/german.ins @@ -0,0 +1,84 @@ +%% german.ins +%% +%% Docstrip installation instruction file +%% for the `german' collection, Version 2.5e of 1998-07-08 +%% +%% Copyright (C) 1991-1997 by B.Raichle and DANTE e.V. +%% Copyright (C) 1998,1999 by B.Raichle +%% + +\def\batchfile{german.ins} +\input docstrip.tex + +\expandafter\ifx\csname declarepreamble\endcsname\relax + \Msg{==> This file requires docstrip version 2.4} + \Msg{==> available from CTAN (e.g. ftp.dante.de) in} + \Msg{==> tex-archive/macros/latex/unpacked/docstrip.tex} + \Msg{}\expandafter\endinput\fi + +\keepsilent + +\preamble + +This file is part of the `german' collection, +providing German language support for +plain TeX or LaTeX version 2e/2.09. + +----------- Copyright (C) 1998, 1999 by B.Raichle ---------- +------------------- All rights reserved. ------------------- +Maintained by Bernd Raichle (Uni Stuttgart), +using ideas by H.Partl (TU Wien, Uni.f.Bodenkultur Wien) +and many other people. + + +IMPORTANT NOTICE: + +This program 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. + + +Error Reports (in case of UNCHANGED versions) should be sent to: + + Bernd Raichle + +\endpreamble + +\declarepreamble\emptypreamble +\endpreamble + +\Msg{*** Generating files ***} +\generate{% + \file{german.sty}{\from{german.dtx}{old}} + \file{ngerman.sty}{\from{german.dtx}{new}} +% \file{german.drv}{\from{german.dtx}{driver}} + \usepreamble\emptypreamble + \file{hyphxmpl.cfg}{\from{german.dtx}{hyphcfg}}% +} +\Msg{************************************************************} +\Msg{*} +\Msg{* To finish the installation you have to move the following} +\Msg{* files into a directory searched by TeX:} +\Msg{*} +\Msg{* \space\space german.sty ngerman.sty} +\Msg{*} +\Msg{* There exists a separate file `gerdoc.tex' containing} +\Msg{* the user documentation. Please get this file, run it} +\Msg{* through LaTeX (LaTeX2e or LaTeX 2.09):} +\Msg{*} +\Msg{* \space\space latex gerdoc.tex} +\Msg{*} +\Msg{* and follow the instructions how to install the hyphenation} +\Msg{* patterns when creating format files. The file `hyphxmpl.cfg'} +\Msg{* can be used as an example for LaTeX2e's `hyphen.cfg' file.} +\Msg{*} +\Msg{* (Gurus only!) To produce the implementation documentation you} +\Msg{* can run the file `german.dtx' through LaTeX:} +\Msg{* \space\space latex german.dtx} +\Msg{*} +\Msg{* Happy TeXing} +\Msg{************************************************************} +\endbatchfile +%% +%% End of file `german.ins'. diff --git a/Master/texmf-dist/source/generic/kastrup/binhex.drv b/Master/texmf-dist/source/generic/kastrup/binhex.drv new file mode 100644 index 00000000000..91ab4acc211 --- /dev/null +++ b/Master/texmf-dist/source/generic/kastrup/binhex.drv @@ -0,0 +1,49 @@ +%% +%% This is file `binhex.drv', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% binhex.dtx (with options: `driver') +%% +%% IMPORTANT NOTICE: +%% +%% For the copyright see the source file. +%% +%% Any modified versions of this file must be renamed +%% with new filenames distinct from binhex.drv. +%% +%% For distribution of the original source see the terms +%% for copying and modification in the file binhex.dtx. +%% +%% This generated file may be distributed as long as the +%% original source files, as listed above, are part of the +%% same distribution. (The sources need not necessarily be +%% in the same archive or directory.) + \documentclass{ltxdoc} + \usepackage{amsmath} + \input binhex.tex + \def\verbatize#1{\begingroup + \toks0{#1}\edef\next{\the\toks0}% + \dimen0\the\fontdimen2\font + \fontdimen2\font=0pt + \expandafter\stripit + \meaning\next + \fontdimen2\font=\dimen0 + \endgroup} + \def\next{} + \expandafter\def\expandafter\stripit\meaning\next{} + \newcommand\showeffect[1]{% + \text{\verbatize{#1}}\quad&\rightarrow\quad\text{#1}% + \\} + \def\samples{\begingroup\MacroFont\[\begin{aligned}\nextsample} + \def\nextsample#1#2{% + \if.\noexpand#2\expandafter\endsamples\fi + \showeffect{#1{#2}}\nextsample{#1}} + \def\endsamples#1\nextsample#2{\end{aligned}\]\endgroup} + \begin{document} + \DocInput{binhex.dtx} + \end{document} +\endinput +%% +%% End of file `binhex.drv'. diff --git a/Master/texmf-dist/source/generic/kastrup/binhex.dtx b/Master/texmf-dist/source/generic/kastrup/binhex.dtx new file mode 100644 index 00000000000..202308d3a7c --- /dev/null +++ b/Master/texmf-dist/source/generic/kastrup/binhex.dtx @@ -0,0 +1,518 @@ +% \iffalse +% Copyright(c) 2001 by David Kastrup +% Any use of the code is permitted as long as this copyright notice is +% preserved in the code. +% +% In case of an emergency (no LaTeX available), you may rename this +% file to binhex.tex. In all other cases, use the accompanying +% binhex.ins in order to extract binhex.drv (run LaTeX on it for +% getting the documentation) and binhex.tex. If binhex.ins is +% missing, you can regenerate it by running docstrip on this file with +% the option ``installer'' set. +% \fi +% \CheckSum{251} +% \title{The \texttt{binhex.tex} package for expansible conversion +% into binary-based number systems} +% \author{David Kastrup\thanks +% {David.Kastrup@neuroinformatik.ruhr-uni-bochum.de}} +% \maketitle +% \tableofcontents +% +% \section{Usage} +% This is a file for expandably converting numbers into binary, octal +% and hexadecimal. All constructs \TeX\ accepts as an argument to its +% |\number| primitive are valid. This holds for all numeric arguments +% of the macros presented in here. +% +% You use this package by simply inputting it with +% \begin{verbatim} +%\input binhex +% \end{verbatim} +% It will work equally well under \LaTeX\ and plain \TeX. It does not +% even use plain \TeX, but only \TeX\ primitives. Simply setting the +% correct |\catcode| values for |{}#| and end of line will make it +% load and work under ini\TeX. +% +% The following macros are defined: +% \DescribeMacro{\binary} +% |\binary{|\meta{number}|}| will convert \meta{number} into its binary +% representation. +% \samples\binary{0}{\maxdimen}{-"7EE6}. +% +% \DescribeMacro{\nbinary} +% |\nbinary{|\meta{size}|}{|\meta{number}|}| will convert \meta{number} +% into a binary representation of at least \meta{size} digits length, +% filling up with leading zeros where necessary. The |-| sign of +% negative numbers is not counted. If both \meta{size} and +% \meta{number} are zero, an empty string is generated. This should +% please some computer scientists in some situations. +% \samples{\nbinary{3}}{3}{-2}{-12}. +% +% \DescribeMacro{\hex} +% |\hex{|\meta{number}|}| converts \meta{number} into its hexadecimal +% representation, using uppercase letters. +% \samples\hex{34}{-4711}. +% +% \DescribeMacro{\nhex} +% |\nhex{|\meta{size}|}{|\meta{number}|}| will convert \meta{number} +% into a hexadecimal representation of at least \meta{size} digits length, +% filling up with leading zeros where necessary. The |-| sign of +% negative numbers is not counted. If both \meta{size} and +% \meta{number} are zero, an empty string is generated. This should +% please some computer scientists in some situations. +% \samples{\nhex{3}}{3}{-\maxdimen}. +% +% \DescribeMacro{\oct} +% |\oct{|\meta{number}|}| converts \meta{number} into its octal +% representation. +% \samples\oct{34}{-4711}. +% +% \DescribeMacro{\noct} +% |\noct{|\meta{size}|}{|\meta{number}|}| will do the right thing. +% \samples{\noct{3}}{13}{-\maxdimen}. +% +% \DescribeMacro{\tetra} +% |\tetra{|\meta{number}|}| is for people counting with arms and legs +% instead of fingers, or for quadrupeds. +% \samples\tetra{34}{-4711}. +% +% \DescribeMacro{\ntetra} +% |\ntetra{|\meta{size}|}{|\meta{number}|}| is for those of the same +% count which have minimum requirements. +% \samples{\ntetra{3}}{3}{-\maxdimen}. +% +% \DescribeMacro{\nbinbased} +% |\nbinbased{|\meta{logbase}|}{|\meta{size}|}{|\meta{number}|}| will +% convert \meta{number} into number base $2^{\text{\meta{logbase}}}$ and +% generate at least \meta{size} digits. Only supported values of +% \meta{logbase} are 1, 2, 3, 4. This is called by all other macros +% except of the faster binary conversion macros. +% \samples{\nbinbased{3}{3}}{13}{-\maxdimen}. +% \samples{\nbinbased{2}{4}}{13}{-\maxdimen}. +% +% That's it, have fun! +% \StopEventually{} +% \section{Implementation} +% Now the implementation. First save catcode of |@| and old contents of +% |\toks0| in |\toks0|, then make |@| a letter to enable internal +% macros. +% \begin{macrocode} +%<*style> +\edef\next{\toks0=% + {\catcode`\noexpand\@=\the\catcode`\@\toks0{\the\toks0}}% +} +\next +\catcode`\@11 +% \end{macrocode} +% +% \subsection{Binary conversions} +% \subsubsection{Basics} +% \begin{macro}{\bb@00} +% \begin{macro}{\bb@01} +% \begin{macro}{...} +% \begin{macro}{\bb@19} +% We now define the work horse macros for conversion of binary +% commands. If numbers were allowed in macro names, one of those +% definitions would be +% \begin{verbatim} +%\def\bb@13#1{6\csname bb@1#1\endcsname} +% \end{verbatim} +% That is, the macro divides the decimal two-digit number (up to~19) +% embedded into its name by~2, spews out the result and starts up the +% next macro with the first digit of the name of \emph{that} being the +% remainder from its own division, and the second digit being the next +% following one. +% \begin{macrocode} +\def\next#1#2#3{\expandafter \def \csname bb@#1\endcsname##1% + {#2\csname bb@#3##1\endcsname}} +\next{00}00 \next{01}01 \next{02}10 \next{03}11 +\next{04}20 \next{05}21 \next{06}30 \next{07}31 +\next{08}40 \next{09}41 \next{10}50 \next{11}51 +\next{12}60 \next{13}61 \next{14}70 \next{15}71 +\next{16}80 \next{17}81 \next{18}90 \next{19}91 +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \begin{macro}{\bb@0+} +% \begin{macro}{\bb@1+} +% Now we need to end such a conversion. For no particular reason at +% all (well, some sneakiness might explain it later), we use |+| as an +% end marker for the decimal digits. After the |+|, we collect the +% resulting binary digits, from last to first. So here are two macros +% to deal with the last digit produced. Simply tacks them on after +% replacing the gobbled |+|. +% \begin{macrocode} +\expandafter \def \csname bb@0+\endcsname {+0} +\expandafter \def \csname bb@1+\endcsname {+1} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% Now all that remains to be done is to initiate the process, and to +% end it again. The process ends when the decimal number reaches~0. +% Since we want to produce one digit even when starting out, and we +% check the end of recursion by comparing the result with~|0|, we have a +% problem here. We solve it by comparing two letters, and looking for +% the complete |0+| sequence, and we start out by prepending a trivial |0| +% before the number to convert, so that at the first run it will be |00| +% instead of |0| if the number in question is~0. +% +% \begin{macro}{(\binary)} +% \begin{macro}{(\bb@dobinary)} +% Actually, this is how we \emph{could} do things. The actual, slightly +% different version used can be shared by the other converters, but +% we'll keep this listed for reference. +% \begin{verbatim} +%\def\binary#1{\expandafter \bb@dobinary \expandafter 0\number#1+} +%\def\bb@dobinary#1#2{\if0#1\if+#2\bb@endbinary \fi\fi +% \expandafter \bb@dobinary \number \csname bb@0#1\endcsname #2} +% \end{verbatim} +% Notice that |\number| here serves multiple purposes. It will +% initiate expansion that will only be stopped once the macros +% generating the next binary digit will crank out a space or anything +% else stopping expansion. Its second purpose is to get rid of any +% leading zeros that might remain from the last loop through. +% +% \begin{macro}{\bb@endbinary} +% |\bb@endbinary| can +% be used as written, though. It scraps everything up to the tack +% mark |+|, leaving only the converted results accumulated behind +% that. Since this means scrapping |\fi\fi| as well, it reinserts +% it in order to properly finish the conditional. +% \begin{macrocode} +\def\bb@endbinary#1+{\fi\fi} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \subsubsection{Negative numbers} +% We would like negative numbers to work, too. The semantics for +% defined field widths are unclear (so we basically just tack a |-| on +% and convert the remaining number to the full width). Since the sign +% of the number is easy to discern, further massaging of the number to +% replace leading zeros by spaces, insert |+| signs and similar folderol +% are easy to do and left as an exercise to the reader. We mostly +% implement this to have the conversion not fail on any number. +% +% \begin{macro}{\bb@0-} +% The following one-liner achieves that. Figure out why. It is easy. +% \begin{macrocode} +\expandafter \def \csname bb@0-\endcsname {0+-\bb@dobinary} +% \end{macrocode} +% \end{macro} +% +% \subsubsection{Minimum field widths} +% \begin{macro}{\bb@0m} +% \begin{macro}{\bb@1m} +% We often have the situation that we want to produce a number that is +% at least of a certain length. We specify this by tagging on an +% appropriate number of |m| characters to the decimal as sort of a +% format string. If we match such an~|m| at the end of the conversion, +% we produce a digit and remove one~|m|, leaving all other |m| intact (or +% whatever else happens to be before our |+| sign). +% \begin{macrocode} +\expandafter\def\csname bb@0m\endcsname#1+{#1+0} +\expandafter\def\csname bb@1m\endcsname#1+{#1+1} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{(\nbinary)} +% We call |\nbinary| with the number of digits as first argument, the number +% itself as second. +% +% This now becomes trivial: +% \begin{verbatim} +%\def \nbinary#1#2{% +% \binary{\number #2\romannumeral \number \number #1 000}% +%} +% \end{verbatim} +% +% Whoa, what about all these calls of |\number|? First notice the space +% after |#1|. We need that in case |#1| happens to be octal or whatever, +% since the |000| at the end is supposed to multiply by 1000 \emph{decimal}. +% If |#1| were something like |'13| (11 decimal), the last |\number| will +% expand |'13|, the |\number| before that will remove the blank we +% inserted in case it was not needed to finish the number of digits, +% we multiply by~1000 and turn this into a roman numeral consisting of +% the appropriate amount of |m| letters. The very first |\number| ensures +% that in case |#2| is a complete number without the need of trailing +% spaces, still |\romannumeral| will be expanded when |\binary| first sets +% sight on the whole thing. +% \end{macro} +% +% \begin{macro}{\nbinary} +% \begin{macro}{\binary} +% \begin{macro}{\bb@dobinary} +% Actually, since there is a certain logic to returning +% an empty string when 0 is to be converted into a number at least 0 +% characters long, we redefine the stuff the other way round, |\binary| +% as a special case of |\nbinary|. We check the end by testing against +% |0| followed by anything but~|m|. This has reasons\dots +% +% \begin{macrocode} +\def\bb@dobinary#1#2{\if#10\if m\string#2\else\bb@endbinary\fi\fi + \expandafter\bb@dobinary\number\csname bb@0#1\endcsname#2} +\def\nbinary#1#2{\expandafter\bb@dobinary\number\number#2% + \romannumeral\number\number#1 000+} +\def\binary{\nbinary1} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \subsection{Hexadecimal and the rest} +% +% Ok, stop with the small fry. Now we want to convert into +% hexadecimal and octal as well. We do this by first converting into +% binary, then into the wanted base whenever enough binary digits have +% accumulated. In the following, we will talk about hex digits +% exclusively for simplicity, even though they might indeed be octal +% instead. +% +% \begin{macro}{\bb@h0} +% \begin{macro}{\bb@h1} +% \begin{macro}{\bb@h10} +% \begin{macro}{...} +% \begin{macro}{\bb@h1111} +% +% The following defines the equivalents of +% \begin{verbatim} +%\def \bb@h110#1+{\bb@dohex #1+6} +% \end{verbatim} +% This is a macro that appends 6, the representation of the binary +% number in its name, after the tack mark |+|. So what's with the +% |\number+|? Actually, here it does nothing but disappear. We just +% write this to remind us of how the macros will be called. When the +% macros are called, we use the same construct, and then |\number| +% will disappear together with the~|+| (that we use as a tack mark) +% and take along any leading zeros. We drop leading zeros so that we +% can share the conversion macros for hex and octal (and quaternary?) +% where they overlap. +% +% \begin{macrocode} +\def \next #1#2{\expandafter \def + \csname bb@h\number +#1\endcsname ##1+{\bb@dohex ##1+#2}% +} +\next {0}0 \next {1}1 \next {10}2 \next {11}3 +\next {100}4 \next {101}5 \next {110}6 \next {111}7 +\next{1000}8 \next{1001}9 \next{1010}A \next{1011}B +\next{1100}C \next{1101}D \next{1110}E \next{1111}F +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\bb@dohex} +% |\bb@dohex| is the magic macro that initiates accumulation of enough +% binary digits for one hexadecimal one. It is called in +% the following form: +% \begin{quote} +% |\bb@dohex| \meta{m\{\#rhex\}} |\endcsname| \meta{m\{\#bin\}} |+| +% \end{quote} +% Where |+| is the tack after which hex digits will accumulate, +% \meta{m\{\#rhex\}} is a sequence of |m|, one for every remaining hex +% digit we want to force out (same convention as with |\nbinary| above), +% and \meta{m\{\#bin\}} is a sequence of |m| corresponding in length to +% the number of binary digits we need to accumulate for one hexadecimal +% (or octal) digit. +% \begin{macrocode} +\def\bb@dohex #1{\csname bb@x#1\endcsname} +% \end{macrocode} +% +% Eeek! What is that? Ok, let's split it into the two cases, one with +% forced digits remaining, one without any remaining forced digits. +% If no forced digits remain, we get +% \begin{quote} +% |\bb@x \endcsname \endcsname| \meta{m\{\#bin\}} +% \end{quote} +% \end{macro} +% +% \begin{macro}{\bb@x} +% |\bb@x| is defined as +% \begin{macrocode} +\def\bb@x\endcsname#1{ \bb@xm{m\endcsname}} +% \end{macrocode} +% +% Notice the space at the start of the macro! It will stop +% expansion. Furthermore, the |\endcsname| that |\bb@dohex| inserted is +% scrapped, as well as the first |m| from +% \meta{m\{\#bin\}}.\footnote{Why do we match |\string\endcsname| explicitly +% for scrapping? The answer is debugging. We know it should always +% be |\string\endcsname|, so let \TeX\ assert that it is indeed so. But we +% also know that the next character will be |m|, why don't we match +% \emph{that} explicitly? The answer is that we cannot be sure about the +% |\string\catcode| of the matched~|m|. A hand-entered |m| has +% |\string\catcode|~11, a \TeX-generated one (with |\string\string| or +% |\string\romannumeral| or such) has |\string\catcode|~12. You'll +% find that all the code here has been carefully +% designed so that it will not care which it gets, so we don't make +% an exception here. +% } +% \end{macro} +% +% \begin{macro}{\bb@xm} +% The argument fed to |\bb@xm| is part of some jiggery-pokery we want +% to happen when |\bb@dobinary| resumes expansion. First, however, it +% will take a look and decide whether it will stop generating digits +% altogether. As |\string \bb@xm| does not start with |m|, |\bb@dobinary| +% will stop expansion when the decimal to convert has shrunk to 0. +% Fine. Now what does |\bb@xm| do? +% \begin{macrocode} +\def\bb@xm #1\endcsname #2#3+{#2#3% + \csname bb@h\number+\endcsname + #1\endcsname m#3+} +% \end{macrocode} +% \end{macro} +% +% This is rather straightforward for the case of forced digits: the +% number of binary digits is encoded in the form of \meta{m\{\#bin\}} in +% |#2#3|. After the conversion of those digits, the appropriate hex +% digit macro is called and sets up |\bb@dohex| again for the next hex +% digit. Piece of cake. Now what happens in the case we have resumed +% from |\do@binary| having had its option of stopping expansion? +% +% In that case, we get called with the next \meta{digit} +% already arriving. This looks more or less like +% \begin{quote} +% |\csname bb@|\meta{digit}|\bb@xm \endcsname{m\endcsname}| +% \meta{m\{\#bin-1\}} +% \end{quote} +% See what happens? This expands |\bb@xm|, after which a command of the +% name |\bb@|\meta{digit}|m| (\meta{digit} being 0 or~1) gets executed. +% It stashes away \meta{digit} after +% the conveniently provided |+| sign, and \meta{\#bin-1} digits remain for +% conversion. +% +% You think this contrived? Well, buster, let me tell you that the +% previous version was way more insane. Have it still in RCS. +% +% \begin{macro}{\bb@nbinbased} +% The following macro needs to get |#1|, the decimal number to convert, +% in text form already. This is so that |\number#1| will continue +% expanding after |#1|, expanding |\bb@dohex| exactly once. This problem +% does not exist for the |\romannumeral| calls for |#2| and |#3|, so +% spurious expansion with |\number\number| does no harm, since it is +% stopped readily at the hard |\endcsname| and |+| thresholds. +% \begin{macrocode} +\def\bb@nbinbased #1#2#3{\expandafter \bb@dobinary \number#1% + \expandafter \bb@dohex + \romannumeral \number\number #2 000\expandafter\endcsname + \romannumeral \number\number #3 000+} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\nbinbased} +% The following macro gets 3~arguments, the number of binary digits the +% output digits shall be based on, the number of digits to produce at +% least, and the number itself. It expands the number into text +% form. If the number is not space-terminated, the closing brace +% reliably stops expansion nevertheless, so that |\bb@nbinbased| gets a +% clean number. +% \begin{macrocode} +\def\nbinbased #1#2#3{\expandafter\bb@nbinbased + \expandafter {\number#3}{#2}{#1}} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\nhex} +% \begin{macro}{\noct} +% \begin{macro}{\ntetra} +% \begin{macro}{\hex} +% \begin{macro}{\oct} +% \begin{macro}{\tetra} +% Now follow the obvious definitions: +% \begin{macrocode} +\def\nhex{\nbinbased4} +\def\noct{\nbinbased3} +\def\ntetra{\nbinbased2} +\def\hex{\nhex1} +\def\oct{\noct1} +\def\tetra{\ntetra1} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \subsection{The end} +% Restore |\catcode`\@| and |\toks0| and finish. +% \begin{macrocode} +\the\toks0 +% +% \end{macrocode} +% And that was that! +% \section{Various drivers} +% The installer, in case it is missing. +% \begin{macrocode} +% \input docstrip +% \generate{ +% \file{binhex.drv}{\from{binhex.dtx}{driver}} +% \usedir{tex/generic/misc} +% \file{binhex.tex}{\from{binhex.dtx}{style}} +% } +% \endbatchfile +% \end{macrocode} +% And here comes the documentation driver. +% \begin{macrocode} +% \documentclass{ltxdoc} +% \usepackage{amsmath} +% \input binhex.tex +% \end{macrocode} +% \begin{macro}{\verbatize} +% |\detokenize| is available in e\TeX, but we may not have that\dots +% The |\fontdimen| folderol makes spaces temporarily disabled. Looks +% prettier. Sorry for that. +% \begin{macrocode} +% \def\verbatize#1{\begingroup +% \toks0{#1}\edef\next{\the\toks0}% +% \dimen0\the\fontdimen2\font +% \fontdimen2\font=0pt +% \expandafter\stripit +% \meaning\next +% \fontdimen2\font=\dimen0 +% \endgroup} +% \def\next{} +% \expandafter\def\expandafter\stripit\meaning\next{} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\showeffect} +% |\showeffect|\meta{Stuff} will put out a one-line correspondence of +% the verbatim source of \meta{Stuff} with its expansion, to be used +% in a |aligned| environment or similar. +% \begin{macrocode} +% \newcommand\showeffect[1]{% +% \text{\verbatize{#1}}\quad&\rightarrow\quad\text{#1}% +% \\} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\samples} +% |\samples| gets one parameter, and a following expression list ended +% by a period. It applies that parameter to each of the expressions +% in the list and generates a correspondance table for each. For +% example, +% \begin{verbatim} +%\samples{\nbinary{3}}{3}{-2}{-12}. +% \end{verbatim} +% was used in this document to produce +% \samples{\nbinary{3}}{3}{-2}{-12}. +% \begin{macrocode} +% \def\samples{\begingroup\MacroFont\[\begin{aligned}\nextsample} +% \def\nextsample#1#2{% +% \if.\noexpand#2\expandafter\endsamples\fi +% \showeffect{#1{#2}}\nextsample{#1}} +% \def\endsamples#1\nextsample#2{\end{aligned}\]\endgroup} +% \end{macrocode} +% \end{macro} +% Now all that remains is inputting the stuff. +% \begin{macrocode} +% \begin{document} +% \DocInput{binhex.dtx} +% \end{document} +% \end{macrocode} +% \Finale{} \ No newline at end of file diff --git a/Master/texmf-dist/source/generic/kastrup/binhex.ins b/Master/texmf-dist/source/generic/kastrup/binhex.ins new file mode 100644 index 00000000000..fc3322cd039 --- /dev/null +++ b/Master/texmf-dist/source/generic/kastrup/binhex.ins @@ -0,0 +1,32 @@ +%% +%% This is file `binhex.ins', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% binhex.dtx (with options: `installer') +%% +%% IMPORTANT NOTICE: +%% +%% For the copyright see the source file. +%% +%% Any modified versions of this file must be renamed +%% with new filenames distinct from binhex.ins. +%% +%% For distribution of the original source see the terms +%% for copying and modification in the file binhex.dtx. +%% +%% This generated file may be distributed as long as the +%% original source files, as listed above, are part of the +%% same distribution. (The sources need not necessarily be +%% in the same archive or directory.) + \input docstrip + \generate{ + \file{binhex.drv}{\from{binhex.dtx}{driver}} + \usedir{tex/generic/misc} + \file{binhex.tex}{\from{binhex.dtx}{style}} + } + \endbatchfile +\endinput +%% +%% End of file `binhex.ins'. diff --git a/Master/texmf-dist/source/generic/mfpic/grafbase.dtx b/Master/texmf-dist/source/generic/mfpic/grafbase.dtx new file mode 100644 index 00000000000..0eadd2885a9 --- /dev/null +++ b/Master/texmf-dist/source/generic/mfpic/grafbase.dtx @@ -0,0 +1,5900 @@ +% \iffalse +% Copyright 2002--2003, Daniel H. Luecking +% +% Mfpic consists of the 3 files mfpic.dtx, grafbase.dtx and mfpic.ins +% and the 5 files they generate: mfpic.tex, mfpic.sty, grafbase.mf, +% grafbase.mp, and dvipsnam.mp. +% +% Mfpic may be distributed and/or modified under the conditions of the +% LaTeX Project Public License, either version 1.2 of this license or (at +% your option) any later version. The latest version of this license is in +% +% http://www.latex-project.org/lppl.txt +% +% and version 1.2 or later is part of all distributions of LaTeX version +% 1999/12/01 or later. +% +% Documentation, examples, and ancillary files are separate and not +% covered by this license. See readme.1st for a complete list. See +% individual files for any copyright and license restrictions. +% +% With respect to the proposed draft LPPL-1.3: mfpic has maintenance +% status "maintained". The Current Maintainer is Daniel H. Luecking. There +% are several Base Interpreters: TeX, LaTeX, MetaPost and Metafont. +% +%<*driver> +\documentclass[draft]{ltxdoc} +\usepackage{docmfp} +\def\fileversion{0.7a beta} +\def\filedate{2004/04/16} + +\addtolength{\textwidth}{.5878pt} + +\def\mytt{\upshape\mdseries\ttfamily} +\renewcommand\marg[1]{{\mytt \{#1\}}} +\renewcommand\oarg[1]{{\mytt [#1]}} +\renewcommand\parg[1]{{\mytt (#1)}} +\renewcommand{\meta}[1]{{$\langle$\rmfamily\itshape#1$\rangle$}} +\DeclareRobustCommand\cs[1]{{\mytt\char`\\#1}} +\def\prog#1{{\mdseries\scshape #1}} +\def\grafbase{\prog{grafbase}} +\def\Grafbase{\prog{Grafbase}} +\def\mfpic{\prog{mfpic}} +\def\Mfpic{\prog{Mfpic}} +\def\MF{\prog{metafont}} +\def\MP{\prog{metapost}} +\def\CMF{\prog{Metafont}} +\def\CMP{\prog{Metapost}} +\def\opt#1{{\sffamily\upshape#1}} +\def\env#1{{\mytt#1}} +\let\file\env +\let\mfc\env +\let\gbc\env +\renewcommand\{{\char`\{} +\renewcommand\}{\char`\}} +\renewcommand\|{${}\mathrel{|}{}$} + +\makeatletter +\newcommand\bsl{{\mytt\@backslashchar}} +% Stupid lists! +\def\@listi{\leftmargin\leftmargini + \parsep \z@ \@plus\p@ \@minus\z@ + \topsep 4\p@ \@plus\p@ \@minus2\p@ + \itemsep\parsep} +\let\@listI\@listi \@listi +\renewcommand\labelitemi{\normalfont\bfseries \textendash} +\renewcommand\labelitemii{\textasteriskcentered} +\renewcommand\labelitemiii{\textperiodcentered} +\leftmargini\parindent +% Stupid index! +\def\IndexParms{% + \parindent \z@ \columnsep 15pt + \parskip 0pt plus 1pt + \rightskip 5pt plus2em \mathsurround \z@ + \parfillskip=-5pt \small + % less hanging: + \def\@idxitem{\par\hangindent 20pt}% + \def\subitem{\@idxitem\hspace*{15pt}}% + \def\subsubitem{\@idxitem\hspace*{25pt}}% + \def\indexspace{\par\vspace{10pt plus 2pt minus 3pt}}} +\renewcommand\routinestring{} +\renewcommand\variablestring{\space(var.)} +% Why does every command have to be indexed twice? +\renewcommand\SpecialMfpIndex[3]{\@bsphack + \index{% + \string#1\actualchar + \string\verb\quotechar*\verbatimchar\string#1\verbatimchar + #2 \encapchar usage}% + \@esphack} +\makeatother + +\def\pdfTeX{\textrm{pdf\kern.04em\TeX}} +\def\pdfLaTeX{\textrm{pdf\kern.06em\LaTeX}} +\def\ConTeXt{\textrm{Con\kern-.16em\TeX\kern-0.06em t}} +\def\PiCTeX{\textrm{P\kern-.13em\lower.3ex\hbox{I}C\TeX}} + +\title{The \grafbase{} macros\thanks{This file has version number + \fileversion, last revised \filedate. The code described here + was developed by several people, notably Thomas Leathrum, + Geoffrey Tobin and Dan Luecking. Dan wrote this documentation.}} +\author{Dan Luecking} +\date{\filedate} +\DisableCrossrefs +\CodelineIndex +\AlsoImplementation + +\begin{document} + \DeleteShortVerb{\|} + \DocInput{grafbase.dtx} +\end{document} +% +%\fi +% +% \CheckSum{1} +% \CharacterTable +% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +% Digits \0\1\2\3\4\5\6\7\8\9 +% Exclamation \! Double quote \" Hash (number) \# +% Dollar \$ Percent \% Ampersand \& +% Acute accent \' Left paren \( Right paren \) +% Asterisk \* Plus \+ Comma \, +% Minus \- Point \. Solidus \/ +% Colon \: Semicolon \; Less than \< +% Equals \= Greater than \> Question mark \? +% Commercial at \@ Left bracket \[ Backslash \\ +% Right bracket \] Circumflex \^ Underscore \_ +% Grave accent \` Left brace \{ Vertical bar \| +% Right brace \} Tilde \~} +% +% \catcode`\_=12 +% \maketitle +% +% \begin{abstract} +% Macros are defined for use with \mfpic{}. The latter is a set of \TeX{} +% macros which allows a \file{.tex} file to write a \file{.mf} or +% \file{.mp} file that, with the help of these macros and \MF{} (or \MP), +% can be used to create pictures in the document, especially mathematical +% pictures. There are two versions of \grafbase, one for \MF{} and one for +% \MP{}. As they are alike more than unlike, we document both here. +% +% This file documents the \grafbase{} source code. The user manual for +% \mfpic{} is \file{mfpicdoc.tex}. +% \end{abstract} +% +% \StopEventually{\PrintIndex} +% \tableofcontents +% +% +% \section{Introduction}\label{intro} +% +% \subsection{Identification and checks}\label{checks} +% +% We start with identifying information. Then we detect if grafbase was +% loaded already, but we don't do anything about it except write a +% message. +% +% The \gbc{grafbaseversion} is required to match the definition of +% \cs{mfpicversion} in \file{mfpic.tex}. The output file written by the +% \mfpic{} macros includes a test that these are the same, but that would +% fail to catch a new \grafbase{} with an old \mfpic. So we also put a test +% here, and it alone would fail to catch the use of older versions of +% \grafbase{} with current versions of \mfpic. Newer versions of \mfpic{} +% signal their version before inputting \file{grafbase}. Unfortunately +% (for error checking), \grafbase{} can also be used without \mfpic, so if +% \gbc{mfpicversion} is unknown, we merely write a message. +% +% It might be possible (at some point) to optimize things for \mfpic{} use +% whenever \gbc{mfpicversion} is defined, but so far we don't do anything +% except test the version and set this boolean. +% +% \DescribeRoutine{GBmsg} +% \DescribeRoutine{GBerrmsg} +% These are used fairly consistently and identify the source of the +% message delivered as being \gbc{"Grafbase"}. The \gbc{GBerrmsg} takes +% care of both the error message and the \mfc{errhelp} string. +% \begin{macrocode} +%<*MF|MP> +string fileversion, filedate; +fileversion := "0.7a beta"; filedate := "2004/04/16"; +def GBmsg expr s = message "Grafbase: " & s; enddef; +def GBerrmsg (expr s) expr t = + errhelp t; + errmessage "Grafbase: "& s; + errhelp ""; +enddef; +if (known grafbaseversion) or (known grafbase) : + GBmsg "You have loaded grafbase more than once! " & + "Please make sure that it is loaded only once."; + endinput; +fi + +boolean grafbase; grafbase := true; +boolean MFPIC; MFPIC := false; + +def checkversions (expr g)= + numeric grafbaseversion; grafbaseversion := g; + if unknown mfpicversion : % no mfpic, or < 0.63 + GBmsg "Recent mfpic not detected."; + elseif g = mfpicversion : + MFPIC := true; + else: + GBerrmsg ("version mismatch") + "The installation may be broken: mfpic and grafbase " & + "versions do not match."; + fi +enddef; + +checkversions (70); + +% \end{macrocode} +% We try to make sure that the macros of \file{plain.mf} or +% \file{plain.mp} are available. +% \begin{macrocode} +if unknown base_name : input plain; +elseif not string base_name : input plain; +elseif base_name <> "plain" : input plain; +fi + +% \end{macrocode} +% +% We try to determine which of \MF{} or \MP{} is using these macros. +% Perhaps one day we'll merge both versions of \grafbase{} in one file and +% use the following boolean. For now, we only use it to catch cases where +% the \grafbase{} file is being used by the wrong compiler. +% +% Of course, \MP{} natively knows about colors but \MF{} doesn't, so we +% use that to set a boolean \gbc{METAPOST}. We don't simply check if +% \mfc{known blue} is \mfc{true} because `\mfc{blue}' is certainly a legal +% variable name in \MF. Instead we check \mfc{known color X} for +% some unlikely \gbc{X}. In \MP, \gbc{color X} is either true or +% false (\gbc{X} is a color or it isn't) and therefore always known, so +% \gbc{known color X} is always true. +% +% In \MF{} \mfc{color X} is an identifier (presumably unknown) with the +% base name \mfc{color} and suffix \mfc{X}. +% \begin{macrocode} +boolean METAPOST; + +if known color Maurits Cornelis Escher : METAPOST := true; +else: METAPOST := false; +fi + +%<*MF> +if METAPOST : + GBerrmsg ("wrong compiler") + "You may have input to Metapost a file designed for Metafont. " & + "Instead of the file grafbase.mf, Metapost should be using " & + "grafbase.mp. Make sure Metapost can find it."; +fi +% +%<*MP> +if not METAPOST : + GBerrmsg ("wrong compiler") + "You may have input to Metafont a file designed for Metapost. " & + "Instead of the file grafbase.mp, Metafont should be using " & + "grafbase.mf. Make sure the extension was not changed."; +fi +% + +% \end{macrocode} +% +% \DescribeRoutine{GBdebug} +% \DescribeRoutine{GBenddebug} +% The \gbc{debug} flag is for developers, who should set it before +% inputing \file{grafbase}. These two routines start and end debug +% messages. +% +% \DescribeRoutine{mftitle} +% The \gbc{mftitle} macro is useful when debugging. +% It will put its argument, which should be a string, as a TFM comment, +% and also print it to the terminal and log file. +% \begin{macrocode} +if (unknown debug) or (not boolean debug) : + boolean debug; debug := false; +fi + +def GBdebug = + begingroup + save >>; def >> = message enddef; + >> "Grafbase DEBUG: "; +enddef; +def GBenddebug = + >> "End DEBUG"; + endgroup +enddef; + +vardef mftitle expr t = + t; message t; +enddef; + +% \end{macrocode} +% +% \subsection{Setting up the font}\label{font} +% +% Font-related housekeeping is for \MF{} only. \MF{} only produces +% fonts, so we have to define the variables it thinks are needed for +% fonts. +% +% We intercept the \mfc{mode} variable before \mfc{mode_setup} can set +% \mfc{proof} mode. We used to set \mfc{mode := cx} if it was unknown, +% then for a while we just issued an error message; in this version we +% try \mfc{ljfour}. +% +% The font identifier and coding scheme are just for information and end +% up as comments in the \file{.tfm} file (in all capitals). The design +% size just needs to be rather large for graphics, and \mfc{128pt\#} is +% anyway the default if we didn't set it ourselves. +% \begin{macrocode} +%<*MF> +if unknown mode : + GBerrmsg ("unknown Metafont mode") + "Please use \mode:=localfont; or a mode known on your " & + "system. If you continue, ljfour mode will be tried."; + mode := lfjour; +fi + +mode_setup; +if debug : + GBdebug; + >> "pixels_per_inch = " & decimal pixels_per_inch; + GBenddebug; +fi +font_identifier := "MFpic graphics"; +font_coding_scheme := "Arbitrary"; +interim designsize := 128pt#; + +% +% \end{macrocode} +% +% \Mfpic-generated files make reference to \mfc{aspect_ratio} and +% \mfc{pt\#}, while \MP{} has no need for them. Rather than make +% \mfpic{} write different things, and to make the files intended for +% \MF{} also work with \MP, we define them in the obvious way. We also +% add a definition of \mfc{hppp} and \gbc{t_} to simplify maintenance of +% two versions of the \file{grafbase} files. Then we define +% \gbc{currenttransform} for \MP{} sake. +% \begin{macrocode} +%pt# := 1pt; +%def t_ = transformed currenttransform enddef; +if unknown aspect_ratio: aspect_ratio := 1; fi +if unknown hppp : hppp := 1 fi; +if unknown currenttransform : + transform currenttransform; + currenttransform := identity yscaled aspect_ratio; +fi + +% \end{macrocode} +% +% Don't complain when variables get too large. For \MF{} this has to be +% after \mfc{mode_setup}, which sets \mfc{warningcheck := 1}. Also don't +% complain if a clockwise path is filled (\MF). +% \begin{macrocode} +%interim turningcheck := 0; +interim warningcheck := 0; +% \end{macrocode} +% +% \subsection{Initializations}\label{init} +% +% Picture size variables would normally be set by a user for each +% picture, or by \mfpic, but we give them default values anyway. +% \begin{macrocode} +numeric unitlen, xscale, yscale, xneg, xpos, yneg, ypos; + +%unitlen := 1 bp#; +%unitlen := 1 bp; +xscale := 7.2; % (xscale * unitlen) = 1/10 inch +yscale := 7.2; % (yscale * unitlen) = 1/10 inch +xneg := 0; xpos := 10; +yneg := 0; ypos := 10; + +% \end{macrocode} +% +% We support both degrees and radians for angles. In \MF, one degree is +% the unit of angle. One radian is $180/\pi$ degrees. A user can say +% \gbc{90} or \gbc{90deg} or \gbc{pi/2*radian} for the same effect. +% \begin{macrocode} +newinternal radian, pi, deg; +deg := 1; pi := 3.14159; +radian := 180/pi; + +% \end{macrocode} +% +% \DescribeRoutine{resizedrawpen} +% Since we need to do this frequently, we define a macro that changes the +% pen width for subsequent drawing. This enables the file written by +% \mfpic{} to be less cluttered. At least that was the original reason. +% Now it gives us the opportunity to localize changes to \mfc{currentpen} +% and \gbc{drawpen}. (We already had this for different +% \gbc{beginmfpic}, since that reinitializes drawpen, but now it is local +% to other groups as well.) + +% We could do this for the hatching pen, but it doesn't seem to change as +% often. The \mfc{pickup} command performs \mfc{yscaled aspect_ratio}, but +% so does the \gbc{shpath}, the only other place pens are required. In +% fact, we wouldn't need to \mfc{pickup} the pen at all, except power +% users may want to rely on \gbc{drawpen} always being the current pen. We +% make its diameter \mfc{.5pt} for backward compatibility. But many +% journal publisher (e.g., AMS) recommend no smaller than \mfc{.5bp} for +% author-supplied drawings. +% +% The default \gbc{hatchwd} used to be larger, but it seemed ugly to me. +% (Backward compatibility? What's that?). +% \begin{macrocode} +newinternal penwd; penwd := 0.5pt; +pen drawpen; + +def resizedrawpen (expr s) = + interim penwd := s; + setvariable (pen) (drawpen) (pencircle scaled penwd); + save currentpen; pen currentpen; pickup drawpen; +enddef; + +numeric hatchwd; hatchwd := 0.5bp; +pen hatchpen; hatchpen := pencircle scaled hatchwd; + +% \end{macrocode} +% +% We have two booleans related to clipping. One, \gbc{clipall} is meant to +% be turned on just once (per picture), and it causes the \gbc{endmfpic} +% code to clip the current picture to the boundaries defined by the +% picture size variables. The other, \gbc{ClipOn}, is meant to be turned +% on and off. While on, most drawing macros (all?) will clip their result +% to the current \emph{clipping path array}. The clipping path array is an +% array of paths: \gbc{ClipPath[]} together with a numeric \gbc{ClipPath}. +% The numeric variable contains the number of clipping paths; the paths +% are \gbc{ClipPath[1]} through \gbc{ClipPath[ClipPath]}. A macro later on +% is defined to loop through the array, clipping the current picture to +% the union of their interiors. +% +% The \gbc{truebbox} boolean sets the bounding box of the picture to its +% natural size in \MP. The default behavior of \MP{} is to output a +% bounding box that is the natural size of the graphic. The \grafbase{} +% default is to override this default, setting \gbc{truebbox} to +% \mfc{false}. \CMF's default behavior is to force the user to specify the +% bounding box, and provides no natural way to obtain any information +% about the actual extent of the ink. So, for now, this boolean is only +% for \MP. +% +% \DescribeRoutine{DoClip} +% This is for the frequent conditional code to implement \gbc{ClipOn}. +% The command \gbc{clipsto} is defined later. +% +% \DescribeRoutine{noclip} +% For debugging we sometimes want to make sure something is drawn +% without clipping being applied. For this we have \gbc{noclip}. +% \begin{macrocode} +boolean clipall; clipall := false; +boolean ClipOn; ClipOn := false; +path ClipPath[]; numeric ClipPath; ClipPath = 0; +boolean truebbox; truebbox := false; + +def DoClip (suffix v) = + if ClipOn and (ClipPath > 0) : clipsto (v, ClipPath); fi +enddef; + +def noclip (text t) = + hide( save ClipOn; boolean ClipOn; ClipOn := false; t) +enddef; + +% \end{macrocode} +% +% The boolean \gbc{showbbox} is for debugging the \gbc{*bbox} macros. +% \begin{macrocode} +boolean showbbox; showbbox := false; + +% \end{macrocode} +% +% \subsubsection{Colors}\label{colors} +% +% Of course colors are only recognized by \MP. The colors \mfc{black}, +% \mfc{white}, \mfc{red}, \mfc{green} and \mfc{blue} are part of +% \file{plain.mp}. We define other standard colors to get all eight +% colors where the coordinates are 0 or 1. +% +% \DescribeRoutine{color} +% We begin trying to merge the format of mfpic output files by defining +% \MF{} replacements for some of the \MP{} color variables and macros. Our +% point of view will be: make each color variable a numeric in \MF. Each +% will lie between $0$ and $1$ representing shades of gray. For +% \emph{drawing} commands we will only between nonwhite (black, ${}<1$) or +% white (${}=1$). For filling commands we will allow levels in between, +% and fill with an approximation using a version of \gbc{shade} +% \begin{macrocode} +%<*MF> +let color = numeric; color black, white; +black := 0; white := 1; +def _wc_ = killtext enddef; +% +%def _wc_ = withcolor enddef; + +% \end{macrocode} +% +% We also define some color variables whose names reflect their use. +% Thus, \gbc{fillcolor} is used for filling, etc. The color +% \gbc{currentcolor} isn't used anywhere yet. The color +% \mfc{background} is used in \MP{} for unfilling a region. +% \begin{macrocode} +color currentcolor, fillcolor, drawcolor, hatchcolor, + headcolor, pointcolor, tlabelcolor, background; +currentcolor := fillcolor := drawcolor := hatchcolor := + headcolor := pointcolor := tlabelcolor := black; +background := white; + +% \end{macrocode} +% +% \DescribeRoutine{snapto} +% This truncates numerics to the $[0,1]$ range, but also returns a value +% ($0$) for unknown and non-numeric input. +% \begin{macrocode} +vardef snapto expr t = + if unknown t : 0 + elseif not (numeric t) : 0 + elseif t < 0 : 0 + elseif t > 1 : 1 + else : t + fi +enddef; + +% \end{macrocode} +% +% The \mfpic{} handling of \LaTeX-like color models relies on being able +% to convert those models to \MP's \opt{rgb} system. Because of the use of +% \gbc{snapto}, the following color functions will return \mfc{black} for +% unknown parameters. In the \MF{} case, they are all converted to +% numerics through \gbc{makeclr}. +% +% \DescribeRoutine{gray} +% The simplest is \gbc{gray} which converts a numeric to a multiple of +% white. In \MF, \gbc{white} is a numeric and equal to $1$ so this is +% almost redundant except for handling unknowns and out of range values. +% +% \DescribeRoutine{makeclr} +% This is defined to convert a triple of numerics to a color, mainly for +% \MF. The formula has three desirable properties: it weights the +% different color coordinates approximately like some color luminescence +% models do, it assigns different graylevels to the eight colors that have +% components 0 or 1 only, and it is biased toward lighter grays. Of course +% it takes \mfc{black} to 0 and \mfc{white} to 1. In \MP, it simply turns +% three numeric parameters to a color triple in the obvious way. +% +% \DescribeRoutine{rgb} +% To simplify \mfpic, we have the nearly redundant \gbc{rgb} which +% converts a triple of numeric arguments to \opt{rgb}. Rather than make +% it formally the identity function under \MP, we define it to handle +% unknowns, and truncate out of range values. +% \begin{macrocode} +vardef gray (expr g) = (snapto g)*white enddef; + +vardef makeclr (expr r, g, b) = +% gray (sqrt((2r*r + 4g*g + b*b)/7)) +% (r, g, b) +enddef; + +vardef rgb (expr r, g, b) = + makeclr (snapto r, snapto g, snapto b) +enddef; + +% \end{macrocode} +% +% \DescribeRoutine{cmyk} +% This algorithm for converting \opt{cmyk} values to \opt{rgb} values is +% the one used in the PostScript header file \file{color.pro} (distributed +% with \prog{dvips}). +% \begin{macrocode} +vardef cmyk (expr c, m, y, k) = + rgb (1-c-k, 1-m-k, 1-y-k) +enddef; + +% \end{macrocode} +% +% \DescribeRoutine{RGB} +% This merely rescales numbers in the range 0--255 to the range 0--1. +% +% \DescribeRoutine{named} +% \DescribeRoutine{forceclr} +% These, too, are nearly redundant, but they convert numerics to gray, and +% convert other non-color variables and unknown color variables to +% black. The difference between \gbc{named} and \gbc{forceclr} is that the +% former requires a suffix parameter, while the latter takes an +% expression. It may be that the latter will never be needed, but for a +% time it seemed there were cases where we ought to use it to force an +% expression to be a color. +% \begin{macrocode} +vardef RGB (expr R, G, B) = + rgb (R/255, G/255, B/255) +enddef; + +vardef named (suffix c) = forceclr (c) enddef; +vardef forceclr (expr c) = + if unknown c : black + elseif numeric c : gray (c) + elseif color c : c + else : black + fi +enddef; + +% \end{macrocode} +% And then the standard colors. Using \gbc{rgb} ensures they are defined +% in \MF{} as well as \MP. +% \begin{macrocode} +color red, green, blue, cyan, magenta, yellow; +red := rgb (1, 0, 0); +green := rgb (0, 1, 0); +blue := rgb (0, 0, 1); +cyan := rgb (0, 1, 1); +magenta := rgb (1, 0, 1); +yellow := rgb (1, 1, 0); + +% \end{macrocode} +% +% \subsection{Arrays}\label{arrays} +% +% \gbc{ClipPath} is a standard example of an array. It is based on the +% fact that a variable can be of a different type from (and can be +% almost completely unrelated to) the variables formed by putting numeric +% suffixes on it. +% +% \DescribeRoutine{list} +% The \gbc{list} macro is essentially due to Frank Michielsen, and assigns +% a \emph{list} (i.e., a comma separated sequence of expressions) to an +% array. Note that the items in the list have to be the same type, and the +% same type as \mfc{v[]}. But \mfc{v} itself must be numeric. +% +% \DescribeRoutine{map} +% The \gbc{map} macro takes two text parameters. The first is any +% procedure, the second is a list of expressions. The procedure is applied +% to each expression and the resulting new expressions are separated by +% commas, that is, a new list is generated (for use in \mfc{for} loops). +% This is full of possibilities for errors. One reared its head because +% the original version started with a comma indicating an empty starting +% expression (normally it would be ignored and that turn through the loop +% skipped). However, it managed to produce an error in a reasonable +% but unforeseen usage and so I added the \gbc{_map} variable that +% skips the comma on the first time through the loop. This routine is +% currently only used in the code \mfpic's \cs{plr} writes. +% \begin{macrocode} +vardef list (suffix v) (text lst) = + v := 0; for _itm = lst: v[incr v] := _itm; endfor +enddef; + +def map (text proc) (text lst) = + hide(_map := 0;) + for _a = lst : + if _map = 0 : hide(_map := 1;) else: , fi + proc(_a) + endfor +enddef; + +% \end{macrocode} +% \DescribeRoutine{knownarray} +% Checks if a suffix is the name of an array. Requires \gbc{arr} to be a +% known positive integer, and all the variables \gbc{arr[n]} to be known +% for \gbc{n} from 1 to \gbc{arr}. +% \begin{macrocode} +vardef knownarray suffix arr = + save _kna; boolean _kna; + _kna := (known arr) and (numeric arr); + if _kna : + _kna := (arr = floor arr) and (arr >= 1); + for _idx = 1 upto arr : + exitif not _kna; + _kna := known arr[_idx]; + endfor + fi + _kna +enddef; + +% \end{macrocode} +% +% \DescribeRoutine{copyarray} +% We only need this once, but it makes the code much more readable. It +% simply steps through an array and copies the values into another array. +% \begin{macrocode} +def copyarray(suffix from, to) = + to := 0; + for _idx = 1 upto from: + to[incr to] := from[_idx]; + endfor +enddef; + +% \end{macrocode} +% +% \DescribeRoutine{maparr} +% The \gbc{maparr} macro applies a procedure \gbc{proc} to each member of +% array \gbc{p[]} with \gbc{p} members. It returns nothing, and currently +% is unused. Though it could have been used for things like \gbc{maxpair}. +% \begin{macrocode} +def maparr (text proc) (suffix p) = + for _idx = 1 upto p: proc (p[_idx]); endfor +enddef; + +% \end{macrocode} +% +% \DescribeRoutine{textpairs} +% This macro takes a suffix (name of an array to be constructed) and a +% list of pairs, and assigns them to the array. It is normally called from +% another macro, which does any necessary \mfc{save}-ing of the variable +% used for the array name. We used to include ``\mfc{save p;}'' in this +% macro, but ran into a problem once when \mfc{p} had a suffix. You can't +% apply \mfc{save} to a variable with a suffix. Moreover, ``\mfc{save p}'' +% also renders \mfc{p.x} unknown, so I judged it best to let whoever calls +% this macro decide what to save. +% \begin{macrocode} +def textpairs (suffix p) (text t) = + numeric p; pair p[]; list (p) (t); +enddef; + +% \end{macrocode} +% \DescribeRoutine{chpair} +% This applies a procedure \gbc{proc} (which maps numeric to +% numeric) to each part of pair \gbc{p}, and returns the resultant pair. +% +% \DescribeRoutine{floorpair} +% \DescribeRoutine{ceilingpair} +% \DescribeRoutine{hroundpair} +% \gbc{floorpair}, \gbc{ceilingpair} and \gbc{hroundpair} use it with +% \gbc{proc} equal to \mfc{floor}, \mfc{ceiling} and \mfc{hround}. +% The last one is not defined in the \MP{} version of \grafbase{} +% because \mfc{hround} is not defined (only \mfc{round}, which already +% works on pairs). Actually, none of these is used any longer in +% \file{grafbase.mp}. +% \begin{macrocode} +vardef chpair (text proc) (expr p) = + (proc (xpart p), proc (ypart p)) +enddef; + +vardef floorpair (expr p) = chpair (floor) (p) enddef; +vardef ceilingpair (expr p) = chpair (ceiling) (p) enddef; +%vardef hroundpair (expr p) = chpair (hround) (p) enddef; + +% \end{macrocode} +% +% \DescribeRoutine{emin} +% \DescribeRoutine{emax} +% These are more efficient versions of \prog{plain}'s \mfc{min} and +% \mfc{max}: avoiding a \mfc{for} loop when only two values are compared. +% +% \DescribeRoutine{pairmin} +% \DescribeRoutine{pairmax} +% \gbc{pairmin} operates on two pairs, returning a pair having the +% smaller of the two xparts and the smaller of the two yparts. Of course +% \gbc{pairmax} is analogous, producing the maximum. +% +% \DescribeRoutine{minpair} +% \DescribeRoutine{maxpair} +% The \gbc{minpair} macro returns the pair comprising the minimum $x$ and +% minimum $y$ coordinates of all pairs in the array \gbc{p[]}, where +% \gbc{p} itself is a numeric count of the members in \gbc{p[]}. +% \gbc{maxpair} is analogous. These operate by repeatedly calling +% \gbc{pairmin} or \gbc{pairmax}. +% \begin{macrocode} +vardef emin (expr a, b) = if a < b : a else: b fi enddef; +vardef emax (expr a, b) = if a > b : a else: b fi enddef; + +vardef pairmin (expr z, w) = + ( emin (xpart z, xpart w), emin (ypart z, ypart w ) ) +enddef; +vardef pairmax (expr z, w) = + ( emax (xpart z, xpart w), emax (ypart z, ypart w ) ) +enddef; + +vardef minpair (suffix p) = + save _mp; pair _mp; _mp := p1; + for _idx = 2 upto p - 1 : + _mp := pairmin(_mp, p[_idx]); + endfor + pairmin (_mp, p[p]) +enddef; +vardef maxpair (suffix p) = + save _mp; pair _mp; _mp := p1; + for _idx = 2 upto p - 1: _mp := pairmax(_mp, p[_idx]); endfor + pairmax (_mp, p[p]) +enddef; + +% \end{macrocode} +% +% +% \section{The \grafbase{} coordinate system}\label{coordinate} +% +% We need to make a distinction between graph units, sharped units, and +% device units. In \MF, a device unit is 1 pixel. On a LaserJet IV, one +% inch is 600 pixels. When constructing a character, \MF{} uses the pixel +% as its unit. Since this differs from one printing device to another, +% \file{plain.mf} arranges for \emph{sharped} units (the name comes from the +% convention that they are written using a name that ends in \mfc{\#}). The +% dimension \mfc{1pt\#} in \MF{} is arbitrarily set to 1, and other +% units defined by conversion factors (\mfc{in\#=72.27}; neither \MF{} +% nor \MP{} makes a distinction between distances and numbers: \mfc{2pt} +% just means \mfc{2} times the value of \mfc{pt}). When one needs to +% draw something actually \emph{one point long}, then \mfc{1pt} is used. +% It is defined to be equal \mfc{pt\#*hppp}, where \mfc{hppp} stands for +% ``horizontal pixels per point'' and its value is usually set by +% \mfc{mode_setup}. So \mfc{1pt} is $600/72.27$ (pixels) if +% \mfc{mode} is \mfc{ljfour}. +% +% Often, when we want numbers not to become too large, we do calculations, +% define paths, etc., in sharped units, then draw by scaling to device +% units. In \grafbase{} we take this one step further: a horizontal graph +% unit (i.e., the difference between the graph points (0, 0) and (1, 0)) +% represents \gbc{unitlen*xscale} sharped units, and +% \gbc{unitlen*xscale*hppp} actual pixels. The \grafbase{} macros do much +% of the calculations in graph units. +% +% In \MP, there is no difference between device and sharped units. +% The \emph{postscript point} or \emph{big point} (1/72 inches) is the +% unit in \MP: \mfc{bp = 1}. +% +% Some things need to be in graph units (for example, positions within a +% graph defined by the user) or independent of units (standard shapes) +% that scale appropriately when scales change. Other things (thickness of +% lines) are a design decision that is either independent of scale, or +% scales in a non-obvious way. The diameter of the drawing pen is one of +% the latter things, so the default pen width is in device units. Also for +% the hatching pen. +% +% When drawing a path we want to use device coordinates. When defining +% paths, we typically want to use graph coordinates. The macros that do +% the drawing, therefore, need to convert from one to the other. In +% addition, for inclusion of the picture in a \TeX{} document, we normally +% want the lower left corner of the graph space to have device coordinates +% (0, 0). +% +% We therefore have two transforms: \gbc{vtr} is the \emph{vector} or +% linear transform for pair quantities that remain invariant under shifts, +% and \gbc{ztr} is a \emph{point} or affine transformation for pair +% quantities that change appropriately under shifts. +% +% The quantities \gbc{xneg}, \gbc{xpos}, \gbc{yneg}, and \gbc{ypos} are +% in \emph{graph} coordinates. Shifting by \gbc{(-xneg, -yneg)} transforms +% the lower left corner to $(0, 0)$. Multiplication by \gbc{xscale} and +% \gbc{yscale} converts to multiples of \gbc{unitlen} and multiplication +% by \gbc{unitlen} gets us sharped coordinates. For \MF{}, +% multiplication by \mfc{hppp} converts to device coordinates, while for +% \MP{} sharped and device are the same (the printer's PostScript +% rasterizing engine -- or \prog{GhostScript} -- does the final conversion +% to actual pixels). +% +% \mfc{currenttransform} (via the macro \mfc{.t_}, defined by +% \mfc{mode_setup}) takes care of the aspect ratio. +% +% \gbc{charwd} and \gbc{charht} are sharped coordinates defined by the +% startup code \gbc{beginmfpic}, and \gbc{w_} and \gbc{h_} are the +% corresponding device (pixel) coordinates +% +% \DescribeRoutine{setztr} +% This macro does the defining of \gbc{ztr} and \gbc{vtr}. It is called +% by \gbc{beginmfpic}, at which time all the necessary quantities should be +% known. +% \begin{macrocode} +transform ztr, vtr; +def setztr = + if debug : + GBdebug; +%<*MF> + >> "charwd = " & decimal charwd & "pt#"; + >> "charht = " & decimal charht & "pt#"; + >> "w_ = " & decimal w_ & " pixels"; + >> "h_ = " & decimal h_ & " pixels"; + >> "unitlen = " & decimal unitlen & "pt#"; + >> "hppp = " & decimal hppp; +% +%<*MP> + >> "w_ = " & decimal w_ & "bp"; + >> "h_ = " & decimal h_ & "bp"; + >> "unitlen = " & decimal unitlen & "bp"; +% + >> "xneg = " & decimal xneg; + >> "xpos = " & decimal xpos; + >> "yneg = " & decimal yneg; + >> "ypos = " & decimal ypos; + >> "xscale = " & decimal xscale; + >> "yscale = " & decimal yscale; + GBenddebug; + fi + save ztr, vtr; + transform ztr, vtr; + vtr := identity xscaled (xscale) yscaled (yscale) + scaled (unitlen*hppp); + ztr := identity shifted (-(xneg, yneg)) transformed vtr; + if debug : + GBdebug; + >> "ztr: "; + show ztr; + >> "vtr: "; + show vtr; + GBenddebug; + fi +enddef; + +% \end{macrocode} +% +% \DescribeRoutine{zconv} +% \DescribeRoutine{invzconv} +% The macro \gbc{zconv} converts a variety of expressions from graph to +% device coords. The expressions include pairs, paths, and transforms. +% This is an affine transform. The inverse, \gbc{invzconv}, converts a +% variety of expressions from device to graph coordinates. +% +% \DescribeRoutine{vconv} +% \DescribeRoutine{invvconv} +% The vector version, \gbc{vconv}, converts a vector \gbc{v} from graph to +% device coordinates. This is a linear (ie, vector) transform. Finally, +% \gbc{invvconv} converts a vector from device to graph coordinates. +% \begin{macrocode} +vardef zconv (expr a) = a transformed ztr enddef; +vardef invzconv (expr a) = a transformed (inverse ztr) enddef; +vardef vconv (expr v) = v transformed vtr enddef; +vardef invvconv (expr v) = v transformed (inverse vtr) enddef; + +% \end{macrocode} +% +% \DescribeRoutine{active_plane} +% \gbc{active_plane} is the active drawing plane. \mfc{currentpicture} is +% unknown at this stage (because it's set in \gbc{beginmfpic}). We use a +% \mfc{def}, and not a picture assignment, partly for this reason but also +% because we can achieve special effects (see \gbc{image} below, and the +% \gbc{tile} macro) by redefining it. +% +% \DescribeRoutine{image} +% The \mfc{image} macro exists in \file{plain.mp} but not \file{plain.mf}. +% The purpose is to just use the \file{plain} \MF{} and \grafbase{} macros +% as you normally would, but wrap the whole thing in parentheses preceded +% by \gbc{X := image} to get all those things drawn on the picture +% variable \gbc{X}. +% \begin{macrocode} +def active_plane = currentpicture enddef; + +%<*MF> +vardef image(text t) = + save currentpicture; picture currentpicture; + currentpicture := nullpicture; + t; + currentpicture +enddef; + +% +% \end{macrocode} +% +% \DescribeRoutine{initpic} +% \gbc{initpic} is called by \gbc{beginmfpic} after \gbc{w_} and +% \gbc{h_} are defined. At this point \gbc{xneg}, \gbc{xscale}, etc., +% have known values and \gbc{setztr} can define the transforms that are +% based on them. Also, the default \gbc{drawpen} is initialized and the +% boundary of the graph space is assigned to the clipping array. +% +% If \gbc{overlaylabels} is \gbc{true}, we try to make labels in \MP{} +% behave the same as labels in \TeX{} (for \mfpic) by adding the labels +% on last. We do this by adding them to the picture variable +% \gbc{current_labels} as they occur, then add that picture onto +% \gbc{active_plane} just before shipout. For backward compatibility, +% the default for \gbc{overlaylabels} is \gbc{false}. We initialize +% \gbc{current_labels} here. The pair variables \gbc{labelbb.ll} and +% \gbc{labelbb.ur} keep track of the bounding box of added labels in case +% \gbc{overlaylabels}, \gbc{truebbox}, and \gbc{clipall} are all +% \gbc{false}. +% \begin{macrocode} +%<*MP> +boolean overlaylabels; +overlaylabels = false; + +% +def initpic = + setztr; + resizedrawpen (penwd); + if ClipOn : ClipPath := 1; + ClipPath1 := rect (origin, (w_, h_)); + fi + if debug : + GBdebug; + >> "Drawing nominal bounding box around picture"; + GBenddebug; + noclip ( safedraw rect (origin, (w_, h_)) ); + fi +%<*MP> + save current_labels; picture current_labels; + current_labels := nullpicture; + save labelbb; pair labelbb.ll, labelbb.ur; + labelbb.ll := labelbb.ur := origin; +% +enddef; + +% \end{macrocode} +% +% \DescribeRoutine{mfpicenv} +% \DescribeRoutine{endmfpicenv} +% For compatibility with older \file{graphbase.mf} (for +% \prog{fig2dev}'s \file{genmf.c}). Actually, I have no idea if +% \prog{fig2dev} even works with the current \mfpic. +% \begin{macrocode} +def mfpicenv = enddef; +def endmfpicenv = enddef; +% \end{macrocode} +% \DescribeRoutine{bounds} +% This used to be for compatibility also, but I decided it was a +% convenient abbreviation, so \mfpic{} uses it now. +% \begin{macrocode} +def bounds (expr a, b, c, d) = + xneg := a; xpos := b; + yneg := c; ypos := d; +enddef; + +% \end{macrocode} +% +% \DescribeRoutine{setvariable} +% This is mainly to save space in \mfpic-generated files. +def setvariable (text kind) (suffix name) (expr value) = + save name; kind name; name := value; +enddef; + +% \begin{macrocode} +% \end{macrocode} +% +% \DescribeRoutine{beginmfpic} +% This is the figure wrapper. \mfpic{} used to begin with figure 1 and +% progressively increment the number. The current value of \gbc{gcode} was +% always equal to the current figure number. Now, \mfpic{} explicitly +% writes the figure number, so we assign \gbc{gcode} to that number in +% case any old files made use of the current number through the +% \gbc{gcode} variable. +% +% Originally, \gbc{beginmfpic} defined \mfc{w}, \mfc{h} and \mfc{d}, but +% that caused problems if an \mfpic{} user tried to store a path in a +% variable named \gbc{h}, etc. So now we use the less obvious names ending +% in underscore. Apart from this, the code below is a clone of +% \file{plain.mf}'s \mfc{beginchar} (for \MF). In fact, it used to invoke +% \mfc{beginchar}. For \MP, we invoke \mfc{beginfig} explicitly. This does +% the \mfc{clear...} actions and \mfc{charcode} assignment. +% +% The `\mfc{extra_...mfpic}' strings provide a compiler-independent way +% to add to the extra beginning and ending tokens. +% \begin{macrocode} +string extra_beginmfpic; extra_beginmfpic := ""; +string extra_endmfpic; extra_endmfpic := ""; + +def beginmfpic (expr ch) = +% beginfig (ch); +% begingroup + gcode := ch; + save w_, h_, d_; numeric w_, h_, d_; + charwd := (xpos-xneg)*xscale*unitlen; + charht := (ypos-yneg)*yscale*unitlen; + chardp := 0; +%<*MF> + charcode := if known ch : byte ch else: 0 fi; + w_ := hround(charwd*hppp); + h_ := vround(charht*hppp); + d_ := vround(chardp*hppp); + charic := 0; clearxy; clearit; clearpen; + scantokens extra_beginchar; +% +%<*MP> + w_ := charwd; + h_ := charht; + d_ := chardp; +% + initpic; + scantokens extra_beginmfpic; +enddef; + +% \end{macrocode} +% +% \DescribeRoutine{endmfpic} +% For \MF, we again clone \file{plain.mf}'s \mfc{endchar}, adding support +% for the \gbc{clipall} (clip to the graph rectangle), and \gbc{ClipOn} +% (clip to some user specified array of paths), and \gbc{showbbox} (draw +% the boundary of the graph for debugging purposes). +% \begin{macrocode} +def endmfpic = + scantokens extra_endmfpic; + if debug : + GBdebug; +% >> "TFM charwd = " & decimal charwd & "pt#"; +% >> "TFM charht = " & decimal charht & "pt#"; +% >> "width = " & decimal w_ & "bp"; +% >> "height = " & decimal h_ & "bp"; + GBenddebug; + fi +%<*MF> + if proofing>0 : makebox(proofrule); fi + chardx := w_; % desired width of character in pixels +% + DoClip (active_plane); + if clipall : clipto (active_plane) rect(origin, (w_, h_)); fi + if showbbox : noclip ( safedraw rect (origin, (w_, h_)) ); fi +%<*MF> + shipit; + if displaying > 0 : makebox(screenrule); showit; fi + endgroup +% +% \end{macrocode} +% +% \MP's code is more involved due to the possibility to put typeset text +% in a picture. In addition to the \gbc{clipall}, \gbc{ClipOn} and +% \gbc{showbbox} support, we have support for labels and \gbc{truebbox}. +% \begin{macrocode} +%<*MP> + save _ll, _ur; + pair _ll, _ur; + if truebbox : + _ll := llcorner active_plane; + _ur := urcorner active_plane; +% \end{macrocode} +% We try to let the bbox include labels, even when they extend beyond the +% nominal picture boundaries. However, they will have been clipped off if +% \gbc{clipall} is set. In that case, just set the bounding box to the +% coordinates determined by \gbc{w_} and \gbc{h_} +% \begin{macrocode} + elseif clipall: + _ll := origin; + _ur := (w_,h_); + else: % expand to accomodate labels + _ll := pairmin((0, 0 ), labelbb.ll); + _ur := pairmax((w_, h_), labelbb.ur); + fi +% \end{macrocode} +% A bounding box in the output PostScript code can have a side with +% length 0 (e.g., a picture drawn with \mfpic{} that contains only +% text placed by \TeX). This can cause division by 0 errors in some +% contexts. That's why we don't just let \MP{} determine the bounding box, +% but force the upper and lower coordinates to differ. +% \begin{macrocode} + _ur := pairmax(_ur, _ll + eps*(1, 1)); + setbounds active_plane to rect(_ll, _ur); +% \end{macrocode} +% If \gbc{overlaylabels} was true during a \gbc{newgblabel} command, +% then \gbc{current_labels} contains that labels. We add them now, on top +% of the picture. This might also extend the bbox, but that is an effect +% we want to achieve. +% \begin{macrocode} + addto active_plane also current_labels; + endfig; +% +enddef; + +% \end{macrocode} +% +% +% \section{Text}\label{text} +% +% In the \MP{} version, \gbc{label_adjust} and \gbc{label_sep} are the +% equivalent of \mfpic's \cs{tlabeloffset} and \cs{tlabelsep}. In the +% \MF{} version they are still needed (in \gbc{textrect}, etc.) to place +% the paths that are to surround the text that \TeX{} places. +% +% \gbc{label_adjust} is a vector displacement for the label, +% while \gbc{label_sep} is the distance from the label to +% the point of placement, when that point is on the edges of the label's +% bounding box. Both are in device coordinates (e.g., \mfc{3bp}). +% \begin{macrocode} +pair label_adjust; label_adjust := (0, 0); +numeric label_sep; label_sep := 0; + +% \end{macrocode} +% +% Another aspect of trying to make \mfpic's \file{.mp} and \file{.mf} +% the same, we here define a version of \mfc{verbatimtex} for \MF. This +% works only if \mfc{etex} is fillowed by a semicolon, and no semicolons +% appear in the \TeX{} material. (There may be other forbidden things, and +% certainly any parentheses have to be in matching pairs.) We would like +% the output of \mfpic{} under the \opt{metapost} option to be usable in +% \MF{} with minimal changes. +% \begin{macrocode} +%def verbatimtex = killtext enddef; + +% \end{macrocode} +% +% \subsection{Placement of text, \MP{} only}\label{placement} +% +% \DescribeRoutine{newgblabel} +% \DescribeRoutine{gblabel} +% This is how \mfpic{} places labels when \opt{mplabels} is in effect. +% Since labels will typically be \mfc{btex...etex}, which are picture +% expressions, it will actually place any picture, \gbc{s}. If you feed it +% a string or path, it will convert it to a picture (with the \mfc{infont} +% operator or the \gbc{picpath} macro). The first two parameters could easily +% be condensed into one if \mfpic{} support were all that was required, +% however I thought it best to generalize. The first two parameters +% \gbc{hf} and \gbc{vf} are numeric. The \gbc{hf} represent the fraction of +% the text that lies left of the point where the text is placed. Normally, +% \gbc{vf} represents the fraction of text that lies below the point, but +% if the third parameter is \mfc{true}, this fraction is relative to the +% baseline (i.e., the depth is ignored). Currently we only use this with +% \gbc{vf = 0} to get placement on the baseline. (Actually, \mfpic{} only +% ever uses values of 0, .5 and 1 for \gbc{hf} or \gbc{vf}). +% +% The macro \gbc{newgblabel} takes 6 parameters. The first 3, as explained +% above, effect the justification of the text (location of the point of +% placement relative to the label). They correspond to the optional +% parameter of \cs{tlabel} in \mfpic{} as follows: +% \begin{itemize} +% \item \gbc{hf} determines horizontal position: 0 = \texttt{l}, +% .5 = \texttt{c}, and 1 = \texttt{r}. +% \item \gbc{vf} and \gbc{BL} determine vertical position. For placement +% option \texttt{B}, \gbc{vf} = 0 and \gbc{BL} is \mfc{true}. For the +% rest, \gbc{BL} is \mfc{false} and \gbc{vf} corresponds as follows: +% 0 = \texttt{b}, .5 = \texttt{c} and 1 = \texttt{t}. +% \item \gbc{r} is degrees of rotation about the specified point. +% \item \gbc{s} is a string or picture expression (typically +% \mfc{btex ... etex} code) +% \item \gbc{pts} is a list of pairs in graph coordinates. +% \end{itemize} +% First the bounding box of the picture is extended by \gbc{label_sep} in +% all directions by \gbc{labeldims}, then a new reference point for the +% picture is calculated using +% \DescribeRoutine{ref_shift}\gbc{ref_shift} +% and then \gbc{thegblabel} rotates it around the reference +% point and adds the \gbc{label_adjust}. Finally, for each \gbc{_itm} in +% \gbc{pts}, the result is shifted by \gbc{_itm}. If \gbc{overlaylabels} +% is true, the label is placed on the picture \gbc{current_labels} and +% added to \gbc{active_plane} at \gbc{endmfpic}. Otherwise, it is added +% directly to \gbc{active_plane} and and the \gbc{labelbb} are adjusted. +% +% We also use \gbc{ref_shift} in \MF{} since the curves that surround text +% require it. +% +% We keep \gbc{gblabel} for backward compatibility with old \mfpic{} +% files, but it merely calls \gbc{newgblabel}. While the old \gbc{gblabel} +% had the same flexibility as \gbc{newgblabel}, this one assumes that the +% parameters are only those that \mfpic{} would write. We provide a null +% definition for \MF{} to allow \mfpic's \file{.mp} files to be usable with +% minimal changes. +% \begin{macrocode} +%def newgblabel (expr hf, vf, BL, r) (text s) (text pts) = enddef; +%<*MP> +vardef newgblabel (expr hf, vf, BL, r) (expr s) (text pts) = + save _lab, _ll, _ur; picture _lab; pair _ll, _ur; + _lab := + if picture s : s + elseif string s : s infont defaultfont scaled defaultscale + elseif path s : picpath (s) + else : nullpicture + fi; + labeldims (origin, _lab) (_ll, _ur); + _lab := thegblabel(ref_shift (hf, vf, BL, _ll, _ur), r, _lab); + save _b; pair _b; + for _itm = pts : + _b := zconv(_itm); + if overlaylabels : + addto current_labels also _lab shifted _b _wc_ tlabelcolor; + else: + addto active_plane also _lab shifted _b _wc_ tlabelcolor; + labelbb.ll := pairmin (_b + llcorner _lab, labelbb.ll); + labelbb.ur := pairmax (_b + urcorner _lab, labelbb.ur); + fi + endfor +enddef; + +% Assumes a+b=1 and either c+d=1 or c=d=0: +vardef gblabel (expr a, b, c, d, r) (expr s) (text t) = + newgblabel (b, d, (c = 0) and (d = 0), r) (s) (t); +enddef; + +% +vardef ref_shift (expr hf, vf, BL, ll, ur) = + - ( (hf)[xpart ll, xpart ur], + (vf)[if BL: 0 else: (ypart ll) fi, ypart ur] ) +enddef; + +% \end{macrocode} +% +% \DescribeRoutine{thegblabel} +% When \gbc{thegblabel} is called by the above, \gbc{p} is a text picture, +% but it is also called by the \gbc{textrect}, etc., in which case \gbc{p} +% is a path. This is why it is needed in the \MF{} version. +% \begin{macrocode} +vardef thegblabel (expr z, r, p) = + ((p shifted z) rotated r) shifted label_adjust +enddef; + +% \end{macrocode} +% +% \subsection{Decorating the text}\label{decorating} +% +% \DescribeRoutine{textrect} +% \DescribeRoutine{textoval} +% \DescribeRoutine{textellipse} +% The three macros \gbc{textrect}, \gbc{textoval} and \gbc{textellipse} +% are designed to surround a bit of text with some curve. These macros +% return the path in graph coordinates. In the first one, the path is a +% rectangle with rounded corners. The second parameter, \gbc{rad}, is the +% radius of quarter circles at the corners (in device units). In the other +% two cases, the path is an ellipse. They differ in the meaning of the +% second parameter. +% +% In \gbc{textoval}, the second parameter \emph{multiplies} the ratio of +% width to height of the text to produce the ratio for the ellipse. Thus, +% with \gbc{mult}=1, the ratio will be the same as that of the text. In +% \gbc{textellipse}, the second parameter \gbc{rat} is the actual value of +% the ratio of width to height of the ellipse and a value of 1 produces a +% circle. In either macro, if that parameter is 0, we draw a rectangle. +% +% The size of each path is determined so that, when the text is placed and +% the path drawn, it passes through the four corners of the following +% rectangle: the rectangle which just encloses the text plus the amount of +% space on all sides determined by \gbc{label_sep}. Note that this means +% a rectangle with rounded corners will have larger height and width than +% one without. +% +% The placement of each path is: centered at the point given in the third +% parameter \gbc{loc}, shifted by the vector specified in \gbc{label_adjust}. +% +% The first parameter \gbc{lbl} is either a pair representing the +% height and width of the text (only possibility in \MF) or the actual +% text. These macros are being kept for backward compatibity, but now they +% call the extended versions that allow the path to follow arbitrary +% text placement. The parameters \gbc{(.5,.5,false,0)} were those +% assumed in the past version: centered at the point, with no rotation. +% +% The extended versions of \gbc{textoval} and \gbc{textellipse} are both +% now implemented in a single command \gbc{xellipse}, with a boolean to +% specify whether the aspect ratio of the text is used to calculate the +% aspect of the ellipse. +% \begin{macrocode} +vardef textrect (expr lbl, rad, loc) = + textrectx (.5, .5, false, 0) (origin, lbl, rad, loc) +enddef; +vardef textoval (expr lbl, mult, loc) = + xellipse (true, .5, .5, false, 0) (origin, lbl, mult, loc) +enddef; +vardef textellipse (expr lbl, rat, loc) = + xellipse (false, .5, .5, false, 0) (origin, lbl, rat, loc) +enddef; + +% \end{macrocode} +% +% \DescribeRoutine{textrectx} +% \DescribeRoutine{textovalx} +% \DescribeRoutine{textellipsex} +% These are extended versions of the previous three. They will now be +% able adjust the position of the path in the same manner as \gbc{newgblabel} +% does the text. In fact, they calculate the position in exactly the same +% manner as that macro, and the first 4 parameters encode that in the same +% way. +% +% \gbc{lbl} is either the upper right corner of the text or the label +% itself. In the first case \gbc{xy} is the lower left corner, in the +% second case it is a dummy parameter, the bounding box being obtained (in +% \gbc{labeldims}) by measuring the label. For these extended macros, the +% parameters \gbc{lbl}, \gbc{mult}, \gbc{rad}, and \gbc{loc} are as in +% the unextended versions. +% +% \gbc{roundends} is a boolean. We really only need it to be a type +% distinguishable from any numeric value. \Mfpic{} users can specify it +% rather than an explicit radius, and when the code of \gbc{textrectx} +% detects this, it uses the maximum radius for the corners (making the +% short side of the `rectangle' a semicircle). That is, if \gbc{rad} is +% a boolean (and \mfc{true}) then the radius at the corners is so chosen. +% (If \gbc{rad} is \mfc{false} the corners are not rounded at all.) +% \begin{macrocode} +boolean roundends; roundends := true; +vardef textrectx (expr a, b, c, rot, xy, lbl, rad, loc) = + save ll, ur, _r, f, zz; + pair ll, ur, zz; path f; + labeldims (xy, lbl) (ll, ur); + _r := + if boolean rad : + if rad : emin (xpart (ur-ll), ypart (ur-ll))/sqrt(2) + else: 0 + fi + elseif numeric rad : rad + else: 0 + fi; + if _r = 0 : + f := rect(ll, ur); + else: + save p, q; + pair p[]; path q; + p1 := ur - _r*dir(45); % center of upper right arc + p3 := ll + _r*dir(45); % lower left + p2 := (xpart p3, ypart p1); % upper left + p4 := (xpart p1, ypart p3); % lower right + q := quartercircle scaled 2_r; + if _r > 0: + f := (q shifted p1) -- (q rotated 90 shifted p2) + -- (q rotated 180 shifted p3) + -- (q rotated -90 shifted p4) + -- cycle; + else: + f := (q shifted p1) -- (q rotated -90 shifted p4) + -- (q rotated 180 shifted p3) + -- (q rotated 90 shifted p2) + -- cycle; + fi + fi + invvconv(thegblabel(ref_shift(a, b, c, ll, ur), rot, f)) shifted loc +enddef; + +% \end{macrocode} +% +% As the coding of \gbc{textoval} and \gbc{textellipse} was refined, it +% turned out that each refinement in one suggested a similar change in the +% other. In the end the two differed only in two lines, so now both call +% another macro \gbc{xellipse}. +% \begin{macrocode} +def textovalx = xellipse (true) enddef; +def textellipsex = xellipse (false) enddef; + +% \end{macrocode} +% \DescribeRoutine{xellipse} +% In \gbc{xellipse}, \gbc{aa} and \gbc{bb} are the horizontal and +% vertical radii of the resulting ellipse, while \gbc{ww} and \gbc{hh} +% are half the width and height size of the text. If the boolean +% \gbc{aspect} is true, the aspect ratio of the ellipse (i.e., \gbc{aa/bb}) +% equals \gbc{mult*hh/ww}, otherwise it equals \gbc{mult}. +% \begin{macrocode} +vardef xellipse (expr aspect, a, b, c, r, xy, lbl, mult, loc) = + if mult = 0 : + textrectx (a, b, c, r) (xy, lbl, 0, loc) + else: + save ll, ur, cc, ww, hh, f; + pair ll, ur, cc; path f; + labeldims (xy, lbl) (ll, ur); + cc := .5[ll, ur]; % center + (ww, hh) = ur - cc; + if (ww = 0) or (hh = 0) : % make a line: + f = (ll--ur); + else: + save aa, bb, mm; + mm := if aspect : ww/hh*mult else: mult fi; + aa := ww ++ hh*mm; + bb := aa/mm; + f := ellipse(cc, aa, bb, 0); + fi + invvconv(thegblabel (ref_shift (a, b, c, ll, ur), r, f)) shifted loc + fi +enddef; + +% \end{macrocode} +% +% \DescribeRoutine{labeldims} +% This has been changed to make the code of \mfpic{} a bit simpler and +% to aid in backward compatibility. It takes a couple of pairs (the actual +% or nominal label bounding box corners) or something visible (picture, +% string or path) and assigns suitable values to \gbc{ll} and \gbc{ur} +% then expands the bbox by \gbc{label_sep}. +% \begin{macrocode} + +def labeldims (expr xy, lbl) (suffix ll, ur) = + if pair lbl : + ll := xy; ur := lbl; + else: +% ll := ur := (0, 0); +%<*MP> + save _lbl; picture _lbl; + _lbl := + if picture lbl : lbl + elseif string lbl : + lbl infont defaultfont scaled defaultscale + elseif path lbl : picpath (lbl) + else : nullpicture + fi; + ll := llcorner _lbl; + ur := urcorner _lbl; +% + fi + ll := ll - label_sep*(1, 1); + ur := ur + label_sep*(1, 1); +enddef; + +% \end{macrocode} +% +% +% \section{Additional functions}\label{functions} +% +% Complex variable functions are provided, which interpret a pair $(x, y)$ +% as the complex number $z = x + iy$. We also provide for the use of +% radians, add the standard exponential and logarithms, and add the +% hyperbolic functions and their inverses. +% +% The value \gbc{eps/2 + epsilon} is the smallest value with +% reciprocal less than \mfc{infinity}. I set \gbc{nottoosmall} a speck +% bigger to ensure that the same is true of \gbc{2*(nottoosmall/2)}. +% +% Normally \mfc{infinity = 2**12 - epsilon} is the largest number allowed +% (as a value involved in actual drawing in \MF). Since we set +% \mfc{warningcheck=0}, values not assigned to a variable and not +% written to the \file{.tfm} file (and any value in \MP) can be as high as +% \mfc{2**15 - epsilon}, which is a speck smaller than \mfc{1/(2epsilon)}. +% So \gbc{reallysmall} is to be the smallest number whose reciprocal is a +% usable number. (\mfc{epsilon} is the smallest possible positive number +% in \MF.) +% +% We set \gbc{secd x = 1/(cosd x)} unless \gbc{cosd x} is less than ``really +% small'', then we set it equal to \gbc{1/reallysmall}. We do a similar +% thing with \gbc{cscd}. +%^^A +% \DescribeRoutine{TruncateWarn} +% (When such a substitution happens \gbc{TruncateWarn} prints a message +% that a truncation has taken place.) +% +% Why not just determine what number will produce arithmetic overflow and +% test for that? Because I'm lazy: it would require a different number +% for each of the functions. Instead, since \MF{} has no ``arithmetic +% underflow'', I compute something that is guaranteed to work and occurs +% in the formula for the function as a reciprocal (e.g., $t = e^{-|x|}$ +% for \gbc{cosh x}) and make sure the number is not too small to take its +% reciprocal. +% +% \DescribeRoutine{signof} +% This expands to a minus sign if its argument is negative, otherwise +% nothing. +% \begin{macrocode} +newinternal nottoosmall; nottoosmall := eps/2 + 2epsilon; +newinternal reallysmall; reallysmall := 3epsilon; +def signof (expr X) = if X < 0 : - fi enddef; +def TruncateWarn expr s = GBmsg s & " too large; truncating"; enddef; + +% \end{macrocode} +% In addition to \mfc{sind} and \mfc{cosd} which take angles in degrees, +% we define the remaining trig functions \gbc{tand}, \gbc{cotd}, +% \gbc{secd}, and \gbc{cscd}. +% +% \DescribeRoutine{secd} +% \DescribeRoutine{tand} +% \DescribeRoutine{cscd} +% \DescribeRoutine{cotd} +% We define \gbc{secd}, one of the simplest, to include an ``out of range'' +% test (which also prevents division by 0). Then \gbc{tand} can make use +% of it without any division. We do the same with \gbc{cscd} and +% \gbc{cotd}. +% \begin{macrocode} +vardef secd primary X = + save temp; temp := cosd(X); + if abs(temp) < reallysmall : + TruncateWarn "Secant"; + temp := signof (temp) reallysmall; + fi + 1/temp +enddef; +vardef tand primary X = sind(X)*secd(X) enddef; + +vardef cscd primary X = + save temp; temp := sind(X); + if abs(temp) < reallysmall : + TruncateWarn "Cosecant"; + temp := signof(temp) reallysmall; + fi + 1/temp +enddef; +vardef cotd primary X = cosd(X)*cscd(X) enddef; + +% \end{macrocode} +% \DescribeRoutine{acos} +% \DescribeRoutine{asin} +% \DescribeRoutine{atan} +% These are the inverse functions, which return an angle in degrees. +% \begin{macrocode} +vardef acos primary X = angle (X, 1 +-+ X) enddef; +vardef asin primary X = angle (1 +-+ X, X) enddef; +vardef atan primary X = angle (1, X) enddef; + +% \end{macrocode} +% \DescribeRoutine{sin} +% \DescribeRoutine{cos} +% \DescribeRoutine{tan} +% \DescribeRoutine{cot} +% \DescribeRoutine{sec} +% \DescribeRoutine{csc} +% Now the trig functions that take angles in radians. +% \begin{macrocode} +vardef sin primary X = sind (X*radian) enddef; +vardef cos primary X = cosd (X*radian) enddef; +vardef tan primary X = tand (X*radian) enddef; +vardef cot primary X = cotd (X*radian) enddef; +vardef sec primary X = secd (X*radian) enddef; +vardef csc primary X = cscd (X*radian) enddef; + +% \end{macrocode} +% \DescribeRoutine{invsin} +% \DescribeRoutine{invcos} +% \DescribeRoutine{invtan} +% And the inverses that return angles in radians. +% \begin{macrocode} +vardef invcos primary X = (acos X)/radian enddef; +vardef invsin primary X = (asin X)/radian enddef; +vardef invtan primary X = (atan X)/radian enddef; + +% \end{macrocode} +% \DescribeRoutine{exp} +% \DescribeRoutine{ln} +% \DescribeRoutine{log} +% \DescribeRoutine{logbase} +% \DescribeRoutine{logtwo} +% \DescribeRoutine{logten} +% Here we define the standard exponential function. (The \MF{} function +% \mfc{mexp} has the unusual base $e^{1/256}$ to avoid overflow.) The +% inverse of \gbc{exp} is the natural logarithm (\gbc{ln} or \gbc{log}). +% We also have the general base logarithm \gbc{logbase} and its two +% special instances \gbc{logtwo} and \gbc{logten}. +% \begin{macrocode} +vardef exp primary X = mexp (256 * X) enddef; +vardef ln primary X = (mlog X) / 256 enddef; +def log = ln enddef; +vardef logbase (expr B) primary X = (mlog X)/(mlog B) enddef; +def logtwo = logbase( 2) enddef; +def logten = logbase(10) enddef; + +% \end{macrocode} +% \DescribeRoutine{Arg} +% \DescribeRoutine{Log} +% \DescribeRoutine{cis} +% \DescribeRoutine{zexp} +% \DescribeRoutine{sgn} +% \CMF's pair variables are a decent replacement for complex variables. +% These give some of the more basic functions of standard complex +% analysis. +% \begin{macrocode} +vardef Arg primary Z = (angle Z)/radian enddef; +vardef Log primary Z = (ln(abs(Z)), Arg (Z)) enddef; +vardef cis primary T = dir(radian*T) enddef; +vardef zexp primary Z = (exp (xpart Z))*(cis(ypart Z)) enddef; +vardef sgn primary Z = + if Z = origin : origin else: unitvector Z fi +enddef; + +% \end{macrocode} +% \DescribeRoutine{cosh} +% \DescribeRoutine{sinh} +% \DescribeRoutine{tanh} +% \DescribeRoutine{sech} +% \DescribeRoutine{csch} +% \DescribeRoutine{coth} +% The hyperbolic functions. +% \begin{macrocode} +vardef cosh primary X = + save temp; temp := 2 exp (-abs(X)); + if temp < reallysmall : + TruncateWarn "Cosh"; + temp := reallysmall; + fi + 1/temp + temp/4 +enddef; + +vardef sinh primary X = + save temp; temp := 2 exp (-abs(X)); + if temp < reallysmall : + TruncateWarn "Sinh"; + temp := reallysmall; + fi + signof (X) (1/temp - temp/4) +enddef; + +vardef sech primary X = + save temp; temp := exp(-(abs (X))); + 2temp/(1 + temp*temp) +enddef; + +vardef tanh primary X = + save temp; temp := exp(-2(abs (X))); + signof (X) (1 - temp)/(1 + temp) +enddef; + +vardef csch primary X = + save temp; temp := exp(-(abs (X))); + if abs(1 - temp*temp) < reallysmall : + TruncateWarn "Csch"; + signof (X) 2temp / reallysmall + else: + signof (X) 2temp / (1 - temp*temp) + fi +enddef; + +vardef coth primary X = + save temp; temp := tanh(X); + if abs(temp) < reallysmall : + TruncateWarn "Coth"; + temp := signof (temp) reallysmall; + fi + 1/temp +enddef; + +% \end{macrocode} +% \DescribeRoutine{acosh} +% \DescribeRoutine{asinh} +% \DescribeRoutine{atanh} +% The inverses of some of the hyperbolic functions. +% \begin{macrocode} +vardef acosh primary y = + if y < 1 : + GBerrmsg ("Undefined function: acosh " & decimal y) + "If you proceed, a value of 0 will be used. " & + "Expect more errors later."; + 0 + else: + ln (y + (y+-+1)) + fi +enddef; + +vardef asinh primary y = ln (y + (y++1)) enddef; + +vardef atanh primary y = + if abs (y) < 1 : + (ln(1+y) - ln(1-y))/2 + else: + GBerrmsg ("Undefined function: atanh " & decimal y) + "If you proceed, a value of plus or minus infinity " & + "will be used. Expect more errors later."; + signof (y) infinity + fi +enddef; + +% \end{macrocode} +% +% \DescribeRoutine{polar} +% \DescribeRoutine{id} +% \gbc{polar} converts a polar coordinate pair $(r, \theta)$ to the +% corresponding rectangular coordinate pair. +% +% \gbc{id} returns its argument, which can be any expression of any type. +% \begin{macrocode} +vardef polar (expr p) = (xpart p) * dir (ypart p) enddef; +def id (expr x) = x enddef; + +% \end{macrocode} +% +% +% \section{Coordinate systems and transformations}\label{systems} +% +% \DescribeRoutine{T_push} +% \DescribeRoutine{T_pop} +% \DescribeRoutine{bcoords} +% \DescribeRoutine{ecoords} +% We want to define a localization of the ``current transform''. To do +% this we define a LIFO stack of transforms \gbc{T_stack[]}, a pair of +% macros \gbc{T_push} puts its argument (a transform) on the stack, and +% \gbc{T_pop} pops it off into its argument (a transform variable name). +% We also define two localizing macros \gbc{bcoords} that pushes our +% \gbc{ztr} and \gbc{vtr} on the stack, and \gbc{ecoords} that pops them +% off. +% \begin{macrocode} +transform T_stack[]; T_stack := 0; +def T_push (expr T) = T_stack[incr T_stack] := T; enddef; +def T_pop (suffix $) = + if T_stack > 0 : + $ := T_stack[T_stack]; T_stack := T_stack - 1; + fi +enddef; + +def bcoords = hide ( T_push (ztr); T_push (vtr) ) enddef; +def ecoords = hide ( T_pop (vtr); T_pop (ztr) ) enddef; + +% \end{macrocode} +% +% \subsection{Coordinate changes}\label{changes} +% +% \DescribeRoutine{apply_t} +% Here we define a mechanism for changing \gbc{ztr} and \gbc{vtr} by +% composing them with a new transform. Since a transform can be any affine +% transform, we get \gbc{ztr} by composing with the transform, but we +% calculate \gbc{vtr} from \gbc{ztr} by arranging that \mfc{origin +% transformed vtr} is \mfc{origin}. The syntax is \gbc{apply_t(rotated +% theta)} or \gbc{apply_t(transformed T)} if \mfc{T} is a variable or +% expression of type transform. Thus the argument of \gbc{apply_t} is +% phrase which, were it to follow a path, would produce a transformed +% path. Knuth calls such a phrase a \emph{transformer}. +% \begin{macrocode} +def apply_t (text Transformer) = + ztr := identity Transformer transformed ztr; + vtr := ztr shifted - zconv(origin); +enddef; + +% \end{macrocode} +% +% \DescribeRoutine{xslant} +% \DescribeRoutine{yslant} +% \DescribeRoutine{zslant} +% \DescribeRoutine{xyswap} +% \DescribeRoutine{boost} +% And now we define some available transformers. The only two that +% need comment are \gbc{zslant} and \gbc{boost}. I know that boost comes +% from special relativity, but I have no idea what zslant is about. +% \begin{macrocode} +def xslant = slanted enddef; % (x+sy, y). +def yslant primary s = % (x, y+sx). + transformed + begingroup + save _T; transform _T; + origin transformed _T = origin; + (1, 0) transformed _T = (1, s); + (0, 1) transformed _T = (0, 1); + _T + endgroup +enddef; + +def zslant primary p = % (xu+yv, xv+yu), where p = (u, v). + transformed + begingroup + save _T; transform _T; + xpart _T = ypart _T = 0; + xxpart _T = yypart _T = xpart p; + xypart _T = yxpart _T = ypart p; + _T + endgroup +enddef; + +def xyswap = zslant (0, 1) enddef; +def boost primary X = zslant (cosh X, sinh X) enddef; + +% \end{macrocode} +% +% \subsection{Path transformation}\label{transformation} +% +% These are functions that accept a path and return a path in graph +% coordinates. For the most part they are named and defined to +% apply a similarly named transform to the path and return the result. +% There are two exceptions. When we draw things, we expect that rotated +% and reflected objects appear congruent to the originals. If we define a +% path in graph coordinates, and the x and y directions are scaled +% differently, then simply rotating the graph coordinates will distort +% angles. The same is true of reflection. Therefore, we apply \gbc{vtr} +% (so we are in drawing coordinates) then rotate, then apply \gbc{inverse +% vtr}. This may be a mistake, or perhaps we should do it for all of +% these. For now, I'm sticking with the scheme I inherited. One can +% always use \gbc{coords} and \gbc{apply_t} if one wants the difference in +% scales ignored. +% +% \DescribeRoutine{rotatedpath} +% This returns the path rotated around point \gbc{p} by angle +% \gbc{th} in degrees. +% +% \DescribeRoutine{scaledpath} +% This returns the path scaled so that distances from the point +% \gbc{p} are multiplied by \gbc{s}. +% +% \DescribeRoutine{xslantedpath} +% This returns the path x-slanted with line $y = {}$\gbc{b} +% being the pivot rather than the x-axis. +% +% \DescribeRoutine{yslantedpath} +% This returns the path y-slanted with line $x = {}$\gbc{a} +% being the pivot rather than the y-axis. +% +% \DescribeRoutine{xscaledpath} +% This returns the path scaled so that vertical distances +% from the line $y={}$\gbc{a} are multiplied by \gbc{s}. +% +% \DescribeRoutine{yscaledpath} +% This returns the path scaled so that vertical distances +% from the line $x={}$\gbc{b} are multiplied by \gbc{s}. +% +% \DescribeRoutine{shiftedpath} +% This returns the path shifted by the vector (pair) \gbc{v}. +% +% \DescribeRoutine{reflectedpath} +% This returns the path relected about the line through the +% points \gbc{p} and \gbc{q}. +% +% \DescribeRoutine{xyswappedpath} +% Finally, this returns the path in which all coordinates +% have had the coordinates exchanged $(a, b) \to (b, a)$. Note that this +% is not the same as \gbc{reflectedpath ((0, 0), (1, 1))}, as it performs the +% reflection in graph coordinates, as its name implies. If \gbc{vtr} has +% not been changed (by \gbc{apply_t}) then \gbc{xyswappedpath} will +% convert vertical lines to horizontal and vice versa. The +% \gbc{reflectedpath} version will not when x and y are scaled differently, +% for then the line \gbc{(0, 0)--(1, 1)} is not at a 45 degree angle in +% device coordinates where drawing takes place. +% \begin{macrocode} +vardef rotatedpath (expr p, th) expr f = + f transformed vtr rotatedaround (p transformed vtr, th) + transformed (inverse vtr) +enddef; +vardef scaledpath (expr p, s) expr f = + f shifted -p scaled s shifted p +enddef; +vardef xslantedpath (expr b, s) expr f = + f shifted (0, -b) slanted s shifted (0, b) +enddef; +def slantedpath = xslantedpath enddef; +vardef yslantedpath (expr a, s) expr f = + f shifted (-a, 0) yslant s shifted (0, a) +enddef; +vardef xscaledpath (expr a, s) expr f = + f shifted (-a, 0) xscaled s shifted (a, 0) +enddef; +vardef yscaledpath (expr b, s) expr f = + f shifted (0, -b) yscaled s shifted (0, b) +enddef; +vardef shiftedpath (expr v) expr f = f shifted v enddef; +vardef reflectedpath (expr p, q) expr f = + f transformed vtr + reflectedabout (p transformed vtr, q transformed vtr) + transformed (inverse vtr) +enddef; +vardef xyswappedpath expr f = f xyswap enddef; +vardef transformedpath (text Transformer) expr f = + f Transformer +enddef; + +% \end{macrocode} +% +% \DescribeRoutine{partialpath} +% \DescribeRoutine{gsubpath} +% It seems odd, in retrospect, that we got by with a user interface that +% didn't include any subpath operations. But recently a user asked for the +% ability to add an arrowhead to the \emph{middle} of a path, and it +% seemed best to provide a subpath and use existing commands to add an +% arrowhead on its end. This macro takes two fractions $\alpha$ and +% $\beta$ between 0 and 1, and a path \gbc{f}, and returns the subpath +% from $\alpha * {} $\meta{length of \gbc{f}} to $\beta * {}$\meta{length +% of \gbc{f}} of \gbc{f}. \gbc{gsubpath} is the same as \MF's subpath +% primitive, but follows the prefix macro syntax of accepting a path +% expression (rather than a primary) and wrapping the result in a +% \mfc{vardef}. +% \begin{macrocode} +vardef partialpath (expr a, b) expr f = + save p; path p; + p := zconv (f) scaled (1/unit_of_length); + save cumlen, totlen, idx, ta, tb; + totlen := makelengtharray(cumlen) p; +% \end{macrocode} +% \gbc{idx} holds the current index into the array \gbc{cumlen[]}. The +% code of \gbc{gettime} is optimized for sorted lengths. If we always +% found \gbc{ta} first, we'd have to re-initialize \gbc{idx} in case +% \gbc{tb < ta}, i.e., search from the beginning again. +% \begin{macrocode} + idx := 0; + if a <= b: + ta := gettime (cumlen, idx) (a*totlen); + tb := gettime (cumlen, idx) (b*totlen); + else: + tb := gettime (cumlen, idx) (b*totlen); + ta := gettime (cumlen, idx) (a*totlen); + fi + subpath (ta, tb) of f +enddef; +vardef gsubpath (expr a, b) expr f = subpath (a, b) of f enddef; + +% \end{macrocode} +% +% +% \section{Picture level operations}\label{picture} +% +% None of these operations are available in \MP. Mostly these are used by +% higher level operations. Those higher level operations are available in +% \MP, but need to be defined differently. +% +% \subsection{Bitwise logical operations}\label{logical} +% +% We have two types of operations. One type is a binary operator that +% takes two picture expressions and returns a picture, the other type +% returns nothing, but merely modifies a given picture variable. These +% take the name of a picture and a picture expression and modify the named +% one. The binary operators are not used elsewhere in graphbase except +% for \gbc{picsub}, which occurs in \gbc{picneg} and \gbc{shadepic}. +% +% \DescribeRoutine{mono} +% Here we define the bitwise logical operations: and, or, xor, and +% difference. These mostly only work if all pixels have values 0 or 1. +% Since \MF{} allows other integer values, we define a \gbc{mono} operator +% that converts all pixels with weight ${}\ge 1$ to 1 and all pixels +% with weight ${}\le 0$ to 0. +% \begin{macrocode} +%<*MF> +def mono (suffix u) = cull u keeping (1, infinity); enddef; + +% \end{macrocode} +% \DescribeRoutine{andto} +% \DescribeRoutine{picand} +% The bitwise and: in the resulting picture, a pixel is \emph{on} if and +% only if it is \emph{on} in both \gbc{u} and \gbc{v}. +% \begin{macrocode} +def andto (suffix u) (expr v) = + mono (u); addto u also v; cull u keeping (2, 2); +enddef; +primarydef u picand v = + begingroup save t; picture t; + t := u; andto (t, v); t + endgroup +enddef; + +% \end{macrocode} +% \DescribeRoutine{orto} +% \DescribeRoutine{picor} +% The inclusive or: in the result, a pixel is \emph{on} if and only if it +% is \emph{on} in \gbc{u} or \gbc{v} or both. +% \begin{macrocode} +def orto (suffix u) (expr v) = + mono (u); addto u also v; cull u keeping (1, 2); +enddef; +primarydef u picor v = + begingroup save t; picture t; + t := u; orto (t, v); t + endgroup +enddef; + +% \end{macrocode} +% \DescribeRoutine{xorto} +% \DescribeRoutine{picxor} +% The exclusive or, also called the symmetric difference: +% in the result, a pixel is \emph{on} if and only if it is \emph{on} in +% \gbc{u} or \gbc{v}, but not both. These are not used elsewhere in +% \grafbase. +% \begin{macrocode} +def xorto (suffix u) (expr v) = + mono (u); addto u also v; cull u keeping (1, 1); +enddef; +primarydef u picxor v = + begingroup save t; picture t; + t := u; xorto (t, v); t + endgroup +enddef; + +% \end{macrocode} +% \DescribeRoutine{subto} +% \DescribeRoutine{picsub} +% The nonsymmetric difference: in the result, a pixel is \emph{on} if +% and only if it is \emph{on} in \gbc{u} and off in \gbc{v}. +% \begin{macrocode} +def subto (suffix u) (expr v) = + mono (u); addto u also -v; cull u keeping (1, 1); +enddef; +primarydef u picsub v = + begingroup save t; picture t; + t := u; mono (t); subto (t, v); t + endgroup +enddef; + +% +% \end{macrocode} +% +% \subsection{Producing and modifying pictures} +% +% Here we define some slightly higher level commands that make use (in \MF) +% of the previous bitmap operations. In \MP, they mostly need different +% definitions, but we have merged most of them by providing a \MP{} +% alternative for the most frequently used bitmap operation in the +% previous section, \gbc{orto}. These operations either return a picture +% or modify a picture variable. They do not draw anything unless +% \gbc{active_plane} is the modified picture. All curves, points, +% dimension, etc., are in device coordinates. +% +% \DescribeRoutine{coloraddto} +% This has become a useful abbreviation. In \MF{} it adds when the color +% is not white, subtracts when it is. Grays are handles in \MF{} by +% appropriate preparation of \gbc{u} and \gbc{v}. See, for example, the +% code of \gbc{colorsafefill}. In \MP{} it is an abbreviation for the +% basic \mfc{addto} operation, and is defined only so that \MP{} and \MF{} +% can share the same higher level code. +% \begin{macrocode} +def coloraddto (expr clr) (suffix u) (expr v) = +%<*MF> + if clr < white : + orto (u, v); + else: + subto (u) (v); + fi; +% +% addto u also v _wc_ clr; +enddef; + +%def orto (suffix u) (expr v) = addto u also v; enddef; +% +% \end{macrocode} +% +% \DescribeRoutine{interior} +% This takes the following expresion, \gbc{c}, which must be a +% closed path, and returns the picture expression which is that path +% filled. The cull command (\MF{} only) retains negative pixels +% (converting them to positive). This way, clockwise contours are filled +% also. \gbc{interior} is one of the most used commands throughout the +% rest of \grafbase. +% +% We ignore color (new behavior), since the higher level commands now +% implement the coloring operations. +% \begin{macrocode} +vardef interior expr c = + save v; picture v; v := nullpicture; + addto v contour (c.t_); +% cull v dropping (0, 0); + v +enddef; +% \end{macrocode} +% +% \DescribeRoutine{interiors} +% This is followed by the name of an array of closed paths and +% returns the picture of the interiors of those closed paths. It builds +% the returned picture from \mfc{nullpicture} by successively adding +% the result of \gbc{interior} applied to each path in the array. This is +% only used once by \grafbase, in \gbc{clipsto}, which might be a better +% place to put the \mfc{for}-loop and not use this at all. +% \begin{macrocode} +vardef interiors suffix cc = + save _ints; picture _ints; _ints := nullpicture; + for _idx = 1 upto cc: + addto _ints also interior cc[_idx]); + endfor +% mono (_ints); + _ints +enddef; + +% \end{macrocode} +% +% \subsection{Clipping}\label{basicclipping} +% +% \DescribeRoutine{clipto} +% \gbc{clipto} takes the name of a picture \gbc{vt} and a closed path +% \gbc{c} and modifies the picture leaving only the part inside the path. +% In \MP{} we just invoke the \mfc{clip} primitive. +% +% \DescribeRoutine{clipsto} +% This is similar, except it takes an array of paths \gbc{cc} and +% leaves what is interior to any of the paths. This is one case where +% \MP{} requires a substantially different point of view. In \MF, we +% create the interiors and `and' the result to the named picture. In \MP, +% we have to create the picture which is \gbc{vt} clipped to each separate +% path, and combine the results. \Grafbase{} only uses this in the +% \gbc{DoClip} command. +% \begin{macrocode} +def clipto (suffix vt) expr c = +% andto (vt, interior c); +% clip vt to c; +enddef; +def clipsto (suffix vt, cc) = +% andto (vt, interiors cc); +%<*MP> + begingroup + save _cl, _cl_; picture _cl, _cl_; _cl_ := nullpicture; + for _idx = 1 upto cc: + _cl := vt; clip _cl to cc[_idx]; addto _cl_ also _cl; + endfor + vt := _cl_; + endgroup +% +enddef; + +% \end{macrocode} +% +% \DescribeRoutine{Clipped} +% Here, rather than modify a given picture, \gbc{Clipped} is a vardef +% returning the picture which is the result of clipping the given picture +% to the path. +% +% Having found out that \mfc{clipped} is a \MP{} primitive, I've +% changed the name to the uppercase version, but keep the lowercase +% version for now (backward compatibility). We save the primitive +% meaning in \gbc{clipped_}. We also define \gbc{clip} in \MF{} for +% backward compatibility. +% \begin{macrocode} +vardef Clipped (suffix vt) expr c = + save _Cl; picture _Cl; _Cl := vt; clipto (_Cl) c; _Cl +enddef; +%let clipped_ = clipped; +def clipped = Clipped enddef; +%def clip = Clipped enddef; + +% \end{macrocode} +% +% \DescribeRoutine{picneg} +% The reverse video is easy in \MF, where \gbc{picneg} takes a picture +% name and a closed path, and returns the part of the picture inside the +% path, but with pixels reversed. In \MP{} we can only approximate this: +% we clip the given picture and add that (using color \gbc{background}) +% on top of the \gbc{interior} of the curve. This is not used elsewhere +% in \file{grafbase.mp} so it is not really important if \gbc{fillcolor} +% or \mfc{black} is the right choice. +% \begin{macrocode} +vardef picneg (suffix vt) expr c = +%<*MF> + mono (vt); + (interior c) picsub vt +% +%<*MP> + save _pn; picture _pn; _pn := nullpicture; + addto _pn (interior c) _wc_ fillcolor; + addto _pn also (Clipped (vt) c) _wc_ background; + _pn +% +enddef; + +% \end{macrocode} +% +% \DescribeRoutine{shpath} +% \gbc{shpath} does most of the work of drawing curves in \grafbase. It is +% called by \gbc{safedraw} which is used by almost all the commands that +% somehow draw a curve. It takes the name of a picture, a pen expression +% and a path expression. It draws the path on the picture with the pen. +% Since we use this (ultimately) for almost all drawing of paths, we +% automatically have the aspect ratio taken care of by the \mfc{.t_} +% macro. +% +% \DescribeRoutine{picpath} +% \gbc{picpath} accepts a path expression and returns a picture, which is +% either \gbc{nullpicture} (\gbc{penwd} too small) or the path drawn with +% \gbc{drawpen}. This is mostly how \gbc{shpath} gets used: curve drawing +% commands produce a picture with \gbc{picpath} and that gets used. +% +% \begin{macrocode} +def shpath (suffix v) (expr q, f) = + addto v doublepath (f.t_) withpen (q.t_); +enddef; + +numeric minpenwd; +%minpenwd := 1; % 1 pixel +%minpenwd := .05bp; % 1 pixel at 1440dpi +vardef picpath expr d = + save v; picture v; v := nullpicture; + if penwd >= minpenwd : + shpath (v, drawpen) (d); +% mono (v); + fi + v +enddef; + +% \end{macrocode} +% +% \DescribeRoutine{picdot} +% This places a specified picture expression (\gbc{w}) at a specified +% location (\gbc{p}) in a specified picture variable (\gbc{v}). It is used +% a number of places. It's \MF{} version takes care of the aspect ratio +% via \mfc{.t_}. This is how we draw points and symbols and dots along a +% curve: make the symbol into a picture \gbc{w} and add that picture with +% \gbc{picdot}. +% \begin{macrocode} +def picdot (suffix v) (expr w, p) = + addto v also +% (w shifted p); +% (w shifted hroundpair (p.t_)); +enddef; + +% \end{macrocode} +% +% \DescribeRoutine{setdot} +% \gbc{setdot} is named for its use rather than what it does. It takes a +% path and a scale (numeric expression) and returns a picture which is a +% drawing of the filled interior of the path (if it is a cycle) or the +% path itself (not a cycle). In \MF, we ensure that the scale is at least +% one pixel (assumes that the \gbc{apath} has dimension about 1 and +% \gbc{minpenwd} is 1). This usually assures that something is drawn. In +% \MP, \gbc{minpenwd} has the same purpose (though it is probably not +% necessary). This routine is used a number of times where dots are +% needed. Not in \gbc{shaded} (just below) but later in \gbc{shade}, an +% older command taking paths in graph coordinates. +% \begin{macrocode} +vardef setdot (expr apath, sc) = + if cycle apath : interior + else : picpath + fi +% (apath scaled emax(ceiling (sc), minpenwd)) +% (apath scaled emax(sc, minpenwd)) +enddef; + +% \end{macrocode} +% +% \DescribeRoutine{shadepic} +% We want to shade regions with a very regular pattern of black and white +% pixels for best appearance. Experiments show that symmetric dots +% (e.g., circles, squares) work better than non-symmetric (e.g., +% rectangular). Circular dots are not significantly better than square at +% the size needed. I believe that the default result of \gbc{shade} looks +% reasonably good on my system. (That happens to produce two 3-pixel by +% 3-pixel square dots in a 8-pixel square on a 360dpi printer.) So we try +% to produce something similar. That is, the shading picture is 1.6bp +% (8 pixels at 360dpi) square. +% +% As a compromise (symmetric dots look better, but rectangular dots give +% more gray levels) we allow dots to be $k\times (k+1)$-pixels (assuming +% the aspect ratio is 1) rectangles. This produces twice the number of +% gray levels. In my 360dpi example we get 15 gray levels. The two +% farthest apart (4 by 4 dots versus 3 by 4 dots) differ by 1/8 in +% fraction of area of coverage (which we equate to grayness). +% +% The parameter \gbc{dims} needs to be a pair variable, and it will be +% assigned the actual dimensions of the picture returned. These routines +% are complicated by the fact that we may have an aspect ratio unequal to +% $1$. When \mfc{aspect_ratio = 1} the basic concept is simple: make an +% $n\times n$ square with two dots, each nearly $k \times k$ and nearly +% square, where $2k^2/n^2$ is the gray level needed. +% +% First \gbc{dims} is equated to half the size needed, the dot is created +% (\gbc{_shp}) and then the dot is repeated and \gbc{dims} is doubled. +% Finally, for dark gray (gray levels less than .5) we calculate the shade +% picture for \gbc{1 - greylevel} and subtract it from a black square. +% \begin{macrocode} +%<*MF> +numeric shadepicsize; shadepicsize := 0.8bp; +vardef shadepic (suffix dims) (expr grparam) = + pair dims; + save _frac; _frac := 2*emin(grparam, 1 - grparam); + save _hp, _vp, _dotwd, _dotht; + if aspect_ratio < 1 : + _vp := emax (2, hround(shadepicsize.o_)); + _hp := hround (_vp._o_); + _dotwd := hround (_hp*sqrt _frac); + _dotht := if _dotwd = 0 : 0 + else: hround (_hp*_vp*_frac/_dotwd) + fi; + else: + _hp := emax (2, hround (shadepicsize)); + _vp := hround (_hp.o_); + _dotht := hround (_vp*sqrt _frac); + _dotwd := if _dotht = 0 : 0 + else: hround (_hp*_vp*_frac/_dotht) + fi; + fi + dims := ( _hp, _vp._o_ ); + save _shp; picture _shp; _shp := nullpicture; + addto _shp contour rect ((0,0), (_dotwd, _dotht)); + picdot (_shp, _shp, dims); + dims := 2dims; mono (_shp); + if grparam >= .5 : _shp + else : (interior (rect ((0,0), dims))) picsub _shp + fi +enddef; + +% +% \end{macrocode} +% +% \DescribeRoutine{shaded} +% This fills the interior of a contour (device coordinates) with copies of +% \gbc{shadepic}. The routine \gbc{filledwith} is defined later, but its +% name reflects its effect: a bounding rectangle (corners at \gbc{ll} and +% \gbc{ur}) is filled with copies of a picture (\gbc{shpic} in this case), +% the picture having nominal dimensions \gbc{shdims} in this case. +% +% It may seem odd that black and white return the same thing. That is +% because white is handled in the calling routine by subtracting the +% result. +% +% The \gbc{gbbox} command is defined in the next section. The bounding +% rectangle it obtains is only approximate in \MF{}, but that is +% sufficient, since we only use it to produce things that are eventually +% clipped. +% +% I am not sure why we return \gbc{picpath} for non-cycles, but I think +% I once thought to make \gbc{shaded} a replacement for setdot to get gray +% dots (in the \gbc{polkadot} routine). +% \begin{macrocode} +vardef shaded (expr clr) expr c = + if cycle c : +%<*MP> + save v; picture v; + v := nullpicture; + addto v contour c _wc_ clr; + v +% +%<*MF> + if (clr <= black) or (clr >= white) : + interior c + else: + save vsh, shpic, shdims, ll, ur; + picture vsh, shpic; pair shdims, ll, ur; + shpic := shadepic (shdims) (clr); + gbbox (c, ll, ur); + vsh := filledwith (shpic) (shdims, ll, ur); + Clipped (vsh) c + fi +% + else: picpath c % should we? or just make it null? + fi +enddef; + +% \end{macrocode} +% +% \DescribeRoutine{filledwith} +% This is one of the ways we obtain something other than a solid fill. The +% routines \gbc{polkadot}, \gbc{tess} and (in \MF) \gbc{shade} and +% \gbc{shaded} all use it. +% +% It takes a picture expression, along with its dimensions (the pair +% \gbc{dims}) in device coordinates, plus the opposite corners, \gbc{ll} +% and \gbc{ur}, of a boundingbox rectangle, and returns the picture which +% is that rectangle filled with copies of the picture. +% +% One might do this with two nested loops, but it turns out to be much +% (much!) faster to do two separate loops: the second one stacking the row +% built by the first loop. +% +% We try to do any rounding that might have been forgotten. This code +% takes a mode's aspect ratio into account so that (most) calling routines +% don't have to. (That is, \gbc{dims} should be measured in horizontal +% pixels, while \gbc{fwdims} is in actual pixels. I would have written +% this in terms of \gbc{picdot}, which already handles aspect, but it +% has got to be more efficient to do the aspect ratio calculations +% once rather than every time through the loop.) +% \begin{macrocode} +vardef filledwith (expr pic, dims, ll, ur) = + save b, v; picture b, v; + b := v := nullpicture; +%<*MF> + save fwdims, _ll, _ur; pair fwdims, _ll, _ur; + fwdims := hroundpair (dims.t_); + _ll := floorpair (ll.t_); + _ur := ur.t_; + for s = xpart _ll step xpart fwdims until xpart _ur: + addto b also pic shifted (s, 0); + endfor + for s = ypart _ll step ypart fwdims until ypart _ur: + addto v also b shifted (0, s); + endfor + mono (v); +% +%<*MP> + for s = xpart ll step xpart dims until xpart ur: + addto b also pic shifted (s, 0); + endfor + for s = ypart ll step ypart dims until ypart ur: + addto v also b shifted (0, s); + endfor +% + v +enddef; + +% \end{macrocode} +% +% \subsection{Hatching}\label{basichatching} +% +% \DescribeRoutine{thatchf} +% This is the all-purpose macro called by the other macros that +% fill a region with hatching. It takes the name of a picture \gbc{v}, +% a transform expression \gbc{CT}, a numeric expresion \gbc{sp} giving the +% space between hatch lines, and two pairs, \gbc{a} and \gbc{b}, +% that represent the lower left and upper right limits of a rectangle. +% The expression \gbc{sp} must be nonzero. The calling macros should take +% care of that. +% +% It modifies the picture by adding to it the rectangle full of +% hatching lines spaced \gbc{sp} apart. The rectangle is initially upright +% and the lines horizontal, but they are drawn transformed by the +% transform \gbc{CT}. This is how diagonal hatching is accomplished: the +% transform is a rotation. +% +% We guard against \gbc{ypart a} being greater than \gbc{ypart b} or +% \gbc{sp} being negative: \gbc{_sp} is \gbc{sp} modified to have the same +% sign as \gbc{ypart (b - a)}. Thus, repeatedly adding it to \gbc{ypart a} +% gets one to \gbc{ypart b}. We make the starting value an integer +% multiple of \gbc{_sp} to make sure adjacent regions don't have jarringly +% misaligned hatch lines. (I guess that's the reason; this algorithm +% predates me.) +% \begin{macrocode} +vardef thatchf (suffix v) (expr CT, sp, a, b) = + save _sp; + _sp = signof (ypart(b - a)) abs(sp); + for _y = _sp*( ceiling ((ypart a)/_sp) ) step _sp until ypart b: + shpath (v, hatchpen) + ( ( (xpart a, _y)--(xpart b, _y) ) transformed CT ); + endfor +% mono(v); +enddef; + +% \end{macrocode} +% +% \subsection{Tiles}\label{tiles} +% +% Tesselations are a generalization type of fill in which a rectangular +% pattern is repeated throughout a region. The rectangular pattern is +% called a tile. We provide here an environment in which the drawing commands +% add to a picture variable other than \mfc{currentpicture}. We do this +% very simply by redefining \gbc{active_plane}, localizing the +% redefinition between \gbc{tile} and \gbc{endtile} +% +% \DescribeRoutine{tile} +% \DescribeRoutine{endtile} +% \gbc{tile} accepts one suffix parameter, the name of the tile, followed +% by three numeric expressions and a boolean. \gbc{unit} should be a +% dimension in device units and is the unit of length for all high level +% drawing commands within the environment. \gbc{height} and \gbc{width} +% specify the size of the tile in multiples of \gbc{unit}, and +% \gbc{clipit} is a boolean that determines if the resulting picture is +% clipped to the rectangle these parameters determine. For example,\\ +% \indent \gbc{tile (fred)(1in, 1, 2, true)} \\ +% starts a tile named \gbc{fred} which will be 1 inch wide and 2 inches +% tall, and any marks that extend beyond this rectangle are clipped off. +% +% In \MF, the picture should be a whole number of pixels in size, so that +% the tiles fit perfectly together. The fact that shifts must be integer +% values is only mildly relevant, because the placement code does the +% rounding. +% +% For tesselation (filling with tiles), we need to know various properties +% of the tile so, in fact, a tile is a composite object consisting of a +% picture, \gbc{fred.pic} in our example (the actual tile), two numerics +% \gbc{fred.wd} and \gbc{fred.ht} (the device dimensions) and a boolean +% \gbc{fred.clipon}. +% \begin{macrocode} +def tile (suffix atile) (expr unit, width, height, clipit) = + picture atile.pic; atile.pic := nullpicture; + numeric atile.wd, atile.ht; +% (atile.wd, atile.ht) = round ((width, height)*unit); +% (atile.wd, atile.ht) = (width, height)*unit; + boolean atile.clipon; atile.clipon := clipit; + begingroup +% \end{macrocode} +% We simply do a subset of what we do in \gbc{beginmfpic}, redefining +% \gbc{active_plane} so that all drawing commands that add to it will +% contribute to the tile. +% \begin{macrocode} +% save active_plane; + save active_plane; + def active_plane = atile.pic enddef; + save ztr, vtr; transform ztr, vtr; + ztr := identity scaled unit; vtr := ztr; +% \end{macrocode} +% And if clipit is true we set the \gbc{ClipPath} to the bounding +% rectangle so that all commands that respect \gbc{ClipOn} will draw only +% inside the tile. And in case some don't, \gbc{endtile} clips it all +% anyway. +% \begin{macrocode} + save ClipOn; boolean ClipOn; + if clipit : + ClipOn := true; + save ClipPath; path ClipPath[]; + ClipPath = 1; + ClipPath[1] = rect(origin, (atile.wd, atile.ht)); + else: + ClipOn := false; + fi +enddef; +def endtile = + DoClip (active_plane); + endgroup +enddef; + +% \end{macrocode} +% +% \DescribeRoutine{is_tile} +% To test whether \gbc{atile} is really a tile, just see if all the +% components are defined and of the correct type. +% \begin{macrocode} +vardef is_tile (suffix atile) = + (known atile.pic ) and (picture atile.pic ) and + (known atile.wd ) and (numeric atile.wd ) and + (known atile.ht ) and (numeric atile.ht ) and + (known atile.clipon) and (boolean atile.clipon) +enddef; + +% \end{macrocode} +% +% \section{Bounding boxes of paths}\label{bboxes} +% +% To fill a region with other than a solid fill, we normally fill a +% rectangle with copies of a picture (or a path) and then clip to the +% boundary curve. In order not to place too many copies, we try to find a +% rectangle that is not too much larger than that region. For this we have +% the macro \gbc{gbbox} which takes a path expression and two pair +% variables, and sets the pairs to the lower left corner and upper right +% corner, respectively, of a rectangle enclosing the path. In \MF, this +% finds a rather loose box, the smallest rectangle containing all the +% control points and all the nodes of the path. Or rather it used to do +% that. Now we break the path into twice as many nodes and use the control +% points relative to that, which gives a tighter box. Both algorithms make +% use of the fact that the convex hull of the points and controls for a +% path segment contains the segment. +% +% The bounding box macros are used on paths in device coordinates, but +% there is no intrinsic reason that has to be so: they will return the +% bounding box in whatever coordinates the supplied path is in. +% +% We also have \gbc{tightbbox} and \gbc{tbbox} in \MF{} but these are no +% longer used so we'll omit them from \grafbase, but keep them in the +% documentation for now. +% +% \DescribeRoutine{tightbbox} +% Calculate tight bounding box points \gbc{ll} and \gbc{ur} for path +% \gbc{g}. The tight bounding box is accurate to the limits of the +% \mfc{solve} macro, which is the numeric \mfc{tolerance}, which we set to +% \mfc{.5} (pixel). This is only called by \gbc{tbbox}, which is never +% used. +% +% \DescribeRoutine{xlimit} +% \DescribeRoutine{ylimit} +% \gbc{xlimit(x)} returns a value of true if the path \gbc{g} doesn't +% cross the vertical line at \gbc{x}. \gbc{ylimit(y)} is the same for +% the horizontal line at \gbc{y}. +% \begin{macrocode} +%<*unused> +vardef tightbbox (expr g) (suffix ll, ur) = + % true iff horizontal at y does not intersect g: + vardef xlimit (expr x) = + (((x, -infinity)--(x, infinity)) intersectiontimes g) < origin + enddef; + % true iff vertical at x does not intersect g: + vardef ylimit (expr y) = + (((-infinity, y)--(infinity, y)) intersectiontimes g) < origin + enddef; + interim tolerance := .5; + ll := ( (solve xlimit (-infinity, xpart pnt 0 (g))), + (solve ylimit (-infinity, ypart pnt 0 (g))) ); + ur := ( (solve xlimit ( infinity, xpart pnt 0 (g))), + (solve ylimit ( infinity, ypart pnt 0 (g))) ); + if showbbox : + noclip ( safedraw rect (ll, ur) ); + fi +enddef; + +% \end{macrocode} +% +% \DescribeRoutine{tbbox} +% \gbc{tbbox} simply calls \gbc{tightbbox} on each of an array of paths +% and takes the maximum of all the upper right corners and the minimum of +% all the lowerleft. Same syntax as \gbc{tightbbox} except that, instead +% of a path parameter, \gbc{g} must be the name of an array of paths. +% +% This macro is never used elsewhere in \grafbase. Changed recently to +% use the new \gbc{pairmin} and \gbc{pairmax} macros. This avoids two +% \mfc{for} loops (which seem to be something of a \MF{} bottleneck). +% \begin{macrocode} +vardef tbbox (suffix g) (suffix ll, ur) = + save _gll, _gur; pair _gll, _gur; + tightbbox (g1, ll, ur); + for _idx = 2 upto g: + tightbbox (g[_idx], _gll, _gur); + ll := pairmin(ll, _gll); ur := pairmax(ll, _gur); + endfor + if showbbox : noclip ( safedraw rect (ll, ur) ); fi +enddef; +% +% \end{macrocode} +% +% \DescribeRoutine{gbbox} +% One can get a rather loose bounding rectangle by using the fact that +% each segment of a path (from \mfc{point j of g} to \mfc{point j+1 of g}) +% is contained in the convex set determined by all 4 control points for +% that segment. So we get a containing rectangle by getting the smallest +% and largest values of the x- and y-coordinates of all those points. We +% can get a considerably tighter fit if we cut each segment in half. +% +% \DescribeRoutine{ctrlsbbox} +% There is a difference between `\mfc{postcontrol j of (subpath (j,j+1/2) +% of p)}' and `\mfc{postcontrol j of p}'. To gain the tighter box we have +% to look at the former. \gbc{ctrlsbbox} just updates the previously found +% corners \gbc{ll} and \gbc{ur} of the bounding box based on the controls +% of the path segment \gbc{p}, and the calling routine \gbc{gbbox} passes +% it half a segment at a time. We don't actually examine both endpoints of +% the half-segment, only those that are nodes of the original path. The +% reason is that the subdivision points are already on the line segment +% connecting the controls of the subpaths on either side. We've given this +% potentially unlimited accuracy by allowing the number of subdivisions +% (\gbc{bbox_split}) to be arbitrary. We choose 2 for the default. +% +% This description applies only to \MF, because \MP{} has primitive +% facilities for determining the bounding box. +% +% \DescribeRoutine{pnt} +% \DescribeRoutine{pre} +% \DescribeRoutine{post} +% I got tired of typing long expressions like `\gbc{precontrol length p of p}', +% and now use the abbreviation `\gbc{pre[length p](p)}'. +% \begin{macrocode} +vardef pnt@# (expr p) = point @# of p enddef; +vardef pre@# (expr p) = precontrol @# of p enddef; +vardef post@# (expr p) = postcontrol @# of p enddef; + +vardef gbbox (expr g) (suffix ll, ur) = +% ll := llcorner g; ur := urcorner g; +%<*MF> + save _s; _s := emax(1, ceiling bbox_split); + ur := ll := pnt 0 (g); + if (length g) > 0 : + for _j = 1 upto length g: + ll := pairmin(ll, pnt[_j] (g)); ur := pairmax(ur, pnt[_j] (g)); + endfor + for _j = 1 upto _s*(length g): + ctrlsbbox (subpath ((_j-1)/_s, _j/_s) of g) (ll, ur); + endfor + fi +% + if showbbox : noclip ( safedraw rect (ll, ur) ); fi +enddef; + +%<*MF> +numeric bbox_split; bbox_split := 2; +def ctrlsbbox (expr p) (suffix ll, ur) = + ll := pairmin (ll, post0 (p)); ll := pairmin (ll, pre 1 (p)); + ur := pairmax (ur, post0 (p)); ur := pairmax (ur, pre 1 (p)); +enddef; + +% +% \end{macrocode} +% +% \section{Device coordinate rendering +% commands}\label{basicrendering} +% +% We use the word rendering to refer to commands that accept a path +% expression as one parameter and use it to modify the \gbc{active_plane}. +% All the commands in this section expect paths, pairs and dimensions in +% device coordinates. +% +% \subsection{Drawing}\label{basicdrawing} +% +% \DescribeRoutine{safedraw} +% \gbc{safedraw} accepts a path expression, and adds the result to +% \gbc{active_plane}. It is the first drawing command to draw +% exclusively on \gbc{active_plane}. This is the first of many uses of +% \gbc{coloraddto}. In \MP{} it is basically the primitive \mfc{addto +% ... also ... withcolor ...}, but in \MF{} it adds when the color is less +% than 1 (gray or black), otherwise it subtracts (white). +% +% \DescribeRoutine{colorsafedraw} +% \gbc{safedraw} merely calls colorsafedraw, which calls \gbc{picpath}, +% which calls \gbc{shpath}. One reason for this roundabout path +% is to support older files (\gbc{colorsafedraw} not defined). Another +% is that color handling in \MF{} requires a picture with pixels of +% weight 1 or 0 only (\gbc{picpath}). Moreover, \gbc{shpath} guarantees +% that the mode's aspect ratio is respected. +% \begin{macrocode} +def safedraw = colorsafedraw (drawcolor) enddef; +vardef colorsafedraw (expr clr) expr d = + save v; picture v; v := picpath d; + DoClip (v); + coloraddto (clr) (active_plane, v); +enddef; + +% \end{macrocode} +% +% \subsection{Filling}\label{basicfilling} +% +% \DescribeRoutine{NoCycleWarn} +% This is a common warning for all those commands that require a cycle +% (closed) path but an open path is supplied. In addition to the warning +% in those commands, we also call \gbc{safedraw} for debugging purposes. +% We make no attempt to color the path, but maybe we should. +% +% \DescribeRoutine{safefill} +% \DescribeRoutine{colorsafefill} +% \DescribeRoutine{safeunfill} +% These three take one parameter that is a path expression, and +% \gbc{colorsafefill} takes another that is a color. These commands fill +% (or unfill) it in the \gbc{active_plane}. In \MF, when the color is +% strictly between $0$ and 1, a gray fill is simulated with the +% \gbc{shaded} macro. +% +% To simulate the effect of painting over in gray, the \MF{} version +% clears the region before adding the shaded fill. +% +% \gbc{safeunfill} is just \gbc{safefill} with the color \mfc{background}. +% In \MF{}, when \gbc{background = white = 1}, this is detected by +% \gbc{coloraddto} which then subtracts the picture. +% \begin{macrocode} +def NoCycleWarn expr s = + GBmsg s & " cannot be applied to an open path. " + & "The path will be drawn instead."; +enddef; + +def safefill = colorsafefill (fillcolor) enddef; +vardef colorsafefill (expr clr) expr c = + if cycle c : + save v; picture v; v := interior c; + DoClip (v); +%<*MF> + if (clr > black) and (clr < white) : + subto (active_plane) (v); + v := nullpicture; + v := shaded (clr) c; + fi +% + coloraddto (clr) (active_plane, v); + else: NoCycleWarn "fill"; safedraw c; + fi +enddef; +def safeunfill expr c = + if cycle c : noclip (colorsafefill (background) c); + else: NoCycleWarn "unfill"; safedraw c; + fi +enddef; + +% \end{macrocode} +% +% \subsection{Clipping}\label{clipping} +% +% \DescribeRoutine{safeclip} +% This applies \gbc{clipto} to the active drawing plane. It follows the +% pattern started with \gbc{safefill} where commands that require a cycle +% will \gbc{safedraw} non-cyclic paths. +% \begin{macrocode} +def safeclip expr c = + if cycle c : clipto (active_plane) c; + else: NoCycleWarn "clip"; safedraw c; + fi +enddef; + +% \end{macrocode} +% +% \section{Rendering: the highest level commands}\label{rendering} +% +% \DescribeRoutine{store} +% Now we come to the highest level rendering operations. These are the +% commands written to the output file by \mfpic. They accept a path in +% \emph{graph} coordinates, convert it to device coordinates, rendering +% the result, and return the original path. This way one can render a +% path and pass it on to the preceding command for further processing. +% This is how \mfpic{} implements multiple prefix macros. However, this +% cannot be kept up because \MF{} abhors an isolated expression. Therefore +% we provide a command that accepts a path and doesn't pass it on. In +% theory, it could do nothing, but in \mfpic{} we store the path in +% \gbc{curpath}, making every \mfpic{} figure a path assigment command +% and the rendering is merely a side-effect. +% +% \DescribeRoutine{stored} +% The macro \gbc{stored} performs \gbc{store}, but passes the same path as +% its return value. This is used by \mfpic{} to implements the \cs{store} +% command, allowing it to also be a prefix macro +% +% I don't know if \gbc{store} needs to employ \mfc{hide()}, but it seems +% not to hurt. +% \begin{macrocode} +def store (suffix fs) expr f = +hide( + if (not path f) and (not pair f) : + GBerrmsg ("Second argument to `store' must be a path or pair") + ""; + fi + if not path fs : path fs; fi + fs := f +) +enddef; +vardef stored (suffix fs) expr f = store (fs) f; f enddef; + +% \end{macrocode} +% +% \subsection{Drawing}\label{drawing} +% +% \DescribeRoutine{drawn} +% \DescribeRoutine{colordrawn} +% \gbc{drawn} and \gbc{colordrawn} accept a path +% expression \gbc{f} and return the same. In between, \gbc{zconv(f)} is +% subjected to \gbc{colorsafedraw}. +% \begin{macrocode} +def drawn = colordrawn (drawcolor) enddef; +vardef colordrawn (expr clr) expr f = + colorsafedraw (clr) (zconv (f)); f +enddef; + +% \end{macrocode} +% +% \subsection{Filling, unfilling and clipping}\label{filling} +% +% \DescribeRoutine{filled} +% \DescribeRoutine{colorfilled} +% \DescribeRoutine{unfilled} +% \DescribeRoutine{Clip} +% These subject \gbc{zconv(f)} to \gbc{colorsafefill}, \gbc{safeunfill} or +% \gbc{safeclip}. The name \gbc{clip} (lowercase) is taken: it is a \MP{} +% primitive and an old \file{grafbase.mf} command we keep for compatibility. +% +% \begin{macrocode} +def filled = colorfilled (fillcolor) enddef; +vardef colorfilled (expr clr) expr c = + colorsafefill (clr) zconv (c); c +enddef; +vardef unfilled expr c = safeunfill zconv (c); c enddef; +vardef Clip expr c = safeclip zconv(c); c enddef; + +% \end{macrocode} +% +% \subsection{Shading}\label{shading} +% +% Shading is accomplished differently in \MP{} from \MF; however, many of +% the same parameters are used for compatibility (so that \MP{} can be run +% on a \file{.mf} created for \grafbase{} by \mfpic). In \MP, shading is +% just filling with some level of gray. In \MF, we place a pattern of +% small dots with the size and spacing adjustable. For compatibility, +% \MP{} accepts these size and spacing parameters, but simply uses them to +% calculate the darkness of gray. +% +% Ideally (i.e., for best appearance) one would shade with single pixels +% placed in a regular pattern. Unfortunately, this is the most memory +% intensive for \MF, which stores bitmaps by scanning each row of pixels, +% and records where changes from black to white occur. We do use simple +% dots, but make them quite a bit larger than one pixel. By default, +% \gbc{0.5bp} in diameter, spaced (in \mfpic) a default \gbc{1pt} between +% centers. +% +% \DescribeRoutine{shade} +% This is the old \gbc{shade} macro, filling a contour with small dots. +% The shape and size of the dot used can be selected by defining +% \gbc{shadedotpath} and \gbc{shadewd}. +% +% A closed path representing the boundary of one dot of unit size, +% \gbc{shadedotpath} is initialized to a circle. +% +% The parameter \gbc{sp} is the distance between the centers of the dots in +% device coordinates, and \gbc{f} is the path to be filled in \emph{graph +% coordinates}. +% +% As usual, if the path is not closed, we draw the curve instead. If the +% spacing is too small relative to \gbc{shadewd}, we fill the curve. Otherwise the \gbc{filledwith} macro is used to fill with copies of +% a dot picture. For speed, it actually fills with a two-dot picture. +% \begin{macrocode} +numeric shadewd; shadewd := 0.5bp; +path shadedotpath; +shadedotpath := fullcircle; % unitsquare; + +vardef shade (expr sp) expr f = + save g; path g; g := zconv (f); +% \end{macrocode} +% It seems clear that the gray level (\gbc{gr}) should depend +% quadratically on \gbc{shadewd/sp}. Also, there is a point where the +% result is essentially black and a fill would be more efficient. +% The value .88 is arrived at empirically and is a compromise so that +% \MF{} and \MP{} produce similar levels of gray on both printers available +% to me. Theoretically, no white will appear when +% \gbc{sqrt(2)*shadewd/sp >= 1} +% \begin{macrocode} + save gr; numeric gr; + gr := 1 - (.88*abs(shadewd)/sp)**2; + if not cycle g : NoCycleWarn "shade"; safedraw g; + elseif gr <= 0 : safefill g; + else: +%<*MF> + save ll, ur; pair ll, ur; + gbbox (g, ll, ur); + ll := floorpair (ll); +% \end{macrocode} +% +% What we do is draw a row of dots and stack the rows to fill a rectangle. +% We call \gbc{filledwith} to draw these copies. To save a little memory +% we do this twice with half the dots each time. The second set +% interleaves the first and is staggered from the first by half the +% horizontal spacing. I wonder which which uses less memory, rendering +% \gbc{v} unknown with \mfc{picture v}, or null with \mfc{v := nullpicture}? +% +% Shifts of pictures need to be by integer number of pixels, but this is +% ensured by \gbc{filledwith}, using \mfc{ceiling} to define \gbc{dx} is +% more to ensure it is not rounded down to 0. +% \begin{macrocode} + save sh, v; picture sh, v; + save dx; dx := ceiling(sp/(sqrt 2)); + sh := setdot (shadedotpath, abs(shadewd)); + v := filledwith (sh, 2(dx, dx), ll, ur); + DoClip(v); + orto (active_plane, Clipped (v) g); + sh := sh shifted hroundpair ((dx, dx).t_); + v := nullpicture; + v := filledwith (sh, 2(dx, dx), ll, ur); + DoClip(v); + orto (active_plane, Clipped (v) g); +% +% \end{macrocode} +% In \MP{} we just fill with gray. The gray level having been calculated +% at the beginning. +% \begin{macrocode} +%<*MP> + colorsafefill (gr*white) g; +% + fi + f +enddef; + +% \end{macrocode} +% +% \DescribeRoutine{polkadot} +% The macro \gbc{polkadot} is intended to fill a region with \emph{large} +% dots. The diameter, \gbc{polkadotwd}, is initialized to \mfc{5bp}. The +% code is similar to that of \gbc{shade}, but here we attempt a hexagonal +% array: each dot surrounded by 6 equally spaced dots. Because of their +% larger size and presumably larger spacing, we can be a little less +% efficient and so we aim for improved visual appearance. We do what we +% can to avoid unsightly slivers of partial dots, and only draw a dot if +% its center lies in the bounding box. +% +% We also permit the circles to overlap, and only replace the code with a +% fill if the dots overlap so much that no background can show (this assumes +% that \gbc{polkadotpath} is a circle). +% +% If the space \gbc{sp} and \gbc{polkadotwd} are too small, there will +% be a great many tiny dots. It is quite easy to overflow \MP{} capacity +% and the dots are really ugly. In \MF, we already have \gbc{shade} to +% place tiny dots. Therefore, we merely fill if \gbc{sp} is less that a +% certain minimum, even if that minimum is greater than \gbc{polkadotwd}. +% \begin{macrocode} +polkadotwd := 5bp; +mindotspace := 1bp; +path polkadotpath; polkadotpath := fullcircle; + +vardef polkadot (expr sp) expr f = + save g; path g; g := zconv (f); + if not cycle g : NoCycleWarn "polkadot"; safedraw g; + elseif sp <= emax (2*polkadotwd/3, mindotspace) : + safefill g; + else: + save ll, ur; pair ll, ur; + gbbox (g, ll, ur); +% \end{macrocode} +% As with \gbc{shade}, we shift alternate rows by half the spacing between +% dot centers, \gbc{dx}. The vertical shift \gbc{dy} is slightly larger +% (relatively speaking) and the horizontal smaller. We also apply a +% horizontal and vertical shift to avoid small pieces of dots. What it does +% is take only those dots whose centers lie in the bounding box, and center +% the whole array relative to that box. +% \begin{macrocode} + save dx, dy; dx := sp/2; dy := dx*(sqrt 3); + hshift := ((xpart (ur - ll)) mod dx)/2; + vshift := ((ypart (ur - ll)) mod dy)/2; +% \end{macrocode} +% Here, \gbc{p} is the center of the first dot in the lower left corner. +% \begin{macrocode} + save p, dims; pair p, dims; + p := ll + (hshift, vshift); + dims := 2(dx, dy); +% \end{macrocode} +% The extra \MF{} code is to clear what's under the dots in case they +% are gray dots. And then to `gray' the dots when fillcolor demands it. +% \begin{macrocode} + save v, thepolkadot; picture v, thepolkadot; + thepolkadot := setdot (polkadotpath, polkadotwd); + v := filledwith (thepolkadot, dims, p, ur); + p := p + (dx, dy); + orto (v, filledwith (thepolkadot, dims, p, ur)); + DoClip (v); clipto (v) g; +%<*MF> + if (fillcolor > black) and (fillcolor < white): % gray + subto (active_plane) (v); + thepolkadot := + shaded (fillcolor) polkadotpath scaled ceiling(polkadotwd); + v := filledwith (thepolkadot, dims, p, ur); + p := p - (dx, dy); + orto (v, filledwith (thepolkadot, dims, p, ur)); + DoClip (v); clipto (v) g; + fi +% + coloraddto (fillcolor) (active_plane) (v); + fi + f +enddef; + +% \end{macrocode} +% +% \subsection{Hatching}\label{hatching} +% +% \DescribeRoutine{thatch} +% \DescribeRoutine{colorthatch} +% Hatch interior of path \gbc{f} (graph coordinates) with lines at angle +% \gbc{theta}, spaced \gbc{sp} apart (device coordinates). As usual an +% unclosed path is simply drawn. The thickness of the lines is determined +% by \gbc{hatchwd}. If \gbc{sp} is not greater than \gbc{abs(hatchwd)}, we +% simply fill. This will ensure \gbc{thatchf} is called only for positive +% \gbc{sp}. +% +% We find the bounding box of the backward rotated path, so when that box +% is filled with lines and rotated, it will cover the path. After calling +% \gbc{thatchf} we add the picture, clipped to the path. +% \begin{macrocode} +def thatch = colorthatch (hatchcolor) enddef; +vardef colorthatch (expr clr) (expr sp, theta) expr f = + save g; path g; g := zconv (f); + if not cycle g : NoCycleWarn "hatch"; safedraw g; + elseif sp <= abs(hatchwd) : colorsafefill (clr) g; + else: + save v; picture v; v := nullpicture; + save CT; transform CT; CT := identity rotated theta; + save ll, ur; pair ll, ur; + gbbox (g transformed inverse CT, ll, ur); + thatchf (v, CT, sp, ll, ur); + DoClip(v); + coloraddto (clr) (active_plane) (Clipped (v) g); + fi + f +enddef; + +% \end{macrocode} +% +% \DescribeRoutine{hhatch} +% \DescribeRoutine{vhatch} +% \DescribeRoutine{lhatch} +% \DescribeRoutine{rhatch} +% \DescribeRoutine{xhatch} +% We offer some special cases, calling \gbc{thatch} with different angles. +% These take only the spacing (in device coordinates) and a path +% expression (in graph coordinates) as parameters. \gbc{hhatch} has angle +% 0 and so produces horizontal lines; \gbc{vhatch} produces vertical +% lines; \gbc{lhatch} produces lines tilted to the left (running from +% upper left to lower right), and \gbc{rhatch} produces lines running from +% lower left to upper right. \gbc{xhatch} produces cross-hatching, and +% essentially runss \gbc{lhatch} and \gbc{rhatch}. +% +% Color is a parameter only for \gbc{colorxhatch}. The reason for that +% is to make code written by \mfpic{} simpler. The \mfpic{} commands for +% the others actual write calls to \gbc{thatch} or \gbc{colorthatch}. +% +% \begin{macrocode} +def hhatch (expr sp) = thatch (sp, 0) enddef; +def vhatch (expr sp) = thatch (sp, 90) enddef; +def lhatch (expr sp) = thatch (sp, -45) enddef; +def rhatch (expr sp) = thatch (sp, 45) enddef; + +def xhatch = colorxhatch (hatchcolor) enddef; +vardef colorxhatch (expr clr, sp) expr f = + colorthatch (clr) (sp, 45) colorthatch (clr) (sp, -45) f +enddef; + +% \end{macrocode} +% +% \subsection{Tesselations}\label{tess} +% +% \DescribeRoutine{tess} +% Tesselation of interior of closed path is filling with copies of a tile +% (see subsection~\ref{tiles}). The path is in graph units, the tile is a +% suffix parameter and is the name of a previously defined tile. In fact, +% one can create the picture any way one likes (it doesn't have to be with +% the \gbc{tile} environment). Thus \gbc{tess (fred) f;} will work as long +% as \gbc{fred.pic} is a picture \gbc{fred.wd} is its width, etc. +% \begin{macrocode} +vardef tess (suffix atile) expr c = + save _g; path _g; _g := zconv (c); + if not is_tile (atile) : + GBerrmsg ("Tile parameter " & str atile & " of tess() is invalid") + "This tile may be undefined or incorrectly defined. " & + "If you proceed, tess() will be abandoned and the curve " & + "merely drawn."; safedraw _g; + elseif not cycle _g : NoCycleWarn "tess"; safedraw _g; + else: + save _ll, _ur; pair _ll, _ur; + gbbox (_g, _ll, _ur); + save _ts; picture _ts; + _ts := filledwith (atile.pic, (atile.wd, atile.ht), _ll, _ur); + DoClip (_ts); + orto (active_plane, Clipped (_ts) _g); + fi + c +enddef; + +% \end{macrocode} +% +% \subsection{Dots and Dashes}\label{dashes} +% +% \MP{} has some builtin commands for drawing a dashed or dotted curve, +% but \MF{} does not. Considerable effort went into making this possible +% (before \MP{} even existed). The code is reasonably fast and the result +% is actually better quality than the builtin commands of \MP{} so we use +% the same code in both versions. The \grafbase{} dashing code is designed +% to produce a whole number of dashes on any curve to which it is applied, +% and (usually) to begin and end with half a dash (so that when dashed +% curves abut the result looks decent). The built-in facilities do neither +% of these. In addition, the dotting code is flexible enough that copies +% of any picture (not just a circular dot) can be used to trace a path. +% +% The general command is \gbc{gendashed} which takes a suffix parameter +% (the name of a \emph{dashing pattern}, see below) and a path expression +% in graph coordinates. +% +% A dashing pattern \gbc{pat} consists of three arrays, \gbc{pat.start}, +% which is used to draw the beginning of the path (half a dash in the +% default \gbc{dashed} command), \gbc{pat.finish}, which is used to draw +% the other end, and \gbc{pat.rep}, which is the repeating pattern for +% drawing the rest of the curve. Each of these is an \emph{array} of +% numerics. These should be lengths, in device units, and represent the +% lengths of dashes and spaces. +% +% We start with some variables and their defaults, some of which are no +% longer used. \gbc{segment_split} is used in the code for finding the +% approximate length of a curve. This is needed so that adjustments +% can be made so that a whole number of repeated patterns are used. +% \gbc{dashsize} and \gbc{dashgap} are no longer used. Originally they +% gave the lengths of default dashes and the spaces in between. +% \gbc{dash_start} and \gbc{dash_finish} are the fractions of a dash +% length that are used at the start and finish if the command +% \gbc{dashpat} is used to create the dashing pattern. +% +% And \gbc{unit_of_length} is used to adjust numbers downward and avoid +% arithmetic overflow. For a 1200dpi \MF{} mode, a curve 4 inches long +% will be over \mfc{infinity} pixels in length, but only 40 deci-inches. +% Our default for this variable is just that: 1/10 inch. +% \begin{macrocode} +if unknown segment_split : segment_split := 8; fi +if unknown dashsize : dashsize := 3bp; fi +if unknown dashgap : dashgap := dashsize + 2penwd; fi +if unknown dash_finish : dash_finish := .5; fi +if unknown dash_start : dash_start := .5; fi +if unknown unit_of_length : unit_of_length := 0.1in; fi + +% \end{macrocode} +% +% \DescribeRoutine{gendashed} +% The main idea is to have a list of lengths represent the repeating +% pattern of dashes and dots. These lengths represent a dash length, +% followed by a gap length, etc., so there are an even number. To start +% dashing a path, we normally take a fraction (\gbc{dash_start}) of the +% first dash, then the rest of the pattern. We continue by repeating the +% pattern as many times as will fit, then we finish off with a fraction +% (\gbc{dash_finish}) of the first dash. A dash of length 0 is a dot. A +% gap of length 0 is OK, but useless unless it's between a dot and a dash, +% and you arrange for the dot's size to be different from \gbc{penwd}. +% +% We generalize this so that \gbc{pat.start} and \gbc{pat.finish} can be +% any patterns, not necessarily related to \gbc{pat.rep}. Also "dots" can be +% symbols like \gbc{Triangle}. We also supply (later) the \gbc{dashpat} +% command which takes a list of lengths, equates \gbc{pat.rep} to them, +% and generates \gbc{pat.start} and \gbc{pat.finish} according to the +% description above. +% \begin{macrocode} +vardef gendashed (suffix pat) expr f = + save _g; path _g; _g := zconv(f); + if (unknown pat.rep) : % no "pattern" + GBmsg "Dash pattern " & str pat & " undefined. " & + "Path will be drawn instead."; + safedraw _g; + elseif pat.rep < 2 : % no "spaces" + safedraw _g; + else: +% \end{macrocode} +% We want to manipulate the values of \gbc{pat} so that a whole number of +% repetitions are used. So we copy \gbc{pat} to \gbc{_tmppat}. +% +% After this loop, \gbc{_dl.s} is the total length of the corresponding +% \gbc{pat.s} in multiples of \gbc{unit_of_length}, and \gbc{_tmppat.s[i]} +% is \gbc{pat.s[i]} converted to these units. +% \begin{macrocode} + save _dl, _tmppat; + forsuffixes _s = start, rep, finish : + _dl._s := 0; _tmppat._s := pat._s; + for i = 1 upto pat._s : + _tmppat._s[i] := pat._s[i]/unit_of_length; + _dl._s := _dl._s + _tmppat._s[i]; + endfor + endfor + if _dl.rep = 0 : + GBmsg "Dash pattern " & str pat & " has length 0. " & + "Path will be drawn instead."; + safedraw _g; + else: +% \end{macrocode} +% Here \gbc{_g} is our path in device units, but we convert that to our +% unit of length to avoid having paths of length \gbc{infinity}. +% +% This is how we process a path mathematically: let $f(t)$, $0 \le t \le +% k$ be the formula for the path \gbc{f}, $k$ being the number of segments +% of \gbc{f}, we consider the polygon connecting the points $f(0), f(1/8), +% f(2/8),\ldots,f(k)$ and compute the length of \emph{that} path (assuming +% \gbc{segment_split = 8}). Actually, we compute and save the cumulative +% lengths at each vertex of this polygon, since we use that later to +% determine ``when'' (i.e., at what values of $t$) to place a dot or draw +% a dash. The command \gbc{makelengtharray} does this, storing the +% cumulative lengths in the array \gbc{_cumlen} and returning the total +% length. +% \begin{macrocode} + save _p; path _p; + _p := _g scaled (1/unit_of_length); + save _cumlen, _totlen, _n, _sf; + _totlen := makelengtharray(_cumlen) _p; +% \end{macrocode} +% Now we scale the dashes so that a whole number of patterns make up +% the lengths of the approximating polygon. \gbc{scale_adjust} returns +% the scaling factor, equates \gbc{_n} to the total number of +% \gbc{pat.rep} to use. If the path length is already less than the length +% of the start and finish patterns, this is equated to $-1$ as a flag to +% draw the path instead. (recall \gbc{_dl.s} holds the length of part +% \gbc{s}). +% +% After this we rescale the dashes and spaces stored in \gbc{_tmppat}, and +% the length of the patterns in \gbc{_dl}. +% \begin{macrocode} + _sf := scale_adjust (_n, _dl)(_totlen); + if _n < 0 : safedraw _g; + else: + forsuffixes _s = start, rep, finish : + for _i = 1 upto _tmppat._s : + _tmppat._s[_i] := _tmppat._s[_i]*_sf; + endfor + _dl._s := _dl._s*_sf; + endfor +% \end{macrocode} +% The user has the capability to use something other than a small disk for +% a dot by defining \gbc{plot_pic}. The utility \gbc{makesymbol} is +% defined later. It examines \gbc{plot_pic} and makes a picture depending +% on what type of variable it is. The default \gbc{dotpath} is +% \mfc{fullcircle}, but user may also change that to get different dots. +% \gbc{makesymbol} scales by \gbc{penwd} \emph{only if the first +% parameter is a path}. This is how to increase the dot size (the code in +% \gbc{plot} uses this.) +% \begin{macrocode} + save dashingdot; picture dashingdot; + if known plot_pic : dashingdot := makesymbol(plot_pic, penwd); + else: dashingdot := makesymbol(dotpath, penwd); + fi +% \end{macrocode} +% The macro \gbc{dashit} draws the dashes, computing where they go and +% drawing the appropriate subpaths of \gbc{_g} or placing a dot at the +% appropriate point. \gbc{dashit} returns nothing and assumes all the +% information accumulated so far, so it can only be called by +% \gbc{gendashed}. +% +% \gbc{_t} and \gbc{_d} are temporary variables used by +% \gbc{dashit}, but we declare them here since we initialize them +% differently for each call. \gbc{_d0} and \gbc{_d1} hold the +% position along the curve of the ends of a dash in distance from the +% start; \gbc{_t0} and \gbc{_t1} are the same, but in terms of time. +% A macro \gbc{gettime} converts the first to the second. It uses the +% cumulative length array \gbc{_cumlen} for this, and maintains +% \gbc{_ct} as the current index into that array. The parameters to +% \gbc{dashit} are the name of the part of the dashing pattern that is being +% drawn, and a temporary picture variable. The latter holds the picture +% until \gbc{DoClip} can process it, then it is added to \gbc{active_plane}. +% The code of \gbc{dashit} leaves \gbc{_d0} pointing to the current +% position on the curve, but for safety and to reduce accumulated +% round-off error, we initialize it to what it should be before each call. +% \begin{macrocode} + save _ct, _t, _d, _v; + picture _v; _v := nullpicture; + _ct := 0; + % Begin with pat.start + _d0 := 0; _t0 := 0; + dashit (_tmppat.start) (_v); +% \end{macrocode} +% The repeating pattern has the tendency to use lots of memory. Previously +% I added all the dashes to \gbc{_v} and then added it all at once to +% \gbc{active_plane}. The purpose was to be able to \gbc{DoClip} it once, +% and add it once with \gbc{coloraddto} to get it drawn in color under \MF. +% This was simplest, but a memory hog requiring $O(n)$ in memory, where +% $n$ is the number of repeated patterns. Then we tried clipping and adding +% within \gbc{dashit}. This was terribly slow, requiring $O(n)$ in time. +% Now I'm going to try a standard programming trick: accumulate $m < n$ +% repetitions before adding them, the memory should be $O(m)$ and the +% time $O(n/m)$. As a first try, we make $m$ about $\sqrt n$. +% \begin{macrocode} + % then pat.rep + if _n > 0 : + save _m; _m := ceiling sqrt(_n); + for _j = 0 step _m until _n - 1 : + for _i = 0 upto _m - 1 : + exitif (_i + _j) > _n - 1; + _d0 := _dl.start + (_j + _i)*_dl.rep; + _t0 := gettime(_cumlen, _ct) (_d0); + dashit (_tmppat.rep) (_v); + endfor + % add _m patterns and reset. + DoClip(_v); +% mono (_v) + coloraddto (drawcolor) (active_plane, _v); + _v := nullpicture; + endfor + fi + % and finally, pat.finish + _d0 := _totlen - _dl.finish; + _t0 := gettime(_cumlen, _ct) (_d0); + dashit (_tmppat.finish) (_v); + DoClip(_v); +% mono(_v) + coloraddto (drawcolor) (active_plane, _v); + fi + fi + fi + f +enddef; + +% \end{macrocode} +% +% \DescribeRoutine{makelengtharray} +% This takes an array name and a path expression (any coordinates), +% computes the array of partial lengths (of the polygon approximation), +% and returns the total length. +% \begin{macrocode} +vardef makelengtharray (suffix clen) expr p = + save _s; _s := emax (1, ceiling segment_split); + clen := _s*length p; clen[0] := 0; + for _i = 1 upto clen : + clen[_i] := clen[_i-1] + abs (pnt[_i/_s] (p) - pnt[(_i-1)/_s] (p)); + endfor + clen[clen] +enddef; + +% \end{macrocode} +% +% \DescribeRoutine{scale_adjust} +% Here \gbc{n} is a suffix defined by the calling routine, +% \gbc{pl.\{start\|ref\|finish\}} are the lengths of corresponding parts +% of a dashing pattern, \gbc{lngth} is the length of some path (determined +% by the calling routine). It determines how many times \gbc{pl.rep} goes +% into \gbc{lngth - pl.start - pl.finish}. If this is negative it remains +% negative, otherwise it is rounded. \gbc{scale_adjust} then determines +% and returns the scaling factor \gbc{sf} required to make +% \gbc{sf*(pl.start + n*pl.rep + pl.finish)} equal to \gbc{lngth}. +% \begin{macrocode} +vardef scale_adjust (suffix n, pl) (expr lngth) = + n := (lngth - pl.start - pl.finish)/pl.rep; + n := if n < 0 : -1 else: round(n) fi; + lngth/(pl.start + emax(n, 0)*pl.rep + pl.finish) +enddef; + +% \end{macrocode} +% +% \DescribeRoutine{gettime} +% \gbc{arr} is an increasing array of lengths, defined by the calling +% routine. \gbc{ct} is current index into that array; it will vary with +% subsequent calls. Calling routine initializes it before the first call, +% \gbc{gettime} updates it. \gbc{lngth} is a length interpreted as the +% length along the path associated to the array. +% +% Since this array is generated by splitting the segments of the path at +% times \gbc{i/segment_split} we first determine in which of these splits +% the given distance is (i.e., find \gbc{ct} so that \gbc{lngth} lies +% between \gbc{arr[ct-1]} and \gbc{arr[ct]}). To avoid problems with +% round-off error, bad length parameter, etc., we force \gbc{lngth} to +% satisfy this for some index between the current value of \gbc{ct} and +% \gbc{arr} inclusive. +% +% Once we know what segment we are in, we determine the time by linear +% interpolation between the times corresponding to \gbc{ct} and +% \gbc{ct+1}. +% \begin{macrocode} +vardef gettime (suffix arr, ct) (expr lngth) = + save _gtl, _s; + _s := emax(1, ceiling segment_split); + _gtl := emax (arr[ct], emin (arr[arr], lngth)); + forever: + exitif ( (arr[ct] <= _gtl) and (_gtl <= arr[ct+1]) ); + ct := ct + 1; % need to exit *before* incrementing + endfor + if arr[ct] = arr[ct+1] : ct + else: ( ct + (_gtl - arr[ct]) / (arr[ct+1] - arr[ct]) ) + fi /_s +enddef; + +% \end{macrocode} +% +% \DescribeRoutine{dashit} +% No variables are saved or initialized; \gbc{gendashed} defines array +% \gbc{_cumlen}, path \gbc{_g}, and initializes \gbc{_d0}, +% \gbc{_t0} and \gbc{_ct}. +% +% \gbc{pos} is one of the dashpattern arrays, so it consists of numerics +% interpreted as lengths of dashes (odd index) and spaces (even index). In +% the first case \gbc{_d0} and \gbc{_t0} will already be pointing to +% the beginning of the dash and we get to the end of the dash by adding +% the length of a dash (\gbc{pos[_j]}) to \gbc{_d0} (getting +% \gbc{_d1}) and calling \gbc{gettime} (getting \gbc{_t1}). We draw +% the subpath between thos points. Unless \gbc{pos[_j] = 0}, in which case +% a dot is placed. +% +% For even \gbc{j} (a space) we are at \gbc{_d1} and \gbc{_t1} and +% we increment them to get \gbc{_d0} and \gbc{_t0} for the next +% iteration. +% \begin{macrocode} +def dashit (suffix pos) (suffix pic) = + for _k = 1 upto pos: + if odd _k : % draw a dash of length pos[_k] + if pos[_k] = 0 : % point required + _d1 := _d0; _t1 := _t0; + picdot (pic, dashingdot, pnt [_t0] (_g)); + else: + _d1 := _d0 + pos[_k]; + _t1 := gettime (_cumlen, _ct) (_d1); + shpath (pic, drawpen) (subpath (_t0, _t1) of _g); + fi + else: % find the start of the next dash: + _d0 := _d1 + pos[_k]; + _t0 := gettime(_cumlen, _ct) (_d0); + fi + endfor +enddef; + +% \end{macrocode} +% +% \DescribeRoutine{dashpat} +% This is a utility to convert a text list of lengths to the three dash +% pattern arrays required by \gbc{gendashed}. We first simply copy the +% list to array \gbc{pat.rep}. If the number is odd we add a 0-length +% item (a nonspacing space). Unless the number is 1, which we use as a +% signal that a curve should be solid and not dashed at all. +% +% \gbc{pat.start} is the same as \gbc{pat.rep} except the first dash is +% reduced by the factor \gbc{dash_start}. \gbc{pat.finish} is just the +% first dash of \gbc{pat.rep} reduced by the factor \gbc{dash_finish}. +% \begin{macrocode} +def dashpat (suffix pat) (text t) = + pat.rep := 0; + for _itm = t: + pat.rep[incr pat.rep] := _itm; + endfor; + if odd (pat.rep) and (pat.rep > 1): + pat.rep[incr pat.rep] := 0; + fi + pat.start := 1; + pat.start[1] := pat.rep[1]*dash_start; + for _idx = 2 upto pat.rep : + pat.start[incr pat.start] := pat.rep[_idx]; + endfor + pat.finish := 1; + pat.finish[1] := pat.rep[1]*dash_finish; +enddef; + +% \end{macrocode} +% +% \DescribeRoutine{dashed} +% \DescribeRoutine{DASHED} +% The old \gbc{dashed} is now implemented by making a dashpattern from the +% two arguments and calling gendashed. When \MP{} support was added, I +% thought it best not to overwrite the \MP{} primitive \gbc{dashed} and +% the command was named \gbc{DASHED}, but then later it seemed better to +% keep \MF/\MP{} compatibility so \gbc{dashed} was used. Now for backward +% compatibility we maintain both. In \MP, we save the primitive +% \mfc{dashed} as \gbc{dashed_}. +% +% \gbc{dashed} takes parameters which are the length and the space (device +% coordinates) and a path (graph coordinates). It returns the path. +% \begin{macrocode} +vardef DASHED (expr dlen, dgap) expr f = + save dashes; dashpat (dashes) (dlen, dgap); + gendashed (dashes) f +enddef; + +%let dashed_ = dashed; +def dashed = DASHED enddef; + +% \end{macrocode} +% +% \DescribeRoutine{doplot} +% \gbc{doplot} places symbols at positions along a path determined by +% \gbc{dgap} (space between symbols), they are scaled by \gbc{sc} and the +% actual symbol is \gbc{spath}. Currently this may be one of three things: +% \begin{enumerate} +% \item A path, giving the shape of the dot, which should be defined in +% units so that the desired size is obtained under scaling by +% \gbc{sc}. Normally this means one unit across. +% \item A picture. This is used unscaled, it being presumed that it has +% been prepared by a user to the correct size. +% \item (\MP{} only) a string. +% \end{enumerate} +% All these are converted to a picture by the \gbc{makesymbol} command and +% it is assigned to \gbc{plot_pic}, which \gbc{gendashed} has been +% trained to use when dots are needed. +% +% After this \gbc{gendashed} is called with a pattern where the dashes are +% 0 length, signalling that dots are used. \gbc{dotted} is implemented by +% calling \gbc{doplot} with \gbc{dotpath} the symbol. +% \begin{macrocode} +vardef doplot (expr spath, sc, dgap) expr f = + save dots; dashpat (dots) (0, dgap); + save plot_pic; picture plot_pic; + plot_pic := makesymbol (spath, sc); + gendashed (dots) f +enddef; + +path dotpath; dotpath := fullcircle; +vardef dotted (expr dsize, dgap) expr f = + doplot (dotpath, dsize, dgap) f +enddef; + +% \end{macrocode} +% +% \DescribeRoutine{plotnodes} +% This is a useful little utility to draw the points on top of the +% curve through them. It differs from \gbc{plotsymbol} (defined later) in +% that it takes a path parameter (rather than a list of points) and +% returns that path (so it works with \mfpic{} as a prefix macro). It +% also uses \gbc{drawcolor}. Otherwise it calls the same code. +% \begin{macrocode} +vardef plotnodes (expr symbol, size) expr f = + save _pln; pair _pln[]; + _pln := 0; + for _a = 0 upto (length f) if cycle f : - 1 fi : + _pln[incr _pln] := pnt[_a] (f); + endfor + dosymbols (drawcolor, symbol, size) (_pln); + f +enddef; + +% \end{macrocode} +% +% \DescribeRoutine{centerit} +% This accepts a picture and returns the same picture centered. This +% is close to impossible in \MF, so we only do it in \MP. Actually, we +% no longer use it, because in the one case where we did +% (\gbc{makesymbol}), it seemed to restrict the user's choices too much. +% \begin{macrocode} +%<*MP> +vardef centerit (expr pic) = + pic shifted -(0.5[urcorner pic, llcorner pic]); +enddef; + +% +% \end{macrocode} +% +% \DescribeRoutine{makesymbol} +% This utility: takes \emph{any} expression and scale and returns a picture. +% If the expression \gbc{spath} is a cycle it returns the interior, for +% other paths it draws the path, in either case scaled by \gbc{sc}. If +% already a picture, it returns it. In \MP, if it is a string, it returns +% a picture containing that string drawn in the \mfc{defaultfont}. In any +% other case, the default dot is returned. +% \begin{macrocode} +vardef makesymbol (expr spath, sc) = + if path spath : setdot (spath, sc) + elseif picture spath : +% save v; picture v; v:= spath; mono (v); v +%<*MP> + spath + elseif string spath : + spath infont defaultfont scaled defaultscale +% + else: + GBmsg "Undefined symbol for plotting, using dotpath instead."; + setdot (dotpath, sc) + fi +enddef; + +% \end{macrocode} +% +% These are some symbols to be used by \gbc{doplot} and \gbc{plotsymbol}. +% They are paths. The ones named with ``\gbc{Solid}'' are closed paths. +% Since these two drawing commands feed the path to \gbc{setdot}, they end +% up filled if they are cyclic, merely drawn if not. +% +% All are intended to have roughly the area (when area makes sense) of a +% circle with diameter 1. +% \begin{macrocode} +path Triangle, Square, Circle, Diamond, Star, Plus, Cross, + Asterisk, SolidTriangle, SolidSquare, SolidCircle, + SolidDiamond, SolidStar; + +Triangle := (for n = 0 upto 2: + (up rotated 120n)-- endfor up) scaled .78; +SolidTriangle := Triangle & cycle; + +Square := (for n = 0 upto 3: + dir (90n + 45)-- endfor dir 45) scaled .63; +SolidSquare := Square & cycle; + +Circle := halfcircle & halfcircle rotated 180; +SolidCircle := Circle & cycle; + +Diamond := (Square rotated 45) xscaled (1/1.2) yscaled 1.2; +SolidDiamond := Diamond & cycle; + +Plus := (origin for n = 0 upto 3: + --(up rotated 90n)--origin endfor) scaled .65; +Cross := Plus rotated 45; +Asterisk := (origin for n = 0 upto 5: + --(up rotated 60n)--origin endfor) scaled .6; + +% \end{macrocode} +% +% We do some computations to find the vertices of a standard 5-pointed +% star (pentagram). The first equation says the indented vertex at the +% ``left shoulder'' is on the line from the top of the ``head'' to the +% ``left foot'', and the second says it is on the line from the ``left +% hand'' to the ``right hand''. That point determined, we get the rest by +% rotaing 72 degrees. +% \begin{macrocode} +pair zz; +zz = (whatever)[up, up rotated 144]; +zz = (whatever)[up rotated 72, up rotated -72]; +Star := (for n = 0 upto 4: + (up rotated 72n)--(zz rotated 72n)-- endfor up) scaled .84; +SolidStar := Star & cycle; +save zz; + +% \end{macrocode} +% +% In \mfpic, the \cs{plotdata} command draws several curves with one +% command. The curves are drawn with changeable methods of rendering. +% There are three schemes. The first draws the curves with different dash +% patterns. Another scheme is to plot the curves with different symbols. +% Still another is to use different colors (\MP{} only). +% +% We implement the changing of patterns (symbols, colors) by defining +% arrays of such things and changing the index into the array. For +% example, when the user has selected dashes, the first curve is +% \gbc{gendashed} with the pattern \gbc{dashtype0}, the next with +% \gbc{dashtype1}, etc. +% +% \DescribeRoutine{defaultdashes} +% These are the usual dash patterns. Their setting is done by a macro +% so the user may easily restore them. The spaces are apparently larger +% than the dashes, but taking the thickness of the pen into account +% (\mfc{.5bp}) the dashes will appear about \mfc{.5bp} larger than stated +% and the spaces about \mfc{.5bp} smaller. +% \begin{macrocode} +numeric dashtype; +forsuffixes s = start, rep, finish : + numeric dashtype[].s, dashtype[].s[]; +endfor +def defaultdashes = + dashpat (dashtype0) (0); % solid + dashpat (dashtype1) (3bp, 4bp); % dashed + dashpat (dashtype2) (0, 4bp); % dotted + dashpat (dashtype3) (0, 4bp, 3bp, 4bp); % dot-dash + dashpat (dashtype4) (0, 4bp, 3bp, 4bp, 0, 4bp);% dot-dash-dot + dashpat (dashtype5) (0, 4bp, 3bp, 4bp, 3bp, 4bp);% dot-dash-dash + dashtype := 6; +enddef; +defaultdashes; + +% \end{macrocode} +% +% \DescribeRoutine{isdashpat} +% Checks, for the given variable \gbc{pat}, if the three arrays that +% make up a dash pattern are know arrays. It does not check if they are +% numeric arrays, but one hardly thinks they could all three exist +% accidentally if they hadn't been created by \gbc{dashpat}. +% +% \DescribeRoutine{setdatadashes} +% We have this method for users to select their own dash patterns. The +% \gbc{setdatadashes} command requires a list of suffixes previously +% defined by the \gbc{dashpat} command. +% +% \DescribeRoutine{getdashpat} +% And finally, we remove the mod-ing operation from \TeX, where it is +% cumbersome, to \MF, where it is trivial, with this command. +% \begin{macrocode} +vardef isdashpat suffix pat = + (knownarray pat.start) and + (knownarray pat.finish) and + (knownarray pat.rep) +enddef; + +def setdatadashes (text lst) = + save dashtype; dashtype := 0; + forsuffixes _itm = lst : + if isdashpat _itm : + forsuffixes _s = start, rep, finish : + copyarray (_itm._s, dashtype[dashtype]._s); + endfor + dashtype := dashtype + 1; + else: GBmsg "Improper dash pattern in setdatadashes."; + fi + endfor + if dashtype = 0 : + SetdataWarn "dashes"; + defaultdashes; + fi +enddef; +def getdashpat expr n = dashtype[n mod dashtype] enddef; + +def SetdataWarn expr s = + GBmsg "Command setdata"& s &"() failed; using defaults." +enddef; + +% \end{macrocode} +% +% \DescribeRoutine{setdatasymbols} +% This can be used to define the sequence of point plotting styles for +% \mfpic's \cs{plotdata} command. We could use it to set the default +% symbols, but I worry about the difficulty chasing down bugs if +% \gbc{defaultpoints} calls \gbc{setdatasymbols} which can again call +% \gbc{defaultpoints}. +% +% \DescribeRoutine{getsymbol} +% This is similar to \gbc{getdashpat}. In fact we could write a +% single macro to do both, but I think we get a more readable \mfpic{} +% output file if we have separate commands. +% \begin{macrocode} +def setdatasymbols (text lst) = + save pointtype; path pointtype[]; pointtype := 0; + for _itm = lst : + if (known _itm) and (path _itm): + pointtype[pointtype] := _itm; + pointtype := pointtype + 1; + else: + GBmsg "Improper path in setdatasymbols()."; + fi + endfor + if pointtype = 0: + SetdataWarn "symbols"; + defaultsymbols; + fi +enddef; +def getsymbol expr n := pointtype[n mod pointtype] enddef; + +% \end{macrocode} +% +% \DescribeRoutine{defaultsymbols} +% We store the default definitions in a macro so the user can restore +% them easily. +% \begin{macrocode} +numeric pointtype; path pointtype[]; +def defaultsymbols = + pointtype0 := Circle; + pointtype1 := Cross; + pointtype2 := SolidDiamond; + pointtype3 := Square; + pointtype4 := Plus; + pointtype5 := Triangle; + pointtype6 := SolidCircle; + pointtype7 := Star; + pointtype8 := SolidTriangle; + pointtype := 9; +enddef; +defaultsymbols; + +% \end{macrocode} +% +% \DescribeRoutine{setdatacolors} +% \DescribeRoutine{getcolor} +% Finally, for \MP, we do a similar pair of commands for setting and +% getting the colors for the \cs{plotdata} command. The default colors +% were tested on screen and on an inkjet printer. The adjustments away +% from pure colors is based on a compromise between those experiments. +% +% \DescribeRoutine{defaultcolors} +% We store the default definitions in a macro so the user can restore +% them easily. +% \begin{macrocode} +%<*MP> +def setdatacolors (text lst) = + save colortype; color colortype[]; colortype := 0; + for _itm = lst : + if (known _itm) and (color _itm) : + colortype[colortype] := _itm; + colortype := colortype + 1; + else: GBmsg "Improper color in setdatacolors()."; + fi + endfor + if colortype = 0 : + SetdataWarm "colors"; + defaultcolors; + fi +enddef; +def getcolor expr n = colortype[n mod colortype] enddef; + +numeric colortype; color colortype[]; +def defaultcolors = + colortype0 := black; + colortype1 := red; + colortype2 := 0.80blue + .2white; % blue + colortype3 := 0.66yellow + .34red; % orange + colortype4 := 0.80green; % green + colortype5 := 0.85magenta; % magenta + colortype6 := 0.85cyan; % cyan + colortype7 := 0.85yellow; % yellow + colortype := 8; +enddef; +defaultcolors; + +% +% \end{macrocode} +% +% Points are filled or unfilled circles. They are implemented with +% \gbc{plotsymbol}, but the code differs in that filled or unfilled +% circles are determined by a parameter rather than the type of curve. +% In addition, for unfilled circles, it clears the pixels inside the circle. +% +% \DescribeRoutine{bpoint} +% \gbc{bpoint} is basicly a shorthand for a scaled circle shifted to a +% point. The scale and the point are in device coordinates. We don't use +% it anywhere in grafbase anymore. +% \begin{macrocode} +vardef bpoint (expr ptwd, b) = + fullcircle scaled ptwd shifted b +enddef; +% \end{macrocode} +% +% \DescribeRoutine{pointd} +% This draws disks with diameter \gbc{ptwd}, filled or unfilled based on +% the boolean \gbc{filled}, at the graph coordinate coordinates in the +% list \gbc{t}. In case \gbc{filled} is true, \gbc{pointd} calls +% \gbc{plotsymbol (SolidCircle)} otherwise we make \gbc{clearsymbols} true +% (so that the area where each point is drawn will be cleared before +% drawing it) and call \gbc{plotsymbol(Circle)}. +% \begin{macrocode} +def pointd (expr ptwd, filled) (text t) = + if filled : + plotsymbol (SolidCircle, ptwd) (t); + else : + begingroup; + save clearsymbols; boolean clearsymbols; clearsymbols := true; + plotsymbol (Circle, ptwd) (t); + endgroup + fi +enddef; + +% \end{macrocode} +% +% \DescribeRoutine{plotsymbol} +% \DescribeRoutine{colorplotsymbol} +% These place a symbol centered at each of the graph +% coordinate points in the list. The symbol placed is the first parameter, +% which would normally be a path, but can be a picture or, in \MP, a +% string. Like the \gbc{doplot} command, it calls \gbc{makesymbol}. +% If \gbc{spath} is of type path, and is cyclic, it is drawn filled. This +% is because we call \gbc{makesymbol} on it, and that subjects it to +% \gbc{setdot}, which has that behavior. For other types of symbols, we +% simply convert them to pictures with \gbc{makesymbol} and then place +% them. Unlike \gbc{pointd} above, the interior of the path is not +% erased by default. However, in the special case where the symbol is an +% open path, if its first point is equal to its last point, and +% \gbc{clearsymbols} is true, then the interior of the path obtained by +% \gbc{\& cycle} is cleared before the path itself is drawn. +% +% \DescribeRoutine{dosymbols} +% \DescribeRoutine{addsymbols} +% We copy the text list to an array and call \gbc{dosymbols} so that +% \gbc{plotnodes} can share the code. Also, since \gbc{dosymbols} uses +% identical code twice (once to clear, once to draw), we put that code +% in \gbc{addsymbols} +% \begin{macrocode} +boolean clearsymbols; clearsymbols := false; +vardef clearable (expr pth) = + false + if path pth : + if (not cycle pth) and (length pth > 0): + if ( pnt0 (pth) = pnt[length pth] (pth) ) : + or true + fi fi fi +enddef; + +def plotsymbol = colorplotsymbol (pointcolor) enddef; +vardef colorplotsymbol (expr clr, spath, sc) (text t) = + save _cpls; + textpairs (_cpls) (t); + dosymbols (clr, spath, sc) (_cpls); +enddef; + +vardef dosymbols (expr clr, spath, sc) (suffix arr) = + save one_symbol, _pls; picture one_symbol, _pls; + if clearsymbols and clearable (spath): + addsymbols (background, spath&cycle, sc) (arr); + fi + addsymbols (clr, spath, sc) (arr); +enddef; + +def addsymbols (expr clr, spath, sc) (suffix arr) = + one_symbol := makesymbol (spath, sc); + _pls := nullpicture; + for _idx = 1 upto arr: + picdot (_pls, one_symbol, zconv(arr[_idx])); + endfor + DoClip (_pls); +% mono (_pls); + coloraddto (clr) (active_plane) (_pls); +enddef; + +% \end{macrocode} +% +% +% \section{Modification of paths}\label{modification} +% +% \subsection{Closing a path}\label{closing} +% +% In \MF{} one can close a path by any legal path connection between the +% last point and the keyword \mfc{cycle}. Connecting the last point to the +% first point is not enough. \Grafbase{} commands provide a few different +% ways. All the closure commands have a version with a tension parameter +% when that makes sense. These version make the connection with the +% supplied tension. The ones where it doesn't make sense are \gbc{lclosed}, +% \gbc{cbclosed} and \gbc{qbclosed}. The first always uses a straight line +% and the other two require explicit controls. +% +% \DescribeRoutine{lclosed} +% This closes with a line segment. +% \begin{macrocode} +vardef lclosed expr f = f if not cycle f : --cycle fi enddef; + +% \end{macrocode} +% \DescribeRoutine{sclosed} +% \DescribeRoutine{sclosedt} +% This closes the path in the manner that \gbc{mksmooth} creates a path. +% This will change the first and last segment of the original path. In +% particular, if there are fewer than three segments, the whole path is +% different. +% \begin{macrocode} +numeric default_tension; +default_tension := 1; + +def sclosed = sclosedt (default_tension) enddef; +vardef sclosedt (expr t) expr f = + if cycle f : f + else: save n; n := length f; + if n = 0 : f&cycle + elseif n = 1 : f..tension t..cycle + else : + (pnt0 (f)) { (pnt1(f)) - (pnt[n] (f)) }..tension t + ..(subpath (1, n-1) of f)..tension t + ..(pnt[n](f)) { pnt0(f) - pnt[n-1](f) } + ..tension t..cycle + fi + fi +enddef; + +% \end{macrocode} +% \DescribeRoutine{bclosed} +% This closes with the basic default \MF{} Bezi\'er. It is a smooth +% closure, but it does not have the same direction at the endpoints +% that \gbc{mksmooth (true)} would have produced. +% \begin{macrocode} +def bclosed = bclosedt (default_tension) enddef; +vardef bclosedt (expr t) expr f = + f if not cycle f : ..tension t..cycle fi +enddef; + +% \end{macrocode} +% \DescribeRoutine{uclosed} +% This is now just a renaming of \gbc{bclosed}. It turns out (contrary +% to my earlier belief) that just adding \mfc{..cycle} does \emph{not} +% change the original curve. \gbc{sclosed} will do that because it +% takes the curve apart and redoes its end segments. +% \begin{macrocode} +def uclosed = bclosed enddef; + +% \end{macrocode} +% \DescribeRoutine{bsplinecontrols} +% This utility is for use in \gbc{cbclosed}. It converts Bezier segment +% key points of a path \gbc{f}, to cubic B-spline control points stored +% in an array \gbc{b}. The data needed are the first point and first two +% control points of \gbc{f}. The B-spline points needed are \gbc{b1} and +% \gbc{b4}. The extra two points \gbc{b2} and \gbc{b3} divide the line +% from \gbc{b1} to \gbc{b4} into thirds and will be turned into Bezier +% control points of a new path segment. +% \begin{macrocode} +def bsplinecontrols (suffix b) expr f = + b := 4; + b1 := 2[pre 1(f), post0(f)]; + b2 := 2[post0(f), pnt 0(f)]; + b3 := 2[b1, b2]; + b4 := 2[b2, b3]; +enddef; + +% \end{macrocode} +% +% \DescribeRoutine{cbclosed} +% This closes a path with a cubic B-spline. If the path \gbc{f} had been +% produced by \gbc{opencbs}, then \gbc{q1} and \gbc{q4} would have been the +% last two points in the argument list, and \gbc{p4} and \gbc{p1} would +% have been the first two. We just use them and mimic the effect of +% \gbc{closedcbs}. +% \begin{macrocode} +vardef cbclosed expr f = + if cycle f : f + elseif (length f)=0 : f&cycle + else: + save p, q; pair p[], q[]; + bsplinecontrols (p) f; % defines p1 to p4 + bsplinecontrols (q) reverse f; % defines q1 to q4 + f..controls q2 and q3..opencbs (q1,q4,p4,p1) + ..controls p3 and p2..cycle + fi +enddef; + +% \end{macrocode} +% +% \DescribeRoutine{qbclosed} +% It seems wrong to be able to close with a cubic B-spline but not a +% quadratic B-spline. Therefore I will add such a possibility. We +% calculate B-spline controls \gbc{p[n]} that will agree with those of +% \gbc{f}, if \gbc{f} had been created as a quadratic B-spline. Note +% that \gbc{cbclosed} required three \MF{} links to close the curve; +% \gbc{qbclosed} only requires two. +% \begin{macrocode} +vardef qbclosed expr f = + if cycle f : f + else: save n; n := length f; + if n = 0 : f&cycle + else: + save p; pair p[]; p := 4; + p1 := (3/2)[pnt[n](f), pre[n](f)]; + p2 := 2[p1, pnt[n](f)]; + p4 := (3/2)[pnt 0 (f), post0 (f)]; + p3 := 2[p4, pnt 0 (f)]; + f & mkqbs (p) & cycle + fi + fi +enddef; + +% \end{macrocode} +% +% \DescribeRoutine{makesector} +% This makes sense only if the path being modified is an arc. It closes +% the arc by connecting its ends to the center of the circle, as +% computed by \gbc{pathcenter}. +% \begin{macrocode} +vardef makesector expr p = + (pathcenter p)--p--cycle +enddef; + +% \end{macrocode} +% \subsection{Trimming a path}\label{trimming} +% +% \DescribeRoutine{cutoffbefore} +% \DescribeRoutine{cutoffafter} +% This is a useful utility operation present in \file{plain.mp} but +% missing from \file{plain.mf}. We write a different version for our +% purposes; it has the syntax of most of our path modification +% commands. Plus, the first loop tries to avoid a bug (or perhaps +% inaccuracy) in \mfc{intersectiontimes} which can return an intersection +% time in a later segment of \gbc{f} than the first intersection point. +% If I can learn the actual method used to find intersection times, I'll +% put in some \mfc{solve} code to get the first \gbc{t} rather than the +% minimal `shuffled binary' of the pair \gbc{w}. +% \begin{macrocode} +%path cuttings; +vardef cutoffbefore (expr b) expr f = + save w, t, u, n; n:= length f; + pair w; + for k = 1 upto n : + w := (subpath (0,k) of f) intersectiontimes b; + exitif w > left; + endfor + if debug : + GBdebug; + >> "Intersectiontimes:"; + show w; + GBenddebug; + fi + t := xpart w; + if t < 0: + cuttings := pnt0 (f); + f + else: + cuttings := subpath (0,t) of f; + subpath (t, n) of f + fi +enddef; + +vardef cutoffafter (expr b) expr f = + save g; path g; + g := cutoffbefore (b) reverse f; + cuttings := reverse cuttings; + reverse g +enddef; + +% \end{macrocode} +% +% \DescribeRoutine{trimmedpath} +% This takes two lengths and a path and trims off the ends of the path +% that lie within the given lengths of the endpoints. The lengths are in +% device coordinates, the path in graph coordinates. +% \begin{macrocode} +vardef trimmedpath (expr btrim, etrim) expr f = + save g, h; path g, h; + g := invvconv (fullcircle scaled 2btrim) shifted pnt0(f); + h := invvconv (fullcircle scaled 2etrim) shifted pnt[length f] (f); + cutoffafter (h) cutoffbefore (g) f +enddef; + +% \end{macrocode} +% +% \subsection{Appending an arrowhead} +% +% +% \DescribeRoutine{predirection} +% \DescribeRoutine{postdirection} +% \DescribeRoutine{__dir} +% First, some better \mfc{direction} commands. They makes use of the fact +% (easily proved) that a cubic B\'ezier $z\sb0(1 - t)^3 + 3z\sb1(1-t)^2t + +% z\sb2(1-t)t^2 + z\sb3t^3$ has a direction at $z\sb0$ equal to the first +% one of $z\sb{j} -z\sb0$ that is nonzero. +% +% \gbc{__dir} gets the direction at point 0 for an arbitrary path. +% \gbc{postdirection} reduces to this case using \mfc{subpath}. If the +% postdirection is 0, that means the path is trivial from that point to +% the end so we are effectively at an endpoint (noncyclic path) and we use +% the incoming direction. \gbc{predirection} just runs +% \gbc{postdirection} on the reversed path. +% \begin{macrocode} +vardef predirection@# (expr p) = + - postdirection[length p - @#] (reverse p) +enddef; + +vardef postdirection@# (expr p) = + save _n; _n := length (p); + save v; pair v; v := __dir (subpath (@#, @# + _n) of p); + if v = origin : + v := - __dir (subpath (@#, @# - _n) of p); + fi + v +enddef; + +vardef __dir (expr p) = + save v, w; pair v, w; w := pnt0 (p); + v := origin; + for n = 1 upto length (p) : + v := post[n-1] (p) - w; + if v = origin : + v := pre[n] (p) - w; + if v = origin : + v := pnt[n] (p) - w; + fi + fi + exitif v <> origin; + endfor + v +enddef; + +% \end{macrocode} +% +% Arrowheads can be just two straight lines at an angle placed on the end +% of a curve, or it can be a filled triangle. \grafbase{} permits both, +% but it also allows the two lines (or the corresponding sides of the +% triangle) to be gracefully concave and tangent to the path at the +% endpoint of the path. The parameters controlling the shape of the arrowhead +% are the two numerics \gbc{hdwdr}, the ratio of the length to width of the +% arrowhead, and \gbc{hdten}, the tension in the two angled curves. By +% default, one side of an arrowhead is just the \MF{} path +% \mfc{a..b\marg{\meta{tangent}}}, where \mfc{a} is the base of the +% arrowhead (calculated from \gbc{hdwdr}) and \gbc{b} is the end of the +% path and \meta{tangent} is the direction of the curve at that +% point. The curve can be straightened by increasing \gbc{hdten}, the +% head widened by increasing \gbc{hdwdr} +% +% The arrowhead is drawn by drawing two of the curves described above. If +% \gbc{hfilled} is \mfc{true}, the two base points (\gbc{a} above) are +% connected and the three sided region filled. +% \begin{macrocode} +newinternal hdwdr, hdten; +interim hdwdr := 1; interim hdten := 1; +boolean hfilled; hfilled := false; + +% \end{macrocode} +% +% \DescribeRoutine{headshape} +% The following little utility adjusts the above parameters, call it +% with two pure numbers \gbc{wr} and \gbc{tens} for the \gbc{hdwdr} and +% \gbc{hdten}, and a boolean \gbc{fil} for \gbc{hfilled}. +% \begin{macrocode} +def headshape (expr wr, tens, fil) = + interim hdwdr := wr; interim hdten := tens; + save hfilled; boolean hfilled; hfilled := fil; +enddef; + +% \end{macrocode} +% +% \DescribeRoutine{ahead} +% \DescribeRoutine{colorhead} +% This command draws an arrowhead. \gbc{front} and \gbc{back} are in +% device coordinates. They are the point of the arrowhead (\gbc{front}) +% and the point such that \gbc{front - back} points in the direction of +% the arrow. We use the ratio \gbc{hwr} to compute the other two +% corners. So \gbc{side} is the vector from \gbc{back} to one of the +% corners \gbc{p1}, and the other corner is on the other side. \gbc{f} +% is the path of the arrowhead. +% +% If \gbc{filled} is true we close the curve and fill it, otherwise we +% draw it. \gbc{clr} is the color used to draw or fill it. +% +% For backward compatibility we define \gbc{head}. In \MF{} \gbc{head} +% didn't have a color parameter, while in \MP{} it has always had one, +% in retrospect, this was not a good idea, and we should have followed +% the pattern of other macros. However, \gbc{head} was never a user-level +% macro and I didn't think it mattered. +% \begin{macrocode} +%def head = ahead (headcolor) enddef; +%def head = ahead enddef; + +vardef ahead (expr clr, front, back, hwr, tens, filled) = + if front <> back : + save side; pair side; + side := (hwr/2) * ((front-back) rotated 90); + save f; path f; + f := (back + side)..tension tens.. + {front-back}front{back-front}..tension tens.. + (back - side) + if filled : --cycle; colorsafefill (clr) f fi; + colorsafedraw (clr) f; + fi +enddef; + +% \end{macrocode} +% +% It is a fact of life that, unless the path to which the head is added is +% a straight line, the above described arrowhead looks ``off''. But I know +% of no automatic way of making it look good. Therefore \grafbase{} and +% \mfpic{} have provided a means to micro-adjust the head. (Actually, I +% think the best looking arrowhead for small heads and paths of modest +% curvature is obtained by taking a secant for the direction of the head +% head rather than a tangent.) +% +% \DescribeRoutine{headpath} +% \DescribeRoutine{colorheadpath} +% This takes a path expression \gbc{f} in graph coordinates, puts an +% arrowhead on it and returns \gbc{f}. The arrowhead is placed according +% to the first four parameters. \gbc{hlen} is the length of the head in +% device coordinates, the width being determined by \gbc{hdwdr}, and +% and \gbc{hrot} is a rotation adjustment. \gbc{hback} is a distance (in +% device coordinates) by which it is set back from the point of placement. +% It is set back in the direction determined after the rotation. +% +% If the length of the head is 0, we just skip everything and return +% \gbc{f}. +% +% \gbc{headpath} calls \gbc{colorheadpath} with the color set to +% \gbc{headcolor}. +% \begin{macrocode} +def headpath = colorheadpath (headcolor) enddef; +vardef colorheadpath (expr clr, hlen, hrot, hback) expr f = + if hlen <> 0 : + save g; path g; g := zconv (f); + save P; pair P[]; + P2 := pnt[length g] (g); + P1 := predirection[length g] (g); + if P1 <> (0, 0) : + P3 := (unitvector P1) rotated hrot; + P4 := P2 - (hback * P3); + P5 := P4 - (hlen * P3); + ahead (clr, P4, P5, hdwdr, hdten, hfilled); + fi + fi + f +enddef; + +% \end{macrocode} +% +% \section{Axes, Axis Tic Marks, and Grids} +% +% \DescribeRoutine{arrowdraw} +% This is used elsewhere only to draw axes. It returns nothing. This +% doesn't follow the usual pattern of drawing something and returning the +% same path. This makes the old \cs{axes}, \cs{xaxis} and \cs{yaxis} +% commands in \mfpic{} impossible to dash or dot. The newer axis drawing +% commands permit this and so use other code. +% +% We simply call \gbc{headpath} with default values, but add \gbc{drawn} +% to make sure the path is drawn, and precede it with \gbc{store} so +% \MF{} won't complain of an isolated expression. The new axis commands +% just call \gbc{headpath}, and the \mfpic{} code makes sure it is drawn, +% but it can also be \gbc{dashed}, \gbc{dotted}, and \gbc{doplot}\,ed. +% +% The order is important if axis and head are different colors. This +% order puts the head on top of the shaft. +% \begin{macrocode} +def arrowdraw (expr hlen) (expr f) = + store (curpath) headpath (hlen, 0, 0) drawn f; +enddef; + +% \end{macrocode} +% +% \DescribeRoutine{xaxis} +% \DescribeRoutine{yaxis} +% \DescribeRoutine{axes} +% These draw the obvious things: the corresponding axis or axes through +% the point (0, 0) in graph coordinates. The only parameter is the length +% of the arrowhead in device coordinates. \gbc{axes} draws both axes with +% the same length of head. +% \begin{macrocode} +def xaxis (expr hlen) = arrowdraw (hlen) ((xneg, 0)--(xpos, 0)); enddef; +def yaxis (expr hlen) = arrowdraw (hlen) ((0, yneg)--(0, ypos)); enddef; +def axes (expr hlen) = xaxis (hlen); yaxis (hlen); enddef; + +% \end{macrocode} +% +% For axes at the borders of the graph coordinates, we allow for them to +% be shifted inwards. The amount of the shift is given by \gbc{laxis} for +% the left side axis, \gbc{baxis} for the bottom axis, etc. They are in +% graph coordinates. +% +% \DescribeRoutine{axisline.x} +% \DescribeRoutine{axisline.y} +% \DescribeRoutine{axisline.l} +% \DescribeRoutine{axisline.b} +% \DescribeRoutine{axisline.r} +% \DescribeRoutine{axisline.t} +% The commands \gbc{axisline.l}, etc., return the straight line along the +% corresponding edge shifted the appropriate amount. These are vardefs +% rather than variables so they can be affected by changing shift values. +% +% \DescribeRoutine{axis} +% Finally, the commands \gbc{axis.x}, etc. examine their suffix and +% apply \gbc{headpath} to the corresponding axis line. With a recent +% change in \mfpic{} code, it no longer gets used, as we now simply apply +% \cs{arrow} to the appropriate \gbc{axisline}. The change was made for +% consistency: so that the head would be drawn on top of the shaft. +% \begin{macrocode} +laxis := baxis := raxis := taxis := 0; + +vardef axisline.x = (xneg + laxis, 0)--(xpos - raxis, 0) enddef; +vardef axisline.y = (0, yneg + baxis)--(0, ypos - taxis) enddef; +vardef axisline.l = axisline.y shifted (xneg + laxis, 0) enddef; +vardef axisline.b = axisline.x shifted (0, yneg + baxis) enddef; +vardef axisline.r = axisline.y shifted (xpos - raxis, 0) enddef; +vardef axisline.t = axisline.x shifted (0, ypos - taxis) enddef; +vardef axis@# (expr len) = + headpath (len, 0, 0) axisline@# +enddef; + +% \end{macrocode} +% +% Tick marks can be on the inside or outside of a border axis, +% above or below any horizontal axes, left or right of any vertical axis +% or centered on any axis. The following numerics are merely used to +% convert the names to numeric code that the drawing routine will examine. +% +% However, it is no accident that \gbc{onbottom = onright} and that +% \gbc{centered} is halfway between \gbc{onright} and \gbc{onleft}. The +% code uses the numeric values to compute a shift, and one can supply an +% expression like \gbc{.33ontop+.67onbottom]} and then 1/3 of each mark +% will be above (and 2/3 will be below) the axis. +% +% The negative value of \gbc{inside} and \gbc{outside} is a flag that they +% are to be treated differently. The others have the property that the +% direction is the direction of the axis rotated a certain way (e.g., +% $90$ degrees from \mfc{up} points \mfc{left}, $-90$ points \mfc{right}). +% But \gbc{inside} is right of the left axis and left of the right axis. +% \begin{macrocode} +numeric inside, outside, centered, onleft, onright, ontop, onbottom; +inside := -2; +outside := -1; +onright := 1; +onleft := 2; +centered := .5[onright, onleft]; +onbottom := onright; +ontop := onleft; +% \end{macrocode} +% +% We interact with \mfpic{} by allowing the user to change the value of +% \gbc{ltick}, for example, with a command like \ +% \cs{setaxismarks l}\marg{outside}. Here we set the defaults. +% \begin{macrocode} +ltick := rtick := ttick := btick := inside; +xtick := ytick := centered; + +% \end{macrocode} +% +% \DescribeRoutine{axismarks} +% This utility macro draws the tick marks on an arbitrary axis. The +% different commands \gbc{xmarks}, etc., call this command with particular +% values of these parameters. +% \begin{itemize} +% \item \gbc{inang} is the direction one must rotate the axis to point +% inside. This is always $\pm90$ degrees. The x-axis and y-axis are +% treated just like bottom and left axis in this respect. +% \item \gbc{tp} is the tick position (e.g., \gbc{inside} or +% \gbc{ontop}). +% \item \gbc{loc} is the location of the 0-point of the axis (graph +% coordinates). +% \item \gbc{pdir} is the positive direction on the axis (right or up). +% \item \gbc{len} is the length of a tick mark, supplied as an argument +% to the individual axis mark commands. +% \item \gbc{t} is the list of positions, also supplied. +% \end{itemize} +% \begin{macrocode} +vardef axismarks (expr inang, tp, loc, pdir) (expr len) (text t) = + save _tp, _U, _P, _tic, _ticang; + pair _U, _P, _tic[]; +% \end{macrocode} +% For \gbc{onleft}, \gbc{onright}, \gbc{ontop} or \gbc{onbottom}, which +% are positive, don't examine \gbc{inang} but for \gbc{inside/outside} +% use it to determine what inside means. \gbc{_ticang} will be the angle +% to rotate \gbc{pdir} to set the direction of the tic mark. +% +% Then we shift the numeric value of \gbc{tp} by one, so \gbc{centered} +% corresponds to $.5$ and the rest to either $0$ or $1$. +% \begin{macrocode} + _ticang := if tp<0 : inang else: 90 fi; + _tp := abs(tp) - 1; +% \end{macrocode} +% Except, we go through the following shenanigans so that the marks are +% always perpendicular to the axis, even if a coordinate transform will +% slant the axis. After this \gbc{_U} should point in direction of inside, +% onleft or ontop. +% \begin{macrocode} + _U := unitvector (vconv (pdir)) rotated _ticang; +% \end{macrocode} +% Next, we use \gbc{_tp} to calculate the ends of the mark. For example, +% if \gbc{tp = inside}, then \gbc{_tp = 1}. Since \gbc{_U} points toward +% inside, \gbc{_tic2} will be \gbc{len} toward the inside and \gbc{_tic1 = +% (0, 0)}. +% \begin{macrocode} + _tic1 := (_tp - 1) * len * _U; % start of mark + _tic2 := _tp * len * _U; % end of mark +% \end{macrocode} +% Finally, convert each numeric position to a point on the axis, a +% multiple of \gbc{pdir} from the 0 point of the axis, and than draw the +% tic. +% \begin{macrocode} + for _a = t: + safedraw ((_tic1--_tic2) shifted zconv (loc + _a*pdir)); + endfor +enddef; + +% \end{macrocode} +% +% \DescribeRoutine{xmarks} +% \DescribeRoutine{ymarks} +% \DescribeRoutine{lmarks} +% \DescribeRoutine{bmarks} +% \DescribeRoutine{rmarks} +% \DescribeRoutine{tmarks} +% And now the specialized command for each axis. Inside and outside +% really make no sense for the x- and y-axis, but since a bottom axis is +% usually used for x and a left axis for y, we give \gbc{xmarks} the same +% first parameter as \gbc{bmarks} and \gbc{ymarks} the same as \gbc{lmarks}. +% \begin{macrocode} +def xmarks = axismarks ( 90, xtick, (0, 0), right) enddef; +def ymarks = axismarks (-90, ytick, (0, 0), up) enddef; +def lmarks = axismarks (-90, ltick, (xneg + laxis, 0), up) enddef; +def bmarks = axismarks ( 90, btick, (0, yneg + baxis), right) enddef; +def rmarks = axismarks ( 90, rtick, (xpos - raxis, 0), up) enddef; +def tmarks = axismarks (-90, ttick, (0, ypos - taxis), right) enddef; + +% \end{macrocode} +% +% \DescribeRoutine{vgrid} +% \DescribeRoutine{grid} +% This is mainly for the purpose of visualising coordinates. \gbc{vgrid} +% draws a dot of size \gbc{dsize} at every point whose coordinates +% are are \gbc{(n*xspace, m*yspace)}, \gbc{n} and \gbc{m} being integers. +% \gbc{dsize} is in device coordinates, the spacings are in graph +% coordinates. \gbc{grid} is for backward compatibility, calling vgrid +% with a default \gbc{dsize} of \mfc{.5bp}. +% +% \begin{macrocode} +path griddotpath; griddotpath := fullcircle; +def grid = vgrid (0.5bp) enddef; +vardef vgrid (expr dsize, xspace, yspace) = + save gdot, gridpic; picture gdot, gridpic; + gdot := setdot (griddotpath, dsize); + gridpic := nullpicture; + for n = ceiling(xneg/xspace) upto floor(xpos/xspace): + for m = ceiling(yneg/yspace) upto floor(ypos/yspace): + picdot (gridpic, gdot, zconv((n*xspace, m*yspace))); + endfor + endfor +% mono (gridpic); + coloraddto (pointcolor) (active_plane) (gridpic); +enddef; + +% \end{macrocode} +% +% \DescribeRoutine{hgridlines} +% \DescribeRoutine{vgridlines} +% \DescribeRoutine{gridlines} +% This is more what I think of when I hear ``grid'', but the name was already +% taken. \gbc{gridlines} draws horizontal and vertical lines through the +% same points where \gbc{grid} would draw a dot. To draw only horizontal +% or only vertical lines use \gbc{hgridlines} or \gbc{vgridlines}. +% \begin{macrocode} +def hgridlines (expr ysp) = + for n = ceiling((yneg + baxis)/ysp) upto floor((ypos - taxis)/ysp) : + safedraw zconv((xneg + laxis, n*ysp)--(xpos - raxis, n*ysp)); + endfor +enddef; +def vgridlines (expr xsp) = + for n = ceiling((xneg + laxis)/xsp) upto floor((xpos - raxis)/xsp) : + safedraw zconv((n*xsp, yneg + baxis)--(n*xsp, ypos - taxis)); + endfor +enddef; +def gridlines (expr xsp, ysp) = + vgridlines (xsp); hgridlines (ysp); +enddef; + +% \end{macrocode} +% +% \DescribeRoutine{plrpatch} +% \DescribeRoutine{patcharcs} +% \DescribeRoutine{patchrays} +% Polar grids can be drawn two ways. \gbc{patcharcs} draws the arcs +% \gbc{tstart}${}\le \theta \le{}$\gbc{tstop} with $r = {}$\gbc{rstart}, +% stepping by \gbc{rstep} until \gbc{rstop}. \gbc{patchrays} draws the lines +% \gbc{rstart}${}\le r \le{}$\gbc{rstop} with $\theta = {}$\gbc{tstart} +% stepping by \gbc{tstep} until \gbc{tstop}. \gbc{plrpatch} then calls +% +% They are utilities that draw on a picture variable \gbc{X}, and then a +% calling command like \gbc{plrpatch} adds them to \gbc{active_plane}. +% \gbc{plrpatch} used to be called by \gbc{polarpatch}, but now it is +% not called at all. +% \begin{macrocode} +vardef plrpatch (expr rstart, rstop, rstep, tstart, tstop, tstep) = + save v; picture v; v := nullpicture; + patcharcs (v) (rstart, rstop, rstep, tstart, tstop); + coloraddto (drawcolor) (active_plane, v); + v := nullpicture; + patchrays (v) (tstart, tstop, tstep, rstart, rstop); + coloraddto (drawcolor) (active_plane, v); +enddef; +def patcharcs (suffix X) (expr rstart, rstop, rstep, tstart, tstop) = + for rad = (if rstart=0: rstep else: rstart fi) step rstep until rstop: + orto (X, picpath zconv (arcplr ((0, 0), tstart, tstop, rad)) ); + endfor +enddef; +def patchrays (suffix X) (expr tstart, tstop, tstep, rstart, rstop) = + for _ang = tstart step tstep until tstop: + orto (X) (picpath zconv ((rstart*dir _ang)--(rstop*dir _ang))); + endfor +enddef; + +% \end{macrocode} +% +% \DescribeRoutine{polargrid} +% \DescribeRoutine{polargridpoints} +% \DescribeRoutine{gridarcs} +% \DescribeRoutine{gridrays} +% These are analogous to \gbc{gridlines} and \gbc{grid}. They first draw a +% grid large enough to cover the whole graph, then clip it to the. graph +% boundaries. The arcs have radii that are multiples of \gbc{rstep} and +% radial lines have angles that are multiples of \gbc{tstep}. The command +% \gbc{polargridpoints} draws dots at the points where the lines and arcs +% in \gbc{poloargrid} would intersect. The `step' parameters are in graph +% coordinates. \gbc{beginpolargrid} computes the bounds for the patch and +% declares the picture variable \gbc{gridpic}, while \gbc{endpolargrid} +% clips the resulting picture and adds it to \gbc{active_plane}. +% +% The \gbc{rmin}, etc., returned are modified to fit the grid established +% by the step sizes. A ray could happen to be one of the graph's sides, so +% we use \mfc{ceiling} and \mfc{floor} which doesn't change integer +% values. However, the arc with radius \gbc{rmin} or \gbc{rmax} could +% touch the graph rectangle in at most 4 points, so we use \mfc{floor (1 +% + x)} and \mfc{ceiling(x - 1)} to start and stop before the edge of the +% graph. +% \begin{macrocode} +def polargrid (expr rstep, tstep) = + gridarcs (rstep); gridrays (tstep); +enddef; + +def polargridpoints (expr dsize, rstep, tstep) = + beginpolargrid; + save gdot; picture gdot; gdot := setdot (griddotpath, dsize); + if rmin = 0: + picdot (gridpic, gdot, zconv(origin)); + rmin := rstep; + fi + for n = ceiling (rmin/rstep) upto floor (rmax/rstep) : + for m = ceiling (tmin/tstep) upto floor (tmax/tstep) : + picdot ( gridpic, gdot, zconv ( polar((n*rstep, m*tstep)) ) ); + endfor + endfor + endpolargrid (pointcolor, .5dsize); +enddef; + +def gridarcs (expr rstep) = + beginpolargrid; + if rmin = 0 : % add "circle" of radius 0 + picdot (gridpic, setdot(griddotpath, penwd), zconv(origin)); + fi + rmin := rstep * floor(rmin/rstep + 1); + rmax := rstep*ceiling(rmax/rstep - 1); + patcharcs (gridpic) (rmin, rmax, rstep, tmin, tmax); + endpolargrid (drawcolor, .5penwd); +enddef; + +def gridrays (expr tstep) = + beginpolargrid; + tmin := tstep*ceiling(tmin/tstep); + tmax := tstep * floor(tmax/tstep); + patchrays (gridpic) (tmin, tmax, tstep, rmin, rmax); + endpolargrid (drawcolor, .5penwd); +enddef; + +% \end{macrocode} +% \DescribeRoutine{beginpolargrid} +% This computes the bounds (on $r$ and $\theta$) of the smallest polar +% coordinate patch that covers the graph rectangle. It leaving the values +% in \gbc{rmin}, \gbc{rmax}, \gbc{tmin} and \gbc{tmax}. It is only for use +% in \gbc{polargrid}, \gbc{gridarcs} and \gbc{gridrays}. +% \begin{macrocode} +def beginpolargrid = + begingroup; + save p, r, t, rmax, rmin, tmax, tmin; + pair p[]; + % Four corners: + p0 := (xneg, yneg); p1 := (xneg, ypos); + p2 := (xpos, ypos); p3 := (xpos, yneg); +% \end{macrocode} +% This loop finds the radial coordinate of each corner of the graph and +% finds the maximum while doing so. +% \begin{macrocode} + r0 := abs(p0); rmax := r0; + for j = 1 upto 3 : + r[j] := abs(p[j]); + if rmax < r[j] : rmax := r[j]; fi + endfor +% \end{macrocode} +% When the origin is inside the graph rectangle we need the full range +% of $r$ and $\theta$. When the origin is one of the corners, the angles +% can just be read off. Otherwise, to find the range of $\theta$ we +% rotate one corner to have angle zero (so now we are guaranteed all +% angles are between $-180$ and $180$) and get the largest and smallest of +% the angles to all the corners. +% \begin{macrocode} + rmin := 0; + if (xneg < 0) and (xpos > 0) and (yneg < 0) and (ypos > 0) : + tmin := 0; tmax := 360; + elseif (p0 = (0,0)) : tmin := 0; tmax := 90; + elseif (p1 = (0,0)) : tmin := -90; tmax := 0; + elseif (p2 = (0,0)) : tmin := -180; tmax := -90; + elseif (p3 = (0,0)) : tmin := 90; tmax := 180; + else : + tmax := tmin := t0 := angle p0; + for j = 1 upto 3: + t := t0 + angle (p[j] rotated -t0); + if tmax < t : tmax := t; fi + if tmin > t : tmin := t; fi + endfor +% \end{macrocode} +% The minimum value of $r$ can be one of 9 possibilities: if the four +% sides of the graph are extended infinitely far in both directions, the +% origin can be in any one of the 9 regions formed. We've already disposed +% of the inside of the graph. This code considers the remaining regions in +% the following order: (1)~above or below, (2)~left or right, and (3)~one +% of the four corner regions. +% \begin{macrocode} + if (xneg < 0) and (xpos > 0) : % (1) + rmin := emin(abs(yneg), abs(ypos)); + elseif (yneg < 0) and (ypos > 0) : % (2) + rmin := emin(abs(xneg), abs(xpos)); + else : % (3) + rmin := min(r0, r1, r2, r3); + fi + fi + save gridpic; picture gridpic; gridpic := nullpicture; +enddef; + +% \end{macrocode} +% +% \DescribeRoutine{endpolargrid} +% The \gbc{clr} is \gbc{drawcolor} for line grids, \gbc{pointcolor} for +% dot grids. The size is half the width of the grid's lines or half the +% width of the grid's dots. The purpose is to make sure dots and lines on +% the graph's edge aren't cut off. For dots I should probably put this +% decision in the code that draws them on \gbc{gridpic}. +% \begin{macrocode} + +def endpolargrid (expr clr, size)= + clipto (gridpic) rect ( zconv((xneg, yneg)) - size*(1,1), + zconv((xpos, ypos)) + size*(1,1) ); + coloraddto (clr) (active_plane) (gridpic); + endgroup +enddef; + +% \end{macrocode} +% +% \DescribeRoutine{polarpatch} +% Finally, this just does \gbc{plrpatch}, but also draws the ending +% boundaries, in case they are not an integer number of steps from the +% start. +% \begin{macrocode} +vardef polarpatch (expr rstart, rstop, rstep, tstart, tstop, tstep) = + plrpatch (rstart, rstop, rstep, tstart, tstop, tstep); + safedraw zconv ( arcplr ((0, 0), tstart, tstop, rstop) ); + safedraw zconv ( ((rstart, 0)--(rstop, 0)) rotated tstop ); +enddef; + +% \end{macrocode} +% +% \section{Path construction} +% +% \DescribeRoutine{rect} +% Most of the macros that only define paths are coordinate independent. +% The simplest is \gbc{rect}. It accepts two pair expressions and produces +% the upright rectangle with those points at opposite corners. It might be +% noted that if the corners really are lower left and upper right, then +% the path is anticlockwise, If they are on the other diagonal, the +% path is clockwise. The path is a cycle (closed). +% +% \DescribeRoutine{triangle} +% Produces a closed path joining three points with straight lines; first +% named point \gbc{A} is \mfc{point 0 of triangle (A, B, C)}, etc. +% \begin{macrocode} +vardef rect (expr ll, ur) = + ll--(xpart ur, ypart ll)--ur--(xpart ll, ypart ur)--cycle +enddef; +vardef triangle (expr A, B, C) = A--B--C--cycle enddef; + +% \end{macrocode} +% +% \DescribeRoutine{regularpolygon} +% The first argument is the number of sides, the second is an array name +% to hold the list of vertices. The third argument contains two +% equations, preferably the location of two of the vertices, or the +% location of the center and one vertex. That plus the equations in the +% \mfc{for}-loop give \gbc{n+1} equations to determine the \gbc{n} +% vertices and the center. Note that the vertices are numbered +% anticlockwise. +% \begin{macrocode} +vardef regularpolygon (expr n) (suffix Bob) (text eqns) = + pair Bob[]; Bob := emax(round (abs (n)), 2); + eqns; + for _uncle = 1 upto Bob - 1 : + (Bob1 - Bob0) rotated (360*_uncle/Bob) = Bob[_uncle+1] - Bob0; + endfor + mkpoly (true) (Bob) +enddef; + +% \end{macrocode} +% +% The following set of commands accept any path as argument, but it is +% intended that it be a triangle. Even then, they work correctly only if +% it is a cycle. +% +% \DescribeRoutine{altitudept} +% \DescribeRoutine{altitude} +% These first two produce the perpendicular from \gbc{point n of t} +% to the (extension of) the opposite side (i.e., the altitude). The +% first one determines where the altitude meets the opposite side, and the +% second just connects the two points +% \begin{macrocode} +vardef altitudept expr n of t = + save A, B, C, zz; pair A, B, C, zz; + A := pnt[n] (t); + B := pnt[n + 1] (t); % wraps around a cyclic path + C := pnt[n + 2] (t); + zz = whatever[B,C]; + zz = A + whatever*((C-B) rotated 90); + zz +enddef; + +vardef altitude expr n of t = + (pnt[n](t))--(altitudept n of t) +enddef; + +% \end{macrocode} +% +% \DescribeRoutine{medianpt} +% \DescribeRoutine{median} +% These two produce the line from \gbc{point n of t} to the midpoint of +% the opposite side. +% \begin{macrocode} +vardef medianpt expr n of t = + 0.5[pnt[n + 1] (t), pnt[n + 2] (t)] +enddef; + +vardef median expr n of t = + (pnt[n](t))--(medianpt n of t) +enddef; + +% \end{macrocode} +% +% \DescribeRoutine{anglebisectorpt} +% \DescribeRoutine{anglebisector} +% These two produce the line from \gbc{point n of t} to the opposite side +% that bisects the angle there. +% \begin{macrocode} +vardef anglebisectorpt expr n of t = + save A, B, C; pair A, B, C; + A := pnt[n ] (t); + B := pnt[n + 1] (t); + C := pnt[n + 2] (t); + save zz; pair zz; + zz = whatever[B,C]; + zz = A + whatever*((B-A) rotated (.5*cornerangle (A,B,C))); + zz +enddef; + +vardef anglebisector expr n of t = + (pnt[n](t))--(anglebisectorpt n of t) +enddef; + +% \end{macrocode} +% +% \DescribeRoutine{cornerangle} +% This calculates the angle at the corner of a triangle. Specifically, +% the angle (between $-180$ and $180$) required to rotate the vector +% \gbc{B-A} into \gbc{C-A}. For degenerate triangles the seemingly +% arbitrary values 0, 60 and 90 are designed to match the assumptions used +% in the \gbc{arc*} commands. But also to guarantee that the three +% \gbc{cornerangle}\,s add up to $\pm180$. \gbc{cornerangle (A,B,C)} gives +% the angle at \gbc{A}, positive if \gbc{A--B--C--cycle} is +% anticlockwise. +% \begin{macrocode} +vardef cornerangle (expr A, B, C) = + if (A = B) and (B = C) : 60 + elseif (B = C) : 0 + elseif (A = B) or (A = C) : 90 + else: angle ((C - A) rotated (-angle (B - A))) + fi +enddef; + +% \end{macrocode} +% +% \DescribeRoutine{mkpath} +% This accepts the name of an array of pairs and produces a path +% that connects them. The first two parameters are booleans. If +% \gbc{smooth} is \mfc{true} a smooth path is produced, otherwise a +% polyline. If \gbc{cyclic} is \mfc{true} the path is closed. The work is +% actually done by \gbc{mksmooth} or \gbc{mkpoly}. +% \begin{macrocode} +vardef mkpath (expr smooth, tens, cyclic) (suffix pts) = + if smooth : mksmooth (tens, cyclic, pts) + else : mkpoly (cyclic, pts) + fi +enddef; + +% \end{macrocode} +% +% \DescribeRoutine{mkpoly} +% This produces the path of line segments connecting \gbc{pts1}, +% \gbc{pts2}, etc., closing it up if the boolean \gbc{cyclic} is true. +% \begin{macrocode} +vardef mkpoly (expr cyclic) (suffix pts) = + for _i = 1 upto pts-1: pts[_i]-- endfor + pts[pts] if cyclic : -- cycle fi +enddef; + +% \end{macrocode} +% +% \DescribeRoutine{polyline} +% This is the \mfpic{} interface. Instead of an array name, it accepts a +% list of pair expressions, forms an array from them and calls +% \gbc{mkpoly}. +% \begin{macrocode} +vardef polyline (expr cyclic) (text t) = + save _pl; textpairs (_pl) (t); mkpoly (cyclic, _pl) +enddef; + +% \end{macrocode} +% +% We added an optional parameter for the tension of smooth curves to +% \mfpic. It used to be implemented this way: functions that implement a +% tension parameter set \gbc{cur_tension} and called \gbc{mksmooth}, which +% uses that tension in its formation of a path. Since \gbc{mksmooth} was +% only ever used in this way, I decided to change its syntax to include a +% tension parameter. Only the functions \gbc{tcurve} and \gbc{mkpath} +% actually call \gbc{mksmooth} directly, other path building commands with +% tension parameters call \gbc{mkfcn}, which calls \gbc{mkpath}. +% +% \DescribeRoutine{mksmooth} +% This takes a tension value, a boolean, and the name of an array of +% points, draws the curve connecting them and closes it up if the boolean +% is true. It draws the curve forcing it to have the same direction at a +% point as the line segment connecting the preceding and following points. +% This is normally best if the curve direction changes relatively modestly +% from point to point. For example, if the polyline would be convex, then +% this smooth version would be pretty close to being convex. If the convex +% polygon has several consecutive sides that are in the same direction, +% all but the first and last of these segments in the smooth version would +% be straight. We should experiment with ``\mfc{tension atleast}'' here +% to see what difference it makes. +% \begin{macrocode} +vardef mksmooth (expr tens, cyclic) (suffix pts) = + pts1 + if pts = 1 : + if cyclic : &cycle fi + else: + if cyclic : + {pts[2]-pts[pts]} + fi + for _i = 2 upto pts-1: + ..tension tens..pts[_i]{pts[_i+1]-pts[_i-1]} + endfor + ..tension tens..pts[pts] + if cyclic : + {pts[1]-pts[pts-1]}..tension tens..cycle + fi + fi +enddef; + +% \end{macrocode} +% +% \DescribeRoutine{curve} +% \DescribeRoutine{tcurve} +% The old \cs{curve} command in \mfpic{} permitted no tension parameter +% and wrote a \grafbase{} \gbc{curve} command. For backward compatibility +% we keep that name, but simply call the \gbc{tcurve} command with the +% default value for tension. \gbc{tcurve} converts a list of pairs to an +% array, then calls \gbc{mksmooth} on the array. +% \begin{macrocode} +def curve = tcurve (default_tension) enddef; +vardef tcurve (expr tens, cyclic) (text t) = + save _tc; textpairs (_tc) (t); mksmooth (tens, cyclic, _tc) +enddef; + +% \end{macrocode} +% +% \DescribeRoutine{mkbezier} +% \DescribeRoutine{bezier} +% \DescribeRoutine{tbezier} +% It seemed odd that we had no way for an \MF-savvy user to easily get +% the standard \mfc{p..q..r} kind of path. For such a simple one +% \cs{mfobj} with the explicit path expression would work, but when one +% has to add a tension to it, it is nice to have an abbreviation. That's +% what these are for. +% \begin{macrocode} +vardef mkbezier (expr tens, cyclic) (suffix pts) = + for _i = 1 upto pts-1 : pts[_i]..tension tens.. endfor + pts[pts] if cyclic : ..tension tens..cycle fi +enddef; + +def bezier = tbezier (default_tension) enddef; +vardef tbezier (expr tens, cyclic) (text t) = + save _tsb; textpairs (_tsb) (t); mkbezier (tens, cyclic) (_tsb) +enddef; + +% \end{macrocode} +% +% \DescribeRoutine{qbezier} +% \DescribeRoutine{mkqbezier} +% It also semed we ought to allow \mfpic{} users to easily reproduce the +% effect of a sequence of \LaTeX's \cs{qbezier} commands. That's what +% these are for. +% +% These commands and the various splines don't use tension as they have +% their control points explicitly given, not computed from the tension +% value by \MF. The \gbc{qbezier} command does not produce a smooth path +% unless the controls are explicitely chosen for that. The spline commands +% will almost always produce a smooth path. +% +% \gbc{mkqbezier} requires an even number of points for a cyclic path, +% an oddnumber for a noncyclic path. If \gbc{pts} has the wrong parity, +% the last point in the list is repeated. This makes the last segment +% either trivial or a straight line. We increment \gbc{_mqb} instead of +% \gbc{pts} so a user's suffix doesn't unexpectedly change. +% \begin{macrocode} +vardef mkqbezier (expr cyclic) (suffix pts) = + save _mqb; _mqb := pts; + if (cyclic and odd pts) or not (cyclic or odd pts): + pts[incr _mqb] := pts[pts]; + fi + if cyclic : pts[incr _mqb] := pts1; fi + pts1 + for _i = 2 step 2 until _mqb - 1 : + ..controls 1/3[pts[_i],pts[_i-1]] and 1/3[pts[_i], pts[_i+1]] + ..pts[_i+1] + endfor + if cyclic : &cycle fi +enddef; + +vardef qbezier (expr cyclic) (text t) = + save _qbz; textpairs (_qbz) (t); mkqbezier (cyclic) (_qbz) +enddef; + +% \end{macrocode} +% +% For quadratic B-splines, a list of pairs representing the control +% points must be given. The nodes of the path and the cubic Bezi\'er +% controls required to produce a quadratic B-spline are computed. +% +% \DescribeRoutine{mkqbs} +% For simplicity, the list is converted to an array \gbc{_oq} first and +% \gbc{mkqbs} is called. This draws an open spline based on the points in +% an array \gbc{b}. +% \begin{macrocode} +vardef openqbs (text t) = + save _oq; textpairs (_oq) (t); mkqbs (_oq) +enddef; + +vardef closedqbs (text t) = + save _cq; textpairs (_cq) (t); + _cq[incr _cq] := _cq1; _cq[incr _cq] := _cq2; + mkqbs (_cq) & cycle +enddef; + +vardef mkqbs (suffix b) = + for _i = 1 upto b-2: + 0.5[b[_i], b[_i+1]] + ..controls 1/6[b[_i+1], b[_i]] and 1/6[b[_i+1], b[_i+2]].. + endfor + 0.5[b[b-1], b[b]] +enddef; + +% \end{macrocode} +% As for cubic B-splines, I'll have to trust the previous coder, as I +% didn't even know what a cubic B-spline was until I deduced it from his +% code. Earlier versions of \gbc{mkclosedcbs} would define +% \gbc{b[incr b]:=b1} and \gbc{b[incr b]:=b2}. I decided we shouldn't +% change the values of variables associated with the given suffix \gbc{b} +% and so now we use \gbc{mkopencbs} to get most of the way around and then +% fill in the gap with an explicit call to \gbc{opencbs}). +% \begin{macrocode} +vardef mkopencbs (suffix b) = + for _i = 1 upto b-3: + (b[_i]+4b[_i+1]+b[_i+2])/6 + ..controls 1/3[b[_i+1], b[_i+2]] and 2/3[b[_i+1], b[_i+2]].. + endfor + (b[b-2]+4b[b-1]+b[b])/6 +enddef; +vardef mkclosedcbs (suffix b) = + mkopencbs (b) & opencbs (b[b-2],b[b-1],b[b], b1, b2, b3) & cycle +enddef; + +vardef opencbs (text t) = + save _oc; textpairs (_oc) (t); mkopencbs (_oc) +enddef; +vardef closedcbs (text t) = + save _clc; textpairs (_clc) (t); mkclosedcbs (_clc) +enddef; + +% \end{macrocode} +% When calling \gbc{curve} or \gbc{tcurve} there there can be a problem +% with the resulting path: even with high tension one is not guaranteed +% that a sequence of points with increasing x-coordinate will produce a +% path with increasing x-coordinate. The requirement to guarantee this is +% that the control points of the segment connecting $(x\sb1, y\sb1)$ to the +% next $(x\sb2, y\sb2)$ have their \gbc{xpart} in the interval $x\sb1 < x +% < x\sb2$. +% +% Therefore, if we wish to plot a curve connecting points with increasing +% x-coordinates and believe that the resulting path should be the graph of +% a function, we pretty much have to select the control points ourselves. +% A related problem is to keep the path under control. That is, the +% segment of the curve connecting $(x\sb1, y\sb1)$ to the next $(x\sb2, +% y\sb2)$ should have \gbc{ypart} within an interval not too much larger +% than the interval $y\sb1 < y < y\sb2$. +% +% We accomplish both these tasks at once by making the vector from +% $(x\sb n, y\sb n)$ to its \mfc{postcontrol} have length less than +% $|x\sb{n+1} - x\sb n|$, and the same for the vector from $(x\sb{n+1}, +% y\sb{n+1})$ to its \mfc{precontrol} +% +% Another concern is what direction to place the controls. In +% \gbc{mksmooth} we ask the direction at a given point to be the average +% of the straight line directions to adjacent points. For graphing +% functions, we average the slopes instead. An added refinement is that +% this is a weighted average, with the nearer x-coordinate being weighted +% more. +% +% Finally, we permit a tension of sorts by dividing the distance to the +% controls by a parameter \gbc{fcn_tension}. +% +% \DescribeRoutine{fcncontrol} +% This computes the control point for the points on the path. The +% parameters \gbc{X, Y, Z} are three successive points of the path to be +% constructed. If they are given in order, it gives the postcontrol of +% \gbc{Y}. If they are in reverse order, the precontrol is obtained. +% Oddly enough, the addition of the trap for \gbc{dl=0} or \gbc{dr=0} +% made it possible to trivially extend the array (in +% \gbc{functioncurve}) and get better looking results than either method +% used before this. +% +% \DescribeRoutine{mkfcnpath} +% This produces the path, calling \gbc{fcncontrol} to produce the controls. +% +% \DescribeRoutine{functioncurve} +% \DescribeRoutine{fcncurve} +% This is the interface; \gbc{fcncurve} calls \gbc{functioncurve} with the +% default tension, which then takes a list of points, converts it to an +% array, and calls \gbc{mkfcnpath} to build the path. +% \begin{macrocode} +vardef fcncontrol (expr ftens, X, Y, Z) = + save dl, dr, before, after; pair before, after; + before := Y - X; after := Z - Y; + dl := xpart (before); dr := xpart (after); + if (dr = 0) or (dl = 0): + Y + abs(dr)/ftens * sgn before + else: + Y + abs(dr)/ftens * unitvector (before*dr/dl + after*dl/dr) + fi +enddef; + +vardef mkfcnpath (expr ftens) (suffix q) = + for _i = 1 upto q - 1: + q[_i]..controls fcncontrol (ftens) (q[_i-1], q[_i], q[_i+1]) + and fcncontrol (ftens) (q[_i+2], q[_i+1], q[_i]).. + endfor + q[q] +enddef; + +def fcncurve = functioncurve (emax(1.2default_tension, eps)) enddef; +vardef functioncurve (expr ftens) (text t) = + save _fc; textpairs (_fc) (t); + if _fc > 1 : _fc0 := _fc1; _fc[_fc+1] := _fc[_fc]; fi + mkfcnpath (ftens)(_fc) +enddef; + +% \end{macrocode} +% +% \DescribeRoutine{turtle} +% \emph{Turtle graphics} was a teaching tool to get youngsters used to the +% concept of programming while also teaching geometry. The students fed an +% Apple II computer a sequence of angles and distances, and a small +% triangle on the screen (the ``turtle'') would turn the indicated amount +% and travel the indicated distance, tracing a polyline on the screen. +% +% The argument of \gbc{turtle} is a list of pairs. The first is the +% starting point, the rest are vector displacements (moves). The +% distance and incremental angles of the original turtle graphics seems +% to have been abandoned at some point in the development of \grafbase. +% \begin{macrocode} +vardef turtle (text t) = + save _tu; pair _tu[]; _tu := 0; _tu0 := (0, 0); + for _a = t: _tu[incr _tu] := _tu[_tu - 1] + _a; endfor + mkpoly (false, _tu) +enddef; + +% \end{macrocode} +% +% +% \section{Arcs, Circles and Ellipses} +% +% We have multiple commands that generate circular arcs, differing in +% how the arc is specified. All are (in part) based on the following +% \gbc{mkarc}. However, perfectly reasonable arcs can have centers so far +% away that requiring the center among the parameters can cause numeric +% overflow. +% +% I'd like to use some scheme that avoids this. It is possible, given +% three reasonably spaced points on an arc with angle less than 90 +% degrees between each, to draw the arc without finding the center. +% However, I am not sure how to reduce any given format to this +% information +% +% Another problem is that of accuracy. If the angle is small, accuracy is +% not usually a problem, but if an angle is close to 360, and the +% endpoints are known, then finding the center (or finding other points on +% the arc without knowing the center) is unstable. +% +% There is really no problem with \gbc{mkarc} itself: if you can express +% both \gbc{center} and \gbc{from} in \MF, then the other values on the +% arc should be no problem. +% +% \DescribeRoutine{mkarc} +% This takes the center, starting and ending point (pair expressions) and +% the angle, and returns the arc defined pretty much the way \file{plain.mf} +% defines \mfc{quartercircle}. +% +% It would be easier to do something like we frequently do with +% \mfc{fullcircle}: make an arc of unit radius, and then rotate, scale +% and shift it into place. However, I would like to accomplish at least +% the following: if an endpoint of the arc is among the parameters, or is +% straightforwardly implied by them, then the corresponding endpoint of +% the path created should test equal to that point. Shifting works OK, but +% scaling and rotating cause roundoff differences. +% +% Note that \gbc{mkarc} has parameters that over-determine the arc. It +% is only called by arc making commands that have calculated these +% parameters. \gbc{mkarc}'s job is to ensure that the arc begins at +% \gbc{from} and ends at \gbc{to} (exactly). +% \begin{macrocode} +vardef mkarc (expr center, from, to, sweep) = + save n, d; pair d; + n := ceiling (abs(sweep)/45); + d := (from - center) rotated (signof (sweep) 90); + from{d} + for j = 1 upto n-1 : + ..(from rotatedabout (center, j/n*sweep)){d rotated (j/n*sweep)} + endfor ..to{d rotated sweep} +enddef; + +% \end{macrocode} +% +% \DescribeRoutine{arc} +% The most basic: center of circle, starting point of arc, and angle +% subtended. Another name for \gbc{arc} is \gbc{arccps}, (\gbc{cps} is +% for ``center, point, sweep''). +% \begin{macrocode} +vardef arc (expr center, from, sweep) = + if (center = from) or (sweep = 0) : + from--from + else: + save to; pair to; + to := from rotatedabout (center, sweep); + mkarc (center, from, to, sweep) + fi +enddef; +def arccps = arc enddef; + +% \end{macrocode} +% +% \DescribeRoutine{arccenter} +% For arcs greater than 90 degrees we will convert to the above basic +% \gbc{mkarc}. Since two of the methods don't provide the center among the +% parameters, we use the utility \gbc{arccenter} to locate that center, +% given two points and the angle. This can fail (arithmetic overflow) if +% the angle is too small relative to the distance between the points. +% Therefore, we try not to call it for small angles (or angles near +% multiples of 360). +% +% We find the center by solving equations representing two lines which +% must be perpendicular to the circle. Which two lines we use depends on +% the sweep. For accurate solutions we want the angle between the two +% lines to be closer to 90 than to 0. \gbc{ang} is the angle we need to +% rotate the chord \gbc{(to - from)} to be perpendicular to the circle at +% \gbc{from}. \gbc{cd} is a vector in the direction of the chord. When +% \gbc{ang} is close to $\pm90$, we use the lines perpendicular to the circle +% at \gbc{from} and \gbc{to}. Otherwise we use the lines perpendicular +% to the circle at \gbc{from} and perpendicular to the chord at its +% midpoint. The latter is better when \gbc{ang} is between $-30$ and $30$ +% degrees. +% \begin{macrocode} +vardef arccenter (expr from, to, sweep) = + save ang, c; + pair c; + ang := 90 - (sweep mod 360)/2; % -90 < ang <= 90 + if (abs(ang) = 90) or (from = to) : + GBmsg "The central point of this arc is undefined. " & + "Using midpoint of chord instead."; + 0.5[from, to] + else: + save cd; pair cd; cd := to - from; + c = from + whatever*(cd rotated ang); + if abs(ang) < 30 : + c = (0.5)[from, to] + whatever*(cd rotated 90); + else: + c = to + whatever*(-cd rotated -ang); + fi + c + fi +enddef; + +% \end{macrocode} +% +% \DescribeRoutine{midarc} +% This finds the midpoint of the arc determined by two points and an +% angle. It work because the angle subtended at \gbc{from} by an arc of +% length \gbc{sweep/2} is \gbc{sweep/4}. We use it for small angles, as +% we can then draw the arc without having to find its center. +% \begin{macrocode} +vardef midarc (expr from, to, sweep) = + save m, cd; pair m, cd; + cd := to - from; + m = from + whatever*( cd rotated (-sweep/4)); + m = 0.5[from, to] + whatever*(cd rotated 90); + m +enddef; + +% \end{macrocode} +% +% \DescribeRoutine{arcpps} +% In this form we are given two points and the angle of the arc between +% them. If the points are equal or the sweep makes the arc undefined, we +% return a line segment. If the sweep is less than 90 degrees we use the +% idea from the code of \mfc{quartercircle}, except, when the sweep is +% greater than 45 degrees we let \MF{} find the midpint \gbc{m} of the +% arc. Otherwise, we get the center of the circle and call \gbc{mkarc}. +% \begin{macrocode} +vardef arcpps (expr from, to, sweep) = + if ((sweep mod 360) = 0) or (from = to) : + GBmsg "Undefined arc. A line segment will be used instead."; + from--to + elseif abs(sweep) <= 90 : + save cd; pair cd; cd := to - from; + if abs(sweep) <= 45 : + from{cd rotated (-sweep/2)}..to{cd rotated (sweep/2)} + else: + from{cd rotated (-sweep/2)}..midarc(from, to, sweep){cd} + ..to{cd rotated (sweep/2)} + fi + else: + save center; pair center; + center := arccenter (from, to, sweep); + mkarc (center, from, to, sweep) + fi +enddef; + +% \end{macrocode} +% +% \DescribeRoutine{arcplr} +% This one takes the center and polar coordinates of the ends relative to +% the center. We just call \gbc{mkarc} with the obviously computed +% endpoints and sweep. +% \begin{macrocode} +vardef arcplr (expr center, frtheta, totheta, rad) = + if rad = 0 : + center -- center + else: + save from, to; pair from, to; + from := center + rad*dir frtheta; + to := center + rad*dir totheta; + if frtheta = totheta : + from--to + else: + mkarc (center, from, to, totheta - frtheta) + fi + fi +enddef; +% \end{macrocode} +% +% \DescribeRoutine{arcalt} +% This one is the same as above, but with the same argument order as +% \gbc{sector}. +% \begin{macrocode} +vardef arcalt (expr center, radius, anglefrom, angleto) = + arcplr (center, anglefrom, angleto, radius) +enddef; + +% \end{macrocode} +% +% \DescribeRoutine{arcppp} +% This last one finds the arc connecting three points in the order given. +% It works by calling \gbc{arcpps} twice, using first the sweep from +% \gbc{first} to \gbc{second}, and then the sweep from \gbc{second} to +% \gbc{third}. Each of these is twice the opposite angle of the triangle +% formed from these points, and calculated by \gbc{cornerangle}. +% \begin{macrocode} +vardef arcppp (expr first, second, third) = + arcpps (first, second, 2*cornerangle (third, first, second)) & + arcpps (second, third, 2*cornerangle (first, second, third)) +enddef; + +% \end{macrocode} +% +% \DescribeRoutine{ellipse} +% \DescribeRoutine{circle} +% We get an ellipse by x-scaling and y-scaling a unit circle, rotating it +% and then shifting it into position. All parameters are coordinate +% independent expressions, with obvious meaning (\gbc{center} is a pair, the +% rest numeric). \gbc{circle} is similar, but we only scale and shift. +% \begin{macrocode} +vardef ellipse (expr center, radx, rady, angle) = + fullcircle xscaled (2*radx) yscaled (2*rady) rotated angle + shifted center +enddef; +vardef circle (expr center, rad) = + fullcircle scaled (2*rad) shifted center +enddef; + +% \end{macrocode} +% \DescribeRoutine{circlecp} +% \DescribeRoutine{circleppp} +% \DescribeRoutine{circlepps} +% The next three implement different ways of specifying a circle. The +% first produces the circle with a given center passing through a given +% point. The second produces the circle passing through three given +% points. The third produces the circle passing through two given points +% in such a way that the arc from the first to the second has a given +% angle. +% \begin{macrocode} +vardef circlecp (expr center, point) = + mkarc (center, point, point, 360) & cycle +enddef; +vardef circleppp (expr one, two, three) = + save ang; numeric ang[]; + ang0 := cornerangle(three, one, two); + ang1 := cornerangle(one, two, three); + ang2 := cornerangle(two, three, one); + arcpps (one, two, 2ang0) & arcpps (two, three, 2ang1) & + arcpps (three, one, 2ang2) & cycle +enddef; +vardef circlepps (expr one, two, sweep) = + save ang, full; numeric ang[], full; + full := signof (sweep) 360; + ang1 := sweep mod (full); + ang2 := full - ang1; + arcpps (one, two, ang1) & arcpps (two, one, ang2) & cycle +enddef; + +% \end{macrocode} +% +% \DescribeRoutine{pathcenter} +% This finds the center of a circle. For other paths, the point found +% may be meaningless (but it will also obtain the center of an arc or a +% rectangle). It takes three supposedly distinct points on the path and +% finds the intersection of the perpendicular bisectors of two chords. +% \begin{macrocode} +vardef pathcenter expr p = + save a, cntr, n; pair cntr, a[]; + n := length p; + a1 = pnt 0 (p); + a3 = pnt [n/2] (p); + if cycle p : + a2 = pnt [n/4] (p); + a4 = pnt [3n/4] (p); + else: + a2 := a3; + a4 := pnt[n] (p); + fi + cntr = .5[a1, a3] + whatever*((a3 - a1) rotated 90); + cntr = .5[a2, a4] + whatever*((a4 - a2) rotated 90); + cntr +enddef; + +% \end{macrocode} +% \DescribeRoutine{circumcircle} +% \DescribeRoutine{incircle} +% \DescribeRoutine{excircle} +% \DescribeRoutine{ninepointcircle} +% These four create the relevant circles from a given triangle. The +% triangle is specified as a path expression, so they produce results for +% any path, but make sense only for a cyclic triangular path. +% \begin{macrocode} +vardef circumcircle expr t = + circleppp (pnt0 (t), pnt1 (t), pnt2 (t)) +enddef; + +vardef incircle expr t = + save A, B, C; pair A, B, C; + A := pnt0 (t); + B := pnt1 (t); + C := pnt2 (t); + % Find the tangent points on the sides. E.g., a is the common + % distance from A to the tangent points on the adjacent sides. + save a, b, c; + a + b = abs (B-A); + b + c = abs (C-B); + a + c = abs (A-C); + circleppp (A + a*unitvector (B-A), + B + b*unitvector (C-B), + C + c*unitvector (A-C)) +enddef; + +vardef excircle expr n of t = + save A, B, C; pair A, B, C; + A := pnt[n] (t); + B := pnt[n + 1] (t); % wraps around + C := pnt[n + 2] (t); + save a, b, c; + a - b = abs (B-A); + b + c = abs (C-B); + a - c = abs (C-A); + circleppp (A + a*unitvector(B-A), + B + b*unitvector(C-B), + C + c*unitvector(C-A)) +enddef; + +vardef ninepointcircle expr t = + circleppp (medianpt 0 of t, medianpt 1 of t, medianpt 2 of t) +enddef; + +% \end{macrocode} +% +% \DescribeRoutine{circumcenter} +% \DescribeRoutine{incenter} +% \DescribeRoutine{excenter} +% \DescribeRoutine{ninepointcenter} +% \DescribeRoutine{barycenter} +% These find various centers associated with a triangle. The last one is +% made to work for any path. +% \begin{macrocode} +vardef circumcenter expr t = pathcenter circumcircle t enddef; +vardef incenter expr t = pathcenter incircle t enddef; +vardef excenter expr n of t = pathcenter excircle n of t enddef; +vardef ninepointcenter expr t = pathcenter ninepointcircle t enddef; + +% Make this work for any path. +% Divide as we go, +% decrease chance of overflow. +vardef barycenter expr t = + save n, m; n := length t; m := n + 1; + save xxx; + xxx : = pnt0 (t)/m for k = 1 upto n-1 : + pnt[k] (t)/m endfor; + if cycle t: xxx*(1 + 1/n) + else: xxx + pnt[n] (t)/m + fi +enddef; +% \end{macrocode} +% +% \DescribeRoutine{sector} +% \gbc{sector} produces the closed path consisting of a straight line +% of length \gbc{rad} from \gbc{center} in the direction \gbc{frtheta}, +% thence along an arc of the circle centered at \gbc{center} to angle +% \gbc{totheta}, and then along the straight line back to \gbc{center}. +% \begin{macrocode} +vardef sector (expr center, rad, frtheta, totheta) = + center -- arcalt (center, rad, frtheta, totheta) -- cycle +enddef; + +% \end{macrocode} +% +% +% \section{Plotting of functions} +% +% In these macros, if the boolean argument \gbc{smooth} is true then the +% path returned will be a B\'ezier, otherwise it will be a polyline. The +% parameter is simply passed to \gbc{mkpath}. If a \gbc{tens} parameter +% exists, then the smooth version will have that value of tension, +% otherwise the value of \gbc{default_tension} is used. +% +% All of these macros call \gbc{mkfcn}. +% +% \DescribeRoutine{mkfcn} +% In this command the text parameter \gbc{pf} should be the name of a +% function of some sort that can take a numeric value in parentheses and +% return a pair expression. The parameters \gbc{bmin}, \gbc{bmax} and +% \gbc{bst} determine a sequence of numeric values starting at \gbc{bmin}, +% stepping by \gbc{bst} and ending with \gbc{bmax}. These are fed to +% \gbc{pf} and the resulting pairs stored in an array. Then +% \gbc{mksmooth} is called with the tension \gbc{tens} and the name of the +% array. +% +% For stability, we don't actually step by \gbc{bst}, but round +% \gbc{(bmax-bmin)/bst} and step that many equal steps. We first adjust +% the step size upward so the number of steps doesn't exceed +% \gbc{infinity}. The path is forced to begin at \gbc{pf(bmin)} and +% end at \gbc{pf(bmax)} +% \begin{macrocode} +vardef mkfcn (expr smooth, tens) (expr bmin, bmax, bst) (text pf) = + save _p; pair _p[]; _p := 0; + save _dx, _n, _r; numeric _dx, _n, _r; + if bmax = bmin : _n := 1; + else: + _r := bmax - bmin; + _dx := max (abs(bst), nottoosmall*abs(_r), epsilon); + _n := emax (round(abs(_r)/_dx), 1); + fi + for _i = 0 upto _n: _p[incr _p] := pf(bmin + _i/_n*_r); endfor + mkpath (smooth, tens, false, _p) +enddef; +% compatibility: +def tfcn (expr smooth) = mkfcn (smooth, default_tension) enddef; + +% \end{macrocode} +% +% \DescribeRoutine{parafcn} +% This is like \gbc{mkfcn}, but the text argument is not a pair +% valued function, but rather a text parameter containing code that, when +% copied literally into a vardef, defines a function in which \gbc{t} is +% the argument, and which returns a pair. +% +% Older files are supported with a definition of \gbc{parafcn} that calls +% \gbc{tparafcn} with \gbc{default_tension}. I should have made this easier +% by reversing the smoothness and tension arguments, but for backward +% compatibility I have to leave it thus. Other commands implement \mfpic's +% tension options: \gbc{function} and \gbc{plrfcn}. They also have forms +% that accept a tension argument (\gbc{tfunction} and \gbc{tplrfcn}) and +% call them with the default tension. +% \begin{macrocode} +def parafcn (expr smooth) = tparafcn (smooth, default_tension) enddef; +vardef tparafcn (expr sm, tn) (expr bmin, bmax, bst) (text pf) = + save _fp; vardef _fp (expr t) = pf enddef; + mkfcn (sm, tn) (bmin, bmax, bst) (_fp) +enddef; + +% \end{macrocode} +% +% \DescribeRoutine{xfcn} +% This first converts its final argument, which should be a numeric +% valued function \gbc{f}, to a pair valued function \gbc{(x, f(x))}, then +% calls \gbc{mkfcn} to return the path that should be the graph of $f(x)$. +% \begin{macrocode} +vardef xfcn (expr smooth) (expr xmin, xmax, st) (text _fx) = + save _fp; vardef _fp (expr _x) = (_x, _fx(_x)) enddef; + mkfcn (smooth, default_tension) (xmin, xmax, st) (_fp) +enddef; + +% \end{macrocode} +% +% \DescribeRoutine{function} +% This is to \gbc{xfcn} as \gbc{parafcn} is to \gbc{mkfcn}: it +% takes a text argument and copies it into a vardef so as to define a pair +% valued function with a literal \gbc{x} as the argument. +% +% \DescribeRoutine{btwnfcn} +% This is mainly for the sake of simpler \mfpic{} output, implementing +% the \cs{btwnfcn} macro. +% \begin{macrocode} +def function (expr smooth) = tfunction (smooth, default_tension) enddef; +vardef tfunction (expr smooth, tens) (expr xmin, xmax, st) (text _fx) = + save _fp; vardef _fp (expr x) = (x, _fx) enddef; + mkfcn (smooth, tens) (xmin, xmax, st) (_fp) +enddef; + +def btwnfcn (expr sm) = tbtwnfcn (sm, default_tension) enddef; +vardef tbtwnfcn (expr sm, tn)(expr xlo, xhi, st)(text _fx)(text _gx) = + tfunction (sm, tn) (xlo, xhi, st) (_fx) -- + ( reverse tfunction (sm, tn) (xlo, xhi, st) (_gx) ) -- cycle +enddef; + +% \end{macrocode} +% +% \DescribeRoutine{rfcn} +% This takes the name of a function \gbc{f} which is a numeric +% valued function of a numeric parameter. It interprets it as a polar +% curve $(\theta, f(\theta))$, converts that to a curve in rectangular +% coordinates and calls \gbc{mkfcn} on it. +% \begin{macrocode} +vardef rfcn (expr smooth) (expr tmin, tmax, st) (text ft) = + save _fq; vardef _fq (expr t) = (ft(t)) * (dir t) enddef; + mkfcn (smooth, default_tension) (tmin, tmax, st) (_fq) +enddef; + +% \end{macrocode} +% +% \DescribeRoutine{plrfcn} +% This is to \gbc{rfcn} as \gbc{parafcn} is to \gbc{mkfcn}: the +% text argument should be code that can be copied literally into a +% \mfc{vardef} creating a numeric function with a literal \gbc{t} as the +% parameter (representing $\theta$). +% \begin{macrocode} +def plrfcn (expr smooth) = tplrfcn (smooth, default_tension) enddef; +vardef tplrfcn (expr smooth, tens) (expr tmin, tmax, st) (text ft) = + save _fq; vardef _fq (expr t) = (ft) * (dir t) enddef; + mkfcn (smooth, tens) (tmin, tmax, st) (_fq) +enddef; + +% \end{macrocode} +% +% +% \section{Pie charts and bar charts} +% +% \DescribeRoutine{piechart} +% The \gbc{piechart} command calculates the wedges of a pie from the text +% parameter \gbc{data}. It should be a list of positive numerics, and the +% result will be one wedge for each datum, the area of the wedge being +% proportional to the corresponding datum. The wedge for each datum has +% its point at \gbc{cent} and the wedge for the first datum begins at +% angle \gbc{ang}. Each wedge is clockwise from the preceding one if +% \gbc{sign = -1}, otherwise anticlockwise. The radius of the pie is +% \gbc{rad}. +% +% After the calculations, the wedges (closed sectors) are stored in the +% array \gbc{piewedge[]} with the numeric \gbc{piewedge} holding the number +% of wedges. The center is saved in \gbc{piecenter}, the directions of the +% wedges (the bisecting rays) are stored in \gbc{piedirection[]}, the +% starting angles of the wedges in \gbc{pieangle[]} +% \begin{macrocode} +vardef piechart (expr sign, ang, cent, rad) (text data) = + save _sum, _tot; + numeric piewedge; piewedge := 0; + numeric pieangle, pieangle[]; pieangle0 := 0; + for _val = data : + pieangle[incr piewedge] := pieangle[piewedge - 1] + _val; + endfor + _tot := pieangle[piewedge]; + pair piecenter; piecenter := cent; + path piewedge[]; + numeric piedirection; pair piedirection[]; + pieangle[piewedge + 1] = ang + sign*360; + for _n = piewedge downto 1 : + pieangle[_n] := ang + sign*pieangle[_n - 1]/_tot*360; + piewedge[_n] = + sector(cent, rad, pieangle[_n], pieangle[_n+1]); + piedirection[_n] := dir(0.5[ pieangle[_n], pieangle[_n+1] ]); + endfor + piedirection := pieangle := piewedge; +enddef; + +% \end{macrocode} +% +% \DescribeRoutine{barchart} +% I was told that there are better ways (than piecharts) to represent +% quantitative data. Perhaps bar charts are better. \gbc{barchart} +% calculates the bars from the text parameter, \gbc{data}. These bars are +% vertical \gbc{vert} is true, otherwise horizontal. +% +% \gbc{start} is the location (on the appropriate axis) of the start of +% the first bar. \gbc{sep} is the separation between bar centers. \gbc{r} +% is the ratio of the width of the bars to their separation. +% +% After the calculations, the array of paths \gbc{chartbar[]} holds the +% rectangles, \gbc{barend[]} holds their rightmost or topmost +% coordinates (which is just the items in \gbc{data} or their y-parts), +% \gbc{barbegin[]} holds their leftmost or bottommost coordinates (either +% 0 or the x-parts of the data), \gbc{barstart[]} holds the appropriate +% coordinate of the leading edge of the bar, and \gbc{barwd = r*sep}. +% +% If the data are pair data, this command uses the x-part as the beginning +% of the bar and the y-part as the end. Thus Gantt diagrams can be +% created. We keep \gbc{barlength} for backward compatibility (formerly +% all data had to be numeric and bars went from 0 to \gbc{barlength[]}). +% \gbc{barlength[]} was made available to help place some label or symbol +% at the end of a bar and existing code might break if we omitted it. +% \begin{macrocode} +def barchart (expr start, sep, r, vert)(text data) = + numeric barbegin, barbegin[], + barend, barend[], + barlength, barlength[], + barstart, barstart[], + chartbar, barwd; + path chartbar[]; + chartbar := 0; barwd := r*sep; + for _itm = data : + barend[incr chartbar] := if pair _itm: ypart _itm else: _itm fi; + barbegin[chartbar] := if pair _itm: xpart _itm else: 0 fi; + endfor + barbegin := barend := barlength := barstart := chartbar; + for _n = 1 upto chartbar : + barstart[_n] := start + sep*(_n-1); + barlength[_n] := barend[_n]; + chartbar[_n] := rect ((barbegin[_n], 0), ( barend[_n], barwd) ) + shifted (0, barstart[_n]) if vert: xyswap fi; + endfor +enddef; + +% \end{macrocode} +% +%^^A Overlays - taken from MFbook, p 295. (Bruce Leban) +% +% \section{Overlays} +% +% This final code predates me. I've never seen it used and don't know what +% its for. For the \MP{} version I just tried to make sure everything was +% defined in \MP{} or \file{plain.mp} and otherwise left it alone. +% \begin{macrocode} +picture totalpicture; +boolean totalnull, currentnull; +def clearit = + currentpicture := totalpicture := nullpicture; + currentnull := totalnull := true; +enddef; + +def keepit = +% mono (currentpicture); + addto totalpicture also currentpicture; + currentpicture := nullpicture; + totalnull := currentnull; + currentnull := true; +enddef; + +def addto_currentpicture = + currentnull := false; + addto currentpicture +enddef; + +def mergeit (text do) = + if totalnull : + do currentpicture + elseif currentnull : + do totalpicture + else: + begingroup + save _v_; picture _v_; + _v_ := currentpicture; +% mono (_v_); + addto _v_ also totalpicture; + do _v_ + endgroup + fi +enddef; + +% \end{macrocode} +% This apparently redundant definition (\gbc{shipit} = \gbc{shipit_}) is +% so that \mfpic{} can turn shipping off and back on by redefining +% \gbc{shipit} to either \gbc{shipit_} or \mfc{relax}. +% \begin{macrocode} +def shipit_ = + mergeit (shipout) +enddef; +def shipit = shipit_ enddef; + +%<*MF> +def showit_ = + mergeit (show_) +enddef; +def show_ suffix v = + display v inwindow currentwindow +enddef; + +% +% \end{macrocode} +% +% Here we initialize \gbc{gcode} (which current versions of mfpic do not use) +% for hacked \mfpic{} files that require it. And that's all. +% \begin{macrocode} +numeric gcode; gcode := 0; + +%% end grafbase.mf +%% end grafbase.mp +% +% \end{macrocode} +% +% The following code was borrowed from the the standard \LaTeX{} graphics +% package (\file{dvipsname.def} by David Carlisle and Sebastian Rahtz). In +% fact it was mostly generated automatically by some editor macros that +% replaced \prog{graphics} package code with the \grafbase{} code. +% +%^^A This file may be distributed under the terms of the LaTeX Project Public +%^^A License, as described in \file{lppl.txt} in the base LaTeX +%^^A distribution, either version 1.0 or, at your option, any later version. +% +% Declare all the dvips color names to be color variables: +% \begin{macrocode} +%<*dvips> +color Apricot, Aquamarine, Bittersweet, Black, Blue, BlueGreen, +BlueViolet, BrickRed, Brown, BurntOrange, CadetBlue, CarnationPink, +Cerulean, CornflowerBlue, Cyan, Dandelion, DarkOrchid, Emerald, +ForestGreen, Fuchsia, Goldenrod, Gray, Green, GreenYellow, JungleGreen, +Lavender, LimeGreen, Magenta, Mahogany, Maroon, Melon, MidnightBlue, +Mulberry, NavyBlue, OliveGreen, Orange, OrangeRed, Orchid, Peach, +Periwinkle, PineGreen, Plum, ProcessBlue, Purple, RawSienna, Red, +RedOrange, RedViolet, Rhodamine, RoyalBlue, RoyalPurple, RubineRed, +Salmon, SeaGreen, Sepia, SkyBlue, SpringGreen, Tan, TealBlue, Thistle, +Turquoise, Violet, VioletRed, White, WildStrawberry, Yellow, +YellowGreen, YellowOrange; + +% \end{macrocode} +% The function \gbc{cmyk} (which converts a CMYK quadruple to \MP's rgb +% triple) is defined in \file{grafbase.mp}, which should be input before +% \file{dvipsnam.mp}: +% \begin{macrocode} +Apricot = cmyk( 0, 0.32, 0.52, 0); +Aquamarine = cmyk(0.82, 0, 0.30, 0); +Bittersweet = cmyk( 0, 0.75, 1, 0.24); +Black = cmyk( 0, 0, 0, 1); +Blue = cmyk( 1, 1, 0, 0); +BlueGreen = cmyk(0.85, 0, 0.33, 0); +BlueViolet = cmyk(0.86, 0.91, 0, 0.04); +BrickRed = cmyk( 0, 0.89, 0.94, 0.28); +Brown = cmyk( 0, 0.81, 1, 0.60); +BurntOrange = cmyk( 0, 0.51, 1, 0); +CadetBlue = cmyk(0.62, 0.57, 0.23, 0); +CarnationPink = cmyk( 0, 0.63, 0, 0); +Cerulean = cmyk(0.94, 0.11, 0, 0); +CornflowerBlue = cmyk(0.65, 0.13, 0, 0); +Cyan = cmyk( 1, 0, 0, 0); +Dandelion = cmyk( 0, 0.29, 0.84, 0); +DarkOrchid = cmyk(0.40, 0.80, 0.20, 0); +Emerald = cmyk( 1, 0, 0.50, 0); +ForestGreen = cmyk(0.91, 0, 0.88, 0.12); +Fuchsia = cmyk(0.47, 0.91, 0, 0.08); +Goldenrod = cmyk( 0, 0.10, 0.84, 0); +Gray = cmyk( 0, 0, 0, 0.50); +Green = cmyk( 1, 0, 1, 0); +GreenYellow = cmyk(0.15, 0, 0.69, 0); +JungleGreen = cmyk(0.99, 0, 0.52, 0); +Lavender = cmyk( 0, 0.48, 0, 0); +LimeGreen = cmyk(0.50, 0, 1, 0); +Magenta = cmyk( 0, 1, 0, 0); +Mahogany = cmyk( 0, 0.85, 0.87, 0.35); +Maroon = cmyk( 0, 0.87, 0.68, 0.32); +Melon = cmyk( 0, 0.46, 0.50, 0); +MidnightBlue = cmyk(0.98, 0.13, 0, 0.43); +Mulberry = cmyk(0.34, 0.90, 0, 0.02); +NavyBlue = cmyk(0.94, 0.54, 0, 0); +OliveGreen = cmyk(0.64, 0, 0.95, 0.40); +Orange = cmyk( 0, 0.61, 0.87, 0); +OrangeRed = cmyk( 0, 1, 0.50, 0); +Orchid = cmyk(0.32, 0.64, 0, 0); +Peach = cmyk( 0, 0.50, 0.70, 0); +Periwinkle = cmyk(0.57, 0.55, 0, 0); +PineGreen = cmyk(0.92, 0, 0.59, 0.25); +Plum = cmyk(0.50, 1, 0, 0); +ProcessBlue = cmyk(0.96, 0, 0, 0); +Purple = cmyk(0.45, 0.86, 0, 0); +RawSienna = cmyk( 0, 0.72, 1, 0.45); +Red = cmyk( 0, 1, 1, 0); +RedOrange = cmyk( 0, 0.77, 0.87, 0); +RedViolet = cmyk(0.07, 0.90, 0, 0.34); +Rhodamine = cmyk( 0, 0.82, 0, 0); +RoyalBlue = cmyk( 1, 0.50, 0, 0); +RoyalPurple = cmyk(0.75, 0.90, 0, 0); +RubineRed = cmyk( 0, 1, 0.13, 0); +Salmon = cmyk( 0, 0.53, 0.38, 0); +SeaGreen = cmyk(0.69, 0, 0.50, 0); +Sepia = cmyk( 0, 0.83, 1, 0.70); +SkyBlue = cmyk(0.62, 0, 0.12, 0); +SpringGreen = cmyk(0.26, 0, 0.76, 0); +Tan = cmyk(0.14, 0.42, 0.56, 0); +TealBlue = cmyk(0.86, 0, 0.34, 0.02); +Thistle = cmyk(0.12, 0.59, 0, 0); +Turquoise = cmyk(0.85, 0, 0.20, 0); +Violet = cmyk(0.79, 0.88, 0, 0); +VioletRed = cmyk( 0, 0.81, 0, 0); +White = cmyk( 0, 0, 0, 0); +WildStrawberry = cmyk( 0, 0.96, 0.39, 0); +Yellow = cmyk( 0, 0, 1, 0); +YellowGreen = cmyk(0.44, 0, 0.74, 0); +YellowOrange = cmyk( 0, 0.42, 1, 0); + +% End of file `dvipsnam.mp'. +% +% \end{macrocode} +% \clearpage +%\Finale diff --git a/Master/texmf-dist/source/generic/mfpic/mfpic.dtx b/Master/texmf-dist/source/generic/mfpic/mfpic.dtx new file mode 100644 index 00000000000..1789f6e9146 --- /dev/null +++ b/Master/texmf-dist/source/generic/mfpic/mfpic.dtx @@ -0,0 +1,5045 @@ +% \iffalse +% Copyright 2002--2003, Daniel H. Luecking +% +% Mfpic consists of the 3 files mfpic.dtx, grafbase.dtx and mfpic.ins +% and the 5 files they generate: mfpic.tex, mfpic.sty, grafbase.mf, +% grafbase.mp, and dvipsnam.mp. +% +% Mfpic may be distributed and/or modified under the conditions of the +% LaTeX Project Public License, either version 1.2 of this license or (at +% your option) any later version. The latest version of this license is in +% +% http://www.latex-project.org/lppl.txt +% +% and version 1.2 or later is part of all distributions of LaTeX version +% 1999/12/01 or later. +% +% Documentation, examples, and ancillary files are separate and not +% covered by this license. See readme.1st for a complete list. See +% individual files for any copyright and license restrictions. +% +% With respect to the proposed draft LPPL-1.3: mfpic has maintenance +% status "maintained". The Current Maintainer is Daniel H. Luecking. There +% are several Base Interpreters: TeX, LaTeX, MetaPost and Metafont. +% +%<*driver> +\documentclass[draft]{ltxdoc} + +\def\fileversion{0.7a beta} +\def\filedate{2004/04/16} + +\addtolength{\textwidth}{.5878pt} + +\def\mytt{\mdseries\ttfamily} +\renewcommand\marg[1]{{\mytt \{#1\}}} +\renewcommand\oarg[1]{{\mytt [#1]}} +\renewcommand\parg[1]{{\mytt (#1)}} +\renewcommand{\meta}[1]{{$\langle$\rmfamily\itshape#1$\rangle$}} +\DeclareRobustCommand\cs[1]{{\mytt\char`\\#1}} +\def\prog#1{{\mdseries\scshape #1}} +\def\grafbase{\prog{grafbase}} +\def\mfpic{\prog{mfpic}} +\def\Mfpic{\prog{Mfpic}} +\def\MF{\prog{meta\-font}} +\def\MP{\prog{meta\-post}} +\def\CMF{\prog{Meta\-font}} +\def\CMP{\prog{Meta\-post}} +\def\opt#1{{\sffamily\upshape#1}} +\def\mfc#1{{\mytt#1}} +\let\env\mfc +\let\file\mfc +\let\gbc\mfc +\renewcommand\{{\char`\{} +\renewcommand\}{\char`\}} +\renewcommand\|{${}\mathrel{|}{}$} + +\makeatletter +\newcommand\bsl{{\mytt\@backslashchar}} +% Stupid lists! +\def\@listi{\leftmargin\leftmargini + \parsep \z@ \@plus\p@ \@minus\z@ + \topsep 4\p@ \@plus\p@ \@minus2\p@ + \itemsep\parsep} +\let\@listI\@listi \@listi +\renewcommand\labelitemi{\normalfont\bfseries \textendash} +\renewcommand\labelitemii{\textasteriskcentered} +\renewcommand\labelitemiii{\textperiodcentered} +\leftmargini\parindent +% Stupid index! +\def\IndexParms{% + \parindent \z@ \columnsep 15pt + \parskip 0pt plus 1pt + \rightskip 5pt plus2em \mathsurround \z@ + \parfillskip=-5pt \small + % less hanging: + \def\@idxitem{\par\hangindent 20pt}% + \def\subitem{\@idxitem\hspace*{15pt}}% + \def\subsubitem{\@idxitem\hspace*{25pt}}% + \def\indexspace{\par\vspace{10pt plus 2pt minus 3pt}}} +\makeatother + +\def\pdfTeX{\textrm{pdf\kern.04em\TeX}} +\def\pdfLaTeX{\textrm{pdf\kern.06em\LaTeX}} +\def\ConTeXt{\textrm{Con\kern-.16em\TeX\kern-0.06em t}} +\def\PiCTeX{\textrm{P\kern-.13em\lower.3ex\hbox{I}C\TeX}} + +\title{The \mfpic{} package\thanks{This file has version number + \fileversion, last revised \filedate. The code described here + was developed by several people, notably Thomas Leathrum, + Geoffrey Tobin and Dan Luecking. Dan wrote this documentation.}} +\author{Dan Luecking} +\date{\filedate} +\DisableCrossrefs +\CodelineIndex +\AlsoImplementation + +\begin{document} + \DeleteShortVerb{\|} + \DocInput{mfpic.dtx} +\end{document} +% +%\fi +% +% \CheckSum{4392} +% \CharacterTable +% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +% Digits \0\1\2\3\4\5\6\7\8\9 +% Exclamation \! Double quote \" Hash (number) \# +% Dollar \$ Percent \% Ampersand \& +% Acute accent \' Left paren \( Right paren \) +% Asterisk \* Plus \+ Comma \, +% Minus \- Point \. Solidus \/ +% Colon \: Semicolon \; Less than \< +% Equals \= Greater than \> Question mark \? +% Commercial at \@ Left bracket \[ Backslash \\ +% Right bracket \] Circumflex \^ Underscore \_ +% Grave accent \` Left brace \{ Vertical bar \| +% Right brace \} Tilde \~} +% +% \catcode`\_=12 +% \maketitle +% +% \begin{abstract} +% An environment, \env{mfpic}, is defined, within which commands can +% be used for drawing pictures, especially graphs of mathematical +% functions. These commands actually write code to an external file +% which can be processed through \MF{} or \MP{} (depending on package +% options) to produce the picture. The picture is then included on a +% second pass through \TeX. +% +% This file documents the source code. See \file{mfpicdoc.tex} for the +% user documentation. +% \end{abstract} +% +% \StopEventually{\PrintIndex} +% \tableofcontents +% +% +% \section{Introductory setup}\label{intro} +% +% \Mfpic{} is designed to work with plain \TeX, \LaTeX, \pdfTeX, and +% \pdfLaTeX. +% +% \subsection{Versions numbers, category codes, etc.}\label{category} +% +% Almost all the various category code settings we do were prompted by +% an \mfpic{} user who had sent a bug report and had to send along his +% modified version of \file{mfpic.tex}. It had been modified so that +% \cs{message}\,s and \cs{write}\,s would do the right thing in latex +% files where various punctuation were made active (e.g., with +% \file{french.sty}). +% +% \DescribeMacro{\mfpfileversion} +% \DescribeMacro{\mfpfiledate} +% \DescribeMacro{\mfpicversion} +% We keep track of version numbers here. We use \cs{mfpfileversion} +% because \cs{fileversion} is used by very many \LaTeX{} packages. +% This is important, because later we write the version information to the +% output file, The \cs{mfpicversion} is 100 times the numeric part of the +% version. The output file can compare this number with the corresponding +% value in \file{grafbase} and detect installations where there is a +% mismatch. +% \begin{macrocode} +%<*tex> +{\catcode\lq\.12 \catcode\lq\/12% +\gdef\mfpfileversion{0.7a beta}% +\gdef\mfpfiledate{2004/04/16}% +\gdef\mfpicversion{70}}% +\ifx\MFPicpackagE\UndEfInEd\else\expandafter\endinput\fi% +% \end{macrocode} +% +% A bug in older versions of some support files is triggered by the macro +% \cs{+}, which is an \cs{outer} macro in plain \TeX. Here we save the +% current definition and then give it a nonouter meaning. +% \begin{macrocode} +\let\mfpsaveplus\+% +\let\+\tabalign% +% \end{macrocode} +% +% \DescribeMacro{\MFPrestorecode} +% We now get rid of unusually catcoded punctuation, space and EOL. +% We save all the current category codes in the macro \cs{MFPicpackagE} +% and restore them at the end by executing this command. +% We try to assume only: that letters, numbers, +% `\texttt\bsl', `\texttt\{', `\texttt\}', `\texttt\#' and +% `\texttt\%' have the usual categories. Styles (e.g., \prog{french}) +% that make punctuation active foul up \cs{write}\,s of MF/MP code. This can +% still occur in user-generated \cs{write}\,s, so maybe some code should be +% added in \cs{mfpic} or \cs{mfsrc} command too. +% \begin{macrocode} +\edef\MFPrestoreequal{\catcode61\space\the\catcode61\relax}% +\catcode61 12\relax% +\edef\MFPrestorespace{\catcode32=\the\catcode32\relax}% +\catcode32=10\relax% +\edef\MFPrestoreEOL{\catcode13=\the\catcode13\relax}% +\catcode13=5\relax +\edef\MFPrestorelq{\catcode96=\the\catcode96\relax}% +\catcode96=12 +\def\MFPrestorecode#1{\catcode`\string#1=\the\catcode`#1\relax}% +% \end{macrocode} +% +% \DescribeMacro{\MFPicpackagE} +% This will be invoked at the end of the file to restore all the catcodes. +% This will fail if some of these characters have really bad codes +% (comment or escape, for example) but that would likely be the case only +% if {\tt\bsl} or {\tt\%} have some different codes and then everything +% above here would fail. +% \begin{macrocode} +\edef\MFPicpackagE{% + \MFPrestorecode{@}\MFPrestorecode{-}% + \MFPrestorecode{:}\MFPrestorecode{;}% + \MFPrestorecode{.}\MFPrestorecode{,}% + \MFPrestorecode{!}\MFPrestorecode{?}% + \MFPrestorecode{(}\MFPrestorecode{)}% + \MFPrestorecode{[}\MFPrestorecode{]}% + \MFPrestorecode{'}\MFPrestorecode{/}% + \MFPrestorecode{"}\MFPrestorecode{*}% + \MFPrestorecode{$}\MFPrestorecode{+}% + \MFPrestorecode{_}\MFPrestorecode{>}% + \MFPrestorecode{<}\MFPrestorecode{~}% + \MFPrestorelq\MFPrestoreEOL\MFPrestorespace + \MFPrestoreequal\catcode 10=\number\catcode10}% +% \end{macrocode} +% +% Set everything to normal except \texttt @=letter, \mfc{_}=other, and +% \texttt \textasciitilde=other. Do this by putting the settings in a +% macro and invoking the macro. That makes it possibly to redo the +% settings inside some other macro, should that ever become necessary. +% Characters 10 and 13 are \verb|^^J| and \verb|^^M|, control-J and +% control-M. +% +% \begin{macrocode} +\catcode`\@=11 +\ifx\@makeother\UndEfInEd \def\@makeother#1{\catcode`#1=12\relax}\fi +\def\mfp@sanitize{% +\catcode10=12\catcode13=5\catcode`\$=3\catcode`\ =10 +\@makeother\:\@makeother\;\@makeother\.\@makeother\,% +\@makeother\!\@makeother\?\@makeother\(\@makeother\)% +\@makeother\[\@makeother\]% +\@makeother\'\@makeother\/\@makeother\"\@makeother\*% +\@makeother\_\@makeother\`\@makeother\+\@makeother\=% +\@makeother\>\@makeother\<\@makeother\~\@makeother\-}% +\mfp@sanitize +\edef\restorenewlinechar{\newlinechar=\number\newlinechar\relax}% +\chardef\mfp@ctrlJ10 \chardef\mfp@ctrlM13 +\newlinechar\mfp@ctrlJ\def\@nl{^^J}% +% \end{macrocode} +% +% \subsection{Debugging and messages}\label{debug} +% +% \DescribeMacro{\ifmfpicdebug} +% \DescribeMacro{\mfpicdebug} +% To turn on debugging before option processing, the user must make sure +% \cs{mfpicdebug} is defined. \cs{mfp@DBlog} writes it contents to the +% log file only if debugging is on. +% \begin{macrocode} +\newif\ifmfpicdebug +\ifx\mfpicdebug\UndEfInEd \mfpicdebugfalse +\else \mfpicdebugtrue +\fi +\def\mfp@DBlog#1{% + \ifmfpicdebug{\let\@msgbreak\mfp@errbrk\wlog{Mfpic debug: #1}}\fi}% +% \end{macrocode} +% Various kinds of messages to the screen and log file. \cs{mfp@msg} is only +% used in the definition of the others and to write a blank line. We +% always use the second, which identifies the source of the message, or +% the third, which adds the word `warning'. The fourth is for errors +% and provides for help if a user presses `\texttt h' in response to the +% message. The bit with the spaces is to get a hanging indentation with +% text properly aligned on screen. +% \begin{macrocode} +\def\mfp@msg#1{{\newlinechar\mfp@ctrlJ\immediate\write16{#1}}}% +\def\@msgbreak{^^J}% +\def\mfp@spaces{\space\space\space\space\space\space}% +% +\def\mfp@msgbrk{^^J\mfp@spaces\space}% +\def\mfp@errbrk{\mfp@msgbrk\mfp@spaces}% +\def\mfp@warnbrk{\mfp@errbrk\space\space}% +% +\def\Mfpic@msg#1{{\let\@msgbreak=\mfp@msgbrk + \mfp@msg{Mfpic: #1 }}}% +\def\Mfpic@warn#1{{\let\@msgbreak=\mfp@warnbrk + \mfp@msg{^^JMfpic warning: #1}}}% +\def\mfp@errmsg#1#2{{\newlinechar\mfp@ctrlJ + \let\@msgbreak\mfp@errbrk + \errhelp{#2}\errmessage{Mfpic error: #1}}}% +% \end{macrocode} +% +% In \TeX{} 3.x we can identify the line being processed when a message is +% issued. We do not support \TeX{} 2.x. The command \cs{@mfplineno} is +% for information written into the output file. +% \begin{macrocode} +\def\@online{ on line \number\inputlineno}% +\def\@mfplineno{line \number\inputlineno\space in TeX source}% +% \end{macrocode} +% +% \subsection{Detecting the format}\label{format} +% +% To detect its environment, \mfpic{} needs to test whether certain +% commands are defined. The \cs{@xp} is usually used to `expand away' +% the rest of a conditional. \cs{@XP} does this from two levels deep in +% a conditional. (We use \cs{@xp}\cs{@XP}\cs{@xp} later to expand +% away from three levels.) Since it uses \cs{@firstoftwo} and +% \cs{@secondoftwo}, we cannot use it to check their existence. +% \begin{macrocode} +\ifx\@firstoftwo\UndEfInEd \long\def\@firstoftwo#1#2{#1}\fi +\ifx\@secondoftwo\UndEfInEd \long\def\@secondoftwo#1#2{#2}\fi +\let\@xp\expandafter +\def\@XP{\@xp\@xp\@xp}% +\def\mfp@ifdefined#1{% + \ifx#1\UndEfInEd \@xp\@secondoftwo + \else\ifx#1\relax \@XP\@secondoftwo + \else \@XP\@firstoftwo + \fi\fi}% +\mfp@ifdefined\@firstofone{}{\long\def\@firstofone#1{#1}}% +% \end{macrocode} +% +% We test for the format. If all tests fail we assume plain\TeX{} or +% something compatible. Mainly this is needed to support \LaTeX. I've done +% a few things to work around \ConTeXt, but its been a moving target and +% \mfpic{} didn't work in \ConTeXt{} the last time I tried. +% +% Here we see if \cs{documentstyle} is defined, and then make sure +% we are not in \AmSTeX{}. Probably there is a better command to test, +% and perhaps we should just test whether the functionality required is +% present, but I'm not really sure how best to do either of those. +% \begin{macrocode} +\newif\if@mfp@latex \@mfp@latexfalse +\mfp@ifdefined\documentstyle + {{\def\x{AmS-TeX}% + \ifx \fmtname\x \mfp@DBlog{AmS-TeX detected.}% + \else + \global\@mfp@latextrue \mfp@DBlog{LaTeX detected.}% + \fi}}% + {\mfp@DBlog{Neither LaTeX2e nor LaTeX209 nor AmS-TeX.}}% +% \end{macrocode} +% +% We are in \LaTeXe{}, as opposed to \LaTeX2.09, if \cs{documentclass} +% is defined. +% \begin{macrocode} +\newif\if@mfp@latexe \@mfp@latexefalse +\mfp@ifdefined\documentclass + {\@mfp@latexetrue \mfp@DBlog{LaTeX2e detected.}}% + {\mfp@DBlog{Not LaTeX2e.}}% +% \end{macrocode} +% +% We now test \cs{pdfoutput} to see if pdf support is needed. +% \begin{macrocode} +\newif\if@mfp@pdf \@mfp@pdffalse +\mfp@ifdefined\pdfoutput + {\mfp@DBlog{PdfTeX detected...}% + \ifcase\pdfoutput + \mfp@DBlog{...with dvi output.}% + \else + \@mfp@pdftrue \mfp@DBlog{...with PDF output.}% + \fi}% + {\mfp@DBlog{Not pdfTeX.}}% +% \end{macrocode} +% +% \subsection{Blank line and spacing hacks}\label{spacing} +% +% In order for commands to always read their arguments correctly, +% we need EOLs to have their normal category codes, but then a +% blank line will end a paragraph, and we would like blank lines to be +% ignored inside an \env{mfpic} environment. Therefore we turn off +% \cs{par} inside that environment, and then need(?) to turn it back on +% inside \cs{tlabel} and \cs{tcaption}. \cs{@@par} (in \LaTeX) and +% \cs{endgraf} (in plain \TeX) should equal the primitive \cs{par}. +% \begin{macrocode} +\if@mfp@latex \else \let\@@par\endgraf \fi +\def\mfp@restorepar{\let\par\@@par}% +% \end{macrocode} +% +% Some \mfpic{} commands end with \cs{ignorespaces}. For some others a +% better choice is the \LaTeX{} strategy of conditionally ignoring spaces. +% \begin{macrocode} +\if@mfp@latex\else + \def\@namedef#1{\@xp\def\csname #1\endcsname}% + \def\@nameuse#1{\csname #1\endcsname}% +\fi +\mfp@ifdefined\@bsphack{}% + {\@nameuse{newskip}\@savsk + \@nameuse{newcount}\@savsf + \def\@bsphack{\relax + \ifhmode \@savsk\lastskip \@savsf\spacefactor \fi}% + \def\@esphack{\relax + \ifhmode \spacefactor\@savsf + \ifdim\@savsk>\z@ \ignorespaces + \fi\fi}}% +% \end{macrocode} +% +% We sometimes (either by accident or by choice) redefine things defined +% in some formats. For the accidental redefinitions we want to be told, +% and since we cannot assume \LaTeX{} with its \cs{newcommand}, we define +% a simple check and print a warning when it happens. +% \begin{macrocode} +\mfp@DBlog{Defining test for previous definitions of macros.}% +\mfp@ifdefined\mfp@testdef + {\Mfpic@warn{% + Hey! How can \string\mfp@testdef\space already be defined? % + \@msgbreak I'll redefine it anyway!}}% + {}% +\def\mfp@testdef#1{% + \ifx#1\UndEfInEd + \else\ifx#1\relax + \Mfpic@warn{\string #1 was previouly defined to be \string\relax.}% + \else + \Mfpic@warn{\string #1 is already defined!}% + \fi\fi}% +% \end{macrocode} +% +% \DescribeMacro{\newdef} +% \DescribeMacro{\newlet} +% Is the proposed definer of new definitions itself not new? Well, +% we'd like a warning, but go ahead and define it anyway. All +% \cs{newdef} does is check whether the macro being defined is already +% defined, raise a warning (but \emph{not} an error) and define it +% anyway. We do something similar with \cs{let}. +% \begin{macrocode} +\mfp@testdef\newdef +\mfp@testdef\newlet +\def\newdef#1{\mfp@testdef#1\def#1}% +\newdef\newlet#1{\mfp@testdef#1\let#1}% +% \end{macrocode} +% +% +% \section{Configuring \mfpic{} behavior}\label{configuring} +% +% \subsection{Options}\label{options} +% +% \DescribeMacro{ifmfpmpost} +% I have decided to make this a user-level macro so that a user can +% write code that behaves one way for \MP{} and another for \MF. However +% the commands to change the setting are private. +% +% Our switch to turn \MP{} support on or off needs to be global, so it +% can't be a normal \cs{newif}. +% \begin{macrocode} +\global\let\ifmfpmpost\iffalse +\newdef\mfp@mposttrue {\global\let\ifmfpmpost\iftrue}% +\newdef\mfp@mpostfalse{\global\let\ifmfpmpost\iffalse}% +\newdef\mfp@ifmpost{% + \ifmfpmpost\@xp\@firstoftwo\else\@xp\@secondoftwo\fi}% +% \end{macrocode} +% +% \DescribeMacro{\usemetafont} +% We make a user-level commands for switching to the appropriate drawing +% program. This is necessary for plain\TeX, but also used internally by +% \mfpic. \CMF{} is the default. This command needs to not only clear the +% boolean \cs{ifmfpmpost}, but also restore the default graphics inclusion +% commands. Actually, it doesn't \emph{need} to unless \cs{usemetapost} +% was previously issued to change the default. This would normally not +% happen unless the user wanted to close the current graph file and open a +% new one for \MF. +% +% \MP{} support requires macros for including EPS graphics. What works +% best depends on the format, so we delay the definition of +% \cs{usemetapost} until the \LaTeX{} options section, but we define the +% error message here. +% \begin{macrocode} +\newdef\usemetafont{\mfp@mpostfalse + \def\preparemfpicgraphic##1{}% + \def\setmfpicgraphic##1{\@graphfont\char\mfp@count}% + \def\getmfpicoffset##1{}}% +\newdef\MPtoolate@error{% + \mfp@errmsg {Command \string\usemetapost\space too late.}% + {It is too late to select the metapost option.^^J% + It must be selected before the \opengraphsfile command.^^J% + If you proceed, the metafont option will be assumed.}}% +% \end{macrocode} +% +% Some options need an open \file{.mf} or \file{.mp} file before they +% can do anything. This means the \cs{opengraphsfile} command must have +% been issued but not \cs{closegraphsfile}. Since those commands define and +% undefine \cs{mfp@filename}, we use that as our test. +% \begin{macrocode} +\newdef\@ifmfpfileisopen{\mfp@ifdefined\mfp@filename}% +% \end{macrocode} +% +% \DescribeMacro{\setmfvariable} +% \DescribeMacro{\setmpvariable} +% A useful abbreviation for a common requirement: declaring and setting +% a \MF{} variable. I have decided to change it to a user level macro for +% power users. \cs{setmpvariable} is another name for it. It takes three +% arguments: the type of variable, the variable itself, and its value. +% Example: \cs{setmfvariable}\marg{numeric}\marg{shadewd}\marg{.7pt}. +% Since it \mfc{save}\,s the variable, it must not have a suffix. This is +% not a big problem since mostly it is for internal use. We document +% that fact for power users and advise ordinary users on the naming of +% \MF{} variables. +% +% \DescribeMacro{\setmfboolean} +% \DescribeMacro{\setmfnumeric} +% \DescribeMacro{\setmfcolor} +% Abbreviations for the most common internal uses. In the case of \MF, +% color is the same numeric, but in \MP{} it is a separate variable type. +% \begin{macrocode} +\newdef\setmfvariable#1#2#3{% + \@ifmfpfileisopen{\mfcmd{setvariable (#1) (#2) (#3)}}{}}% +\newlet\setmpvariable\setmfvariable +\newdef\setmfboolean#1#2{\setmfvariable{boolean}{#1}{#2}}% +\newdef\setmfnumeric#1#2{\setmfvariable{numeric}{#1}{#2}}% +\newdef\setmfcolor#1#2{\setmfvariable{color}{#1}{#2}}% +% \end{macrocode} +% +% The command \cs{setmfvariable} arranges for the value of +% that variable to be localized to each figure if set inside one, but +% it is global otherwise. We have to be careful that \TeX{} and \MF{} +% stay in sync, as they have different understandings as to what is +% global and what is not. So we define a switch that will be set at the +% start of an \env{mfpic} environment to test if a command is issued +% inside one. +% +% We also define here \texttt{true} and \texttt{false} as macros. These +% are strings we need to write to the output frequently. +% \begin{macrocode} +\let\ifin@mfpicenv\iffalse +\newdef\mfp@local{\relax\ifin@mfpicenv\else\global\fi}% +\newdef\mf@T{true}% +\newdef\mf@F{false}% +\newdef\mfp@let{\mfp@local\let}% +\newdef\mfp@def{\mfp@local\def}% +% \end{macrocode} +% +% \DescribeMacro{\usecenteredcaptions} +% \DescribeMacro{\nocenteredcaptions} +% This (\opt{centeredcaptions}) is the simplest option. Other options +% follow a similar pattern: user-level commands are defined for +% turning on (and sometimes turning off) the option. Selection of +% centered captions can be turned on or off at will throughout a +% document. +% \begin{macrocode} +\newdef\usecenteredcaptions{\mfp@let\if@mfp@centcapt\iftrue}% +\newdef\nocenteredcaptions {\mfp@let\if@mfp@centcapt\iffalse}% +\nocenteredcaptions +% \end{macrocode} +% +% This common code is repeated almost verbatim four times, so we define +% the following abbreviation. The first two arguments are the commands +% to turn the option on and off. The third and fourth are the \TeX{} and +% \MF{} booleans to switch. In all cases, the default for the option is +% \emph{off}, so we run \texttt{\#2} at the end. +% \begin{macrocode} +\newdef\mfp@makeoption#1#2#3#4{% + \newdef#1{\mfp@let#3\iftrue\setmfboolean{#4}\mf@T}% + \newdef#2{\mfp@let#3\iffalse\setmfboolean{#4}\mf@F} + #2}% +% \end{macrocode} +% +% \DescribeMacro{\clipmfpic} +% \DescribeMacro{\noclipmfpic} +% The \opt{clip} option shows only what's inside the rectangle +% given in the \cs{mfpic} command. It can be turned on or off for +% each figure independently. The default is the old behavior: no +% clipping. +% +% If the output file has not been opened, \cs{setmfboolean} does nothing. +% But the \cs{opengraphsfile} code checks the boolean and writes the +% appropriate code. +% \begin{macrocode} +\mfp@makeoption\clipmfpic\noclipmfpic\if@mfp@clip{clipall}% +% \end{macrocode} +% +% \DescribeMacro{\usetruebbox} +% \DescribeMacro{\notruebbox} +% The \opt{truebbox} option lets \MP{} set the true bounding box (which +% may differ from the numbers defined through \cs{mfpic}). +% +% We don't need to be too careful with the scope of truebbox. As +% currently written, \TeX{} never needs to know the setting except to pass +% the information on to \cs{opengraphsfile} if the option is set before +% then. However, we treat it like most other settings, turning on or off +% an appropriate \TeX{} boolean, in case it ever becomes necessary to know +% the setting. It is local to any \env{mfpic}, global otherwise. The +% default is to have \opt{truebbox} turned off. +% \begin{macrocode} +\mfp@makeoption\usetruebbox\notruebbox\if@mfp@truebbox{truebbox}% +% \end{macrocode} +% +% Some options and commands require the \opt{metapost} option be in +% effect. We define a generic error message for such cases. If a command +% or option requires \MP, but the \opt{metapost} option is not set, the +% option is ignored, or the command aborted. +% \begin{macrocode} +\newdef\noMP@error#1{% + \mfp@errmsg {Metafont does not support #1, use MetaPost.}% + {Metafont doesn't support #1. Perhaps you forgot to turn on^^J% + MetaPost support by using the metapost option or issuing the^^J% + command \usemetapost. For now, I will ignore it.}}% +% \end{macrocode} +% +% \DescribeMacro{\usemplabels} +% \DescribeMacro{\nomplabels} +% An option to let \MP{} create labels, \opt{mplabels} mostly just +% switches between two versions of \cs{tlabel} so no \MP{} booleans +% are set and so syncronization of scope is not an issue. The default +% is the old behavior: labels are placed by \TeX. The actual setting is +% delayed until \cs{opengraphsfile} so the order of these commands and +% \cs{usemetapost} is not significant (before \cs{opengraphsfile}). +% +% Because of the frequent need to check this setting, we define +% \cs{@ifmplabels} to execute one of two alternatives based on it. +% \begin{macrocode} +\newdef\usemplabels{\mfp@let\if@mfp@mplabels\iftrue + \@ifmfpfileisopen + {\mfp@ifmpost{}% + {\noMP@error{mplabels}\global\let\if@mfp@mplabels\iffalse}}{}}% +\newdef\nomplabels{\mfp@let\if@mfp@mplabels\iffalse}% +\newdef\@ifmplabels{% + \if@mfp@mplabels\@xp\@firstoftwo\else\@xp\@secondoftwo\fi}% +\nomplabels +% \end{macrocode} +% +% \DescribeMacro{\overlaylabels} +% \DescribeMacro{\nooverlaylabels} +% These control an option to defer adding labels (in \MP) until the end +% of the picture. That means they don't get clipped or covered up by any +% drawing elements. Neither of these commands affect \MF, but they write +% to the output file anyway if issued after \cs{opengraphsfile}. +% \begin{macrocode} +\mfp@makeoption% + \overlaylabels\nooverlaylabels\if@mfp@overlabels{overlaylabels}% +% \end{macrocode} +% +% \DescribeMacro{\clearsymbols} +% \DescribeMacro{\noclearsymbols} +% These determine whether the symbols drawn by \cs{plotsymbol} and +% \cs{plotnodes} should have their interiors erased before being drawn. +% \begin{macrocode} +\mfp@makeoption% + \clearsymbols\noclearsymbols\if@mfp@clearsym{clearsymbols}% +% \end{macrocode} +% +% \subsection{Graphic inclusion}\label{graphic} +% +% \DescribeMacro{\mfpicllx} +% \DescribeMacro{\mfpiclly} +% The code to include a figure has been divided into three parts. Under +% \opt{metapost} we need to both include the figure and save the +% bounding box coordinates of the lower left corner. Here we initialize +% the macros that hold these coordinates. +% \begin{macrocode} +\def\mfpicllx{0}% +\def\mfpiclly{0}% +% \end{macrocode} +% +% \DescribeMacro{\preparemfpicgraphic} +% Most EPS inclusion macros make the bounding box information available, +% and so after the inclusion command we just save it in the above two +% macros. However, \LaTeX's \cs{includegraphics} does not, so we have to +% issue a command before the inclusion to force it to become available. +% That command is \cs{preparemfpicgraphic}. Usually it does nothing, +% but in the \LaTeXe{} case it locally redefines one of the graphics +% packages internal macros. +% +% \DescribeMacro{\setmfpicgraphic} +% This command includes the graphic. The \mfpic{} default (for the +% \opt{metafont} option) is set by running \cs{usemetafont}. +% +% \DescribeMacro{\getmfpicoffset} +% This one saves the lower left corner in the macros \cs{mfpicllx} and +% \cs{mfpiclly}. In the case described above, that is accomplished by +% the redefined internal command, so this command does nothing. +% +% The command \cs{@setmfpicgraphic} is a wrapper around the inclusion +% code. It takes the name of the graphic file and passes it along to the +% above three commands. Those three commands can be redefined by the +% user for special circumstances. The user is then responsible to make +% sure \cs{mfpicllx} and \cs{mfpiclly} are properly set when necessary. +% Redefining one may necessitate redefining one or both of the others. +% +% The definition of these three is delayed to the option processing +% section, except under the \MF{} default: \cs{usemetafont} defines them. +% \begin{macrocode} +\newdef\@setmfpicgraphic#1{% + \preparemfpicgraphic{#1}\setmfpicgraphic{#1}\getmfpicoffset{#1}}% +\usemetafont +% \end{macrocode} +% +% \DescribeMacro{\setfilename} +% The user can also change \cs{setfilename} to modify the assumed +% filenames of the graphics output by \MP. The default is to concatenate +% the output file's basename with the picture number. +% \begin{macrocode} +\newdef\setfilename#1#2{#1.#2}% +% \end{macrocode} +% +% \DescribeMacro{\ifmfpicdraft} +% \DescribeMacro{\mfpicdraft} +% \DescribeMacro{\mfpicfinal} +% \DescribeMacro{\mfpicnowrite} +% The \opt{draft}, \opt{final} and \opt{nowrite} options override +% \mfpic's attempts to automatically detect whether the eps +% files should be included. The \opt{final} option can also be used to +% override a global draft option. Each of these sets the user level +% if-command \cs{ifmfpicdraft}, which is retained for backward +% compatibility. These settings are global since they are intended to +% be set for the whole document. The four commands +% \cs{@mfp@draft/finaltrue/false} are used to communicate with the +% \cs{opengraphsfile} command, in case the user-level commands occur before +% then. +% \begin{macrocode} +\newif\ifmfpicdraft +\newif\if@mfp@draft +\newif\if@mfp@final +\newif\if@mfp@nowrite +\newdef\mfpicdraft{% + \@ifmfpfileisopen{\global\mfpicdrafttrue}% + {\global\@mfp@drafttrue}}% +\newdef\mfpicfinal{% + \@ifmfpfileisopen{\global\mfpicdraftfalse}% + {\global\@mfp@finaltrue}}% +\newdef\mfpicnowrite{% + \@ifmfpfileisopen + {\mfp@errmsg + {Improper use of command \string\mfpicnowrite\@online.}% + {You must issue the command \mfpicnowrite prior to + \opengraphsfile. It will be ignored now.}}% + {\global\@mfp@nowritetrue}}% +% \end{macrocode} +% +% \subsection{\CMP{} graphics and \LaTeX{} options}\label{latex} +% +% Code dependent on \LaTeXe. Mostly this is the option processing +% facilities. +% \begin{macrocode} +\if@mfp@latexe + \ProvidesPackage{mfpic}[2004/04/16 v0.7a beta.]% + \DeclareOption{draft}{\mfpicdraft}% + \DeclareOption{final}{\mfpicfinal}% + \DeclareOption{nowrite}{\mfpicnowrite}% + \DeclareOption{metapost}{\mfp@mposttrue}% + \DeclareOption{metafont}{\usemetafont}% + \DeclareOption{centeredcaptions}{\usecenteredcaptions}% + \DeclareOption{clip}{\clipmfpic}% + \DeclareOption{truebbox}{\usetruebbox}% + \DeclareOption{mplabels}{\usemplabels}% + \DeclareOption{overlaylabels}{\overlaylabels}% + \DeclareOption{clearsymbols}{\clearsymbols}% + \DeclareOption{debug}{\mfpicdebugtrue}% + \DeclareOption*{% + \@ifpackageloaded{graphics}% + {\Mfpic@warn{Unrecognized option \CurrentOption.}}% + {\Mfpic@msg{Passing option \CurrentOption\space to % + graphics package.}% + \PassOptionsToPackage{\CurrentOption}{graphics}}}% +% \end{macrocode} +% If \file{mfpic.cfg} exists, it will be input at this point. Then, +% we \cs{ProcessOptions}, using the *-form because it allows package +% options to take precedence over global options. Thus \mfpic's +% \opt{final} option can counteract the \mfpic-specific side effects of a +% global \opt{draft} option. +% \begin{macrocode} + \InputIfFileExists{mfpic.cfg}{}{}% + \ProcessOptions*\relax +% \end{macrocode} +% +% \DescribeMacro{\usemetapost} +% Finally, one of the definitions of \cs{usemetapost}. The other is +% for use outside \LaTeXe, when the \prog{graphics} package cannot be +% assumed to be available. +% \begin{macrocode} + \def\usemetapost{% + \@ifmfpfileisopen{\mfp@mpostfalse\MPtoolate@error}% + {\mfp@mposttrue \RequirePackage{graphics}% +% \end{macrocode} +% +% Unlike all the other eps inclusion macros, \cs{includegraphics} does +% not make the bounding box coordinates available: \cs{Gin@llx} and the +% others are defined, but are local to a group surrounding the internals +% of \cs{includegraphics}. We locally modify one graphics package internal +% macro to globally save the information we need. Here we save the +% original definition and define our replacement. This definitely needs +% to come after the above \cs{RequirePackage} command. +% \begin{macrocode} + \global\let\mfp@save@parse@bb\Gread@parse@bb + \gdef\mfp@parse@bb##1 ##2 ##3 ##4 ##5\\{% + \mfp@save@parse@bb##1 ##2 ##3 ##4 ##5\\% + \xdef\mfpicllx{\Gin@llx}\xdef\mfpiclly{\Gin@lly}}% +% \end{macrocode} +% +% The \prog{graphics} package (as opposed to the \prog{graphicx} package) +% is far too dependent on actual extensions. Since we don't want to +% force our users to rename all the graphics output by \MP, we have to +% force \cs{includegraphics} to treat the current extension (some number) +% as if it were `{\tt eps}' or `{\tt mps}' according to the context. We +% decide which at this point. +% \begin{macrocode} + \if@mfp@pdf \gdef\mfp@Gtype{mps}% + \else \gdef\mfp@Gtype{eps}% + \fi +% \end{macrocode} +% +% The code we add to \cs{setmfpicgraphic} replaces \cs{Gread@parse@bb} with +% our own version. +% \begin{macrocode} + \gdef\preparemfpicgraphic##1{% + \let\Gread@parse@bb\mfp@parse@bb}% + \gdef\getmfpicoffset##1{}% + \gdef\setmfpicgraphic##1{\includegraphics{##1}}}}% +% \end{macrocode} +% +% \cs{ProcessOptions} doesn't allow \cs{RequirePackage}\marg{graphics}, +% so the above and the following were not simply put inside +% \cs{DeclareOption}\marg{metapost}. The \cs{AtEndDocument} command will +% close the output file if the user forgot. +% \begin{macrocode} + \mfp@ifmpost{\usemetapost}{}% + \AtEndDocument{\@closegraphsfile}% +% \end{macrocode} +% +% Now those cases outside \LaTeXe{} that we try to support. +% \begin{macrocode} +\else + \Mfpic@msg{\mfpfiledate\space v\mfpfileversion.}% +% \end{macrocode} +% +% \DescribeMacro{\usemetapost} +% The definition of \cs{usemetapost} depends on the setting of +% \cs{if@mfp@pdf}: \file{epsf.tex} is used for regular \TeX{} and +% \file{supp-pdf.tex} for \pdfTeX. +% \begin{macrocode} + \if@mfp@pdf + \def\usemetapost{% + \@ifmfpfileisopen{\mfp@mpostfalse\MPtoolate@error}% + {\mfp@mposttrue + \mfp@ifdefined\convertMPtoPDF{}{\input supp-pdf\relax}% +% \end{macrocode} +% The command \cs{convertMPtoPDF} takes the filename and and two +% scaling factors. It parses the files PS contents to PDF code. It leaves +% the bounding box info in macros \cs{MPllx}, etc. +% \begin{macrocode} + \gdef\setmfpicgraphic##1{\convertMPtoPDF{##1}{1}{1}}% + \gdef\getmfpicoffset##1{% + \xdef\mfpicllx{\MPllx}\xdef\mfpiclly{\MPlly}}}}% + \else +% \end{macrocode} +% The final case is the generic plain\TeX, \AmSTeX, or \LaTeX2.09. Our +% code uses the macros from \file{epsf.tex}, which should be present in +% every installation that includes \prog{dvips}. The command +% \cs{epsfbox} takes the filename, writes a \cs{special} for +% \prog{dvips} (and other programs) and saves the bounding box +% coordinates in \cs{epsfllx}, etc. +% \begin{macrocode} + \def\usemetapost{% + \@ifmfpfileisopen{\mfp@mpostfalse\MPtoolate@error}% + {\mfp@mposttrue + \mfp@ifdefined\epsfbox {}{\input epsf\relax}% + \gdef\setmfpicgraphic##1{\epsfbox{##1}}% + \gdef\getmfpicoffset##1{% + \xdef\mfpicllx{\epsfllx}\xdef\mfpiclly{\epsflly}}}}% + \fi +\fi +% \end{macrocode} +% +% +% \section{Optional parameter handling}\label{optional} +% +% We borrow \LaTeX's \cs{@ifnextchar} to have the advantage of +% skipping spaces and EOLs, but we skip \cs{relax} as well. The reason for +% this last is that an EOL will be set equal to \cs{relax} in certain +% contexts and we want option handling to work the same there as +% elsewhere. This could be a mistake, since \cs{relax} is a common method +% to halt such things. However, there should be no occasion in an +% \env{mfpic} environment where one would want a `\texttt[' to follow a +% command and \emph{not} be an optional argument. In text label commands +% we restore the meaning of blank lines, and EOLs ought to be normal. +% +% The first argument of \cs{mfp@ifnextchar} is the token being checked. It +% doesn't have to be a character and we sometimes use \cs{mfp@ifnextchar} +% to check whether a certain command follows. However, it is usually +% `\texttt['. The next argument is the code to run if that character is +% present, the last is code to use if the character is not present. The +% first argument must end with code that handles the character. +% +% The reason for the \cs{long} in the code when the next token is +% \cs{relax} is that it may be \cs{par} which has been \cs{let} equal to +% \cs{relax} in \env{mfpic} environments. +% \begin{macrocode} +\mfp@DBlog{Handlers for optional parameters.}% +\long\def\mfp@ifnextchar#1#2#3{% + \let\mfptmp@d=#1\def\mfptmp@a{#2}% + \def\mfptmp@b{#3}\mfp@checknext}% +\def\mfp@checknext{\futurelet\@let@token\mfp@ifnch}% +\def\mfp@ifnch{% + \ifx\@let@token\@sptoken + \let\mfptmp@c\eatspace@checknext + \else\ifx\@let@token\relax + \long\def\mfptmp@c##1{\mfp@checknext}% + \else\ifx\@let@token\mfptmp@d + \let\mfptmp@c\mfptmp@a + \else + \let\mfptmp@c\mfptmp@b + \fi\fi\fi\mfptmp@c}% +\begingroup + \def\:{\global\let\@sptoken= }\: % + \def\:{\eatspace@checknext}\@xp\gdef\: {\mfp@checknext}% +\endgroup +% \end{macrocode} +% +% I've taken to making an empty optional argument the default for a lot +% of commands. I wanted to make it possible to have the same result for +% empty brackets (i.e., \texttt{[]}) as for omitted brackets. +% The following helps check for emptyness. It uses a simple \cs{if} so +% that \texttt{\#1} will be expanded. I use a non-active +% \texttt{\textasciitilde} to test for emptyness because, even if a tilde +% should accidentally occur in \texttt{\#1}, it will most likely be active +% and expand to something else. In fact, in plain \TeX, +% \cs{mfp@ifempty}\marg{\textasciitilde} will compare +% \texttt{\textasciitilde} to \cs{penalty} and in \LaTeX{} to +% \cs{unhbox}. +% +% The \cs{@ifmtarg} macro is borrowed from \file{ifmtarg.sty}. +% It is used when a space should count as empty, but expansion isn't +% wanted. +% \begin{macrocode} +\newdef\mfp@ifempty#1{% + \if~#1~\@xp\@firstoftwo\else\@xp\@secondoftwo\fi}% +\begingroup +\catcode`Q=3 +\long\gdef\@ifmtarg#1{\@xifmtarg#1QQ\@secondoftwo\@firstoftwo\@nil}% +\long\gdef\@xifmtarg#1#2Q#3#4#5\@nil{#4}% +\endgroup +\newdef\@ifmtsub#1#2{\@ifmtarg{#1}{#2}{#1}}% +\newdef\mfp@mtsub#1#2{\mfp@ifempty{#1}{#2}{#1}}% +% \end{macrocode} +% +% The following is a historical holdover. Originally all optional arguments +% were handled through \cs{do@ptparam}. Then there arose cases that did not +% fit its assumptions and I wrote \cs{alt@ptparam}. Then, it became more +% efficient to have \cs{mfp@ifnextchar} (defined above) and now +% this command is defined in terms of it. +% +% The first argument of \cs{do@ptparam} is the command to use and the +% second is a default value of the optional argument. The command must be +% defined, and it must be a command whose first argument is delimited by +% `{\tt[}' and `{\tt]}'. Currently this is no longer used: all commands +% use one of the variants below. +% \begin{macrocode} +\newdef\do@ptparam#1#2{\mfp@ifnextchar[{#1}{#1[#2]}}% +% \end{macrocode} +% +% These are variations on the above. In \cs{simple@opt}, if an optional +% argument is present, we check to see if it is empty and substitute the +% default if it is. This was so named because I intended that it be used +% only if the optional argument required no further parsing (because it +% turned the argument into a nondelimited one). But now we use it even +% then and the few commands that require further parsing handle it more or +% less ad hoc. +% +% \cs{null@opt} is a convenient abbreviation for a common case: the +% default option is null. +% \begin{macrocode} +\newdef\simple@opt#1#2{% + \mfp@ifnextchar[{\process@opt{#1}{#2}}{#1{#2}}}% +\newdef\process@opt#1#2[#3]{% + \mfp@ifempty{#3}{#1{#2}}{#1{#3}}}% +\newdef\null@opt#1{\mfp@ifnextchar[{#1}{#1[]}}% +% \end{macrocode} +% +% Quite a few \mfpic{} commands stuff several parameters into a +% single optional argument. Generally, these commands can be coded to +% proceed gracefully if the last parameter is missing (substituting a +% default). However, if more than that are missing, \TeX{} gobbles the +% closing bracket and produces pretty inscrutable error mesages. This +% (adding extra information in one optional argument) was, in retrospect, +% a bad design decision that was made for backward compatibility and +% (originally) to minimize the changes in existing commands. +% Unfortunately we are stuck with it for at least the near future. +% +% We use the following utility to check for empty optional parameters. +% \begin{itemize} +% \item {\tt\#1} is the parameter to test (passed by some other macro) +% \item {\tt\#2} is what to use if {\tt\#1} is empty. +% \item {\tt\#3} is the command being passed the optional argument +% \end{itemize} +% We use a \cs{mfp@ifempty} so \texttt{\#1} will get expanded (often we +% pass arguments as macros). After the above revamping of optional +% argument handling, we ended up needing this code only once. +% \begin{macrocode} +\newdef\do@mtparam#1#2#3{\mfp@ifempty{#1}{#3[#2]}{#3[#1]}}% +% \end{macrocode} +% +% +% \section{Writing to the \file{.mf} or \file{.mp} file}\label{writing} +% +% \subsection{Preserving linebreaks}\label{linebreaks} +% +% Some macros can take quite long arguments (we call them +% \cs{@listmac}\,s), especially if they are automatically generated by +% some program. While the output file need not ever be looked at, there +% can be a problem with lines too long for the \MF{} executable's line +% buffer. Plus, for debugging, we might want to examine the file \mfpic{} +% writes. We therefore try to get at least the list macros to preserve +% linebreaks on output. +% +% \DescribeMacro{\mfpicobeylines} +% We make use of the \TeX{} property that expandable commands are +% expanded inside \cs{write} commands, but unexpandable commands and +% characters are written verbatim (almost). If this were the only +% consideration, nothing would need to be done. But characters with +% catagory code 5 (end-of-line) are converted to spaces upon reading, so +% we have to change the category of the \cs{endlinechar}, or we have +% change the \cs{endlinechar} to a character in a different category. +% We do the former, because the line a macro starts on will already have +% the end-of-line character added, but its category will not yet be +% established. We need a category that \TeX{} will not \emph{ignore}, +% but that nevertheless has no (or minimal) side effects if encountered in +% a \TeX{} file. We therefore make it active, but \cs{let} it equal to +% \cs{relax}. This makes the end-line-character unexpandable. +% \begin{macrocode} +\mfp@DBlog{Direct output to Metafont/Post file.}% +\begingroup + \catcode\mfp@ctrlM\active% + \gdef\@activectrlM{^^M}% + \gdef\mfpicobeylines{\catcode\mfp@ctrlM\active\let^^M\relax}% +\endgroup +% \end{macrocode} +% +% The choice \cs{relax} seems to be actually a slightly better choice +% than \cs{endgraf} (which we used to use, and which equals the +% unexpandable primative \cs{par}) because \cs{relax} is permitted before +% the opening brace in the syntax of \meta{general text} (for token +% variable assignments, \cs{write}, \cs{message}, and the like) as well as +% being skipped in mfpic's version of \cs{@ifnextchar}. +% +% \DescribeMacro{\preservelines} +% The character assigned to \cs{endlinechar} is added to the end of all +% lines read in by \TeX. The character assigned to \cs{newlinechar} +% will produce a newline when it occurs in a \cs{write}. Our +% \cs{preservelines} ensures these are the same and makes the above +% changes in category. +% \begin{macrocode} +\newdef\preservelines{\newlinechar\mfp@ctrlM + \endlinechar\newlinechar \mfpicobeylines}% +% \end{macrocode} +% +% \DescribeMacro{\unpreservelines} +% This is no longer used and may some day be removed. Grouping is +% enough to isolate effects of \cs{preservelines}. The command +% \cs{unpreservelines} simply restores the catcode of control-M to the +% control-M to the usual in formats consistent with plain \TeX. If we +% really wanted to reverse the effects of \cs{preservelines}, we'd have to +% save and restore the four items changed: the values of \cs{newlinchar} +% and \cs{endlinechar}, the category of control-M, and the definition of +% an active control-M. +% \begin{macrocode} +\newdef\unpreservelines{\catcode\mfp@ctrlM=5 }% +% \end{macrocode} +% +% \DescribeMacro{\mfsrc} +% \DescribeMacro{\mfcmd} +% \DescribeMacro{\mflist} +% We want these to issue \cs{preservelines} before the text is read +% (and category codes assigned). Also we often want to add a few items to +% the argument (figure macros append a semi-colon, list macros surround +% with parentheses), so we isolate the common starting code in +% \cs{@mfwrite}, and then invoke the appropriate continuation command. +% The ending code is in \cs{@mfsrc}. The \cs{begingroup} in +% \cs{@mfwrite} matches the \cs{endgroup} in \cs{@mfsrc}. The group +% isolates the changes to EOLs. We also equate \cs{@nl} to an active +% control-M so that it can be used for line breaks in cases where it is +% inconvenient to make EOLs active (in the replacement text of +% \cs{opengraphsfile} and \cs{@mfpic}, for example). +% \begin{macrocode} +\newdef\mfsrc {\@mfwrite\@mfsrc\mfsrc}% +\newdef\mfcmd {\@mfwrite\@mfcmd}% +\newdef\mflist{\@mfwrite\@mflist}% +\newdef\@mfwrite{\begingroup + \preservelines \let\@nl\@activectrlM}% +% \end{macrocode} +% +% The macro \cs{@mfsrc} does the job of writing to files. The output +% stream \cs{mfp@out} is declared later. The other two commands invoke +% \cs{@mfsrc} on a slightly modified argument. The first argument to +% \cs{@mfsrc} is the command that called it (for the error message), the +% second is the code to write. +% \begin{macrocode} +\newdef\@mfsrc#1#2{% + \@ifmfpfileisopen{\immediate\write\mfp@out{#2}}% + {\nooutputfileerror{#1}}\endgroup}% +\newdef\@mfcmd#1{\@mfsrc\mfcmd{#1;}}% +\newdef\@mflist#1{\@mfsrc\mflist{(#1);}}% +% \end{macrocode} +% +% \subsection{Initializing the output file}\label{output} +% +% Category 12 characters percent, sharp and backslash signs for the +% \file{.mf} file. The command \cs{mf@d} is used to write a line of +% dashes above and below each figure to make them stand out when debugging +% the file. This might be removed in the final distribution. +% \begin{macrocode} +\newdef\mfp@gobble#1{}% +\edef\mf@p{\@xp\mfp@gobble\string\%}% percent (%) +\edef\mf@s{\@xp\mfp@gobble\string\#}% sharp (#) +\edef\mf@b{\@xp\mfp@gobble\string\\}% backslash (\) +\newdef\mf@d{--------------}% +% \end{macrocode} +% +% Used to mark ends of things, \cs{mfp@delim} should never be expanded, +% but we give it a definition for debugging purposes: +% \begin{macrocode} +\newdef\mfp@delim{% + \mfp@errmsg {Misplaced \string\mfp@delim.}% + {If you get this message but did not (mis)use the command^^J% + \mfp@delim, please report this to the mfpic maintainer.}}% +% \end{macrocode} +% +% The current date and time stamp will be written to the \file{.mf} file. +% We calculate it here and store the result in these macros. The commands +% \cs{normalyear} and \cs{normalmonth} are part of \ConTeXt, where they +% have been equated to the primitive commands \cs{year} and \cs{month} +% (which are then redefined). +% \begin{macrocode} +{\mfp@ifdefined\normalmonth + {\let\month\normalmonth\let\year\normalyear}{}% + \xdef\mfp@today{\number\year/\ifnum\month<10 0\fi\number\month/% + \ifnum\day<10 0\fi\number\day}% + \count2=\time \divide\count2 by 60 + \xdef\mfp@now{\ifnum\count2<10 0\fi\number\count2:}% + \multiply\count2 by -60 \advance\count2 \time + \xdef\mfp@now{\mfp@now\ifnum\count2<10 0\fi\number\count2 }}% +% \end{macrocode} +% +% These registers are allocated: +% \begin{itemize} +% \item \cs{mfp@out} Write stream for the \file{.mf} or \file{.mp} file. +% \item \cs{mfp@graph} Read stream used to test existence of files and +% for reading datafiles. +% \item \cs{mfp@count} Number for next \env{mfpic} environment. +% \item \cs{mfp@linetype} Current line style in multi-curve data plots. +% \item \cs{mfp@n} Scratch counter, so far used only in writing data to +% the \file{.mf} file. +% \item \cs{mfp@sequence} Counter incremented with every datapoint written +% from a file to implement the feature that a list of numeric data can be +% plotted against its sequence position. +% \item \cs{mfp@toks} Temporary token register. +% \item \cs{every@tlabel} Tokens inserted at every \cs{tlabel}. +% \item \cs{mfp@verbtex} A temporary token list used by \cs{mfpverbtex}. +% \item \cs{mfp@commonverbatimtex} Tokens written at the start of every +% output file inside a \mfc{verbatimtex} group. +% \end{itemize} +% \begin{macrocode} +\mfp@DBlog{Declarations used with data and graphs files.}% +\newwrite\mfp@out +\newread\mfp@graph +\newlet\mfp@data\mfp@graph +\newcount\mfp@count +\newcount\mfp@linetype +\newcount\mfp@n +\newcount\mfp@sequence +\newtoks\mfp@toks +\newtoks\every@tlabel +\newtoks\mfp@verbtex +\newtoks\mfp@commonverbatimtex +\every@tlabel{}% +% \end{macrocode} +% +% We store most of the \mfc{verbatimtex} block that \mfpic{} relies on in +% the token register \cs{mfp@commonverbatimtex}. We do that because it +% relies on a couple of catcode changes and we want to be in a situation +% where we have that under control. Each line will end with an active +% ctrl-M, which is transformed by \cs{mfsrc} into a newline. +% \begin{macrocode} +\begingroup + \let\newtoks\relax + \@makeother\%\@makeother\#\preservelines + \global\mfp@commonverbatimtex= + {\def\MFPtext#1{% + \vbox{\def\\{\cr}\MFPcfont\everylabel + \halign{##\hfil\cr#1\crcr}}}% + }\endgroup +% \end{macrocode} +% +% \DescribeMacro{\opengraphsfile} +% This is the main command to set up the output file. It also aims to +% check whether \MF{} or \MP{} has already been run on the output file, +% thereby determining whether the graphics can be included. It does this +% by checking for the existence of one of the products of these programs. +% In the case of \MF{} it looks for a \file{.tfm} file; in the case of +% \MP{} it looks for the first output graphic. +% +% The name of the output file is its only parameter, and it appends +% the extension \file{.mf} or \file{.mp} depending on the whether option +% \opt{metafont} or \opt{metapost} was chosen. +% \begin{macrocode} +\mfp@DBlog{Macros to open and close graphs files.}% +\newdef\opengraphsfile#1{\@bsphack +% \end{macrocode} +% A command can determine if it occurs after \cs{opengraphsfile} but +% before \cs{closegraphsfile} by testing whether \cs{mfp@filename} is defined. +% \begin{macrocode} + \@ifmfpfileisopen% + {\Mfpic@warn + {An attempt has been made to open a graph file, #1, + \@msgbreak while another, \mfp@filename, is still open. + \@msgbreak Closing \mfp@filename.}% + \@closegraphsfile}% + {}% + \xdef\mfp@filename{#1}% +% \end{macrocode} +% The value of \cs{mfp@count} should be the number of the first figure. +% We use the existence of that figure as a signal that there are graphics +% to be included. +% \begin{macrocode} + \mfp@ifmpost{% + \openin\mfp@graph=\setfilename{\mfp@filename}{\number\mfp@count}% + \relax + \ifeof\mfp@graph \mfp@msg{}% + \Mfpic@msg + {No file \setfilename{\mfp@filename}{\number\mfp@count}.^^J}% + \global\mfpicdrafttrue + \else + \global\mfpicdraftfalse + \fi +% \end{macrocode} +% Type out the \MP-specific portion of a reminder to process the +% output. Then on to the \MF{} case. +% \begin{macrocode} + \if@mfp@nowrite \else + \immediate\openout\mfp@out=\mfp@filename.mp\relax + \Mfpic@msg{Don't forget to process \mfp@filename.mp! % + \@msgbreak (Apply metapost to \mfp@filename.mp.)}% + \fi + }{% metafont +% \end{macrocode} +% Under the \opt{metafont} option, we check for the \file{.tfm} file. +% We do not simply try to load the font because that might trigger +% some \prog{maketfm} script which could be disastrous at this point, +% when the \file{.mf} file is in an uncertain state. We open the +% \file{.tfm} for input, and check \cs{ifeof}, as we did in the +% \MP{} graphic case. +% \begin{macrocode} + \openin\mfp@graph=\mfp@filename.tfm\relax + \ifeof\mfp@graph \mfp@msg{}% + \Mfpic@msg{No file \mfp@filename.tfm .^^J}% + \global\let\@graphfont=\mfp@dummy + \global\mfpicdrafttrue +% \end{macrocode} +% If it does exist, we load the font and in either case type out the +% \MF{} specific portion of our reminder. +% \begin{macrocode} + \else + \global\font\@graphfont=\mfp@filename\relax + \global\mfpicdraftfalse + \fi + \if@mfp@nowrite \else + \immediate\openout\mfp@out=\mfp@filename.mf\relax + \Mfpic@msg{Don't forget to process \mfp@filename.mf! % + \@msgbreak (Apply metafont to \mfp@filename.mf, % + then gftopk to the resulting gf file.)}% + \fi + }% +% \end{macrocode} +% The input stream used for testing is closed and the +% unspecific portion of the reminder is typed out, then +% the above settings of \cs{ifmfpicdraft} are overridden if the user has +% explicitly chosen the \opt{draft} or \opt{final} option. The +% \opt{nowrite} option merely disables the \cs{@mfsrc} command. +% \begin{macrocode} + \closein\mfp@graph + \if@mfp@nowrite\else + \Mfpic@msg{Then reprocess this file (\jobname).^^J}% + \fi + \if@mfp@draft\global\mfpicdrafttrue\fi + \if@mfp@final\global\mfpicdraftfalse\fi + \if@mfp@nowrite\gdef\@mfsrc##1##2{}\fi +% \end{macrocode} +% The first two lines of the output file are comments identifying the +% file, the \mfpic{} version, the tex source file, and the date. +% Then we let \grafbase{} know the \mfpic{} version creating the file. +% After that we set the \mfc{mode}, the \mfc{mag} (both ignored by \MP), +% and arrange for \grafbase{} macros to be loaded. The current +% \grafbase{} checks the \gbc{mfpicversion}: if it is unknown, or not +% equal to the value of \gbc{grafbaseversion}, a diagnostic message is +% printed. +% \begin{macrocode} + \mfsrc{% + \mf@p\space\mfp@filename.m\mfp@ifmpost{p}{f}, % + generated by Mfpic, v\mfpfileversion\space\mfpfiledate,\@nl + \mf@p\space from TeX source "\jobname" % + on \mfp@today\space at \mfp@now\@nl + numeric mfpicversion; mfpicversion:=\mfpicversion;\@nl + if unknown mode: mode := localfont; fi\@nl + if unknown mag: mag := \number\mag/1000; fi\@nl + if unknown grafbase: input grafbase; fi\@nl\@nl +% \end{macrocode} +% Then a comparison of the version of this file, stored in +% \cs{mfpicversion} with the version stored in the \grafbase{} variable +% \mfc{grafbaseversion}. This should catch mismatches the previous test +% would miss. +% \begin{macrocode} + if unknown grafbaseversion: grafbaseversion := 0; fi\@nl + if grafbaseversion <> mfpicversion :\@nl + GBmsg "Bad mfpic installation: mfpic and grafbase % + versions do not match.";\@nl + fi\@nl}% +% \end{macrocode} +% For \opt{metapost} we need to load some color macros also, and write +% some setup for text labels (even if \cs{nomplabels}, because +% \cs{usemplabels could be turned on later}). \MF{} now can also handle +% the definitions in \file{dvipsnam.mp} but it seems a waste to load all +% those definitions just to get a few more grayscales (even given \MF{} +% can find that file). +% \begin{macrocode} + \mfp@ifmpost + {\mfsrc{% + if unknown Apricot: input dvipsnam.mp; fi\@nl + verbatimtex\@nl + \the\mfp@commonverbatimtex\@nl + \def\noexpand\everylabel{\the\every@tlabel}\@nl + \if@mfp@verbtex \the\mfp@verbtex\@nl \fi + etex;\@nl}% + \global\@mfp@verbtexfalse\mfp@verbtex{}% +% \end{macrocode} +% Finally, we write information to the output file, and/or set switches +% based on the options as they are currently known. The \cs{usemplabels} +% was delayed until now so that the order of it and \cs{usemetapost} +% before now would not matter. The other five are issued now because they +% might require a write to the output file. +% \begin{macrocode} + \@ifmplabels{\usemplabels}{}% + \if@mfp@truebbox \usetruebbox \fi + \if@mfp@overlabels \overlaylabels \fi}{}% + \if@mfp@clip \clipmfpic \fi + \if@mfp@clearsym \clearsymbols \fi + \if@shipping\else\stopshipping\fi + \@esphack}% +% \end{macrocode} +% +% \DescribeMacro{\closegraphsfile} +% This finishes off the output files and undefines \cs{mfp@filename}. +% We define an error message free version \cs{@closegraphsfile} for +% internal use. We unconditionally undefine \cs{mfp@filename} just in +% case. +% \begin{macrocode} +\newdef\closegraphsfile{% + \@ifmfpfileisopen{}{\nooutputfileerror\closegraphsfile}% + \@closegraphsfile \global\let\mfp@filename\UndEfInEd}% +\newdef\@closegraphsfile{% + \@ifmfpfileisopen + {\if@mfp@nowrite \else + \mfsrc{\@nl end.}\immediate\closeout\mfp@out + \fi}{}}% +% \end{macrocode} +% +% \DescribeMacro{\nooutputfileerror} +% We define a generic error message for macros that need an output file +% to write to. \cs{mfsrc} uses it, as does \cs{closegraphsfile}. +% \cs{mfpic} also uses it even though all its writes take place through +% \cs{mfsrc}. This avoids potentially hundreds of error messages. +% \begin{macrocode} +\def\nooutputfileerror#1{% + \mfp@errmsg {No output file has been opened.}% + {You have tried to used a command, #1, that requires an output^^J% + file to be opened with the \opengraphsfile command, which^^J% + was either not issued or was not successful.}}% +% \end{macrocode} +% +% +% \section{\Mfpic{} dimensions}\label{dimensions} +% +% A number of packages, especially figure drawing packages, allocate a +% great many dimension registers. The most familiar example is \PiCTeX{} +% which is at least partially responsible for most ``No room for a new +% \cs{dimen}'' error messages. \Mfpic{} also needs many dimension +% values, but some are set by macros that simply write the value to the +% \file{.mf} file and do not use any registers. A few are stored in +% \TeX{} registers, but most are stored using a trick with font +% dimensions. +% \begin{macrocode} +\mfp@DBlog{Using dummy font's dimensions, to spare TeX registers.}% +% \end{macrocode} +% While most fonts have relatively few font dimensions (twenty-two is a +% common number), it turns out that if one loads a font and immediately +% assigns a value to \cs{fontdimen}~$n$, Then \TeX{} acts as if the font +% has \cs{fontdimen}\,s 0 through $n$ available. They can be assigned +% dimension values just like \TeX{} dimension registers. +% +% Virtually all \TeX{} systems have a \file{dummy.tfm}, which contains +% no characters (it is used for syntax checking by some packages and +% classes). Since this trick will only work if we are the first to +% load the font (the \AmSTeX{} document style \file{amsppt.sty} loads +% the dummy font), we use another trick, which is to load it scaled to +% some unlikely value, which \TeX{} treats as a new font. +% \begin{macrocode} +\font\mfp@dummy=dummy scaled 1042 +\fontdimen100\mfp@dummy=0pt +% \end{macrocode} +% +% Some versions of \file{dummy.tfm} have values already assigned to font +% dimensions 0 through 22. It would probably not hurt to use those, but +% we'll be cautious and use only font dimensions 23 and up, making 78 +% available. +% +% We use an auxiliary count register to keep track of new font dimens. +% \begin{macrocode} +\newcount\mfp@fdc +\mfp@fdc=22 +% \end{macrocode} +% \DescribeMacro{\newfdim} +% We define a macros that mimics the behavior of \cs{newdimen}, for +% allocating font dimension numbers. It increments \cs{mfp@fdc} and +% defines its argument \texttt{\#1} to expand to an assignment of the +% current \cs{fontdimen}. +% \begin{macrocode} +\newdef\newfdim#1{% + \global\advance\mfp@fdc 1 + \xdef#1{\fontdimen\number\mfp@fdc\mfp@dummy}% + \wlog{\string#1=\string\fontdimen\number\mfp@fdc\mfp@dummy}}% +% \end{macrocode} +% The definition (\cs{xdef}) is global since font dimension +% assignments are always global anyway. \TeX{} will not accept font +% dimensions in its syntax for the dimension arithmetic commands +% \cs{advance}, \cs{multiply} and \cs{divide}. In the rare cases where we +% need to do this we assign the value to a temporary register and +% calculate with it. It is, however OK to use them with a numeric factor. +% +% We allocate a couple of boxes. At the end of an \mfpic{} +% environment, \cs{@wholegraph} is loaded with the picture (possibly +% null) as it exists then. Inside the environment, when text labels are +% processed, \cs{@textbox} holds this text temporarily so it can be +% measured, moved about, etc. We also define abbreviations for the +% frequent commands that specify the dimensions of \cs{@textbox} +% \begin{macrocode} +\mfp@DBlog{A box register for whole labeled graph, % + and a temporary one.}% +\newbox\@wholegraph +\newbox\@textbox +\newdef\tb@ht{\ht\@textbox}% height, +\newdef\tb@dp{\dp\@textbox}% depth and +\newdef\tb@wd{\wd\@textbox}% width of the text label. +% \end{macrocode} +% +% When labels are processed, they are accumulated in the box +% \cs{@alltlabels}. We allocate it, and four \cs{newfdim}\,s for the +% location of the four sides. +% \begin{macrocode} +\newbox\@alltlabels +\newfdim\@tlabelstop +\newfdim\@tlabelsbot +\newfdim\@tlabelsleft +\newfdim\@tlabelsright +% \end{macrocode} +% +% It can be argued that dimensions not needed by \TeX{} should be stored +% in the output file rather than allocating (font) dimensions. These are +% everything below from \cs{pointsize} through \cs{symbolspace}, +% inclusive. This would make syncronictity between \TeX{} and \MF{} easier +% to maintain. Those that are needed by \TeX{} are then few enough to be +% regular \cs{dimen} registers, making them automatically local to each +% \env{mfpic} environment. Unfortunately, changing to such a scheme could +% break some past \mfpic{} files. It would also require recoding every +% command that now writes one of these dimensions to the output. +% +% One of these (\cs{@graphright}) is unused, except for debugging. +% We could also code around \cs{@graphwd} because it is always +% \cs{wd}\cs{@wholegraph}. ^^A Is this true? Check it out. +% \begin{macrocode} +\mfp@DBlog{Internal dimension parameters for graph dimensions...}% +\newfdim\@graphwd +\newfdim\@graphright +\newfdim\@graphleft +\newfdim\@graphtop +\newfdim\@graphbot +\mfp@DBlog{...and dimension parameters for tlabel positioning.}% +\newfdim\tb@raise +\newfdim\tb@moveright +\newfdim\tb@totalht +% \end{macrocode} +% +% The following are for label adjustments. The first two are used to +% implement the feature that all labels can be simultaneously shifted an +% equal amount. The last is for the feature that the label can be a +% certain distance separated from the point where it is placed. +% \begin{macrocode} +\newfdim\tlabel@hadj +\newfdim\tlabel@vadj +\newfdim\tlabel@sep +\tlabel@hadj=0pt +\tlabel@vadj=0pt +\tlabel@sep=0pt +% \end{macrocode} +% +% The following are default parameters for various graphics commands that +% take an optional argument for the size of something. We allocate them, +% and then initialize them. +% \begin{macrocode} +\mfp@DBlog{User level dimension parameters, with default settings.}% +\newfdim\mfpicunit % unit of length +\newfdim\pointsize % diameter of circle +\newfdim\shadespace % spacing of shade dots +\newfdim\polkadotspace % spacing of polkadots +\newfdim\hatchspace % spacing of lines +\newfdim\headlen % size of arrowhead (\arrow) +\newfdim\axisheadlen % size of arrowhead (x, y axes) +\newfdim\sideheadlen % size of arrowhead (border axes) +\newfdim\hashlen % length of marks on axes +\newfdim\dashlen % length of dashes (\dashed) +\newfdim\dashspace % space between dashes +\newfdim\dotsize % size of dots (\dotted) +\newfdim\dotspace % space between dots +\newfdim\symbolspace % space between symbols (\plot) +% +\mfpicunit=1pt +\pointsize=2pt +\shadespace=1pt +\polkadotspace=10pt +\hatchspace=3pt +\headlen=3pt +\axisheadlen=5pt +\sideheadlen=0pt +\hashlen=4pt +\dashlen=4pt +\dashspace=4pt +\dotsize=0.5pt +\dotspace=3pt +\symbolspace=5pt +% \end{macrocode} +% +% Font dimensions are global, and so not restricted to an \env{mfpic} +% environment even when assigned inside one. This would require the +% user to restore a value every time one picture needed a different +% value from the rest. To avoid requiring this, the following macro is +% used to save all values of these dimensions at the start of a picture, +% and to restore the saved values at the end. (Some internal dimensions +% (\cs{@graph...}, for example) don't need saving since they are reset +% with each picture.) +% \begin{macrocode} +\newdef\save@mfpicdimens{% + \edef\restore@mfpicdimens{% + \mfpicunit =\the\mfpicunit + \pointsize =\the\pointsize + \shadespace =\the\shadespace +\polkadotspace =\the\polkadotspace + \hatchspace =\the\hatchspace + \headlen =\the\headlen + \axisheadlen =\the\axisheadlen + \sideheadlen =\the\sideheadlen + \hashlen =\the\hashlen + \dashlen =\the\dashlen + \dashspace =\the\dashspace + \dotsize =\the\dotsize + \dotspace =\the\dotspace + \symbolspace =\the\symbolspace + \tlabel@hadj =\the\tlabel@hadj + \tlabel@vadj =\the\tlabel@vadj + \tlabel@sep =\the\tlabel@sep}}% +% \end{macrocode} +% +% \DescribeMacro{\mfpframesep} +% \DescribeMacro{\mfpframethickness} +% \DescribeMacro{\mfpicheight} +% \DescribeMacro{\mfpicwidth} +% \DescribeMacro{\mfpiccaptionskip} +% Here are the few dimension registers we do allocate. The first two are +% scratch registers, the next two govern frames, and the last two are set +% after each picture to that pictures size. A \cs{vskip} of +% \cs{mfpiccaptionskip} is placed between figure and caption by +% \cs{tcaption}. +% \begin{macrocode} +\newdimen\mfp@scratch +\newdimen\mfp@scratchB +\newdimen\mfpframesep +\newdimen\mfpframethickness +\newdimen\mfpicheight +\newdimen\mfpicwidth +\newskip\mfpiccaptionskip +\mfpframethickness0.4pt +\mfpframesep2pt +\mfpiccaptionskip=\medskipamount +% \end{macrocode} +% +% +% \section{Helper macros}\label{helper} +% +% \DescribeMacro{\mfpicnumber} +% We make a user-level macro for setting the number of the next graph. +% The purpose of this is so that the output file can be used as a font, +% setting the figure numbers to the ascii codes of printable characters. +% Then creating a composite figure is as easy as changing fonts: +% \marg{\cs{pic} ABABAAB}. The motivation came from a discussion on +% \texttt{comp.text.tex} started by someone who wanted to input a sequence +% of 0's and 1's and get a corresponding sequence of black and white +% squares. +% \begin{macrocode} +\def\mfpicnumber#1{\global\mfp@count=#1\relax}% +% \end{macrocode} +% +% \DescribeMacro{\mfpaddto} +% When placing text at intervals on an axis, we need to automatically +% calculate coordinates to feed to the \cs{tlabel} command. The +% following is a utility macro to add two real numbers. It is currently +% used only in the \cs{axislabels} command, so it needn't be globally +% defined, but it might be handy in the future. +% \begin{itemize} +% \item[] \texttt{\#1} is a \emph{macro} that expands to some number. +% \item[] \texttt{\#2} is a number to add to it. +% \end{itemize} +% The result is stored again in \texttt{\#1}, overwriting the old value. +% +% \DescribeMacro{\mfpmultiply} +% For my personal use (or for power users), this is the multiplicative +% version, with the same syntax and behavior. +% \begin{macrocode} +\newdef\mfpaddto#1#2{\mfp@scratch=#1pt\advance\mfp@scratch#2pt + \edef#1{\mfp@strippt\mfp@scratch}}% +\newdef\mfpmultiply#1#2{\mfp@scratch=#1pt \mfp@scratch#2\mfp@scratch + \edef#1{\mfp@strippt\mfp@scratch}}% +\begingroup + \@makeother P\@makeother T\lowercase{\gdef\mfp@factor#1PT{#1}}% +\endgroup +\newdef\mfp@strippt{\@xp\mfp@factor\the}% +% \end{macrocode} +% +% A few user-level utilities. +% +% \DescribeMacro{\pointdef} +% A point defining macro, suggested by a user. +% \begin{itemize} +% \item[] \texttt{\#1} is a symbolic name for a point, only letters. +% \item[] \texttt{\#2} and \texttt{\#3} are the coordinates. +% \item[] Usage: \cs{pointdef}\marg{A}\parg{2,5} makes \cs{A} expand +% to \texttt{(2,5)}, \cs{Ax} to \texttt{2}, and \cs{Ay} to +% \texttt{5}. +% \end{itemize} +% \begin{macrocode} +\newdef\pointdef#1(#2,#3){% + \@namedef{#1}{(#2,#3)}\@namedef{#1x}{#2}\@namedef{#1y}{#3}}% +% \end{macrocode} +% +% \DescribeMacro{\pairarray} +% \DescribeMacro{\numericarray} +% The first enables the simultaneous definition of \MF{} pair variables +% \mfc{A1}, \mfc{A2}, etc, \mfc{A[n]} by writing, +% \cs{pairarray}\marg{A}\marg{\meta{list}}, the list being a list of +% $n$ ordred pairs. Numeric variables can be created similarly with the +% second command. +% \begin{macrocode} +\newdef\pairarray#1{% + \mfcmd{save #1}\mfsrc{textpairs (#1)}\mfp@writedata}% +\newdef\numericarray#1{\mfcmd{save #1; numeric #1; numeric #1[]}% + \mfsrc{list (#1)}\mfp@writedata}% +% \end{macrocode} +% +% \DescribeMacro{\lightershade} +% \DescribeMacro{\darkershade} +% Shade adjustment macros. They just multiply or divide \cs{shadespace} +% by 1.2. +% \begin{macrocode} +\newdef\lightershade{\shadespace=1.2\shadespace}% +\newdef\darkershade{\shadespace=.833333\shadespace}% +% \end{macrocode} +% +% \DescribeMacro{\dashlineset} +% \DescribeMacro{\dotlineset} +% The following arrange for contrastive dashed lines. \cs{dashlineset} +% just resets the default parameters that the \cs{dashed} macro uses, +% \cs{dotlineset} sets these parameters so that \cs{dashed} produces +% something almost dotted. +% \begin{macrocode} +\newdef\dashlineset{\dashlen=4pt \dashspace=4pt}% +\newdef\dotlineset{\dashlen=1pt \dashspace=2pt}% +% \end{macrocode} +% +% \DescribeMacro{\ifpointfill} +% With the commands \cs{pointfilltrue} or \cs{pointfillfalse} the user +% can specify points drawn with the \cs{point} command to be either +% filled in or not. +% \begin{macrocode} +\let\ifpointfill\iftrue +\newdef\pointfilltrue{\mfp@let\ifpointfill\iftrue}% +\newdef\pointfillfalse{\mfp@let\ifpointfill\iffalse}% +% \end{macrocode} +% +% +% \section{Macros to implement prefix commands}\label{prefix} +% +% \Mfpic{} prefix macros change the behavior of the figure macros. +% Normally we want \cs{circle}\marg{...} to draw the solid outline of a +% circle. So normally \cs{circle}\marg{...} will write a drawing command +% followed by a path expression giving the circle to draw. But +% \cs{dashed}\cs{circle}\marg{...} should write a \emph{dashing} command +% and \emph{omit} the drawing command. Thus, \emph{rendering} macros +% like \cs{dashed} need to set a switch, and figure macros like +% \cs{circle} need to test that switch. +% +% Similar considerations hold for prefix macros that transform the +% figure. The logic is that, at the \MF{} level, every figure macro +% is syntactically a path expression. Every prefix accepts a path +% expression as input and has a path as its return value, so a +% combination prefix + path expression is again a path expression. +% Prefixes may also have side effects, such as adding some ink to the +% current picture. Such prefixes are called \emph{rendering} macros. +% Rendering macros normally return the same path as their argument, but +% there are macros that modify the path. Some applying a linear +% transform, some close an open path, some return a subpath. These we call +% \emph{modification} macros. +% +% This scheme is quite simple, but unfortunately too simple. To avoid +% having to explicitly type a rendering prefix every time, we need +% the above mentioned ability to pass information to the figure macros. +% Moreover, \MF{} abhors an `isolated expression', so the first prefix +% has to write something with a different syntax, and pass the info that +% it has already done so on to later prefixes, who need to test that +% info. +% \begin{macrocode} +\mfp@DBlog{Tests to control multiple prefix commands.}% +% \end{macrocode} +% +% Every prefix macro needs to know if it is the first or a later one. +% They test this \cs{if} command and also set it to false. The +% figure macros, which are last in the chain, close by resetting it true. +% \begin{macrocode} +\newif\if@startfig\@startfigtrue +% \end{macrocode} +% +% If a prefix is a rendering prefix, it writes the rendering code +% and sets the following switch to false, letting the figure macro know +% it needn't invoke the default rendering, +% Figure macros close by resetting it true. Some modification macros don't +% touch it at all (the \cs{@modmac}\,s) others just test it +% (\cs{@closmac}\,s). +% \begin{macrocode} +\newif\if@imrend\@imrendtrue +% \end{macrocode} +% +% The following macro is always (and only) invoked by the first prefix +% macro. It writes the code that prevents an isolated expression. It +% stores the following path expression in the variable \gbc{curpath}. Thus +% every combination of prefixes followed by a figure macro is +% syntactically a \MF{} variable assignment command. +% \begin{macrocode} +\newdef\store@path{\mfsrc{\@nl store (curpath)}}% +% \end{macrocode} +% +% Every prefix and figure macro has to invoke \cs{@firststage}, since +% each is potentially the first in the sequence. If +% \cs{if@startfig} is true, it writes the storing command, sets +% \cs{@startfigfalse}, and says that rendering is needed. (The +% rendering macros immediately cancel that switch.) +% \begin{macrocode} +\newdef\@firststage{\relax + \if@startfig \store@path \@imrendtrue \@startfigfalse\fi}% +% \end{macrocode} +% +% \DescribeMacro{\@rendmac} +% Every rendering macro invokes this command. After the first-stage code +% it writes its rendering command (via \cs{mfsrc}) and passes on the info +% that rendering is no longer required of the figure macro. +% \begin{macrocode} +\newdef\@rendmac{\@firststage \@imrendfalse \mfsrc}% +% \end{macrocode} +% +% \DescribeMacro{\@modmac} +% It is possible we should call this something else, as only \cs{arrow} +% and \cs{reverse} use \cs{@modmac}. Other modifications cause the +% modified path to be drawn as if (modifier+figure) were a solitary figure +% macro. This would be pointless for a reversed path or a path with +% arrowhead added, as presumably the original path would already be drawn. +% Moreover, it can be argued (for \MP{} at least) that the arrowhead +% should be drawn on top of the shaft. This is the only significant effect of +% coding \cs{arrow} and \cs{reverse} as \cs{@modmac}\,s. +% +% It simply invokes the common first-stage code and writes its \MF{} code. +% \begin{macrocode} +\newdef\@modmac{\@firststage \mfsrc}% +% \end{macrocode} +% +% \DescribeMacro{\@closmac} +% Other modification macros were added later, and it turned out that +% they needed the same treatment as the closure macros that already +% existed. Therefore, most modification macros invoke \cs{@closmac}. The +% \emph{figure} macros proceed as follows: they invoke the \cs{@firststage} +% code, then write a rendering macro if necessary, then make +% \cs{@starfigtrue} (for the next figure), then write \MF{} code that +% defines the path. These modification macros do only the first two, +% counting on the figure macro to follow to invoke the last two. The idea +% is that {closure + figure} should act the same as if the path it defines +% were encoded as a single figure command. +% +% The \cs{@modmac} and \cs{@closmac} macros differ only when there are +% no preceeding rendering macros. In that case it is as if \cs{draw} (or +% more generally \cs{@render}) precedes the \cs{@closmac} macro. That +% drawing happens \emph{in addition to} any rendering macros that follow. +% This implicitly added \cs{draw} is not present for \cs{@modmac} macros, +% unless it is added by the following figure macro itself. +% \begin{macrocode} +\newdef\@closmac{\@firststage \if@imrend\@xp\@render\fi \mfsrc}% +% \end{macrocode} +% +% \DescribeMacro{\setrender} +% As mentioned above, when a figure macro is invoked without a +% rendering prefix, it will invoke some default. That default is stored +% in the macro \cs{@render}, which can be changed for special effects. +% Initially we define it as \cs{draw} to draw solid paths, but provide a +% command for the user to change it. +% \begin{macrocode} +\newdef\@render{\draw[]}% +\newdef\setrender#1{\mfp@def\@render{#1}}% +% \end{macrocode} +% +% \DescribeMacro{\@figmac} +% A figure macro will invoke the common first-stage code, then check +% if rendering is needed. If so, it issues the \cs{@render} command. +% It also resets the startfig switche. Since a figure macro completes +% an assignment command in \MF, we use \cs{mfcmd}, which places a +% semicolon at the end of the code it writes. We define the first part +% (all but the writing) as a separate command because there are a few cases +% where we need to delay that writing. +% \begin{macrocode} +\newdef\@figmacstart{% + \@firststage \if@imrend\@xp\@render\fi \@startfigtrue}% +\newdef\@figmac{\@figmacstart\mfcmd}% +% \end{macrocode} +% +% \DescribeMacro{\@listmac} +% The list macros take as their last argument a list of $(x,y)$ pairs. +% That list can either be typed directly into +% the \TeX{} source file (inside braces, separated by commas) or be +% present in an external datafile. Either way, the data is written +% as a list of \MF{} pairs within an enclosing pair of +% parentheses. Since these are all figure macros, \cs{@listmac} starts out +% just like \cs{@figmac}, but it writes only part of its arguments, the +% last one being handled by \cs{mfp@writedata}. +% +% \cs{mfp@writedata} looks ahead to see if the token \cs{datafile} +% follows, if it does \cs{mfp@writefile} is invoked, which gobbles +% the \cs{datafile} token and processes the filename that should follow it. +% Otherwise, \cs{mflist} is invoked to write the list in braces +% that should follow. +% +% \cs{mfp@writedata} is also used by non-figure macros such as the axis +% marks macros, plus \cs{piechart} and \cs{barchart}. +% \begin{macrocode} +\newdef\@listmac#1{\@figmacstart\mfsrc{#1}\mfp@writedata}% +\newdef\mfp@writedata{% + \mfp@ifnextchar\datafile{\mfp@writefile}{\mflist}}% +\newdef\mfp@writefile\datafile#1{\@processdatafile{#1}{\mfp@rwdata}}% +% \end{macrocode} +% +% \DescribeMacro{\mftitle} +% \DescribeMacro{\tmtitle} +% These go here because they didn't seem to go anywhere else. The are +% mainly for debugging the example files. \cs{getmfp@toks} assigns the +% following group to a token register and then invokes its argument. +% \cs{mftitle} and \cs{tmtitle} use this to write the code into +% the string argument of the \grafbase{} command \gbc{mftitle}. +% \cs{mftitle} does only that, while \cs{tmtitle} also writes the argument +% to the \file{.log} file and typesets it in the document. +% +% We write the argument as a token list because that is the the easiest +% verbatim-like way to do it. +% \begin{macrocode} +\newif\if@mfpswitch +\newdef\mftitle{\@bsphack\@mfpswitchtrue\mfp@gettoks\mf@title}% +\newdef\tmtitle{\mfp@gettoks\tm@title}% +\newdef\mfp@gettoks#1{\afterassignment#1\mfp@toks=}% +\newdef\tm@title{\@mfpswitchfalse\mf@title + \wlog{\the\mfp@toks}{\the\mfp@toks}}% +\newdef\mf@title{\mfsrc{}% + \immediate\write\mfp@out{mftitle "\the\mfp@toks";}% + \if@mfpswitch\@esphack\fi}% +% \end{macrocode} +% +% \DescribeMacro{\noship} +% \DescribeMacro{\stopshipping} +% \DescribeMacro{\resumeshipping} +% To turn off character shipping for duration of innermost enclosing +% group (eg, \env{mfpic} environment). As far as I know it has never been +% tested with \MP. (It hasn't been tested recently even in \MF.) The \MF{} +% code prevents the figure from being added to the font, the \TeX{} switch +% \texttt{shipping} is checked before \cs{endmfpic} attempts to add the +% (nonexistent) figure to the document. +% \begin{macrocode} +\newdef\stopshipping{\mfp@let\if@shipping\iffalse + \@ifmfpfileisopen{\mfcmd{save shipit;def shipit = relax enddef}}{}}% +\newdef\resumeshipping{\mfp@let\if@shipping\iftrue + \@ifmfpfileisopen{\mfcmd{save shipit;def shipit = shipit_ enddef}}{}}% +\newlet\noship\stopshipping +\resumeshipping +% \end{macrocode} +% +% +% \section{Macros for getting data from files}\label{rwdata} +% +% The following command contains the common code to open a data file for +% reading. The first parameter is the filename, the second is what to do +% if it exists and is nonempty. We first try to \cs{openin} the file and +% issue an error message if that fails. Then we skip any initial blank +% lines and comments and complain if that takes us to the end of the +% file. Otherwise we execute the command specified. Afterwards, since +% each \cs{plotdata} command in a given \env{mfpic} environment +% starts with the linetype at which the previous one ended, we allow the +% value of \cs{mfp@linetype} to survive the group. If \texttt{\#2} is +% not \cs{plotdata}, this is harmless (I hope). +% \begin{macrocode} +\newdef\@processdatafile#1#2{% + \openin\mfp@data=#1\relax + \ifeof\mfp@data \nodatafileerror{#1}% + \else + \begingroup + \mfp@resetwhitespace \mfp@setcomment + \skipBlanksandComments + \ifeof\mfp@data \emptydatafileerror{#1}\else #2\fi + \global\mfp@n=\mfp@linetype + \endgroup + \mfp@linetype=\mfp@n + \fi + \closein\mfp@data}% +% \end{macrocode} +% +% \DescribeMacro{\nodatafileerror} +% \DescribeMacro{\emptydatafileerror} +% These are error messages for missing or empty data files: +% \begin{macrocode} +\newdef\nodatafileerror#1{% + \mfp@errmsg{No data file: #1 .}% + {The data file you tried to plot can't be found.}}% +\newdef\emptydatafileerror#1{% + \mfp@errmsg{Empty data file: #1 .}% + {The file you tried to plot contains only empty lines and comments.}}% +% \end{macrocode} +% +% When reading files it is important that white space in the files +% always have the same meaning for \TeX{}. This utility resets spaces, +% tabs and EOLs to the standard categories. +% \begin{macrocode} +\newdef\mfp@resetwhitespace{% + \catcode`\^^M=5 \catcode`\ =10 \catcode`\^^I=10 }% +% \end{macrocode} +% +% \DescribeMacro{\skipcomments} +% This does what it says, skipping comments in a data file. It reads a +% line from a previously opened file (input stream \cs{mfp@data}) and +% compares it to \cs{@empty}. It calls itself when they are equal (a +% comment line). When this macro finishes, \cs{mfp@temp} contains either +% \cs{par} (blank line or EOF) or real data. +% \begin{macrocode} +\mfp@ifdefined\@empty{}{\def\@empty{}}% +\newdef\skipcomments{\read\mfp@data to \mfp@temp + \ifx\mfp@temp\@empty \@xp\skipcomments\fi}% +% \end{macrocode} +% +% \DescribeMacro{\skipBlanksandComments} +% This command first skips comments. After that \cs{mfp@temp} can contain +% \cs{par}, indicating either EOF or a blank line, or something else. +% In the first case (EOF) the macro terminates, in the second case (blank) +% it calls itself again, in the third case it also terminates, having +% presumably found real data. +% +% When this is called, a file should already be open (by +% \cs{@processdatafile}) using the handle \cs{mfp@data}. +% +% The macro \cs{@XP} causes two macros after the next token to be +% expanded, removing the two \cs{fi}\,s (and so avoiding deep nesting). +% \begin{macrocode} +\newdef\skipBlanksandComments{\skipcomments + \ifeof\mfp@data + \else\ifx\mfp@temp\mfp@par \@XP\skipBlanksandComments + \fi\fi}% +% \end{macrocode} +% +% The following two commands, \cs{mfp@rwdata} and \cs{mfp@rwdataloop} +% perform the work of writing the file (read stream \cs{mfp@data} opened +% by \cs{@processdatafile}). +% +% The counter \cs{mfp@n} is used to keep track of how many lines of the +% data file have been written to one line of the output. The token +% \cs{sequence} in a \cs{using} specification will expand to the value of +% the counter \cs{mfp@sequence}. +% +% When this first macro is called, a non-blank line has been read to the +% macro \cs{mfp@temp}, to which we now add a space. The macro +% \cs{mfp@buffer} is what will be written to the output file as soon as it +% is long enough. We initialize it by defining it to be an open +% parenthesis followed by the result of applying \cs{parse@data} to the +% contents of \cs{mfp@temp}. Then we call \cs{mfp@rwdataloop}, which does +% the actual reading and writing. +% \begin{macrocode} + \def\mfp@rwdata{\mfp@n=1 \mfp@sequence=1 + \def\sequence{\number\mfp@sequence}% + \edef\mfp@temp{\mfp@temp\space}% + \edef\mfp@buffer{(\@xp\parse@data\mfp@temp\mfp@delim}% + \mfp@rwdataloop}% +% \end{macrocode} +% +% At this point, the buffer has been started with the first datum, so we +% read another line. If that is blank, we write the buffer (and the closing +% parenthesis and a semicolon) and terminate the loop. Otherwise we go +% through a loop: +% \begin{enumerate} +% \item Increment the sequence counter, +% \item add a comma to the buffer, +% \item test whether the buffer is `full', and +% \item add the datum to the buffer. If the buffer is full in step~3, it is +% written to the output and cleared before going to step~4. +% \end{enumerate} +% \cs{mfp@rwdataloop} loops by calling itself at the end. Whenever +% \cs{mfp@temp} is empty (comment line read), (1)--(4) are skipped and +% another line read. +% \begin{macrocode} + \def\mfp@rwdataloop{% + \read\mfp@data to \mfp@temp + \ifx\mfp@temp\mfp@par + \mfcmd{\mfp@buffer)}% + \else + \ifx\mfp@temp\@empty % comment line, read another + \else + \edef\mfp@temp{\mfp@temp\space}% + \advance\mfp@sequence1 + \edef\mfp@buffer{\mfp@buffer\mfp@join}% + \ifnum\mfp@n<\mfpdataperline\relax + \advance\mfp@n1 + \else + \mfsrc{\mfp@buffer}% + \mfp@n=1 + \def\mfp@buffer{}% + \fi + \edef\mfp@buffer{\mfp@buffer + \@xp\parse@data\mfp@temp\mfp@delim}% + \fi + \@xp\mfp@rwdataloop + \fi}% +% \end{macrocode} +% +% +% \section{Various \CMF{} Settings.}\label{MFsettings} +% +% \DescribeMacro{\drawpen} +% \DescribeMacro{\pen} +% \DescribeMacro{\penwd} +% Macros that write changes in default \grafbase{} variables now use the +% construct ``\gbc{save x; x; x := ;}'' (via a call to +% \cs{setmfvariable}). This makes changes local if inside a given \env{mfpic} +% environment, global if outside. An exception is \gbc{penwd} which, as an +% internal variable uses `\gbc{interim}' instead (via the \grafbase{} +% command \gbc{resizedrawpen}). Both \cs{drawpen} and \cs{pen} have been +% used in the past, while \cs{penwd} is more consistent with other +% commands, so we keep all three. +% \begin{macrocode} +\newdef\drawpen#1{\mfcmd{\@nl resizedrawpen (#1)}}% +\newlet\pen=\drawpen \newlet\penwd=\drawpen +% \end{macrocode} +% +% \DescribeMacro{\shadewd} +% The \cs{shade} macro works in \MF{} by adding many copies of the small +% picture \gbc{shadedot} to the figure, in \MP{} the parameters +% \gbc{shadewd} and \cs{shadespace} are simply used to calculate a level +% of gray and a color fill is used. +% +% \DescribeMacro{\polkadotwd} +% However, both \MF{} and \MP{} handle polkadots the same. The only +% difference is \MF's need for fitting to a pixel grid. But that is +% handled in \grafbase. +% \begin{macrocode} +\newdef\shadewd#1{\setmfnumeric{shadewd}{#1}}% +\newdef\polkadotwd#1{\setmfnumeric{polkadotwd}{#1}}% +% \end{macrocode} +% +% \DescribeMacro{\hatchwd} +% The thickness of lines in the hatching fill. +% \begin{macrocode} +\newdef\hatchwd#1{\setmfnumeric{hatchwd}{#1}% + \setmfvariable{pen}{hatchpen}{pencircle scaled hatchwd}}% +% \end{macrocode} +% +% \DescribeMacro{\dashpattern} +% A dash pattern consists (internal to \MF) of three arrays. The +% \grafbase{} command \gbc{dashpat} accepts a name, and a sequence of +% numbers representing the sizes of dashes and spaces, and builds these +% arrays. +% \begin{macrocode} +\newdef\dashpattern#1#2{\mfcmd{save #1; dashpat (#1) (#2)}}% +% \end{macrocode} +% +% \DescribeMacro{\settension} +% This sets the default tension for \cs{curve} commands, as well as for +% any command that takes an optional argument of the form +% \oarg{s\meta{tens}}. This includes \cs{function}, \cs{plrfcn}, +% \cs{fcncurve}, \cs{datafile}, \cs{plotdata} and others. It also sets the +% default tension for \cs{sclosed} and \cs{bclosed}. The value should be +% at least $3/4$. +% \begin{macrocode} +\newdef\settension#1{\setmfnumeric{default_tension}{#1}}% +% \end{macrocode} +% +% +% \section{Settings for text label placement in +% figures}\label{labelsettings} +% +% \cs{tlabel}\,s are `justified' by placing a particular point of the +% text at the location specified. The \cs{tlabel} command accepts an +% optional argument containing two letters. There are 4 possibilities +% for the first and three for the second. It turns out to be easier to +% process these if we have a command that converts these to numbers, and +% then \cs{ifcase} can be used. There is a third part of the optional +% argument usable only in \MP{}: a number indicating degrees of rotation. +% +% \DescribeMacro{\tlabeljustify} +% The multi-part definition of \cs{tlabeljustify} is to guard +% against confusing error messages if some part of this optional argument +% is empty. The code assumes that if there are only 2, 1 or no parts, then +% later parts should be left unchanged. The rotation part is empty by +% default (rather than 0), because some commands will emit a warning if +% a nonempty rotation exists without \opt{mlabels}. +% +% The result of \cs{tlabeljustify} is that \cs{tl@vpos} is set equal to +% $-1$ if the first letter is (default) \texttt{B} (for Baseline), and +% 0--2 if it is \texttt{b} (bottom), \texttt{c} (center) or \texttt{t} +% (top). Similarly, \cs{tl@hpos} is set equal to $-1$ if the second +% letter is (default) \texttt{l} (for left), and 0 or 1 if it is +% \texttt{c} (center) or \texttt{r} (right). +% +% The rotation part is just saved in \cs{tlabel@rot}. This is now true +% even without \opt{mplabels} in case it is turned on later. It is +% ignored by \cs{tlabel} without \opt{mplabels}, but a warning is issued +% here anyway. +% \begin{macrocode} +\newcount\tl@vpos \newcount\tl@hpos +\tl@vpos=-1 \tl@hpos=-1 +\newdef\tlabel@rot{}% +% +\newdef\tlabeljustify#1{% + \mfp@ifempty{#1}{}{\mfp@justify#1\mfp@delim}}% +\def\mfp@justify#1#2\mfp@delim{\mfp@local\mfp@vconv{#1}% + \mfp@ifempty{#2}{}{\@mfp@justify#2\mfp@delim}}% +\newdef\@mfp@justify#1#2\mfp@delim{% + \mfp@local\mfp@hconv{#1}\mfp@local\edef\tlabel@rot{#2} + \@ifmplabels{}% + {\mfp@ifempty{#2}{}% + {\Mfpic@warn{Rotation of labels is not supported without the + mplabels\@msgbreak option. Rotation may be ignored\@online .}}}}% +\newdef\mfp@vconv#1{% + \if B#1\tl@vpos=-1 \else + \if b#1\tl@vpos= 0 \else + \if c#1\tl@vpos= 1 \else + \if t#1\tl@vpos= 2 \else + \tl@vpos=-1 \mfp@justifyerror + \fi\fi\fi\fi}% +\newdef\mfp@hconv#1{% + \if l#1\tl@hpos=-1 \else + \if c#1\tl@hpos= 0 \else + \if r#1\tl@hpos= 1 \else + \tl@hpos=-1 \mfp@justifyerror + \fi\fi\fi}% +\newdef\mfp@justifyerror{% + \mfp@errmsg{Invalid justification parameter for text label.}% + {The optional argument for a text label must be^^J% + one of B, b, c or t^^J + followed by l or r or c,^^J% + followed by an angle (optionally).}}% +% \end{macrocode} +% +% \DescribeMacro{\tlpathjustify} +% This acts just like \cs{tlabeljustify} from the user's point of view. +% Since it is only for users, and not used internally, it merely defines +% three macros that \cs{@@@tlpath} passes on to \cs{tlabeljustify} when no +% justification parameter is present. +% \begin{macrocode} +\newdef\tlpathjustify#1{% + \mfp@ifempty{#1}{}{\tlp@justify#1\mfp@delim}}% +\newdef\tlp@justify#1#2\mfp@delim{\mfp@def\tlpath@v{#1}% + \mfp@ifempty{#2}{}{\tlp@@justify#2\mfp@delim}}% +\newdef\tlp@@justify#1#2\mfp@delim{% + \mfp@def\tlpath@h{#1}\mfp@def\tlpath@r{#2}}% +\tlpathjustify{cc}% +% \end{macrocode} +% +% \DescribeMacro{\tlabelsep} +% \DescribeMacro{\tlabeloffset} +% \cs{tlabelsep} takes an absolute length as its argument and sets +% parameters that determine by how much a label is separated from the +% point it is placed at. This is in case something is drawn at that point, +% such as a dot or a hash mark on an axis. +% +% \cs{tlabeloffset}, on the other hand, takes a pair of dimensions, +% representing offsets. This is mainly so that, if labels seem to be off, +% they can all be shifted with one command. +% +% Both these values are written to the \MF{} file for the sake of the +% commands that draw rectangles or ovals around labels. +% \begin{macrocode} +\newdef\tlabelsep#1{\mfp@local\tlabel@sep=#1\relax + \setmfnumeric{label_sep}{\the\tlabel@sep}}% +\newdef\tlabeloffset#1#2{% + \mfp@local\tlabel@hadj=#1\relax \mfp@local\tlabel@vadj=#2\relax + \setmfvariable{pair}{label_adjust}% + {(\the\tlabel@hadj,\the\tlabel@vadj)}}% +% \end{macrocode} +% +% \DescribeMacro{\everytlabel} +% Every line of a multiline label is written inside a group, so +% adjustments to baselineskip and other things are difficult or impossible. +% Therefore, \cs{everytlabel} is provided to define tokens to be inserted +% before the label code, outside these groups. It is not itself a token +% variable, so that that it can write the tokens to the \MP{} file once, +% instead of at every label. +% \begin{macrocode} +\newdef\everytlabel{\afterassignment\@everytlabel + \mfp@local\every@tlabel}% +\newdef\@everytlabel{% + \mfp@ifmpost + {\@ifmfpfileisopen + {\mfcmd{verbatimtex\@nl + \def\noexpand\everylabel{\the\every@tlabel} etex}}% + {}}% + {}}% +% \end{macrocode} +% +% +% \section{Other settings}\label{othersettings} +% +% \DescribeMacro{\headshape} +% This sets the arrowhead shape. The parameters are: the ratio of width +% to length, the tension (see \file{grafbase.dtx}) and a boolean +% (\gbc{true} or \gbc{false}) to say whether the the head is filled, or +% only the barbs are drawn. (In retrospect, it would have been more +% consistent with other commands to have one \TeX{} parameter with commas +% separating the components.) +% \begin{macrocode} +\newdef\headshape#1#2#3{\mfcmd{\@nl headshape (#1, #2, #3)}}% +% \end{macrocode} +% +% \DescribeMacro{\mfpdefinecolor} +% \prog{Mfpic} supports color under \MP{} by writing all color +% definitions to the output \file{.mp} file. In order to support a +% \LaTeX-like color syntax, all the color models allowed by the color +% package correspond to a \grafbase{} function that returns a \MP{} +% color value. For example, \gbc{cmyk(.3,.3,0,.7)} returns \gbc{(0,0,.3)}, +% a very dark blue. This can be set by +% \cs{mfpdefinecolor}\marg{vdblue}\marg{cmyk}\marg{.3,.3,0,.7}. +% +% \DescribeMacro{\fillcolor} +% \DescribeMacro{\drawcolor} +% \DescribeMacro{\headcolor} +% \DescribeMacro{\hatchcolor} +% \DescribeMacro{\pointcolor} +% \DescribeMacro{\tlabelcolor} +% \DescribeMacro{\backgroundcolor} +% To support the syntax +% \cs{fillcolor}\oarg{\meta{model}}\marg{\meta{parameters}}, we just +% call \cs{@mfpcolor} with the \grafbase{} color variable name +% \gbc{fillcolor}. +% \begin{macrocode} +\newdef\mfpdefinecolor#1#2#3{\setmfcolor{#1}{#2(#3)}}% +\newdef\fillcolor{\@mfpcolor{fillcolor}}% +\newdef\drawcolor{\@mfpcolor{drawcolor}}% +\newdef\headcolor{\@mfpcolor{headcolor}}% +\newdef\hatchcolor{\@mfpcolor{hatchcolor}}% +\newdef\pointcolor{\@mfpcolor{pointcolor}}% +\newdef\tlabelcolor{\@mfpcolor{tlabelcolor}}% +\newdef\backgroundcolor{\@mfpcolor{background}}% +\newdef\@mfpcolor#1{% + \mfp@ifnextchar[{\mfp@color{#1}}{\setmfcolor{#1}}}% +\newdef\mfp@color#1[#2]#3{\setmfcolor{#1}{#2(#3)}}% +% \end{macrocode} +% +% When \cs{plotdata} is used to draw several graphs from one file, each +% sequence of non-blank lines corresponds to a different curve with a +% different style of rendering. The user has the option to cycle through +% different dashing patterns, different colors, or different symbols. +% +% Internally, \cs{plotdata} issues the command \cs{mfp@setstyle} (which +% can be defined to be any rendering macro), followed by a path defining +% command such as \cs{curve} or \cs{polyline}, followed by a command +% that reads the data and writes it in a suitable format. The following +% commands essentially allow the user to select the rendering macro. +% They start by resetting \cs{mfp@linetype}, the count register that keeps +% track of how many curves have been drawn, then they define +% \cs{mfp@setstyle}. +% +% \DescribeMacro{\dashedlines} +% \cs{dashedlines} uses the rendering prefix \cs{gendashed} with 6 +% different dashing patterns \gbc{dashtype0} through \gbc{dashtype5}. +% These are actually selected in \MF{} through the command +% \gbc{getdashpat}. This takes care of cycling back to +% \gbc{dashtype0} when the number of available dash patterns is exceeded. +% Dashed lines is the default. +% \begin{macrocode} +\newdef\dashedlines{\mfp@local\mfp@linetype0 + \mfp@def\mfp@setstyle{\gendashed{getdashpat\number\mfp@linetype}}}% +\dashedlines +% \end{macrocode} +% +% \DescribeMacro{\coloredlines} +% This uses \cs{draw} with an optional color parameter set +% to \gbc{colortype0} through (by default) \gbc{colortype 7}. These are +% color variables defined by \grafbase{}. It also issues a warning if +% \MF{} is being used. As with \cs{dashedlines}, a \MP{} command +% \gbc{getcolor} selects these colors. +% \begin{macrocode} +\newdef\coloredlines{% + \mfp@ifmpost + {\mfp@local\mfp@linetype0 + \mfp@def\mfp@setstyle{\draw [getcolor\number\mfp@linetype]}}% + {\Mfpic@warn{You can't use \string\coloredlines\space in + Metafont.\@msgbreak Using \dashedlines instead}% + \dashedlines}}% +% \end{macrocode} +% +% \DescribeMacro{\pointedlines} +% This makes a sort of dotted line, except the dots are actually different +% symbols. It uses the rendering macro \cs{plot} with a parameter cycling +% through 9 different symbols. +% \begin{macrocode} +\newdef\pointedlines{\mfp@local\mfp@linetype0 + \mfp@def\mfp@setstyle{\plot{getsymbol\number\mfp@linetype}}}% +% \end{macrocode} +% +% \DescribeMacro{\datapointsonly} +% \cs{datapointsonly} uses symbols like \cs{pointedlines}, but places +% them only at the data points from the file. It uses the rendering macro +% \cs{plotnodes} with a parameter cycling through the same 9 symbols. +% \begin{macrocode} +\newdef\datapointsonly{\mfp@local\mfp@linetype0 + \mfp@def\mfp@setstyle{\relax + \plotnodes{getsymbol \number\mfp@linetype}}}% +% \end{macrocode} +% +% \DescribeMacro{\reconfigureplot} +% This command allows the user to set the dashes, colors and symbols used +% by the \cs{plotdata} command. The first argument is the plotting method +% to be changed (\texttt{dashes}, \texttt{colors}, or \texttt{symbols}) +% and the second argument is a comma separated list of appropriate type +% variables for \cs{plotdata} to cycle through. For example, +% \cs{reconfigureplot}\marg{dashes} takes a list of dashing patterns +% (previously defined by the \cs{dashpattern} command) separated by +% commas. It writes a command instructing \MF{} to redefine the arrays +% \mfc{dashtype0}, \mfc{dashtype1}, etc., used with \cs{gendashed} when +% \cs{dashedlines} is in effect. The number of patterns is counted by \MF, +% which also handles the mod-ing operation now. +% +% \cs{reconfigureplot}\marg{colors} takes a list of colors (expressions or +% color names previously defined) separated by commas. It redefines +% \gbc{colortype0}, etc., used with \cs{plotdata} when \cs{coloredlines} +% is in effect. +% +% \cs{reconfigureplot}\marg{symbols} takes a list of symbols (\MF{} path +% expressions, one of the symbols available to \cs{plotsymbol}, or path +% names defined by \cs{store}) separated by commas. It redefines +% \gbc{pointtype0}, etc., used by \cs{plotdata} when \cs{pointedlines} or +% \cs{datapointsonly} is in effect. +% +% \DescribeMacro{\defaultplot} +% This restores \mfpic's predefined defaults for dash patterns, colors and +% symbols in \cs{plotdata}. The one argument is one of the words +% \texttt{dashes}, \texttt{colors}, or \texttt{symbols}, indicating which +% plotting method is to be restored. +% \begin{macrocode} +\newdef\reconfigureplot#1{\mfsrc{setdata#1}\mfp@writedata}% +\newdef\defaultplot#1{\mfcmd{default#1}}% +% \end{macrocode} +% +% \DescribeMacro{\mfplinetype} +% \DescribeMacro{\mfplinestyle} +% The user-level commands \cs{mfplinetype} and \cs{mfplinestyle} allow the +% user to set the starting value of \cs{mfp@linetype}. The default is to +% start at $0$. The names ``linestyle'' and ``linetype'' come from +% an analogous system of changing rendering in \prog{gnuplot}. +% \begin{macrocode} +\newdef\mfplinetype#1{\mfp@local\mfp@linetype=#1}% +\newlet\mfplinestyle\mfplinetype +\mfplinetype{0}% +% \end{macrocode} +% +% \prog{Mfpic} has 6 possible axes, the x- and y-axes pass through the +% origin, $(0,0)$, the four border axes are at the edges of the graph +% space, possibly offset from it by some amount. These four commands hold +% the amount of that offset in graph units, the default being 0. +% \begin{macrocode} +\newdef\mfp@lshift{0}% +\newdef\mfp@bshift{0}% +\newdef\mfp@rshift{0}% +\newdef\mfp@tshift{0}% +% \end{macrocode} +% +% \DescribeMacro{\axismargin} +% \DescribeMacro{\setaxismargins} +% \DescribeMacro{\setallaxismargins} +% These are the user-level command for setting the above offsets. The +% first argument to \cs{axismargin} is one of the letters l, b, r, or t to +% select the axis and the second is the offset in graph units. A positive +% offset represents an inward shift, which is why we call them +% \emph{margins}. The arguments of \cs{setaxismargins} are four offsets +% for the axes (in the above order, which is anticlockwise, starting +% with the left). \cs{setallaxismargins} takes one offset and applies it +% to all axes. +% +% The values are passed on to \MF{} in the variables \gbc{laxis}, +% \gbc{baxis}, \gbc{raxis}, and \gbc{taxis}. They are also needed by the +% \cs{axislabels} command so they are saved in macros. +% \begin{macrocode} +\newdef\axismargin#1#2{\setmfnumeric{#1axis}{#2}% + \mfp@local\@namedef{mfp@#1shift}{#2}}% +\newdef\setaxismargins#1#2#3#4{\axismargin l{#1}\axismargin b{#2}% + \axismargin r{#3}\axismargin t{#4}}% +\newdef\setallaxismargins#1{\setaxismargins{#1}{#1}{#1}{#1}}% +% \end{macrocode} +% +% The following converts axis letters to a numeric, making conditionals for +% axes simpler to code (\cs{ifcase} versus the six nested \cs{if}\,s we +% see here.) Plus we get to define the error message only once. The +% first argument is the letter and the second argument is the calling +% command (for the error message). +% \begin{macrocode} +\newcount\mfp@axisnum +\def\get@axisnum#1#2{% + \if x#1\relax \mfp@axisnum0 + \else\if y#1\relax \mfp@axisnum1 + \else\if l#1\relax \mfp@axisnum2 + \else\if b#1\relax \mfp@axisnum3 + \else\if r#1\relax \mfp@axisnum4 + \else\if t#1\relax \mfp@axisnum5 + \else + \mfp@errmsg {Invalid axis letter "#1".}% + {The command #2 requires an axis to be designated by one of^^J% + the following letters: x, y, l, b, r, or t. If you proceed, ^^J% + x will be assumed.}% + \fi\fi\fi\fi\fi\fi}% +% \end{macrocode} +% +% \DescribeMacro{\setaxismarks} +% \DescribeMacro{\setxmarks} +% \DescribeMacro{\setymarks} +% \DescribeMacro{\setbordermarks} +% \DescribeMacro{\setallbordermarks} +% The tick marks (or hash marks) on the axes can be in three possible +% positions: centered on the axes, all on one side, or all on the other +% side. The default for the x- and y-axes is centered, for the border axes +% it is inside. For changing this we provide the \cs{setaxismarks} command, +% whose first argument is the axis letter, and whose second argument is +% one of the words \texttt{inside}, \texttt{outside}, \texttt{centered}, +% \texttt{ontop}, \texttt{onbottom}, \texttt{onleft}, or \texttt{onright}. +% \begin{macrocode} +\newdef\setaxismarks#1#2{\setmfnumeric{#1tick}{#2}}% +\newdef\setxmarks#1{\setaxismarks x{#1}}% +\newdef\setymarks#1{\setaxismarks y{#1}}% +\newdef\setbordermarks#1#2#3#4{\setaxismarks l{#1}\setaxismarks b{#2}% + \setaxismarks r{#3}\setaxismarks t{#4}}% +\newdef\setallbordermarks#1{\setbordermarks{#1}{#1}{#1}{#1}}% +% \end{macrocode} +% +% \DescribeMacro{\smoothdata} +% \DescribeMacro{\unsmoothdata} +% The \cs{datafile} and \cs{plotdata} commands originally just created +% polygonal paths, but users requested the ability to draw smooth ones. +% Originally only the commands below (\cs{smoothdata} and +% \cs{unsmoothdata}) were written to do this. Later, these file +% manipulation commands were given optional arguments to achieve the same +% effect, so now the commands below just set the defaults for the optional +% parameter, storing them in the macros \cs{mfp@smoothness} and +% \cs{mfp@tension}. The latter can be used to adjust the tension of the +% \MF{} path if smoothness is `s'. Default tension is now empty rather +% than 1 so we can implement a scheme to change the actual default used. +% \begin{macrocode} +\newdef\smoothdata{\null@opt\@smoothdata}% +\newdef\@smoothdata[#1]{\mfp@def\mfp@smoothness{s}% + \mfp@def\mfp@tension{#1}}% +\newdef\unsmoothdata{\mfp@def\mfp@smoothness{p}% + \mfp@def\mfp@tension{}}% +\unsmoothdata% default +% \end{macrocode} +% +% \DescribeMacro{\using} +% \DescribeMacro{\usingpairdefault} +% \DescribeMacro{\usingnumericdefault} +% These commands control how we interpret data in a file. +% The command \cs{using} is named after a keyword in \prog{gnuplot}. It +% controls which datum is plotted against which by \cs{plotdata} and +% \cs{datafile}. The default is to read the first two space separated +% words on a line as the x- and y-coordinate of a point. To allow that +% there might be more data on a line, it is also assumed that the second +% word is followed by a space and the rest of the line is read as a third +% parameter that is not used. In case there are only two words, +% \mfpic{} will always add a space on the end and then the third +% parameter will be empty. +% +% The \cs{parse@data} command reads its argument as delimited +% parameters, and the \cs{using} command tells what those delimiters are. +% For example, in the first part of +% \cs{using}\marg{\#1 \#2 \#3}\marg{(\#1,\#2)}, we are telling +% \cs{parse@data} that everything on a line up to the first space is the +% first parameter, and everything up to the second space is the second +% parameter and the rest of the line is the third parameter. In the second +% part we are telling it that what we write to the output is a pair in +% parentheses with the first two parameters separated by a comma. This +% example is the default as we see here in \cs{usingpairdefault}. This +% command can be issued by a user to return to that default. The user can +% also issue \cs{usingnumericdefault} to write the first space separated +% word as a single numeric. This is for commands like \cs{piechart}. +% +% \DescribeMacro{\mfpdataperline} +% \cs{mfpdataperline} is a user level macro that controls the maximum +% number of points that will be written to a single line in the output. +% \begin{macrocode} +\newdef\using#1#2{\mfp@def\parse@data#1\mfp@delim{#2}}% +\newdef\usingpairdefault{\using{##1 ##2 ##3}{(##1,##2)}}% +\newdef\usingnumericdefault{\using{##1 ##2}{##1}}% +\usingpairdefault +\newdef\mfpdataperline{5}% +% \end{macrocode} +% +% The following macros are used internally by \cs{datafile} and \cs{plotdata}. +% A comment line is read by \TeX{} as empty so we need an empty macro to +% test against, and a blank line is read as \cs{par} (not the primitive +% \cs{par}, but the literal token \cs{par}, so it tests as equal to +% \cs{mfp@par}. Early versions of \cs{plotdata} wrote a literal \MF{} path +% expression to the output file and \cs{mfp@join} created the \mfc{--} +% between points. Now we write one of the \grafbase{} list-to-path +% commands followed by a comma separated list of points, so \cs{mfp@join} +% has morphed into a comma. +% \begin{macrocode} +\newdef\mfp@par{\par}% +\newdef\mfp@join{,}% +% \end{macrocode} +% +% \DescribeMacro{\makepercentother} +% \DescribeMacro{\makepercentcomment} +% \DescribeMacro{\mfpdatacomment} +% The user can change the comment character for data files with +% something like \cs{mfpdatacomment}\marg{\cs{\#}}. This also changes the +% percent character to category `other'. We can also use the percent sign +% as part of the numeric data by sandwiching the \cs{using} command +% between \cs{makepercentother} and \cs{makepercentcomment}. Every file +% reading command issues \cs{mfp@setcomment} before reading. The count +% register \cs{@datacomment} hold the ASCII code of the current comment +% character, the default being the percent sign. +% \begin{macrocode} +\newcount\@datacommentchar \@datacommentchar`\% +\newdef\makepercentother{\@makeother\%}% +\newdef\makepercentcomment{\catcode`\%=14 }% +\newdef\mfpdatacomment#1{\mfp@local\@datacommentchar`#1}% +\newdef\mfp@setcomment{\makepercentother\catcode\@datacommentchar14 }% +% \end{macrocode} +% +% \DescribeMacro{\fdef} +% The following is for defining functions to be used in \cs{function} +% through \cs{plrregion}. The first argument is the name of the function, +% the second is its variable, the last is the \MF{} code. Obviously its +% use requires a knowledge of the \MF{} language. The function produced is +% a \mfc{vardef}, and can contain almost arbitrary \MF{} code, but must +% end with an expression. Normally it must be a numerical expression, to +% be use in \cs{function}, or a pair expression so it can be used alone in +% the last argument of \cs{parafcn}. +% +% We apply \cs{@makeother} to \texttt{\#} so it doesn't get doubled. The +% \texttt{\#} is frequent in vardefs among the \MF{} gurus. +% \begin{macrocode} +\newdef\fdef{\begingroup\@makeother\#\preservelines\@fdef}% +\newdef\@fdef#1#2#3{\mfcmd{\@nl save #1;\@nl + vardef #1 (expr #2) = \@nl #3\@nl enddef}\endgroup}% +% \end{macrocode} +% +% The following is executed last inside \cs{@mfpic@graf@macs}. It is a +% hook for adding new definitions. It is initialized to empty, and add-on +% packages can add to it. +% \begin{macrocode} +\newdef\mfp@additions{}% +% \end{macrocode} +% +% +% \section{The main graphics macros}\label{main} +% +% In order to avoid redefining commands of other packages and in order +% to avoid having other packages redefine \mfpic{} commands, all mfpic +% commands that cannot be used outside the \env{mfpic} environment are +% defined anew with every such environment. This is accomplished by having +% the \cs{mfpic} command execute \cs{@mfpic@graf@macs}, which expands to +% all those definitions. Grouping localizes the definitions, so outside +% \env{mfpic} environments, these commands revert to being undefined, or +% to there original definitions if they had any. As might be expected it +% is quite long, over 300 lines of code at last count. +% \begin{macrocode} +\newdef\@mfpic@graf@macs{% +% \end{macrocode} +% +% \subsection{Plotting data from files}\label{datafiles} +% +% \DescribeMacro{\plotdata} +% Most of the \mfpic{} graphic commands take optional arguments. Most of +% them follow the scheme below: \cs{@plotdata} takes a mandatory argument +% enclosed in brackets, and does the work. \cs{plotdata} is simply defined +% to test for an optional argument and pass it or a default to +% \cs{@plotdata}. In this case, the default option is signaled by +% passing empty brackets via \cs{null@opt}. +% +% \cs{@plotdata} follows the scheme of most of the data file processing +% commands: it calls \cs{@processdatafile} with the name of the file (the +% second parameter of \cs{@plotdata}) and another command, \cs{mfp@doplots}, +% which really does the work. The argument of \cs{mfp@doplots} is the +% original optional parameter of \cs{plotdata}. This optional parameter is +% the smoothness, which may be \oarg{s\meta{tension}} for a smooth path +% or \oarg{p} for a polygonal path, or empty to select whatever default +% was created by \cs{smoothdata}. +% \begin{macrocode} + \newdef\plotdata{\null@opt\@plotdata}% + \newdef\@plotdata[##1]##2{\@processdatafile{##2}{\mfp@doplots{##1}}}% +% \end{macrocode} +% +% \cs{mfp@doplots} is a self-looping macro. It issues the rendering +% prefix (in \cs{mfp@setstyle}), increments the linetype, and writes the +% path expression defined by the first set of data in the file (via +% \cs{do@datafile}, which \emph{really} does the work and which stops at a +% blank line). That part, when prefixed by \cs{@figmacstart}, functions +% as a \cs{@figmac}. When finished with one figure, \cs{@if@enddata} +% checks if there is another set of data in the file. If so, +% \cs{mfp@doplots} calls itself again. +% +% The argument is the smoothness parameter(s), which it merely passes on. +% There is no filename argument: since \cs{@processdatafile} has already +% opened the input stream \cs{mfp@data} and subsequent macros will read +% from it. +% \begin{macrocode} + \def\mfp@doplots##1{\mfp@setstyle + \advance\mfp@linetype1 \@figmacstart + \do@datafile{##1}% + \@if@enddata{}{\mfp@doplots{##1}}}% +% \end{macrocode} +% +% When two blank lines occur in succession, \cs{plotdata} is suppose to +% stop. \cs{@ifenddata} is called when \cs{do@datafile} ends (one blank +% line was found), it checks for another blank line (or end-of-file) +% and, if it finds one, selects the first of the two alternatives that +% follow. +% \begin{macrocode} + \newdef\@if@enddata{% check for another blank line + \ifeof\mfp@data \@xp\@firstoftwo + \else + \skipcomments + \ifx\mfp@temp\mfp@par \@XP\@firstoftwo + \else \@XP\@secondoftwo + \fi + \fi}% +% \end{macrocode} +% +% \DescribeMacro{\datafile} +% \cs{datafile} defines a path connecting the points in a datafile. The +% optional parameter is the smoothness, as in \cs{plotdata}. The other +% parameter is the filename. \cs{@datafile} does the figure macro stuff, +% opens the data file, and calls \cs{do@datafile} which does all the work. +% \begin{macrocode} + \newdef\datafile{\null@opt\@datafile}% + \newdef\@datafile[##1]##2{\@figmacstart + \@processdatafile{##2}{\do@datafile{##1}}}% +% \end{macrocode} +% +% I lied. Actually all \cs{do@datafile} does is handle any empty +% optional parameter and call \cs{@do@datafile} to do the work. +% \begin{macrocode} + \newdef\do@datafile##1{% + \do@mtparam{##1}{\mfp@smoothness\mfp@tension}\@do@datafile}% +% \end{macrocode} +% +% And \cs{@do@datafile} is mainly just a wrapper, processing the optional +% parameter (passed by either \cs{plotdata} or \cs{datafile}) which +% selects what figure making code should be written. For +% \oarg{s\meta{tension}} a \gbc{curve} command is used. For \oarg{p}, a +% \gbc{polyline}. (The `\cs{mf@F}' means the curve is not closed). +% +% After that, \cs{mfp@rwdata} is called, which reads and writes the +% data. +% \begin{macrocode} + \newdef\@do@datafile[##1##2]{% + \mfsrc{% + \if s##1 \mfp@ifempty{##2}{curve }{tcurve (##2) }% + \else polyline + \fi (\mf@F)}\mfp@rwdata}% +% \end{macrocode} +% +% \subsection{The prefix commands}\label{prefixcommands} +% +% \subsubsection{Storing and reusing a figure}\label{storing} +% +% \DescribeMacro{\store} +% This stores an \mfpic{} path in a \MF{} path variable. The argument is +% the variable name. It should be followed by an \mfpic{} figure macro +% (such as \cs{rect}\marg{...}). The stored path can be reused via the +% \cs{mfobj} command. This command is written as a \cs{@rendmac} even +% though it does no rendering. This is so (1)~it will turn off implicit +% rendering (any rendering must be explicitly written) and (2) it can be +% placed anywhere within the prefix area. This is new behavior with +% version 0.7. Prior to this it was required to place the path to be +% stored as a second argument. Though that argument could contain other +% prefixes in addition to the path, it was required that no other prefixes +% precede \cs{store}. Note that \cs{store} takes a second argument but +% it merely puts it back. This is so that the old syntax (with the figure +% macro in braces) will continue to work. +% \begin{macrocode} + \newdef\store##1##2{\@rendmac{stored (##1)}##2}% +% \end{macrocode} +% +% \DescribeMacro{\mfobj} +% \DescribeMacro{\mpobj} +% This is the interface to use a \cs{store}-d object. +% \cs{mfobj}\marg{\meta{name}} is a figure macro, and should act pretty +% much exactly the same as if the figure macro that had been stored in the +% variable were typed in its place. Its one argument, the variable name, +% is read by \cs{@figmac}, which operates as described previously, either +% implicitly rendering the path, or allowing it to be picked up by +% preceding prefix macros. +% \begin{macrocode} + \newlet\mfobj\@figmac + \newlet\mpobj\@figmac +% \end{macrocode} +% +% \subsubsection{Subpaths} +% +% \DescribeMacro{\cutoffbefore} +% This macro take one mandatory argument which is an object stored with +% \cs{store}. It modifies the path it is prefixed to so that it starts +% at its first point of intersection with the object, cutting off any +% earlier part of the path. +% +% \DescribeMacro{\cutoffafter} +% This is similar, except the modified path ends at the last point of +% intersection between the following path and the object, cutting off +% any later part of the path. It is internally the same as applying +% \cs{cutoffbefore} to the reversed path and reversing the result. +% +% \DescribeMacro{\trimpath} +% This trims off the specified amounts from the start and end of the +% path. The amounts are two absolute dimensions, separated by commas. +% They may be \TeX{} dimensions. If the first dimension is absent, it is +% set to \texttt{0pt}, if the second is absent, it is set equal to the +% first. (So if both are absent, nothing is trimmed.) +% \begin{macrocode} + \newdef\cutoffafter##1{\@closmac{cutoffafter (##1)}}% + \newdef\cutoffbefore##1{\@closmac{cutoffbefore (##1)}}% + \newdef\trimpath##1{\@getdimens##1,,\mfp@delim + \@closmac{trimmedpath (\the\mfp@scratch, \the\mfp@scratchB)}}% + \newdef\@getdimens##1,##2,##3\mfp@delim{% + \mfp@scratch \@ifmtsub{##1}{\z@}\relax + \mfp@scratchB\@ifmtsub{##2}{\mfp@scratch}\relax}% +% \end{macrocode} +% +% \DescribeMacro{\partpath} +% \DescribeMacro{\subpath} +% These produce a subpath of the following path. Each takes a mandatory +% parameter containing two numbers separated by a comma. In +% \cs{partpath}, these should be between 0 and 1 and produce a fraction +% of the following path. In \cs{subpath}, these are absolute numbers between +% 0 and the number of segments in the path, and it produces the equivalent of +% \MF's \mfc{subpath} primitive. +% \begin{macrocode} + \newdef\partpath##1{\@closmac{partialpath (##1)}}% + \newdef\subpath##1{\@closmac{gsubpath (##1)}}% +% \end{macrocode} +% +% \subsubsection{Drawing a curve}\label{drawing} +% +% These are rendering macros that draw the curve in some fashion: solid, +% dashed, colored, etc. +% +% \DescribeMacro{\draw} +% \cs{draw} is the initial definition of \cs{@render}. It takes one +% optional argument, a color. In \MF{}, where color are just numerics, if +% it is ${}\ge 1$ (representing white) the path is subtracted from the +% picture, otherwise it is drawn in black. +% +% \begin{macrocode} + \newdef\draw{\null@opt\@draw}% + \newdef\@draw[##1]{% + \@rendmac{\mfp@ifempty{##1}{drawn}{colordrawn (##1)}}}% +% \end{macrocode} +% +% \DescribeMacro{\dashed} +% \cs{dashed} (as well as \cs{dotted}) takes one optional argument, +% which should contain the length of the dashes (diameter of dots) and +% the length of the spaces between, separated by a comma. The defaults +% can be seen in the code below. +% \begin{macrocode} + \newdef\dashed{\simple@opt\@dashed{\the\dashlen,\the\dashspace}}% + \newdef\@dashed##1{\@rendmac{DASHED (##1)}}% + \newdef\dotted{\simple@opt\@dotted{\the\dotsize,\the\dotspace}}% + \newdef\@dotted##1{\@rendmac{dotted (##1)}}% +% \end{macrocode} +% +% \cs{gendashed} takes one mandatory argument, the name of a dash pattern +% previously defined by \cs{dashpattern} +% \begin{macrocode} + \newdef\gendashed##1{\@rendmac{gendashed (##1)}}% +% \end{macrocode} +% +% \cs{plot} is like \cs{dotted}, except the dots are variously shaped +% symbols. It takes one optional argument containing the size of the +% symbol and the spacing, separated by a comma, and one mandatory +% argument, the name of the symbol. This can in principal be any +% expression of type \mfc{picture} or \mfc{path}. (In \MP, type +% \mfc{string} is also permitted). For the size parameter to work +% correctly, the symbol should be a path, and it should have 1 as it's +% natural size. \Mfpic{} provides the predefined paths +% \texttt{Triangle}, \texttt{Square}, \texttt{Circle}, \texttt{Star}, +% \texttt{Diamond}, \texttt{Plus}, \texttt{Cross} and \texttt{Asterisk}. +% The first 5 have filled-in versions: \texttt{SolidTriangle}, etc. +% \begin{macrocode} + \newdef\plot{\simple@opt\@plot{\the\pointsize, \the\symbolspace}}% + \newdef\@plot##1##2{\@rendmac{doplot (##2, ##1)}}% +% \end{macrocode} +% +% Sometimes, rather than equally spaced dots or symbols, we would rather +% have a symbol at each `node' of the following path. If the path is +% created by a list macro, then usually each point in the list is a node +% (but the spline paths are exceptions). For other figures, the nodes +% can seem pretty random. For example, a \cs{circle} command without optional +% argument produces a curve with 8 equally spaced nodes, but with optional +% argument the nodes depend on how it is drawn and the size of any angle +% parameter. +% +% \cs{plotnodes} has almost the same syntax as \cs{plot}, but since it +% places the symbols only at the nodes of the path, there is no spacing +% parameter in the optional argument. +% \begin{macrocode} + \newdef\plotnodes{\simple@opt\@plotnodes{\the\pointsize}}% + \newdef\@plotnodes##1##2{\@rendmac{plotnodes (##2, ##1)}}% +% \end{macrocode} +% +% \subsubsection{Closing a curve}\label{closing} +% +% \DescribeMacro{\sclosed} +% \DescribeMacro{\bclosed} +% \DescribeMacro{\lclosed} +% \DescribeMacro{\cbclosed} +% \DescribeMacro{\qbclosed} +% \DescribeMacro{\uclosed} +% These close a path defined by whatever figure macro follows it. The +% first closes smoothly in the same manner that \cs{curve} creates a +% smooth path, the second uses an ordinary \MF{} B\'ezier. These two have +% an optional argument: the amount of tension to put in the connecting +% link. Higher tension produces a linking segment with sharper turns near +% the endpoints and a flatter path in between. This makes no sense with +% \cs{lclosed}, \cs{qbclosed} or \cs{cbclosed}. The first always draws a +% straight line and the other two requires a link explicitly determined by +% the beginning and ending segments of the path: a cubic B-spline for +% \cs{cbclosed} and a quadratic B-spline for \cs{qbclosed}. See +% \cs{closedcspline} and \cs{closedqspline} described later. +% +% Due to a misunderstanding on my part, \cs{uclosed} was defined in a more +% complicated manner than necessary, and actually produced exactly the +% same path as \cs{bclosed}. So now they are just made to be equal. +% \begin{macrocode} + \newdef\@closed##1##2{% + \@closmac{##1closed\mfp@ifempty{##2}{}{t (##2)}}}% + \newdef\bclosed{\null@opt\@bclosed}% + \newdef\@bclosed[##1]{\@closed b{##1}}% + \newdef\sclosed{\null@opt\@sclosed}% + \newdef\@sclosed[##1]{\@closed s{##1}}% + \newdef\lclosed{\@closed l{}}% + \newdef\cbclosed{\@closed{cb}{}}% + \newdef\qbclosed{\@closed{qb}{}}% + \newlet\uclosed\bclosed +% \end{macrocode} +% +% \subsubsection{Filling a closed curve}\label{filling} +% +% The next few prefix macros fill the interior of the closed path that +% follows with some sort of pattern. The path must be either already +% closed (like that produced by \cs{rect} or \cs{circle}) or explicitly +% closed with a closing prefix. A non-closed path will simply be drawn +% with a solid line. +% +% \DescribeMacro{\tess} +% \cs{tess} takes one mandatory argument, the name of a previously defined +% tile, and fills with shifted copies of the tile. +% \begin{macrocode} + \newdef\tess##1{\@rendmac{tess (##1)}}% +% \end{macrocode} +% +% \DescribeMacro{\shade} +% \DescribeMacro{\polkadot} +% \cs{shade} and \cs{polkadot} take one optional parameter, the separation +% between dots, defaulting to \cs{shadespace} (resp., \cs{polkadotspace}). +% The size of the dots is set by issuing the command \cs{shadewd} (resp., +% \cs{polkadotwd}). +% \begin{macrocode} + \newdef\shade{\simple@opt\@shade{\the\shadespace}}% + \newdef\@shade##1{\@rendmac{shade (##1)}}% + \newdef\polkadot{\simple@opt\@polkadot{\the\polkadotspace}}% + \newdef\@polkadot##1{\@rendmac{polkadot (##1)}}% +% \end{macrocode} +% +% \DescribeMacro{\thatch} +% \DescribeMacro{\lhatch} +% \DescribeMacro{\rhatch} +% \DescribeMacro{\xhatch} +% The hatching macros mostly take two optional parameters, the +% separation of the hatching lines (default \cs{hatchspace}) and their +% color. One slight exception is \cs{thatch}, which is called by all the +% others. Its first optional argument is the separation \emph{and} the +% angle (default $0$) of the lines, separated by a comma. The other +% hatching macros have a fixed angle. \cs{lhatch} has lines at a $-45$ +% degree angle (upper left to lower right), \cs{rhatch} produces the opposite +% diagonal, and \cs{xhatch} does both sets of lines (cross hatching). +% \begin{macrocode} + \newdef\thatch{\simple@opt\@thatch{\the\hatchspace,0}}% + \newdef\@thatch##1{\null@opt{\@@thatch{##1}}}% + \newdef\@@thatch##1[##2]{\@rendmac{% + \mfp@ifempty{##2}{thatch}{colorthatch (##2)} (##1)}}% + \newdef\lhatch{\simple@opt\@lhatch{\the\hatchspace}}% + \newdef\@lhatch##1{\@thatch{##1,-45}}% + \newdef\rhatch{\simple@opt\@rhatch{\the\hatchspace}}% + \newdef\@rhatch##1{\@thatch{##1,45}}% + \newdef\xhatch{\simple@opt\@xhatch{\the\hatchspace}}% + \newdef\@xhatch##1{\null@opt{\@@xhatch{##1}}}% + \newdef\@@xhatch##1[##2]{\@rendmac{% + \mfp@ifempty{##2}{xhatch}{colorxhatch (##2)} (##1)}}% + \newlet\hatch=\xhatch +% \end{macrocode} +% +% Commands that might conceivably interfere with small bits of \TeX{} +% code in labels have been renamed. Thus, instead of \cs{fill}, which is a +% \LaTeX{} text mode command, we have \cs{gfill}. We also have \cs{gclear} +% and \cs{gclip}. The `g' is for `graphic'. Later, commands that deal +% with text (labels and captions), have `t' prepended to their more +% natural name, thus \cs{tlabel} and \cs{tcaption}. +% +% \DescribeMacro{\gfill} +% \DescribeMacro{\gclear} +% \DescribeMacro{\gclip} +% \cs{gfill} take one optional argument, the color with which to fill. +% Under \MF{} the color must be a numeric (representing a level of gray) +% or one of the color functions, which are defined in \file{grafbase.mf} +% to return numeric values. +% +% \cs{gclear} will actually fill with the color \texttt{background} in \MP. +% \cs{gclip} might seem to be the inverse of \cs{gclear} (clearing the +% outside of a region), but in \MP{} the mechanism is completely +% different. One wishes \MP{} had an `inverse clip' command to use +% instead of filling with \gbc{background}. The figure macro following +% these commands must be a closed path. +% \begin{macrocode} + \newdef\gfill{\null@opt\@gfill}% + \newdef\@gfill[##1]{% + \@rendmac{\mfp@ifempty{##1}{filled}{colorfilled (##1)}}}% + \newdef\gclear{\@rendmac{unfilled}}% + \newdef\gclip{\@rendmac{Clip}}% +% \end{macrocode} +% +% \subsubsection{Transforming a curve}\label{transforming} +% +% The following are transformation prefixes. They are all but one +% implemented with \cs{@closmac} for reasons covered earlier. Most have a +% mandatory argument, the parameters of the transformation. Because of the +% implementation, one can insert rendering macros between a transformation +% macro and the path being transformed, and they will apply to the +% untransformed path. +% +% If the \env{mfpic} environment has different x and y scales, the +% \cs{rotatepath} and \cs{reflectpath} compensates so that the result is +% congruent to the original. The others do not because this is what users +% seem to expect. +% \begin{itemize} +% \item \cs{reverse} and \cs{xyswappath} have no argument. +% \item \cs{rotatepath} takes \marg{\meta{point},\meta{angle}}. +% \item \cs{shiftpath} takes \marg{\meta{pair}}. +% \item \cs{scalepath} takes \marg{\meta{center of scaling},\meta{factor}}. +% \item \cs{xscalepath} takes \marg{\meta{x-center},\meta{factor}}. +% \item \cs{yscalepath} takes \marg{\meta{y-center},\meta{factor}}. +% \item \cs{slantpath} takes \marg{\meta{y-pivot},\meta{factor}}. +% \item \cs{xslantpath} = \cs{slantpath}. +% \item \cs{yslantpath} takes \marg{\meta{x-pivot},\meta{factor}}. +% \item \cs{reflectpath} takes \marg{\meta{point1},\meta{point2}}, the +% endpoints of a `mirror'. +% \item \cs{transformpath} takes \marg{\meta{transformer}}, a \MF{} +% `transformer' (see ``The \MF book'', page~212). +% \end{itemize} +% +% All of them simply write the \grafbase{} command of nearly the same +% name. +% \begin{macrocode} + \newdef\reverse{\@modmac{reverse}}% + \newdef\xyswappath{\@closmac{xyswappedpath}}% + \newdef\rotatepath##1{\@closmac{rotatedpath (##1)}}% + \newdef\shiftpath##1{\@closmac{shiftedpath (##1)}}% + \newdef\scalepath##1{\@closmac{scaledpath (##1)}}% + \newdef\xscalepath##1{\@closmac{xscaledpath (##1)}}% + \newdef\yscalepath##1{\@closmac{yscaledpath (##1)}}% + \newdef\slantpath##1{\@closmac{xslantedpath (##1)}}% + \newlet\xslantpath\slantpath + \newdef\yslantpath##1{\@closmac{yslantedpath (##1)}}% + \newdef\reflectpath##1{\@closmac{reflectedpath (##1)}}% + \newdef\transformpath##1{\@closmac{transformedpath (##1)}}% +% \end{macrocode} +% +% \subsubsection{Appending an arrowhead}\label{arrowhead} +% +% \DescribeMacro{\arrow} +% The four macros beginning \cs{@h} are assigned default values at the +% start and changed only if an option calls for it. +% Each option starts with a letter (The initial letters of +% `backset', `color', `length', or `rotate'), followed by a value +% to assign to the corresponding variable (defaulting to \mfc{0pt}, +% \meta{empty}, \cs{the}\cs{headlen} and \gbc{0 deg}). Then \cs{arrow} +% finishes with the invokation of \cs{@arrow}. +% \begin{macrocode} + \def\arrow{\def\@hbackset{0}\def\@hcolour{}% + \edef\@hlength{\the\headlen}\def\@hrotate{0}% + \@arrow}% +% \end{macrocode} +% +% \cs{@arrow} calls \cs{@arrowoption} if it finds an optional parameter. +% After processing the parameter, \cs{@arrowoption} calls \cs{@arrow} +% again. This loop will end when optional arguments run out. Then +% \cs{@@arrow} finishes with the actual \MF{} code. +% \begin{macrocode} + \newdef\@arrow{\mfp@ifnextchar[{\@arrowoption}{\@@arrow}}% + \newdef\@@arrow{% + \@modmac{% + \mfp@ifempty{\@hcolour}{headpath}{colorheadpath (\@hcolour)}% + \space(\@hlength, \@hrotate, \@hbackset)}}% +% \end{macrocode} +% +% Since the \cs{arrow} command takes up to 4 optional arguments in any +% order, we have this utility \cs{@arrowoption} which examines an option's +% contents and assigns a value to an appropriate macro. Since rather nasty +% error messages will result if the contents are empty, we test for this +% and do nothing when there is nothing to process. \cs{@@arrowoption} +% makes the appropriated definitions, then \cs{@arrow} is iterated to +% catch another optional parameter. +% \begin{macrocode} + \newdef\@arrowoption[##1]{% + \mfp@ifempty{##1}{}{\@@arrowoption##1\mfp@delim}\@arrow}% + \newdef\@@arrowoption##1##2\mfp@delim{% + \if l##1\relax \mfp@ifempty{##2}{}{\def\@hlength{##2}}% + \else\if r##1\relax \mfp@ifempty{##2}{}{\def\@hrotate{##2}}% + \else\if b##1\relax \mfp@ifempty{##2}{}{\def\@hbackset{##2}}% + \else\if c##1\relax \mfp@ifempty{##2}{}{\def\@hcolour{##2}}% + \else + \Mfpic@warn{Improper option to \string\arrow\@online .}% + \fi\fi\fi\fi}% +% \end{macrocode} +% +% This ends the prefix macros. +% +% \subsection{Transforming the coordinate system}\label{coordinate} +% +% \DescribeMacro{\coords} +% \DescribeMacro{\endcoords} +% The following apply transforms to the \MF{} coordinate system, and +% these can be localized with \cs{coords} $\ldots$ \cs{endcoords}. The +% transforms apply when the curve is \emph{rendered} and have no effect +% on paths merely stored with \cs{store} and \cs{patharr}. Moreover, if a +% path is created with \cs{connect}, it is transformed as a whole. +% +% \DescribeMacro{\applyT} +% These are implemented by \cs{applyT} which takes as its argument a \MF{} +% `transformer'. +% +% These commands (except \cs{turn}, kept for backward compatibility) have +% at most one argument, the parameters of the transformation. \cs{rotate} +% rotates around the origin, \cs{rotatearound} rotates around a given +% point, \cs{turn} takes the point as an optional argument. +% +% Transformations are applied in reverse of the order they appear in the +% file (i.e., the most recent first). +% \begin{macrocode} + \newdef\coords{\mfsrc{\@nl bcoords\@nl}}% + \newdef\endcoords{\mfsrc{\@nl ecoords\@nl}}% + \newdef\applyT##1{\mfsrc{\@nl hide(apply_t (##1))}}% + \def\rotate##1{\applyT{rotated ##1}}% + \newdef\rotatearound##1##2{% + \applyT{rotatedaround (##1, ##2)}}% + \newdef\turn{\simple@opt\@turn{(0,0)}}% + \newdef\@turn##1##2{\rotatearound{##1}{##2}}% + \newdef\reflectabout##1##2{% + \applyT{reflectedabout (##1, ##2)}}% line ##1--##2. + \let\mirror=\reflectabout + \newdef\shift##1{\applyT{shifted ##1}}% pair. + \def\scale##1{\applyT{scaled ##1}}% same scaling + \newdef\xscale##1{\applyT{xscaled ##1}}% + \newdef\yscale##1{\applyT{yscaled ##1}}% + \newdef\zscale##1{\applyT{zscaled ##1}}% + \newdef\xslant##1{\applyT{xslant ##1}}% + \newdef\yslant##1{\applyT{yslant ##1}}% + \newdef\zslant##1{\applyT{zslant ##1}}% + \newdef\boost##1{\applyT{boost ##1}}% + \newdef\xyswap{\applyT{xyswap}}% +% \end{macrocode} +% +% \subsection{Axes and grids}\label{axes} +% +% \DescribeMacro{\axes} +% \DescribeMacro{\xaxis} +% \DescribeMacro{\yaxis} +% An axis would normally not be thought of as a figure macro, because one +% would not want to position them arbitrarily nor transform them. One +% would also not want the hassle of having always to specify the origin, +% etc. However, one would want to occasionally make them dotted or dashed +% or colored. +% +% The original \cs{axes} was therefore not a figure macro. It always drew +% both axes with solid lines. Later \cs{xaxis} and \cs{yaxis} were +% introduced, which mimicked the behavior of \cs{axes}. For backward +% compatibility, the old behavior is supported with the old commands. The +% optional argument to \cs{axes}, \cs{xaxis} and \cs{yaxis} is the length +% of the arrowhead, defaulting to \cs{the}\cs{axisheadlength}. +% \begin{macrocode} + \newdef\xaxis{\simple@opt\@xaxis{\the\axisheadlen}}% + \newdef\yaxis{\simple@opt\@yaxis{\the\axisheadlen}}% + \newdef\axes{\simple@opt\@axes{\the\axisheadlen}}% + \newdef\@axes##1{\mfcmd{\@nl axes (##1)}}% + \newdef\@xaxis##1{\mfcmd{\@nl xaxis (##1)}}% + \newdef\@yaxis##1{\mfcmd{\@nl yaxis (##1)}}% +% \end{macrocode} +% +% \DescribeMacro{\axis} +% When border axes were added, all the code was revamped, and now we +% create axes as figure macros. It also became clear there was so +% much common code that it would be better to implement the syntax +% \cs{axis}\marg{l}, etc., rather than have separate commands \cs{laxis}, +% etc. for all six possible axes. Therefore, only the x- and y-axes have +% their own commands. The \cs{axis} command has one optional argument +% (the arrowhead length) and one mandatory argument, a single letter +% designating the axis to draw. +% +% The only complication is that the x- and y-axis have one default head +% length, \cs{axisheadlength} (initially \texttt{5pt}), while the side +% axes have a different default, \cs{sideheadlength} (initially \texttt{0pt}). +% Therefore we don't know which default to use until the mandatory argument +% is read. In \cs{@@axis}, we use \cs{get@axisnum} to check this +% mandatory argument and convert it to a number \cs{mfp@axisnum}, which is +% used to select the head length. +% \begin{macrocode} + \newdef\axis{\null@opt\@axis}% + \newdef\@axis[##1]##2{\get@axisnum{##2}\axis + \mfp@ifempty{##1}% + {\edef\mfp@param{% + \ifnum\mfp@axisnum<2 \the\axisheadlen + \else \the\sideheadlen + \fi}\@@axis{\mfp@param}}{\@@axis{##1}}{##2}}% + \newdef\@@axis##1##2{\arrow[l##1]\@figmac{axisline.##2}}% +% \end{macrocode} +% +% \DescribeMacro{\doaxes} +% \cs{doaxes} takes one optional argument, the arrowhead length, and one +% mandatory argument, all the axes to draw. These should be just letters +% with nothing separating them except optional spaces. \cs{doaxes} is +% implemented via the self-looping macro \cs{do@axis}, which applies +% one of two commands to the letter, depending on whether the optional +% parameter was present (\cs{@axis}) or not (\cs{@@axis}). +% \begin{macrocode} + \newdef\doaxes{\null@opt\@doaxes}% + \newdef\@doaxes[##1]##2{\def\mfp@axis{\@axis[##1]}% + \do@axis##2\mfp@delim}% + \newdef\do@axis##1{% + \ifx\mfp@delim##1\relax\else\mfp@axis{##1}\@xp\do@axis\fi}% +% \end{macrocode} +% +% \DescribeMacro{\axismarks} +% \DescribeMacro{\xmarks} +% \DescribeMacro{\ymarks} +% \DescribeMacro{\lmarks} +% \DescribeMacro{\bmarks} +% \DescribeMacro{\rmarks} +% \DescribeMacro{\tmarks} +% Hash marks (or tick marks) on the axes are provided by the +% \cs{axismarks} command (\cs{marks} was the original choice, but that +% turned out to conflict with a primative of e\TeX). For brevity, therefore, +% we also have separate commands \cs{xmarks}, etc. \cs{axismarks} has two +% mandatory arguments: the letter for the axis, and a comma separated +% list of numbers giving the positions on the axis. It functions as a list +% macro (see previous discussion of types of macros) and so the list of +% numbers can be prescribed by an external file +% \cs{datafile}\marg{\meta{file}}. One must be sure to issue an +% appropriate \cs{using} command to produce a numeric list in the output. +% This is the main reason for the \cs{usingnumericdefault} command. +% +% I had a change of heart after the \cs{axis} command, and I made things +% simpler to code here by putting the optional argument of \cs{axismarks} +% after the first mandatory argument. I could justify this because I +% expect most users will use the shorter versions that don't require the +% first argument (that is, the expectation that optional arguments come +% first is still satisfied). The optional argument is the length of the +% marks. The position of the marks is controlled separately by the +% \cs{setaxismarks} command, described previously. +% \begin{macrocode} + \newdef\axismarks##1{\simple@opt{\@marks{##1}}{\the\hashlen}}% + \newdef\@marks##1##2{\mfsrc{\@nl ##1marks (##2)}\mfp@writedata}% + \newdef\xmarks{\axismarks x}% + \newdef\ymarks{\axismarks y}% + \newdef\lmarks{\axismarks l}% + \newdef\bmarks{\axismarks b}% + \newdef\rmarks{\axismarks r}% + \newdef\tmarks{\axismarks t}% +% \end{macrocode} +% +% \DescribeMacro{\grid} +% \DescribeMacro{\gridpoints} +% \DescribeMacro{\lattice} +% The first one is, I think, inaccurately named: the word `grid' calls +% to mind a set of lines. It functions in a similar way: allowing a +% visualization of the coordinates, but it actually produces dots. The +% dots are located at the points whose coordinates are integer multiples +% of two numbers, which are given in the single mandatory argument +% separated by commas. The optional first argument is the diameter of the +% dots this defaults to \texttt{0.5bp} (hard coded in \file{grafbase}). +% Because of the name, I have provided two aliases: \cs{gridpoints} +% (for consistency with \cs{gridlines}, below) and \cs{lattice}. +% +% \DescribeMacro{\gridlines} +% Macro \cs{gridlines} takes the same mandatory argument and draws +% horizontal and vertical lines intersecting at all the dots that +% \cs{grid} would draw. Some packages (and \ConTeXt) define a \cs{grid} +% command so we use \cs{def} here instead of \cs{newdef} or \cs{redef}. +% +% \DescribeMacro{\hgridlines} +% \DescribeMacro{\vgridlines} +% These two draw only the horizontal or vertical lines, and their +% argument is the separation (in graph units) between successive lines. +% \begin{macrocode} + \def\grid{\null@opt\@grid}% + \newdef\@grid[##1]##2{% + \mfcmd{\mfp@ifempty{##1}{grid}{vgrid (##1)} (##2)}}% + \newlet\gridpoints=\grid \newlet\lattice=\grid + \newdef\gridlines##1{\mfcmd{\@nl gridlines (##1)}}% + \newdef\vgridlines##1{\mfcmd{\@nl vgridlines (##1)}}% + \newdef\hgridlines##1{\mfcmd{\@nl hgridlines (##1)}}% +% \end{macrocode} +% +% \DescribeMacro{\plrgrid} +% \DescribeMacro{\plrgridpoints} +% \DescribeMacro{\gridarcs} +% \DescribeMacro{\gridrays} +% \DescribeMacro{\plrpatch} +% The command \cs{plrgrid} takes one mandatory argument which contains two +% numbers separated by a comma. The first is a radius and the second an +% angle. It draws circular arcs at integer multiples of the radius, and +% radial lines at integer multiples of the angle. It fills the +% picture rectangle and is clipped to that rectangle. \cs{plrgridpoints} +% is similar but places only dots at the intersections of these arcs and +% rays. It takes an optional argument for the size of the dots, normally +% \cs{dotsize}. \cs{gridarcs} draws only the arcs, \cs{gridrays} only the +% rays. These last two take only one parameter each: the radius separating +% the arcs, and the angle separating the rays. +% +% \cs{plrpatch} draws: a circular arc at a starting +% radius, then increments that radius by a step size and draws another +% arc, etc., and finally draws an arc at the ending radius. It does a similar +% thing for radial lines and angles. It takes one mandatory argument, +% which contains 6 numbers separated by commas: starting radius, ending +% radius, step size, starting angle, ending angle, step size. +% \begin{macrocode} + \newdef\plrgrid##1{\mfcmd{\@nl polargrid (##1)}}% + \newdef\plrgridpoints{\simple@opt\@plrgp{\the\dotsize}}% + \newdef\@plrgp##1##2{\mfcmd{\@nl polargridpoints (##1, ##2)}}% + \newdef\gridarcs##1{\mfcmd{\@nl gridarcs (##1)}}% + \newdef\gridrays##1{\mfcmd{\@nl gridrays (##1)}}% + \newdef\plrpatch##1{\mfcmd{\@nl polarpatch (##1)}}% +% \end{macrocode} +% +% \subsection{Visualizing points}\label{points} +% +% \DescribeMacro{\point} +% \DescribeMacro{\plotsymbol} +% \cs{point} draws a dot or a small circle. It takes one optional +% argument, the diameter of the dot, and one mandatory argument, the ordered +% pair (or comma separated list of them) at which to draw a dot. After +% \cs{pointfillfalse}, the dots will be unfilled (i.e., small circles), +% after \cs{pointfilltrue} (the default), they will be solid. Like the +% grid macros, it is not a figure macro, but merely does its drawing and +% is not subject to any prefix macros. +% +% In order to mark points with other than circles, we have the +% \cs{plotsymbol} command, so-called because it uses the same symbols as +% the \cs{plot} command (previously discussed). There is an optional +% argument that gives the size of the symbol, a mandatory argument with +% the name of the symbol, and a second mandatory argument which +% is a comma separated list of ordered pairs for the locations. +% +% For both these commands, the default optional argument is +% \cs{the}\cs{pointsize}. +% \begin{macrocode} + \newdef\point{\simple@opt\@point{\the\pointsize}}% + \newdef\@point##1{% + \mfsrc{\@nl pointd (##1, \ifpointfill\mf@T\else\mf@F\fi)}% + \mfp@writedata}% + \newdef\plotsymbol{\simple@opt\@plotsymbol{\the\pointsize}}% + \newdef\@plotsymbol##1##2{% + \mfsrc{\@nl plotsymbol (##2, ##1)}\mfp@writedata}% +% \end{macrocode} +% +% \DescribeMacro{\plottext} +% In \MP{}, \TeX{} labels can be used in place of the symbols in +% \cs{plotsymbol}. Moreover, multiple copies of text can be placed with +% the \cs{tlabel} command (under \opt{mplabels}), as it supports a list of +% points for the location parameter. For \MF{} we supply an alternative, +% \cs{plottext}, which loops through the list of coordinates and issues +% \cs{tlabel} commands. The text can be anything that works in \cs{tlabel}. +% +% It takes one optional argument, the justification of the text (as in the +% \cs{tlabel command}, below---see also \cs{tlabeljustify}, above), +% defaulting to \oarg{cc}. There are two mandatory arguments: the text, +% and a comma separated list of ordered pairs. For consistency with +% \cs{plotsymbol} (and because it works better), we now require the same +% syntax for the points (i.e., no braces around individual points in the +% list as are allowed in \cs{tlabel} commands). +% +% We start by handling the justification, resetting whitespace, +% and loading the text into a token register. Then we read the list of +% points with \cs{@@plottext}. Under \opt{mplabels} we process the whole +% list with a single \cs{tlabel} command. Otherwise we prepare to loop +% through the list of points. The \cs{begingroup} in \cs{@plottext} is +% ended by the command called in \cs{@@plottext}. +% \begin{macrocode} + \newdef\plottext{\simple@opt\@plottext{cc}}% + \newdef\@plottext##1{% + \begingroup + \mfp@resetwhitespace \tlabeljustify{##1}% + \@ifmplabels{\@makeother\#}{}% + \mfp@gettoks\@@plottext}% + \newdef\@@plottext##1{% + \@ifmplabels + {\mfp@setMPpos \def\mfp@points{##1}\@@@tlabel}% + {\@@@plottext##1,\mfp@delim}}% +% \end{macrocode} +% After reading the list of points and appending ending tokens, we +% loop through them. The ending condition is that the next token is +% \cs{mfp@delim}. Otherwise we read the coordinates as delimited macros, +% and call \cs{@tlabel}, feeding it the coordinates and the text to +% plot there (the \cs{begingroup} in \cs{x@plottext} matches the +% \cs{endgroup} in \cs{@tlabel}). Then we recall \cs{@@@plottext} for +% another loop. Since we have used two internal commands of \cs{tlabel} +% code, we have to remember to check this if ever we rewrite \cs{tlabel}. +% \begin{macrocode} + \newdef\@@@plottext{% + \mfp@ifnextchar\mfp@delim{\@firstoftwo\endgroup}{\x@plottext}}% + \newdef\x@plottext(##1,##2),{\begingroup + \@tlabel{##1}{##2}{\the\mfp@toks}\@@@plottext}% +% \end{macrocode} +% +% \subsection{Figure macros}\label{figure} +% +% \subsubsection{Common geometric objects}\label{geometric} +% +% Finally we get to the real figure macros. These are implemented as +% \MF{} paths that can be variously rendered, transformed, etc., with the +% prefix macros. +% +% The first few (\cs{rect} through \cs{makesector}) are closed paths and +% need not be prefixed with a closing macro before filling, etc. +% +% \DescribeMacro{\rect} +% This takes one mandatory argument, the two diagonally opposite +% corners of the rectangle separated by a comma, and draws the rectangle +% with horizontal and vertical sides having these as two corners. The +% direction of the path (which seldom makes a difference) is such that it +% starts at the first specified point and moves horizontally first. +% \begin{macrocode} + \newdef\rect##1{\@figmac{rect (##1)}}% +% \end{macrocode} +% +% \DescribeMacro{\regpolygon} +% There are four arguments. The first is the number of sides. The second +% is the name of a variable to represent the vertices. The other +% two should be equations locating two vertices or the center and one +% vertex. If the name used is \gbc{Ver}, then the vertices will be +% \gbc{Ver1}, \gbc{Ver2}, etc., numbering anticlockwise. The center is +% \gbc{Ver0}. Case is significant. After the command, the points can be +% referred to in other \mfpic{} commands (except text label commands +% when \opt{mplabels} is not in effect). +% \begin{macrocode} +\newdef\regpolygon##1##2##3##4{% + \@figmac{regularpolygon(##1)(##2)(##3;##4;)}}% +% \end{macrocode} +% +% \DescribeMacro{\circle} +% This has one optional argument containing one of the letters +% \texttt{t}, \texttt{p} (the default), \texttt{c}, or \texttt{s}. Its +% purpose is to specify what kind of data is in the single mandatory +% argument. These are a subset of the optional arguments that the \cs{arc} +% commad (below) takes, and have almost the same meaning: +% \begin{itemize} +% \item \oarg{t}, the three point form needs three points (of course). +% \item \oarg{p}, the polar form needs the center point and the radius. +% This is the default when the optional argument is absent. +% \item \oarg{c}, the center/point form needs the center and one point on +% the circle. +% \item \oarg{s}, the point-sweep form requires two points and the angle of +% arc between them. The angle may be positive or negative. A +% positive angle indicates the number of degrees anticlockwise from +% the first point to the second. Negative means clockwise. +% \end{itemize} +% +% Supplying \cs{arc} with the same parameters, or the appropriate superset +% in the case of \oarg{p} and \oarg{c}, would produce a sub-arc of the +% circle that \cs{circle} produces. This is the reason for giving +% \cs{circle} these options: to make diagrams which show a circle and an +% arc on it. (This can also be done with an ellipse by using a +% transform on a circle and its arc. +% +% We use \cs{def} instead of \cs{newdef} or \cs{redef} because we know +% \LaTeX{} has already defined a \cs{circle} command, but plain \TeX{} has +% not. Instead of passing the default \texttt{p}, we pass a null +% argument, causing the code to compare various letters to \cs{relax} +% (always false) and then execute the default code. +% \begin{macrocode} + \def\circle{\null@opt\circl@}% + \newdef\circl@[##1]##2{% + \if t##1\relax \@figmac{circleppp (##2)}% + \else\if c##1\relax \@figmac{circlecp (##2)}% + \else\if s##1\relax \@figmac{circlepps (##2)}% + \else \@figmac{circle (##2)}% + \fi\fi\fi}% +% \end{macrocode} +% +% \DescribeMacro{\ellipse} +% \cs{ellipse} has one optional argument, an angle of rotation and one +% mandatory argument, containing the center, the horizontal radius (before +% rotation) and the vertical radius, separated by commas. +% \begin{macrocode} + \newdef\ellipse{\simple@opt\@ellipse{0}}% + \newdef\@ellipse##1##2{\@figmac{ellipse (##2, ##1)}}% +% \end{macrocode} +% +% \DescribeMacro{\sector} +% This is the closed curve starting at the center of a circle, out +% along a radius to the circumference of the circle, along an arc of the +% circle, then back to the center. It has one mandatory argument +% containing the center, the radius, and the two angles, separated by +% commas. +% +% \DescribeMacro{\makesector} +% Takes a following arc and draws the sector (even if the center point +% is not known). It is really a prefix macro (closing an arc with two +% straight lines), but the combination \cs{makesector}\cs{arc} acts like a +% figure. +% \begin{macrocode} + \newdef\sector##1{\@figmac{sector (##1)}}% + \newdef\makesector{\@closmac{makesector}}% +% \end{macrocode} +% +% \DescribeMacro{\arc} +% A circular arc can be specified in several ways and we support most of +% them. \cs{arc} takes an optional argument: a letter to indicate which +% specification. It has one mandatory argument containing the data for +% that specification, separated by commas. +% +% The available letters and the corresponding required data are: +% \begin{itemize} +% \item \oarg{t}, the three point form needs three ordered pairs. +% \item \oarg{p}, the polar form needs the center point, two angles and +% the radius. +% \item \oarg{a}, the alternative polar form needs the center, the radius +% and two angles. +% \item \oarg{c}, the center-point-sweep form needs the center, the +% starting point, and the angle. +% \item \oarg{s}, the point-sweep form requires the starting point, the +% ending point and the angle. +% \end{itemize} +% +% The default optional argument is \oarg{s}. (I don't know why. It +% certainly doesn't seem the most natural. I would have picked \oarg{a}.) +% Like \cs{circle}, an empty argument is passed by default. +% \begin{macrocode} + \newdef\arc{\null@opt\@arc}% + \newdef\@arc[##1]##2{% + \if t##1\relax \@figmac{arcppp (##2)}% + \else\if p##1\relax \@figmac{arcplr (##2)}% + \else\if a##1\relax \@figmac{arcalt (##2)}% + \else\if c##1\relax \@figmac{arccps (##2)}% + \else \@figmac{arcpps (##2)}% + \fi\fi\fi\fi}% +% \end{macrocode} +% +% \DescribeMacro{\plr} +% \DescribeMacro{\midpoint} +% A little utility to convert a list of pairs into another list of +% pairs, where the given list are assumed to be polar coordinates and the +% results are their Cartesian counterparts. And one to calculate the +% midpoint, given two points separated by a comma. +% \begin{macrocode} + \newdef\plr##1{map (polar) (##1)}% + \newdef\midpoint##1{(0.5[##1])}% +% \end{macrocode} +% +% \subsubsection{List macros}\label{list} +% +% The next several figure macros are all list macros. They draw a path +% determined by a list of points. The list can be explicitly given as a +% mandatory argument containing a comma-separated list of ordered pairs, +% or it can be taken from an external datafile. This is true for +% \cs{polyline} through \cs{turtle}. These macros differ only in +% how the points determine the path. (The splines don't actually connect +% the points given, but rather use the points in a different way to +% determine a curve.) The list of points is not an argument of any of +% these. It should follow, and is picked up and written to output by the +% ending code of \cs{@listmac}. This is basic to list macros, and will not +% be repeated for each one. +% +% \DescribeMacro{\polyline} +% \DescribeMacro{\polygon} +% The most basic, a polyline or polygonal path, \cs{polyline} +% draws line segments from each point to the next. \cs{lines} is an +% alias. \cs{polygon} does the same, except it closes the path by +% connecting the last point to the first. +% +% In \cs{@polyline}, the argument is \mfc{true} or \mfc{false}, +% indicating whether the path is to be closed. +% \begin{macrocode} + \newdef\polyline{\@polyline\mf@F}% + \newlet\lines=\polyline + \newdef\polygon{\@polyline\mf@T}% + \newdef\@polyline##1{\@listmac{polyline (##1)}}% +% \end{macrocode} +% +% \DescribeMacro{\curve} +% \DescribeMacro{\cyclic} +% \cs{curve} draws a smooth curve connecting a list of points. it arranges +% for the curve, at point $p\sb n$ to be traveling parallel to the direction +% from $p\sb {n-1}$ to $p\sb {n+1}$ (except at the first and last point). +% +% \cs{cyclic} is similar, except the curve is closed, and at the first +% point it also travels parallel to the direction from the previous point +% (the last one listed) to the next. +% +% There is an optional argument, which is the tension. This is a number +% greater than .75. The larger it is, the closer to a polyline one gets. +% The default is 1 (set in \file{grafbase}) or more generally, the value +% set by \cs{settension}. +% \begin{macrocode} + \newdef\curve {\null@opt{\@curve\mf@F}}% + \newdef\cyclic{\null@opt{\@curve\mf@T}}% + \newdef\@curve##1[##2]{% + \@listmac{\mfp@ifempty{##2}{curve}{tcurve (##2)} (##1)}}% +% \end{macrocode} +% +% \DescribeMacro{\fcncurve} +% A `function curve' is the graph of a function of $x$. It should always +% travel left to right. This is not guaranteed by the \cs{curve} macro, +% above, even if the x-coordinates are listed in order. \cs{fcncurve} is +% guaranteed to do this if the list of points has the x-coordinates so +% ordered. +% +% The optional argument is called tension. Internally, it is not quite the +% same as the tension argument to \cs{curve}, but it also governs how +% closely the curve stays to the corresponding polyline. If the optional +% argument is missing, this command uses $1.2$ (more precisely, it uses +% $1.2$ times the value set with \cs{settension}). The above guarantee is +% voided if the value used is less than $1$. However, most curves will +% satisfy the guarantee with some lower values. +% \begin{macrocode} + \newdef\fcncurve{\null@opt\@fcncurve}% + \newdef\@fcncurve[##1]{% + \@listmac{\mfp@ifempty{##1}{fcncurve}{functioncurve (##1)}}}% +% \end{macrocode} +% +% \DescribeMacro{\qspline} +% \DescribeMacro{\closedqspline} +% \DescribeMacro{\cspline} +% \DescribeMacro{\closedcspline} +% These are supposed to be types of splines, about which I know only a +% little. The list or datafile that should follow each command should +% contain not the points passed through, but instead the control data. +% For quadratic B-splines the points create the path as follows: for +% successive points $p\sb i, p\sb {i+1}$ in the list, the path passes through +% the midpoint of the line segment connecting $p\sb i$ and $p\sb {i+1}$, tangent +% to that line segment. +% +% Cubic splines determine the curve as follows: for successive points +% $p\sb i, p\sb {i+1}$ in the list, the line segment connecting them is divided +% into thirds with two points $q\sb i$ and $q\sb i'$. The curve then passes +% through the midpoint of the segment from $q\sb {i-1}'$ to $q\sb i$ and tangent +% to that segment. +% +% `Control' is obtained as follows: the farther apart the points $p\sb i$ +% and $p\sb {i+1}$ (quadratic) or $q\sb {i-1}'$ and $q\sb i$ (cubic) the +% less the curvature of the curve at the midpoint. +% +% The `\texttt{q}' versions produce quadratic splines, the `\texttt{c}' +% versions produce cubic splines. +% \begin{macrocode} + \newdef\qspline{\@listmac{openqbs}}% + \newdef\closedqspline{\@listmac{closedqbs}}% + \newdef\cspline{\@listmac{opencbs}}% + \newdef\closedcspline{\@listmac{closedcbs}}% +% \end{macrocode} +% +% \DescribeMacro{\mfbezier} +% \DescribeMacro{\closedmfbezier} +% These produce the standard \MF{} cubic B\'ezier (the connection is +% \mfc{..} unless the optional argument is used) with tension given by +% an optional argument. A mandatory argument (not shown) contains the +% list of points. +% +% \DescribeMacro{qbeziers} +% \DescribeMacro{closedqbeziers} +% These produce the equivalent of a sequence of \LaTeX{} \cs{qbezier} +% commands. The mandatory argument will be a list of points alternating +% between nodes and control points. Note that quadratic B\'eziers need +% not be smooth at the nodes unless the control points line up. Our +% plural name distinguishes it from the \LaTeX{} command. +% \begin{macrocode} + \newdef\mfbezier{\null@opt{\@mfbezier\mf@F}}% + \newdef\closedmfbezier{\null@opt{\@mfbezier\mf@T}}% + \newdef\@mfbezier##1[##2]{% + \@listmac{\mfp@ifempty{##2}{bezier}{tbezier (##2)} (##1)}}% + \newdef\qbeziers{\@listmac{qbezier (\mf@F)}}% + \newdef\closedqbeziers{\@listmac{qbezier (\mf@T)}}% +% \end{macrocode} +% +% \DescribeMacro{\turtle} +% Many years ago there was a tool for teaching programming concepts to +% young children. They could draw a figure on a screen by programming a +% `turtle' with a sequence of turns and distances. The following is +% similar. It has a mandatory argument containing a list of ordered pairs. +% The first is the coordinates of the starting point, and each of the rest +% is interpreted as a displacement from the current position, along which +% a line segment is to be drawn. The terminal point of that segment is the +% new current position +% \begin{macrocode} + \newdef\turtle{\@listmac{turtle}}% +% \end{macrocode} +% +% \subsubsection{Graphing functions}\label{functions} +% +% \DescribeMacro{\function} +% \prog{Mfpic} provides the ability to plot the graph of any function that +% can be defined in \MF. This is done with the \cs{function} command, a +% figure macro which takes one optional parameter that selects +% the smoothness of the \MF{} path produced. It can be \oarg{p}, which +% draws a polyline path through selected points (much like \cs{polyline}), +% or \oarg{s\meta{tension}} which selects a smooth path (much like +% \cs{curve}\oarg{\meta{tension}}). The tension may be omitted and then +% defaults to 1 (set in \file{grafbase}). The default is \oarg{s}. +% +% There are two mandatory arguments. The second is the function, which +% must be written as a formula (strictly speaking, a \MF{} numerical +% expression) containing only one variable, \texttt{x}. The first +% mandatory argument contains three numbers separated by commas. They are, +% in order, the starting value of \texttt{x}, the ending value, and the +% step size. +% +% \DescribeMacro{\parafcn} +% \cs{parafcn} is similar, except its formula must be an ordered pair of +% formulas (strictly speaking, a \MF{} pair expression) in which +% \texttt{t} is the only variable. +% +% \DescribeMacro{\plrfcn} +% \cs{plrfcn} is similar, except its argument is a formula (a \MF{} +% numeric expression) representing the radius, in which \texttt{t} is the +% only variable, interpreted as the angle coordinate, $\theta$, in degrees. +% +% These three commands are so alike that all they do is set the name to +% be written to the output and call the common code. +% \begin{macrocode} + \newdef\function{\def\mfp@name{function}\mfp@fcn}% + \newdef\parafcn{\def\mfp@name{parafcn}\mfp@fcn}% + \newdef\plrfcn{\def\mfp@name{plrfcn}\mfp@fcn}% + \newdef\mfp@fcn{\simple@opt\@mfp@fcn{s}}% + \newdef\@mfp@fcn##1{\@@mfp@fcn##1\mfp@delim}% + \newdef\@@mfp@fcn##1##2\mfp@delim##3##4{% + \@figmac{\mfp@ifempty{##2}{}{t}\mfp@name\space + (\if p##1\mf@F\else\mf@T\fi \mfp@ifempty{##2}{}{, ##2}) + (##3) (##4)}}% +% \end{macrocode} +% +% \DescribeMacro{\btwnfcn} +% The region between two functions \cs{btwnfcn} is a figure macro. It is +% mostly intended for shading or other filling operations so it is already +% closed and, by default, it is not `smooth'. Its parameters are the +% same as those of \cs{function} (above), with two exceptions: the default +% optional argument is \oarg{p} and it has an additional mandatory +% argument, the other function. The resulting \MF{} path travels along one +% the graph of the first function from the starting $x$ to the ending $x$, +% thence vertically to the graph of the second function, along it (in +% reverse) to the starting $x$ and finally, vertically to the start of the +% first function's graph. +% +% \DescribeMacro{\plrregion} +% The figure macro \cs{plrregion} also produces a closed \MF{} path. It +% has the same parameters as \cs{plrfcn}, and the path produced begins at +% the origin, travels along a straight line in the direction of the +% starting angle to the beginning of the graph of the expression, along +% that graph to the ending angle and then straight back to the origin. Its +% default option is also \oarg{p}. +% \begin{macrocode} + \newdef\btwnfcn{\simple@opt\@btwnfcn{p}}% + \newdef\@btwnfcn##1{\@@btwnfcn##1\mfp@delim}% + \newdef\@@btwnfcn##1##2\mfp@delim##3##4##5{\btwn@params{##1}{##2}% + \@figmac{\t@pref btwnfcn (\s@vals) (##3) (##4) (##5)}}% + \newdef\btwn@params##1##2{% + \edef\s@vals{\if s##1\mf@T\else\mf@F\fi}% + \mfp@ifempty{##2}{\def\t@pref{}}% + {\def\t@pref{t}\edef\s@vals{\s@vals, ##2}}}% + \newdef\plrregion{\simple@opt\@plrregion{p}}% + \newdef\@plrregion##1{\@@plrregion##1\mfp@delim}% + \newdef\@@plrregion##1##2\mfp@delim##3##4{\btwn@params{##1}{##2}% + \@figmac{((0,0)--(\t@pref plrfcn (\s@vals) (##3) (##4))% + --cycle)}}% +% \end{macrocode} +% +% \subsection{Some composite objects}\label{composite} +% +% \DescribeMacro{\tile} +% A tile is syntactically a \MF{} picture variable. The commands between +% \cs{tile} (or \cs{begin}\marg{tile}) and \cs{endtile} (or +% \cs{end}\marg{tile}) should be any sequence of \mfpic{} figure macros +% with possible prefix macros. They will be drawn not on the main picture +% (\gbc{currentpicture}), but on the picture given by the name in the +% \cs{tile} command's argument. +% +% The argument has five parts separated by commas, the first is the +% name, the second is the unit of length (some absolute dimension like +% \mfc{1pt}), the next two are the width and height (pure numbers, the +% actual dimensions being these numbers times the unit of length), the +% last is one of the words \mfc{true} or \mfc{false}, indicating whether +% tile should be clipped to these dimensions (true) or allowed to extend +% beyond them (false). +% \begin{macrocode} + \newdef\tile##1{\mfcmd{\@nl tile (##1)}}% + \newdef\endtile{\mfsrc{endtile;\@nl}}% +% \end{macrocode} +% +% \DescribeMacro{\patharr} +% A path array is a set of \MF{} path variables each having the same name +% followed by a different numeric suffix. This command turns off rendering +% and simply assigns these variables in order to the path expressions +% written by the figure macros between \cs{patharr} and \cs{endpatharr}. +% It works by redefining \cs{store@path}, issued by all the figure +% macros. These variables can be accessed in \mfpic{} by using the +% \cs{mfobj} command. +% +% \emph{Explicit} rendering commands will work in the sense that the +% affected path will be rendered in addition to being assigned to the +% variable. The only parameter is the common name of the variables. +% \begin{macrocode} + \newdef\patharr##1{\begingroup + \mfsrc{hide(numeric ##1; path ##1[]; ##1 = 0)}% + \def\store@path{\mfsrc{\@nl store (##1[incr ##1])}}% + \setrender{}}% + \newdef\endpatharr{\endgroup}% +% \end{macrocode} +% +% \DescribeMacro{\connect} +% \DescribeMacro{\endconnect} +% These define an environment that can contain any sequence of figure +% macros. It functions as a single large \cs{@figmac}, the figure being +% the path obtained by connecting all the paths within by straight lines +% from the end of one to the beginning of the next. It is implemented via +% a path array, so the individual figures within the environment have +% implicit rendering turned off. Explicit rendering commands within the +% environment will have the expected effect. +% +% The \cs{if@mfp@latex} stuff at the end allows \cs{connect} to be used as +% a \LaTeX{} environment. +% \begin{macrocode} + \newdef\connect{\@figmac{begingroup; save nexus}% + \patharr{nexus}}% + \newdef\endconnect{\endpatharr + \mfcmd{\@nl mkpoly (\mf@F, nexus)\@nl endgroup}% + \if@mfp@latex \def\mfptmp@a{connect}% + \ifx\mfptmp@a\@currenvir + \aftergroup\@startfigtrue %\aftergroup\@imrendtrue + \fi + \fi}% +% \end{macrocode} +% +% \subsection{Other graphical features}\label{otherfeatures} +% +% And now for something completely different: pie charts and bar charts +% (or bar graphs, or histograms). +% +% \DescribeMacro{\piechart} +% The \cs{piechart} command takes one optional argument containing a +% letter and an angle, and one mandatory argument containing the data. The +% letter can be `\texttt{c}' for clockwise or `\texttt{a}' for anticlockwise +% and determines the direction around the pie the different wedges will be +% drawn. The angle determines the angle of the first edge (in the given +% direction) of the first wedge. The default is \oarg{c90} which starts +% the first wedge at 12 o'clock and proceeds clockwise from there. The +% data in the mandatory argument are numbers separated by commas. The size +% of a wedge is proportional to the size of the corresponding number. +% \cs{piechart} is a list macro and can take the data from an external +% file. +% +% \DescribeMacro{\piewedge} +% Actually, nothing is drawn, it only defines a path array and a few +% other internal variables. Each individual wedge (elements of the just +% mentioned array) may be drawn using the \cs{piewedge} command, which is +% a figure macro. That command takes one optional argument that determines +% how the wedge is drawn, as described below, and one mandatory argument, +% the number of the wedge. Without the optional argument, +% \cs{piewedge}\marg{1} draws the first wedge in the position given by the +% arguments of the \cs{piechart} command. +% +% The optional arguments can be: +% \begin{itemize} +% \item \oarg{x\meta{distance}}, the wedge is exploded, drawn +% shifted outward from its position by \meta{distance} (in graph +% units). +% \item \oarg{s(\meta{dx},\meta{dy})}, the wedge is shifted from its +% position by \meta{dx} horizontally and \meta{dy} vertically (in +% graph units). +% \item \oarg{m(\meta{x},\meta{y})}, the wedge is moved so that its +% point is at coordinates \parg{\meta{x},\meta{y}}. +% \end{itemize} +% \begin{macrocode} + \newdef\piechart{\simple@opt\@piechart{c}}% + \newdef\@piechart##1{\@@piechart##1\mfp@delim}% + \newdef\@@piechart##1##2\mfp@delim##3{% + \mfsrc{\@nl piechart(\if a##1 \else-\fi1, % + \mfp@mtsub{##2}{90}, ##3)}\mfp@writedata}% + \newdef\piewedge{\simple@opt\@piewedge{d}}% + \newdef\@piewedge##1{\@@piewedge##1\mfp@delim}% + \newdef\@@piewedge##1##2\mfp@delim##3{% + \@figmac{(piewedge[##3]% + \if x##1 shifted (##2*piedirection[##3])% + \else\if s##1 shifted (##2)% + \else\if m##1 shifted (##2 - piecenter)% + \else + \fi\fi\fi)}}% +% \end{macrocode} +% +% \DescribeMacro{\barchart} +% \DescribeMacro{\bargraph} +% \DescribeMacro{\gantt} +% \DescribeMacro{\histogram} +% The \cs{barchart} command takes one optional and two mandatory +% arguments. The last mandatory argument contains the data, separated by +% commas and these determine the length of the bars in graph units. This +% is also a list macro and instead of the list, an external file can hold +% the data. +% +% The optional argument determines the position and width of the bars and +% the first mandatory argument determines the orientation. The mandatory +% argument can be \marg{v} for vertical bars with base on the x-axis, or +% \marg{h} for horizontal bars with base on the y-axis. +% The optional argument contains three numbers separated by commas. The +% first is the coordinate of the leading edge of the first bar, the second +% is the distance (in graph coordinates) between the leading edge of one +% bar and that of the next, and the third is the fraction of that distance +% that is occupied by the bar. The default is \oarg{0,1,1}. +% +% We provide the aliases \cs{bargraph} and \cs{histogram}. +% +% \DescribeMacro{\chartbar} +% \DescribeMacro{\ganttbar} +% \DescribeMacro{\graphbar} +% \DescribeMacro{\histobar} +% The \cs{barchart} command does not actually draw anything, but defines a +% path array. The \cs{chartbar} command can then be used to draw a bar +% (one of the members of the just mentioned array). It is a figure macro +% and take the number of the bar as its mandatory argument. Aliases +% \cs{graphbar} and \cs{histobar} are provided. We avoid \cs{bar} because +% it is a math accent command. +% \begin{macrocode} + \newdef\barchart{\simple@opt\@barchart{0,1,1}}% + \newdef\@barchart##1##2{% + \mfsrc{\@nl barchart (##1, \if h##2\mf@F\else\mf@T\fi)}% + \mfp@writedata}% + \newlet\bargraph=\barchart + \newlet\histogram=\barchart + \newlet\gantt\barchart + \newdef\chartbar##1{\@figmac{chartbar[##1]}}% + \newlet\graphbar=\chartbar + \newlet\histobar=\chartbar + \newlet\ganttbar=\chartbar +% \end{macrocode} +% +% One can add to \cs{mfp@additions} to extend \mfpic. Currently it +% is empty. This ends \cs{@mfpic@graf@macs}. +% \begin{macrocode} + \newdef\pinumber{3.14159}% + \mfp@additions +}% +% \end{macrocode} +% +% +% \section{The \env{mfpic} environment}\label{mfpicenv} +% +% \subsection{Initializations}\label{mfpicinitializations} +% +% \DescribeMacro{\mfpic} +% This command (or the \LaTeX{} environment \cs{begin}\marg{mfpic}) takes +% two optional arguments: the xscale and the yscale. When both are +% omitted, they are both set to 1, if the yscale is omitted, it is set +% equal to the xscale. +% +% There are also 4 mandatory arguments: the first two give the minimum and +% maximum extent of the x coordinates and the last two do the same for the +% y coordinates. The coordinates used in the figure commands within an +% mfpic environment are multiplied by the corresponding scales, and that +% is the multiple of \cs{mfpicunit} used in positioning, drawing, etc. +% +% The optional arguments are converted by the option handling code to +% mandatory arguments for \cs{@mfpic}, which contains the actual +% definition. +% \begin{macrocode} +\newdef\mfpic{\simple@opt\@mfpicA{1}}% +\newdef\@mfpicA#1{\simple@opt{\@mfpic{#1}}{#1}}% +\newdef\@mfpic#1#2#3#4#5#6{% +% \end{macrocode} +% +% We start by saving \mfpic{} extra fontdimen values. They will be +% restored by \cs{endmfpic}. This makes the values local (font dimensions +% are normally always global). Then we begin a group to localize ordinary +% \TeX{} definitions and assignments, disable writes to the output if +% \cs{opengraphsfile} hasn't occurred yet. save the current font in +% \cs{@tcurr} for restoration inside text labels and captions, set the +% switch that says we are in an \cs{mfpic} environment, disable \cs{par} +% so that blank lines have (little or) no effect, and switch to +% \cs{nullfont} so that stray characters (always an error) and spaces (not +% an error), have no effect. I wonder if \cs{@empty} is a better +% disabling definition for \cs{par} than \cs{relax}. +% \begin{macrocode} + \save@mfpicdimens + \begingroup % ended near end of \endmfpic + \@ifmfpfileisopen{}% + {\if@mfp@nowrite\else \nooutputfileerror{\mfpic}% + \def\@mfsrc##1##2{}% + \fi}% + \mfp@DBlog{Starting mfpic \number\mfp@count \@online.}% + \font\@tcurr=\fontname\font\relax + \let\ifin@mfpicenv\iftrue +% \let\par\relax + \let\par\@empty + \nullfont +% \end{macrocode} +% +% The graphics macros are undefined outside the \env{mfpic} environment. +% They are defined now by invoking \cs{@mfpic@graf@macs}. +% \begin{macrocode} + \@mfpic@graf@macs +% \end{macrocode} +% +% Then we define two utility macros used to convert graph coordinates into +% actual dimensions relative to the lower left corner of the picture. The +% first argument is a dimension, but it is normally obtained by first +% multiplying a coordinate value by \cs{mfpicunit}. Since font dimensions +% may be involved, we assign \texttt{\#\#1} to a scratch dimension +% register first, since \TeX{} won't \cs{advance} font dimensions. We make +% the final assignment global for consistency. +% \begin{macrocode} + \newdef\@xconv##1{% + {\mfp@scratch = ##1\relax + \advance\mfp@scratch by -#3\mfpicunit + \mfp@scratch = #1\mfp@scratch + \global ##1 = \mfp@scratch}}% + \newdef\@yconv##1{% + {\mfp@scratch=##1\relax + \advance\mfp@scratch by -#5\mfpicunit + \mfp@scratch = #2\mfp@scratch + \global ##1 = \mfp@scratch}}% +% \end{macrocode} +% +% We are going to add all text labels to a box \cs{@alltlabels} and put +% that whole box on top of the graph during \cs{endmfpic}. +% We initialize the box here. The dimensions \cs{@tlabelsbot}, etc., +% are also initialized. Each will be changed as labels are added, so a +% `non-maxdimen' value at \cs{endmfpic} means there are labels to add. +% \begin{macrocode} +\setbox\@alltlabels\vbox{\hbox{}}% +\@tlabelsbot \maxdimen +\@tlabelstop -\maxdimen +\@tlabelsleft \maxdimen +\@tlabelsright-\maxdimen +% \end{macrocode} +% +% The graph is loaded into a box register at the end of the mfpic +% environment. The size of that box register may have to correspond to the +% arguments of the \cs{mfpic} command. Since \cs{endmfpic} doesn't receive +% these arguments we process them now. +% +% Dimensions \cs{@graphright}, etc., represent the extent of the graph +% box. We increase them when the text is added if it extends beyond the +% edges of the graph. These are all font dimensions, so they are global +% assignments. +% \begin{macrocode} + \@graphright=#4\mfpicunit \@xconv\@graphright + \@graphtop=#6\mfpicunit \@yconv\@graphtop + \@graphleft=0pt + \@graphbot=0pt + \@graphwd=\@graphright +% \end{macrocode} +% +% \subsection{Initialization code for the current +% picture}\label{current} +% +% Each \env{mfpic} environment produces a \gbc{beginmfpic...endmfpic} +% environment in the output file. Here we initialize the variables that +% correspond there to the 6 arguments and \cs{mfpicunit}, then begin the +% \MF{} environment. \gbc{beginmfpic} takes the number of the current +% figure as its only argument. For debugging purposes we write a \MF{} +% comment the contains the line number in the \TeX{} source file where the +% \cs{mfpic} command occurred. We also write a line of dashes +% (\cs{mf@d}) to make it easier to find the start of the environment. This +% will be removed in the public release. +% +% When \opt{mplabels} is in effect we need to set the font for the labels +% to the saved \cs{@tcurr} by writing some \mfc{verbatimtex} code. Since +% \opt{mplabels} can be turned on at any time, we write this whenever the +% \opt{metapost} option is in effect. It is a common misconception that +% \mfc{verbatimtex} can be used only once at the start of a \MP{} file. In +% fact it can be used any number of times. It's purpose is to be at an +% outer level, while \mfc{btex} is localized inside a box +% \begin{macrocode} + \mfsrc{\@nl \mf@p\mf@d\mf@d\mf@d\@nl + unitlen := \the\mfpicunit\mf@s;\@nl + xscale := #1; yscale := #2;\@nl + bounds (#3, #4, #5, #6);\@nl + \@nl + beginmfpic(\number\mfp@count); \mf@p\space\@mfplineno. + \mfp@ifmpost + {\@nl verbatimtex \@nl + \begingroup\space\font\noexpand\MFPcfont=\fontname\@tcurr\@nl + etex;}{}}% +% \end{macrocode} +% +% \subsection{Placing text labels}\label{textlabels} +% +% All the rest of \cs{@mfpic} defines commands that in some way or another +% produce labels. The easiest part is defining \cs{tlabel} under +% \opt{mplabels} where most of the work takes place in \file{grafbase.mp}. +% The most involved is the definition of \cs{tlabel} without +% \opt{mplabels}. All the rest (except \cs{tcaption}) add labels by +% calling \cs{tlabel}. Some of those could be simpler under \opt{mplabels} +% but then we'd need two versions of each. +% +% \DescribeMacro{\tlabel} +% This is the common code, processing optional arguments, etc. for +% \cs{tlabel}. It ultimately calls one of \cs{@tlabel} (no +% \opt{mplabels}) or \cs{@@tlabel} (\opt{mplabels}). It takes an optional +% argument describing the justification and rotation, followed by a +% location in one of two syntaxes (which adds to the complication, but we +% want to be backward compatible), followed by the text of the label +% (\TeX{} code). +% +% The location can be in the form \parg{\meta{x},\meta{y}}, but if \MP{} +% is processing labels we would like to be able to use \MP{} expressions, +% which can contain parentheses and commas. This would mess up \TeX's +% token matching for reading the two coordinates. Therefore we allow the +% whole point to be enclosed in braces. Under \opt{mplabels} the contents +% of the braces will be written to the output file without any further +% parsing. Without \opt{mplabels}, there should be either no braces, or +% inside the braces is the previously described syntax. +% +% We start with \cs{begingroup} to hide changes, then reset whitespace to +% its normal catcodes. Without \opt{mplabels} we reset \cs{tlabel@rot} to +% empty. Finally, we check for an optional parameter and run \cs{@tlabel@}, +% feeding it an empty optional argument if there is none. +% \begin{macrocode} + \newdef\tlabel{% + \begingroup % ended in \@(@@)tlabel + \mfp@resetwhitespace + \@ifmplabels{}{\def\tlabel@rot{}}% + \null@opt\@tlabel@}% +% \end{macrocode} +% +% We run \cs{tlabeljustify} on the optional parameter. This keeps the +% default values of \cs{tl@vpos}, \cs{tl@hpos} and \cs{tlabel@rot} if +% the parameter is empty, otherwise it modifies them inside the current +% group. +% +% We then check for a left parenthesis and assume the +% \parg{\meta{x},\meta{y}} syntax in that case, calling \cs{@@tlabel@} +% to process it. Under \opt{mplabels} it stuffs the whole point into +% braces and call the main code \cs{@@tlabel} with that argument, +% otherwise it pulls out the two coordinates and feeds them as the first +% two arguments of the main code \cs{@tlabel}. +% \begin{macrocode} + \newdef\@tlabel@[##1]{\tlabeljustify{##1}% + \mfp@ifnextchar({\@@tlabel@}{\@@tlabel@@}}% + \newdef\@@tlabel@(##1,##2){% + \@ifmplabels + {\@@tlabel{(##1,##2)}}{\@tlabel{##1}{##2}}}% +% \end{macrocode} +% +% If no parenthesis, we assume braces surround the point. Under +% \opt{mplabels} we call the main code (\cs{@@tlabel}) with that argument. +% Otherwise, we re-call the above \cs{@@tlabel@} on the contents of the +% braces, assuming (without checking) that the contents are coordinates in +% parentheses. +% \begin{macrocode} + \newdef\@@tlabel@@##1{% + \@ifmplabels {\@@tlabel{##1}}{\@@tlabel@##1}}% +% \end{macrocode} +% +% \DescribeMacro{\extraendtlabel} +% We now come to the main code under \opt{mplabels}, which should just +% arrange to write the correct commands to the output file. All labels are +% passed as \mfc{btex ... etex} structures. The definition of \cs{MFPtext} +% will have been written earlier by \cs{opengraphsfile}. +% \cs{extraendtlabel} is a hook currently only used by the \cs{tlabels} +% command to force a loop. +% \begin{macrocode} + \newdef\mfp@btex##1{btex \noexpand\MFPtext{##1} etex}% + \newdef\extraendtlabel{}% +% \end{macrocode} +% +% The command \gbc{newgblabel}, defined in \file{graphbase.mp} for placing +% labels, uses three parameters to justify the text. If we didn't have to +% support the \texttt{B} vertical placement option, there would be only +% two. All the other options involve placement \emph{relative} to the +% bounding box. But the baseline is absolute: \MP{} always puts it at +% y-coordinate 0 in the picture returned by \gbc{btex}. The first two +% parameters are numerical and the third is boolean. The +% first represents the fraction of the text that lies left of given +% point. The second is the fraction of the text below the point. If the +% third parameter is \mfc{true}, this fraction ignores the depth of the +% text (so $0$ indicates baseline placement); if it is false, the depth +% is accounted for (so $0$ indicates the very bottom of the text). +% +% By this point the letters of the optional parameter have been converted +% to integer values for \cs{tl@hpos} and \cs{tl@vpos} by +% \cs{tlabeljustify}. The following converts these integers to comma +% separated parameters as described above using \cs{ifcase}. +% +% The fourth parameter of \gbc{newgblabel} is the angle of rotation. Empty +% rotation is converted to the angle 0, otherwise it is written as is. +% All four parameters are stored in \cs{mfp@MPpos}. +% \begin{macrocode} + \newdef\mfp@setMPpos{% + \edef\mfp@MPpos{% + \ifcase\tl@hpos .5\or 1\else 0\fi, % horizontal + \ifcase\tl@vpos 0\or .5\or 1\else 0\fi, % vertical + \ifnum \tl@vpos < 0 \mf@T\else\mf@F\fi, % true=Baseline + \mfp@mtsub{\tlabel@rot}{0}}}% +% \end{macrocode} +% +% \cs{@@tlabel} is the code called by \cs{tlabel} when \opt{mplabels} is +% in effect. The argument is a \MP{} pair expression, or comma separated +% list of them. It should be followed by the \TeX{} code for the label. +% We will load the label into a token register afterwards. First +% we restore the meaning of blank lines and then make sure any +% \texttt{\#}'s in the \TeX{} code are not doubled by changing their +% category. +% +% We load the label in a token register because writing that is (almost) +% verbatim (blank lines become \cs{par}, \texttt{\#} symbols are +% doubled if we're not careful, and control names have a space appended). +% One day maybe we'll try to obtain a true verbatim writing mode. +% \begin{macrocode} + \newdef\@@tlabel##1{\def\mfp@points{##1}\mfp@restorepar + \mfp@setMPpos \@makeother\#\mfp@gettoks\@@@tlabel}% +% \end{macrocode} +% Then the \gbc{newgblabel} command is written with the justification +% parameters, and two more: the label tokens, and the point (or list of +% points). The group (begun by \cs{tlabel}) is ended, and the +% \cs{extraendtlabel} command invoked. +% \begin{macrocode} + \newdef\@@@tlabel{% + \mfcmd{\@nl + newgblabel(\mfp@MPpos)(\mfp@btex{\the\mfp@toks})(\mfp@points)}% + \endgroup \extraendtlabel}% +% \end{macrocode} +% +% When \opt{mplabels} is not in effect, we use \TeX{} to position the +% label. By this point, the optional justification parameter to +% \cs{tlabel} has been converted to integer values of \cs{tl@vpos} and +% \cs{tl@hpos}, and the coordinates of the location are passed as the +% first two arguments of \cs{@tlabel}. The third argument is the \TeX{} +% code for the label. +% +% We put the label in a box (\cs{@textbox}) so we can measure and position +% it. It is a \cs{vbox} so we can have multiline labels. This is effected +% by wrapping it in a simple, left-aligned, one column \cs{halign}, +% defining \cs{\bsl} to be \cs{cr}. We make this procedure a separate +% macro, since we need to do the identical thing in the \cs{tlabelpath} +% code. +% \begin{macrocode} + \newdef\set@textbox##1{% + \setbox\@textbox=\vbox{\def\\{\cr}\mfp@restorepar + \@tcurr\the\every@tlabel\halign{####\hfil\cr##1\crcr}}}% +% \end{macrocode} +% +% We then compute its total height to simplify later code. +% \begin{macrocode} + \newdef\@tlabel##1##2##3{% + \set@textbox{##3}% + \mfp@scratch\tb@ht \advance\mfp@scratch\tb@dp + \tb@totalht\mfp@scratch +% \end{macrocode} +% +% The following computes whether the rightmost extent of the picture will +% be increased by the addition of the label. We convert the x-coordinate +% of the label's location to a distance from the left edge of the picture. +% We then add to that the amount of the label extending to the right of +% this location. Then we add or subtract the separation of the label +% from its location. Finally, we simply add the horizontal adjustment +% defined by the user with \cs{tlabeloffset}. The value of +% \cs{@tlabelsright} is set equal to this if it was less. We could omit +% this group: we never use \cs{@tlabelsright} except in debugging. +% +% The macro \cs{tb@wd} expands to \cs{wd}\cs{@textbox}. +% \begin{macrocode} + \mfp@scratch=##1\mfpicunit + \@xconv\mfp@scratch + \begingroup + \ifcase\tl@hpos \advance\mfp@scratch 0.5\tb@wd % center + \or \advance\mfp@scratch -\tlabel@sep % right + \else \advance\mfp@scratch \tb@wd % left + \advance\mfp@scratch \tlabel@sep + \fi + \advance\mfp@scratch \tlabel@hadj + \ifdim \mfp@scratch>\@tlabelsright + \@tlabelsright=\mfp@scratch + \fi + \endgroup +% \end{macrocode} +% +% The following is the same as the previous calculations, but with respect +% to the leftmost extension of picture and label. Here, however, we save +% the calculated value in \cs{tb@moveright}, because it is exactly the +% amount we'll need to \cs{kern} later to position the label. +% \begin{macrocode} + \begingroup + \ifcase\tl@hpos \advance\mfp@scratch -0.5\tb@wd % center + \or \advance\mfp@scratch -\tb@wd % right + \advance\mfp@scratch -\tlabel@sep + \else \advance\mfp@scratch \tlabel@sep % left + \fi + \advance\mfp@scratch \tlabel@hadj + \tb@moveright=\mfp@scratch + \ifdim \mfp@scratch<\@tlabelsleft + \@tlabelsleft=\mfp@scratch + \fi + \endgroup +% \end{macrocode} +% +% Now we base the calculations on the vertical extent of picture and +% label. Otherwise the idea is the same, and we may increase +% \cs{@graphtop}. The macro \cs{tb@ht} means \cs{ht}\cs{@textbox} and +% \cs{tb@dp} means \cs{dp}\cs{@textbox}. Again we save the calculated +% result (in \cs{tb@raise}) for later positioning of the label. +% \begin{macrocode} + \mfp@scratch=##2\mfpicunit + \@yconv\mfp@scratch + \begingroup + \ifcase\tl@vpos \advance\mfp@scratch \tb@totalht % bottom + \advance\mfp@scratch \tlabel@sep + \or \advance\mfp@scratch 0.5\tb@totalht % center + \or \advance\mfp@scratch -\tlabel@sep % top + \else \advance\mfp@scratch \tb@ht % baseline + \fi + \advance\mfp@scratch \tlabel@vadj + \tb@raise=\mfp@scratch + \ifdim \mfp@scratch>\@tlabelstop + \@tlabelstop=\mfp@scratch + \fi + \endgroup +% \end{macrocode} +% +% Finally we compute the bottom-most extent. +% \begin{macrocode} + \begingroup + \ifcase\tl@vpos \advance\mfp@scratch \tlabel@sep % bottom + \or \advance\mfp@scratch -0.5\tb@totalht % center + \or \advance\mfp@scratch -\tb@totalht % top + \advance\mfp@scratch -\tlabel@sep + \else \advance\mfp@scratch -\tb@dp % baseline + \fi + \advance\mfp@scratch \tlabel@vadj + \ifdim \mfp@scratch<\@tlabelsbot + \@tlabelsbot=\mfp@scratch + \fi + \endgroup +% \end{macrocode} +% +% Now we've computed the new size of \cs{@alltlabels} and we put the +% new label on top of it with the above calculated kerns. +% \begin{macrocode} + \global \setbox\@alltlabels=% + \vtop{\unvbox\@alltlabels + \vbox to 0pt{\kern-\tb@raise + \hbox{\kern\tb@moveright\box\@textbox}\vss}}% + \endgroup % group begun in \tlabel + \extraendtlabel}% End \@tlabel +% \end{macrocode} +% +% \subsection{Surrounding the label with a path}\label{surrounding} +% +% These next macros place labels, but also define a path surrounding the +% label This allows one to clear a space for the label, create a +% background, draw a box around it, etc. They take two optional arguments. +% The first optional argument depends on the type of path being created. +% It is described below. The second one is the justification as in the +% \cs{tlabel} command. There are two mandatory arguments, the location +% (same syntax as for \cs{tlabel}) and the text. They also have +% star-forms, which create the path but doesn't place the label. +% +% All the curves are sized to just contain what I will call the +% \emph{label strip}. Imagine a rectangle that just fits around the text. +% Now extend it on all sides by the value defined with \cs{tlabelsep}. +% This rectangle is the label strip. +% +% \DescribeMacro{\tlabelrect} +% \cs{tlabelrect} creates the rectangular boundaries of the label strip by +% default. With the optional argument a rectangle with rounded corners is +% produced; the optional argument is the radius of the quarter circles used. +% These quarter circles pass through the corners of the label strip and are +% joined together with straight lines to create the rest of the rectangle. +% As a special case, the optional argument can contain the keyword +% `\texttt{roundends}' to produce a rectangle with the short sides +% replaced by a semicircle. +% +% \DescribeMacro{\tlabeloval} +% \cs{tlabeloval} produces an ellipse which, by default has the same +% aspect ratio as the label strip. It is sized to just include that label strip, +% passing through its four corners. The optional argument contains a +% numerical factor $m$ that, if greater than 1, increases the width and +% decreases the height to maintain this relationship with the label strip, +% while multiplying the width to height ratio by $m$. The default value of +% $m$ is 1. +% +% \DescribeMacro{\tlabelellipse} +% \cs{tlabelellipse} produces an ellipse, where the optional argument $a$ +% is the ratio of its width to its height. The default for $a$ is 1, which +% produces a circle. +% +% \DescribeMacro{\tlabelcircle} +% To get a circle the user can \cs{tlabelellipse} without the optional +% argument, or with argument \oarg{1}. However, it makes for a more +% readable source if the command reflects the shape. \cs{tlabelcircle} is +% defined to be essentially \cs{tlabelellipse}\oarg{1}, but it first +% checks for the \texttt{*} and passes it along in front of the \oarg{1}. +% +% We implement the other three by calling \cs{tlpath} with the name of the +% curve (\texttt{rect}, \texttt{oval}, or \texttt{ellipse}) and the +% default value of the optional argument (\texttt{0}, \texttt{1}, and +% \texttt{1}, respectively) as arguments. +% \begin{macrocode} + \newdef\tlabelrect{\tlpath{rect}{0}}% + \newdef\tlabeloval{\tlpath{oval}{1}}% + \newdef\tlabelellipse{\tlpath{ellipse}{1}}% + \newdef\tlabelcircle{% + \mfp@ifnextchar*{\@firstoftwo{\tlabelellipse*[1]}}% + {\tlabelellipse[1]}}% +% \end{macrocode} +% +% We store the name of the path in \cs{mfp@name} and the default argument +% in \cs{mfp@param}, then check for a \texttt{*} and set a switch based +% on it before calling \cs{@tlpath}. The \cs{@figmacstart} must be outside +% the group so the switches it sets will survive for later commands to +% detect. +% \begin{macrocode} + \newdef\tlpath##1##2{\@figmacstart + \begingroup % ended in \tlabelpath@ + \def\mfp@name{##1}\def\mfp@param{##2}% + \mfp@ifnextchar*% + {\@mfpswitchtrue\@firstoftwo{\@tlpath}}% gobbles the star + {\@mfpswitchfalse\@tlpath}}% +% \end{macrocode} +% Process first optional argument. First one has value of \cs{mfp@param} +% as default. The second one has a default justification set by the user +% with \cs{tlpathjustify} or the initial \texttt{[cc]} setting. Once these +% are processed, we check whether a parentheses follows, calling one of +% two different handlers for the location parameter(s). +% \begin{macrocode} + \newdef\@tlpath{\null@opt\@@tlpath}% + \newdef\@@tlpath[##1]{% + \edef\mfp@param{\mfp@mtsub{##1}{\mfp@param}}% + \mfp@resetwhitespace + \simple@opt\@@@tlpath{\tlpath@v\tlpath@h\tlpath@r}}% + \newdef\@@@tlpath##1{\tlabeljustify{##1}% + \mfp@setMPpos \mfp@ifnextchar({\@tlabelpath}{\@@tlabelpath}}% +% \end{macrocode} +% +% These handlers just stuff the point into a macro and call the command +% that reads the label code. The name \cs{mfp@points} is plural (even +% though only one point is supported) because the internal command that +% places the label expects this macro. We use \cs{@firstofone} so +% that the braces will not be written to the output, but they will +% function as braces for \TeX's parameter matching. +% \begin{macrocode} + \newdef\@tlabelpath (##1,##2){% + \def\mfp@points{(\@firstofone{##1},\@firstofone{##2})}% + \@@@tlabelpath}% + \newdef\@@tlabelpath##1{\def\mfp@points{##1}\@@@tlabelpath}% + \newdef\@@@tlabelpath{\mfp@restorepar + \@ifmplabels{\@makeother\#}{}\mfp@gettoks\tlabelpath@}% +% \end{macrocode} +% +% Under \opt{mplabels} we just call on \MP{} to do everything (including +% measuring the text). Otherwise we measure the text in \TeX{} and feed +% the bounding box corners to \MF{} for making the path. Then we optionally +% place the text based on the switch previously set. All the data needed +% have already been stored in macros by previous commands in the chain. +% \begin{macrocode} + \newdef\tlabelpath@{% + \@ifmplabels + {\mfcmd{text\mfp@name x (\mfp@MPpos)\@nl(origin, % dummy parameter + \mfp@btex{\the\mfp@toks}, \mfp@param, \mfp@points)}}% + {\measure@textbox{\the\mfp@toks}% + \mfcmd{text\mfp@name x (\mfp@MPpos)\@nl(\tb@ll, \tb@ur, % text bbox + \mfp@param, \mfp@points)}}% + \if@mfpswitch \endgroup % *-form, no label placed + \else % tlabel commands contain \endgroup + \@ifmplabels{\@@@tlabel}% + {\@xp\@@tlabel@\mfp@points{\the\mfp@toks}}% + \fi}% +% \end{macrocode} +% +% Here we define the command that measures the text. It is almost a clone +% of a similar code sequence in \cs{@tlabel}, but it produces the \gbc{ll} +% and \gbc{ur} (corners of the boundingbox) that the \grafbase{} code +% needs. +% \begin{macrocode} + \newdef\measure@textbox##1{% + \set@textbox{##1}% + \edef\tb@ll{(0, -(\the\tb@dp))}% + \edef\tb@ur{(\the\tb@wd, \the\tb@ht)}}% +% \end{macrocode} +% +% \subsection{Placing multiple text labels}\label{multiple} +% +% \DescribeMacro{\tlabels} +% One of the more onerous things about labels in \env{mfpic} environments +% was the shear number of them. The following was intended to reduce the +% amount of typing by having to repeat only the arguments. \cs{tlabels} +% takes only one argument: any sequence of valid arguments for a \cs{tlabel} +% command, optionally separated by whitespace (but not blank lines). +% +% We begin a group, reset whitespace to normal, and call the command that +% reads the argument. That command arranges to make the main code +% self-looping by defining \cs{extraendtlabel} to call the beginning of the +% loop, then it feeds its argument to \cs{do@tlabels} followed by a +% delimiter to signal the end of the loop. +% \begin{macrocode} + \newdef\tlabels{% + \begingroup % ended in \do@tlabels + \mfp@resetwhitespace \@tlabels}% + \newdef\@tlabels##1{\def\extraendtlabel{\do@tlabels}% + \do@tlabels##1\mfp@delim}% +% \end{macrocode} +% +% If \cs{do@tlabels} sees the end-of-loop delimiter it ends the group and +% gobbles the delimiter. Otherwise it calls \cs{tlabel}, which sees the +% next set of arguments, and repeats the loop. +% \begin{macrocode} + \newdef\do@tlabels{% + \mfp@ifnextchar\mfp@delim{\@firstoftwo\endgroup}{\tlabel}}% +% \end{macrocode} +% +% Labelling axes generates a lot of \cs{tlabel} commands or a single +% \cs{tlabels} command with a lot of arguments. Given that such labels +% have much in common (e.g., for the x-axis the y-coordinate and the +% justification are usually the same for all the labels) we can do still +% better at abbreviating this task. +% +% \DescribeMacro{\axislabels} +% The \cs{axislabels} command takes a mandatory argument (the axis) +% followed by an optional argument (the justification, as in the +% \cs{tlabel} command), followed by another mandatory argument, a comma +% separated list of items of the form +% \marg{\meta{label}}\meta{coordinate}. The label is placed at that +% coordinate on the given axis. This command is complicated by the fact +% that the default justification should be different for each axis (for +% example, for the y-axis it is \oarg{cr} but for the x-axis it is +% \oarg{tc}). For all of them, one of the parts is \texttt{c}, so after +% resetting whitespace we initialize them both to this and later change +% only the one that needs it. +% +% Also, one of the coordinates of a label will be given by the argument, +% while the other is the location of the axis. However, which coordinate +% is which is different for different axes. What we do is feed the +% argument to \cs{mfp@xcoord} and \cs{mfp@ycoord}. Both are initialized to +% the identity macro, but one is changed to expand to just the axis +% position. +% +% The axis position for x- and y-axis is 0. For border axes it is +% calculated by adding the border axis shift to the border coordinate. +% \begin{macrocode} + \newdef\axislabels##1{% + \begingroup % ended in \do@axislabel + \mfp@resetwhitespace \tlabeljustify{cc}% + \let\mfp@xcoord=\@firstofone \let\mfp@ycoord=\@firstofone + \get@axisnum{##1}\axislabels + \ifcase\mfp@axisnum \tl@vpos=2 % x-axis -->[tc] + \def\mfp@ycoord{0}% + \or \tl@hpos=1 % y-axis-->[cr] + \def\mfp@xcoord{0} + \or \tl@hpos=1 % left -->[cr] + \edef\mfp@xcoord{\mfp@lshift}\mfpaddto\mfp@xcoord{#3}% + \or \tl@vpos=2 % bottom-->[tc] + \edef\mfp@ycoord{\mfp@bshift}\mfpaddto\mfp@ycoord{#5}% + \or \tl@hpos=-1 % right -->[cl] + \edef\mfp@xcoord{-\mfp@rshift}\mfpaddto\mfp@xcoord{#4}% + \or \tl@vpos=0 % top -->[bc] + \edef\mfp@ycoord{-\mfp@tshift}\mfpaddto\mfp@ycoord{#6}% + \fi +% \end{macrocode} +% +% Now one of \cs{mfp@xcoord} or \cs{mfp@ycoord} expands to the axis +% position. We change it so that it does this while gobbling a parameter. +% And then call \cs{@axislabels}, feeding it an empty argument as the +% default optional argument. +% \begin{macrocode} + \ifx\@firstofone\mfp@xcoord + \edef\mfp@ycoord####1{\mfp@ycoord}% + \else + \edef\mfp@xcoord####1{\mfp@xcoord}% + \fi \null@opt\@axislabels}% +% \end{macrocode} +% +% \cs{@axislabels} processes the contents of the optional parameter and +% calls \cs{do@axislabel} on the list in the argument. An additional item +% is added that signals the end of the loop. +% \begin{macrocode} + \newdef\@axislabels[##1]##2{% + \tlabeljustify{##1}% + \do@axislabel~ ##2,\mfp@delim}% +% \end{macrocode} +% +% We add some code that traps the most common typos: a comma between the +% label and the coordinate, or a missing coordinate, or a doubled comma. +% It seems impossible to detect which of the first two has happened, and +% assuming the first case produces really awful results if the second is +% true. Therefore when a coordinate seems to be missing, we just lose the +% text (as we have no place to put it) and resume the loop. If the first +% case is true, the next iteration will see only the number, read one +% digit or decimal as the text and the rest as the coordinate. The output +% will be wrong, but at least \TeX{} can proceed. +% +% Above we prepended a `\verb*+~ +' so that if the coordinate is missing, +% the braces around the argument won't be lost; the space will be +% consumed in the argument processing of \cs{do@@axislabel}. +% +% The first argument should be the label, and everything from that to the +% comma is the location. In the above error cases, the second argument +% is empty +% \begin{macrocode} + \newdef\do@axislabel~##1,{% + \@ifmtarg{##1}{\x@axislabel}{\do@@axislabel##1\@nil}}% + \newdef\do@@axislabel##1##2\@nil{% + \@ifmtarg{##2}% + {\Mfpic@warn{Possible extra comma, missing coordinate, or + missing\@msgbreak braces in \string\axislabels\@online. + Skipping this label.}}% + {\tlabel(\mfp@xcoord{##2},\mfp@ycoord{##2}){##1}}% + \x@axislabel}% + \newdef\x@axislabel{% check for end of list + \mfp@ifnextchar\mfp@delim{\@firstoftwo\endgroup}{\do@axislabel~ }}% +% \end{macrocode} +% +% \subsection{Captions}\label{captions} +% +% Captions are not added immediately by the \cs{tcaption} command. That +% command redefines \cs{@docaption} to add it, and \cs{endmfpic} executes +% \cs{@docaption}. For now, \cs{@docaption} does nothing. +% \begin{macrocode} + \newdef\@docaption{}% +% \end{macrocode} +% +% \DescribeMacro{\tcaption} +% \cs{tcaption} takes an optional argument that holds two numbers, +% separated by a comma. The first number determines the maximum width of a +% one line caption. Captions larger than that multiple of the width of the +% graphic will be reset as a paragraph, whose lines have length the second +% number times the width of the graph. The defaults are \oarg{1.2,1}. +% +% \cs{@tcaption} has one mandatory argument, the caption's text. In it, the +% \cs{\bsl} command forces line breaks. This works by forcing the width to +% be greater than any reasonable setting of the maximum line width. When +% this happens, the caption is reset in a \cs{vbox} and \cs{\bsl} is +% redefined like a normal line break. +% \begin{macrocode} + \newdef\tcaption{\simple@opt\tcaption@{1.2, 1.0}}% + \newdef\tcaption@##1{\@tcaption##1\mfp@delim}% + \long\def\@tcaption##1,##2\mfp@delim##3{% + \def\@docaption{% + \setbox\@textbox=% + \hbox{\def\\{\hskip\@M\p@}\mfp@restorepar + \@tcurr##3}% +% \end{macrocode} +% +% If the above \cs{hbox} is too wide, we re-assign \cs{@textbox} to a +% \cs{vbox} with \cs{hsize} determined by the second part of the optional +% argument, and with \cs{leftskip} and \cs{rightskip} defined according +% to the setting of \opt{centeredcaptions}. +% \begin{macrocode} + \@graphwd=\wd\@wholegraph + \ifdim\tb@wd>##1\@graphwd + \setbox\@textbox=% + \hbox{% + \vbox{% + \if@mfp@latex % keep LaTeX's `\\' + \else + \def\\{\unskip\hbox{}\hfil\penalty-\@M\ignorespaces}% + \fi + \if@mfp@centcapt + \leftskip=0pt plus 0.5fil + \rightskip=0pt plus -0.5fil + \parfillskip=0pt plus 1fil + \else + \leftskip=0pt + \rightskip=0pt + \fi + \hsize=##2\@graphwd \mfp@restorepar + \noindent\@tcurr ##3% + }% End vbox. + }% End hbox. + \fi +% \end{macrocode} +% +% Here we determine the wider of the graph or the caption, then put the +% graph and caption together by centering them in \cs{hbox}es with this +% width, stacked one atop the other with \cs{mfpiccaptionskip} (default: +% \cs{medskipamount}) in between. +% \begin{macrocode} + \mfp@scratch=\wd\@wholegraph + \ifdim \mfp@scratch<\tb@wd \mfp@scratch=\tb@wd \fi + \global\setbox\@wholegraph=% + \vbox{\hbox to \mfp@scratch{\hss\box\@wholegraph\hss}% + \nointerlineskip \vskip\mfpiccaptionskip + \hbox to \mfp@scratch{\hss\box\@textbox\hss}}% End vbox. + }% End \@docaption. +% \ignorespaces + }% End \@tcaption. +% \ignorespaces +}% End of \@mfpic +% \end{macrocode} +% +% +% \section{Placing the picture: \cs{endmfpic}}\label{endmfpic} +% +% By the time \cs{endmfpic} is reached, the \MF{} code for the figure has +% all been written to the output file. The labels have all been +% accumulated and arrangements have been made to add the caption. +% +% \DescribeMacro{\endmfpic} +% Under \opt{metapost}, write \cs{endgroup} to match beginning written +% by \cs{mfpic} Then write the \cs{grafbase} command \gbc{endmfpic}, +% followed by a comment telling which figure number it is, and the line +% number in the \TeX{} source where the \cs{endmfpic} occurred. +% \begin{macrocode} +\mfp@DBlog{Definition of closure of mfpic environment.}% +\newdef\endmfpic{% + \mfsrc{\mfp@ifmpost{\@nl verbatimtex \endgroup\space etex;}{}\@nl + endmfpic;\mf@p (\number\mfp@count) \space\@mfplineno.\@nl + \mf@p\mf@d\mf@d\mf@d\@nl}% + \ifmfpicdebug\wlog{}\wlog{Mfpic: ENTERED endmfpic.}\wlog{}\fi +% \end{macrocode} +% The code to load and place the box is skipped if figure shipping was +% turned off. +% \begin{macrocode} + \if@shipping % +% \end{macrocode} +% +% \subsection{Loading and measuring the graphic}\label{loading} +% +% Now we load the graphic. It would be at this point that we could add a +% \cs{write18} to process the figure on-the-fly. Of course that would +% require re-initializing the output file with each graphic (i.e., the +% equivalent of issuing \cs{opengraphsfile} at every \cs{mfpic} and +% \cs{closegraphsfile} at every \cs{endmfpic}.) +% \begin{macrocode} + \global\setbox\@wholegraph=% + \vbox{% +% \end{macrocode} +% +% If draft mode has been detected or set by the user, we just make a box +% of the size specified with the figure number inside it. +% \begin{macrocode} + \ifmfpicdraft + \vbox to \@graphtop{\vss + \hbox to \@graphwd{\kern2pt\tt\#\number\mfp@count\hss}% + \kern2pt}% + \else +% \end{macrocode} +% +% The \opt{truebbox} option works at the \MP{} level. Without it the +% height of the EPS bounding box will actually be the calculated value +% of \cs{@graphtop} (but increased by up to \texttt{2bp} due to rounding). +% With it, the box will be its natural height. In either case, the actual +% height is what we use in the \MP{} case. For \MF{} we use the nominal +% height calculated in \cs{mfpic}. +% \begin{macrocode} + \mfp@ifmpost{\vbox}{\vbox to \@graphtop}% + {\vss +% \end{macrocode} +% +% \cs{@graphfilename} holds the name of the \MP{} output figure. (It will be +% ignored by the \opt{metafont} option.) We test if the file exists before +% doing the graphic inclusion because of the large number of confusing error +% messages many graphic inclusion packages generate otherwise. When absent +% we substitute the figure number for \cs{@setmfpicgraphic}. When present, +% and if in \LaTeXe, we arrange for the current numerical extension to be +% accepted as an EPS or MPS file by the \cs{includegraphics} command of the +% graphics package. +% \begin{macrocode} + \edef\@graphfilename{\setfilename{\mfp@filename}% + {\number\mfp@count}}% + \mfp@ifmpost + {\openin\mfp@graph=\@graphfilename\relax + \ifeof\mfp@graph + \Mfpic@msg{No graph file: \@graphfilename\space.}% + \def\@setmfpicgraphic##1{\raise2pt\hbox{\kern2pt\tt ##1}}% + \closein\mfp@graph + \else\if@mfp@latexe + \@namedef{Gin@rule@.\number\mfp@count}##1{% + {\mfp@Gtype}{.\number\mfp@count}{##1}}% + \fi\fi}{}% +% \end{macrocode} +% +% We put the graphic in an \cs{hbox} of the required width and close off +% the boxes. +% \begin{macrocode} + \mfp@ifmpost{\hbox}{\hbox to \@graphwd}% + {\@xp\@setmfpicgraphic\@xp{\@graphfilename}\hss}% End hbox. + \kern0pt + }% End vbox + \fi + }%% End vbox (\setbox\@wholegraph) +% \end{macrocode} +% +% We change the horizontal and vertical dimensions under \opt{metapost} in +% case \opt{truebbox} was in effect, but also because they are almost always +% rounded up to whole numbers of \texttt{bp} and therefore, even without +% \opt{truebbox} the calculated values needn't be correct. +% \begin{macrocode} + \mfp@ifmpost + {\@graphright=\wd\@wholegraph + \@graphtop=\ht\@wholegraph + \@graphwd=\@graphright}{}% + \ifmfpicdebug + \wlog{Mfpic: graphleft = \the\@graphleft}% + \wlog{Mfpic: graphright = \the\@graphright}% + \wlog{Mfpic: graphtop = \the\@graphtop}% + \wlog{Mfpic: graphbot = \the\@graphbot}% + \wlog{Mfpic: graphwd = \the\wd\@wholegraph}% + \wlog{Mfpic: graphht = \the\ht\@wholegraph}% + \wlog{Mfpic: graphdp = \the\dp\@wholegraph}% + \wlog{}% + \fi +% \end{macrocode} +% +% \subsection{Adding labels and caption}\label{addlabel} +% +% We now add the box \cs{@alltlabels} onto the graph box. The box should +% still have 0pt height and depth, so we can just stick it under the graph +% box. But first we have to adjust for \cs{mfpicllx} and \cs{mfpiclly} +% which can only be known after the graphics inclusion. We reset the box +% \cs{@alltlabels} so its contents are shifted by these values. We only +% need to do this if labels have have actually been added. The signal that +% this has happened is that the label dimensions are no longer +% $\pm$\cs{maxdimen}. +% \begin{macrocode} + \ifmfpicdebug + \wlog{Mfpic: tlabelsleft = \the\@tlabelsleft}% + \wlog{Mfpic: tlabelsright = \the\@tlabelsright}% + \wlog{Mfpic: tlabelstop = \the\@tlabelstop}% + \wlog{Mfpic: tlabelsbot = \the\@tlabelsbot}% + \wlog{}% + \fi + \ifdim\@tlabelsleft < \maxdimen + \setbox\@alltlabels\vtop to 0pt{% + \kern \mfpiclly bp + \moveleft \mfpicllx bp \box\@alltlabels + \vss}% +% \end{macrocode} +% Then we adjust \cs{@tlabelsleft}, etc. for the boundingbox offset. +% \begin{macrocode} + \mfp@scratch\@tlabelsleft + \advance\mfp@scratch-\mfpicllx bp + \ifdim\mfp@scratch<\@graphleft + \@graphleft\mfp@scratch + \fi + \mfp@scratch\@tlabelsright + \advance\mfp@scratch-\mfpicllx bp + \ifdim\mfp@scratch>\@graphright + \@graphright\mfp@scratch + \fi + \mfp@scratch\@tlabelstop + \advance\mfp@scratch-\mfpiclly bp + \ifdim\mfp@scratch>\@graphtop + \@graphtop\mfp@scratch + \fi + \mfp@scratch\@tlabelsbot + \advance\mfp@scratch-\mfpiclly bp + \ifdim\mfp@scratch<\@graphbot + \@graphbot\mfp@scratch + \fi + \setbox\@wholegraph=\vtop{% + \unvbox\@wholegraph\box\@alltlabels}% + \fi +% \end{macrocode} +% +% The method for putting labels in \cs{@alltlabels} does not add any width +% on the left, nor any height to the top or depth to the bottom of that box +% (that \TeX{} can detect), but we have saved their values and now we can +% use them. For example, if \cs{@graphleft} is negative after the above, +% then a label sticks out to the left, but \TeX{} thinks it has no width. +% Therefore put \cs{kern}\texttt{-}\cs{@graphleft} to move the graph +% rightward. The height and depth are taken care of by putting it in +% \cs{vbox} with the calculated total height and moving the graph upward +% with \cs{kern}\texttt{-}\cs{@graphbot}. The rightward extensions do get +% detected by \TeX. +% \begin{macrocode} + \ifmfpicdebug + \wlog{Mfpic: tlabelsleft = \the\@tlabelsleft}% + \wlog{Mfpic: tlabelsright = \the\@tlabelsright}% + \wlog{Mfpic: tlabelstop = \the\@tlabelstop}% + \wlog{Mfpic: tlabelsbot = \the\@tlabelsbot}% + \wlog{}% + \fi + \mfp@scratch=\@graphtop + \advance\mfp@scratch by -\@graphbot + \global \setbox\@wholegraph=% + \vbox to \mfp@scratch{\vss + \hbox{\kern-\@graphleft\box\@wholegraph}% + \kern-\@graphbot}% End vbox. +% \end{macrocode} +% +% Now add the caption, then set the parameters \cs{mfpicheight} and +% \cs{mfpicwidth} for user to examine. The debug info now should show +% graphwd${}={}$graphright${}-{}$graphleft, +% graphht${}={}$graphtop${}-{}$graphbot, and graphdp${}= 0$. +% \begin{macrocode} + \ifmfpicdebug + \wlog{Mfpic: graphleft = \the\@graphleft}% + \wlog{Mfpic: graphright = \the\@graphright}% + \wlog{Mfpic: graphtop = \the\@graphtop}% + \wlog{Mfpic: graphbot = \the\@graphbot}% + \wlog{Mfpic: graphwd = \the\wd\@wholegraph}% + \wlog{Mfpic: graphht = \the\ht\@wholegraph}% + \wlog{Mfpic: graphdp = \the\dp\@wholegraph}% + \wlog{}% + \fi + \@docaption + \global\mfpicheight\ht\@wholegraph + \global\mfpicwidth\wd\@wholegraph + \ifmfpicdebug + \wlog{Mfpic: graphleft = \the\@graphleft}% + \wlog{Mfpic: graphright = \the\@graphright}% + \wlog{Mfpic: graphtop = \the\@graphtop}% + \wlog{Mfpic: graphbot = \the\@graphbot}% + \wlog{Mfpic: graphwd = \the\wd\@wholegraph}% + \wlog{Mfpic: graphht = \the\ht\@wholegraph}% + \wlog{Mfpic: graphdp = \the\dp\@wholegraph}% + \wlog{}% + \fi +% \end{macrocode} +% +% \subsection{Placing the graphic}\label{placing} +% +% Add a frame around the box \cs{@wholegraph} in draft mode (so its size +% can be seen) since there is practically nothing in it except the picture +% number +% \begin{macrocode} + \ifmfpicdraft + \setbox\@wholegraph=% + \hbox{\@mfpframed{-\mfpframethickness}{\box\@wholegraph}}% + \fi +% \end{macrocode} +% +% If the \cs{savepic} command occurred prior to this, then \cs{s@vemfpic} +% is defined and we save this picture in the box named in that +% \cs{savepic} command and stored in the macro \cs{s@vemfpic}. Otherwise, +% \cs{s@vemfpic} is undefined, and we place the picture (\cs{@wholegraph}) +% in the document. Afterward, we undefine \cs{s@vemfpic}. +% \begin{macrocode} + \mfp@ifdefined\s@vemfpic + {\global\setbox\s@vemfpic=\box\@wholegraph}% + {\leavevmode\box\@wholegraph}% + \global\let\s@vemfpic\UndEfInEd +% \end{macrocode} +% +% Now we advance the figure count, end the group started by the \cs{mfpic} +% command, restore the values of extra font dimensions that were saved, +% then arrange for spaces to be ignored in case the syntax +% \cs{begin}\marg{mfpic}$\ldots$\cs{end}\marg{mfpic} was used. +% \begin{macrocode} + \global \advance\mfp@count1 + \fi % end of \if@shipping + \endgroup % Begun near start of \@mfpic + \restore@mfpicdimens + \if@mfp@latex + \def\mfptmp@a{mfpic}% + \ifx\mfptmp@a\@currenvir + \@ignoretrue% so \endmfpic and \end{mfpic} have the same effect. + \fi + \fi + \ignorespaces +}% +% \end{macrocode} +% +% +% \section{Additional features}\label{additional} +% +% \subsection{Saving a copy of the picture}\label{saving} +% +% \DescribeMacro{\newsavepic} +% One saves a picture by first allocating a save box with +% \cs{newsavepic}\marg{\cs{mypic}}, then saying +% \cs{savepic}\marg{\cs{mypic}} beforehand. The \cs{endmfpic} code +% detects that this has been done and saves the picture in \cs{mypic}. +% It can be placed with \cs{usepic}{\cs{mypic}}. +% +% \cs{newsavepic} is just a clone of \LaTeX's \cs{newsavebox}. The one +% argument is a control sequence. +% \begin{macrocode} +\newdef\newsavepic#1{% + \if@mfp@latex \newsavebox{#1}% + \else + \mfp@ifdefined{#1}% + {\mfp@errmsg + {Command \string #1 already defined.}% + {You have used \newsavepic with an already defined or an^^J% + improper control sequence. Replace #1 with another name.^^J% + If you proceed, \newsavepic will be ignored.}}% + {\csname newbox\endcsname#1}% + \fi}% +\newlet\newpic=\newsavepic % compatibility +% \end{macrocode} +% +% \DescribeMacro{\savepic} +% All \cs{savepic} really does is define \cs{s@vepic} to its argument, +% which should be a control sequence defined by \cs{newsavepic} (or +% \cs{newbox}). +% \begin{macrocode} +\newdef\savepic#1{\relax + \mfp@ifdefined{#1}{\gdef\s@vemfpic{#1}}% + {\mfp@errmsg{Box \string#1 undefined.}% + {You tried to save a picture in a box which had not been^^J% + previously allocated. Use \newsavepic to allocate a box.}}}% +% \end{macrocode} +% +% \DescribeMacro{\usepic} +% \cs{usepic} takes one argument, a control sequence that should have +% been previously used in a \cs{savepic} comamnd. It just places the box +% with the primitive \cs{copy} command. +% \begin{macrocode} +\newdef\usepic#1{\leavevmode \copy#1\relax}% +% \end{macrocode} +% +% \subsection{Putting a frame around it}\label{frame} +% +% This is essentially code I wrote years ago to have a framing command +% that had two properties not enjoyed by come example `\cs{boxit}' commands +% for plain\TeX: It should have a baseline the same as the baseline of the +% contents, and it should work as an environment, not by reading an +% argument (so verbatim material could be included). +% +% \DescribeMacro{\mfpframed} +% \DescribeMacro{\mfpframe} +% \cs{mfpframed} takes an optional argument (the separation) and a +% mandatory argument, the contents. \cs{mfpframe}$\ldots$\cs{endmfpframe} +% is an environment and \cs{mfpframe} also takes the separation as an +% optional argument. +% +% \DescribeMacro{\framed} +% \cs{framed} is a common command (\ConTeXt{} has one, a few packages also +% define it), therefore we only define it if it is not already defined. +% \begin{macrocode} +\newdef\mfpframed{\simple@opt\@mfpframed\mfpframesep}% +\newdef\mfpframe{\simple@opt\@mfpframe\mfpframesep}% +\newdef\@mfpframed#1#2{\@mfpframe{#1}#2\endmfpframe}% +\newdef\@mfpframe#1{% + \leavevmode\hbox\bgroup + \mfpframesep#1\relax + \vrule width\mfpframethickness + \vtop\bgroup + \vbox\bgroup + \hrule height\mfpframethickness + \kern\mfpframesep + \hbox\bgroup \kern\mfpframesep \ignorespaces}% +\newdef\endmfpframe{\unskip + \kern\mfpframesep + \egroup % end hbox + \egroup % end vbox + \kern\mfpframesep + \hrule height\mfpframethickness + \egroup % end vtop + \vrule width\mfpframethickness + \egroup}% end hbox +\mfp@ifdefined\framed{}{\newlet\framed=\mfpframed}% +% \end{macrocode} +% +% \subsection{Adding \mfc{verbatimtex} to the \file{.mp} +% file}\label{verbatimtex} +% +% \DescribeMacro{mfpverbtex} +% This is a user level utility for putting some \mfc{verbatimtex} material +% in the output file for \MP. We allow the user to do this even before +% \cs{opengraphsfile} by storing it in a token register and setting a flag +% for that command to test. +% \begin{macrocode} +\newif\if@mfp@verbtex +\def\mfpverbtex{% +% \end{macrocode} +% +% We start a group, make sure lines will be preserved in writing the +% material, make sure that \texttt{\#} characters will not be doubled by +% changing its category, then continue after loading the code into the +% token register \cs{mfp@verbtex}. +% \begin{macrocode} + \begingroup \preservelines \@makeother\#% + \afterassignment\mfp@writetex\global\mfp@verbtex=}% +% \end{macrocode} +% +% We end the group and then either set the switch to tell +% \cs{opengraphsfile} that the material is ready, or we write it to the +% output, between the commands \gbc{verbatimtex} and \cs{etex}. +% \begin{macrocode} +\def\mfp@writetex{% + \endgroup + \@ifmfpfileisopen + {\mfp@ifmpost + {\mfsrc{verbatimtex}\mfsrc{\the\mfp@verbtex}\mfcmd{etex}}% + {\noMP@error{verbatimtex}}% + \global\@mfp@verbtexfalse\mfp@verbtex{}}% + {\global\@mfp@verbtextrue}}% +% \end{macrocode} +% +% +% \section{Finale}\label{finale} +% +% Set the default starting graphic number. +% \begin{macrocode} +\global\mfp@count=1 % 1 because we now advance it in \endmfpic. +% \end{macrocode} +% +% Create a system for adding patches in the file \file{mfppatch.tex}, +% and for user defaults in a file \file{mfpic.usr}. +% \begin{macrocode} +\newdef\MFPICinput#1{% + \immediate\openin\mfp@graph=#1 + \ifeof\mfp@graph + \immediate\closein\mfp@graph + \else + \immediate\closein\mfp@graph + \input #1 + \fi}% +\MFPICinput{mfppatch.tex}% +% \end{macrocode} +% +% Restore the meaning of \cs{+}, and of the \cs{newlinechar}, and execute +% the command that restores all the saved category codes. +% \begin{macrocode} +\mfp@DBlog{Punctuation, etc., will revert to old catcodes now.}% +\let\+\mfpsaveplus +\restorenewlinechar +\MFPicpackagE% +\MFPICinput{mfpic.usr}% +% +% \end{macrocode} +% +% Generate a (far too) simple wrapper for \LaTeX. +% \begin{macrocode} +%<*sty> +\input mfpic.tex\relax +% +% \end{macrocode} +%\clearpage +%\Finale diff --git a/Master/texmf-dist/source/generic/mfpic/mfpic.ins b/Master/texmf-dist/source/generic/mfpic/mfpic.ins new file mode 100644 index 00000000000..c72d045ecac --- /dev/null +++ b/Master/texmf-dist/source/generic/mfpic/mfpic.ins @@ -0,0 +1,90 @@ +% File mfpic.ins +% Mfpic version 0.7a beta 2004/04/16 +% +% Copyright 2002--2003, Daniel H. Luecking +% +% Mfpic consists of the 3 files mfpic.dtx, grafbase.dtx and mfpic.ins +% and the 5 files they generate: mfpic.tex, mfpic.sty, grafbase.mf, +% grafbase.mp, and dvipsnam.mp. +% +% Mfpic may be distributed and/or modified under the conditions of the +% LaTeX Project Public License, either version 1.2 of this license or (at +% your option) any later version. The latest version of this license is in +% +% http://www.latex-project.org/lppl.txt +% +% and version 1.2 or later is part of all distributions of LaTeX version +% 1999/12/01 or later. +% +% Documentation, examples, and ancillary files are separate and not +% covered by this license. See readme.1st for a complete list. See +% individual files for any copyright and license restrictions. +% +% With respect to the proposed draft LPPL-1.3: mfpic has maintenance +% status "maintained". The Current Maintainer is Daniel H. Luecking. There +% are several Base Interpreters: TeX, LaTeX, MetaPost and Metafont. +% +\input docstrip +\keepsilent +\preamble + +------------------------------------------------------------------- + +Copyright 2002--2003, Daniel H. Luecking + +Mfpic consists of the 3 files mfpic.dtx, grafbase.dtx and mfpic.ins +and the 5 files they generate: mfpic.tex, mfpic.sty, grafbase.mf, +grafbase.mp, and dvipsnam.mp. + +Documentation, examples, and ancillary files are separate. See +readme.1st for a complete list. + +Mfpic may be distributed and/or modified under the conditions of the +LaTeX Project Public License, either version 1.2 of this license or (at +your option) any later version. The latest version of this license is in + + http://www.latex-project.org/lppl.txt + +and version 1.2 or later is part of all distributions of LaTeX version +1999/12/01 or later. + +With respect to the proposed draft LPPL-1.3: mfpic has maintenance +status "maintained". The Current Maintainer is Daniel H. Luecking. There +are several Base Interpreters: TeX, LaTeX, MetaPost and Metafont. + +\endpreamble +\edef\zyx{% +endinput.^^J% +\DoubleperCent^^J% +\DoubleperCent\space End of file `\outFileName'.} + +\askforoverwritefalse + +\generate{ \file{mfpic.tex}{\from{mfpic.dtx}{tex}} + \file{mfpic.sty}{\from{mfpic.dtx}{sty}} + \usepostamble\zyx + \file{grafbase.mf}{\from{grafbase.dtx}{MF}} + \file{grafbase.mp}{\from{grafbase.dtx}{MP}} + \file{dvipsnam.mp}{\from{grafbase.dtx}{dvips}}} + +\def\jts{^^J \space\space\space} +\immediate\write16{% +^^J***************************************************************** +^^J +^^J To finish the installation: +^^J +^^J -- Copy the files mfpic,tex and mfpic.sty to a location where +\jts TeX and LaTeX will find them. In a TDS compliant system +\jts the directory TEXMF/tex/generic/mfpic/ is recommended. +^^J +^^J -- Copy the file grafbase.mf to a location where Metafont +\jts will find it, for example TEXMF/metafont/mfpic/ . +^^J +^^J -- Copy the files grafbase.mp and dvipsnam.mp to a location where +\jts MetaPost will find them, for example TEXMF/metapost/mfpic/ . +^^J +^^J -- Refresh the filename database if your TeX system requires it. +^^J +^^J*****************************************************************} + +\endbatchfile diff --git a/Master/texmf-dist/source/generic/midnight/00readme.txt b/Master/texmf-dist/source/generic/midnight/00readme.txt new file mode 100644 index 00000000000..42ebbce3eff --- /dev/null +++ b/Master/texmf-dist/source/generic/midnight/00readme.txt @@ -0,0 +1,18 @@ +Midnight Macros --- Tue May 7 09:08:21 PDT 1991 + +quire [1--4] +Macros for making booklets, printing double pages, and printing outlines +and crop marks. + +gloss [5--7] +Macros for vertically aligning words in consecutive sentences. + +loop [8] +A simple looping construct (meta-macros). + +dolines [9--11] +Meta-macros to separate arguments by newlines and by empty lines. + +labels [12--13] +Macros to print address labels and bulk letters. + diff --git a/Master/texmf-dist/source/generic/midnight/Index b/Master/texmf-dist/source/generic/midnight/Index new file mode 100644 index 00000000000..7f58fedeb01 --- /dev/null +++ b/Master/texmf-dist/source/generic/midnight/Index @@ -0,0 +1,23 @@ +Midnight Macros --- Thu Oct 24 14:22:09 PDT 1991 + +quire [1--4] +Macros for making booklets, printing double pages, and printing outlines +and crop marks. + +gloss [5--7] +Macros for vertically aligning words in consecutive sentences. + +loop [8] +A simple looping construct (meta-macros). + +dolines [9--11] +Meta-macros to separate arguments by newlines and by empty lines. + +labels [12--13] +Macros to print address labels and bulk letters. + +styledef [14--16] +Macros to selectively input parts of a file. + +border [17--20] +Macros to typeset borders. diff --git a/Master/texmf-dist/source/generic/psfig/pscompress b/Master/texmf-dist/source/generic/psfig/pscompress new file mode 100644 index 00000000000..c0f1346818b --- /dev/null +++ b/Master/texmf-dist/source/generic/psfig/pscompress @@ -0,0 +1,12 @@ +#!/bin/csh -f +while ($1 != "") + if (-e $1.bb || -e $1.Z) then + echo will not overwrite $1.bb or $1.Z, skipping + shift + else + echo "%\!" > $1.bb + grep \%\%BoundingBox $1 >> $1.bb + compress $1 + shift + endif +end diff --git a/Master/texmf-dist/source/generic/psfig/unsupported/arbortext.pro b/Master/texmf-dist/source/generic/psfig/unsupported/arbortext.pro new file mode 100644 index 00000000000..d06480d1120 --- /dev/null +++ b/Master/texmf-dist/source/generic/psfig/unsupported/arbortext.pro @@ -0,0 +1,100 @@ +%! +% Psfig/TeX Release 1.2 +% arbortext (dvips) version +% +% All software, documentation, and related files in this distribution of +% psfig/tex are Copyright 1987, 1988 Trevor J. Darrell +% +% Permission is granted for use and non-profit distribution of psfig/tex +% providing that this notice be clearly maintained, but the right to +% distribute any portion of psfig/tex for profit or as part of any commercial +% product is specifically reserved for the author. +% +% +% $Header: figtex.pro,v 1.5 87/07/24 20:14:50 trevor Exp $ +% $Source: $ +% +%/TeXscale { 65536 div } def +%/psfts { S 65781.76 div N } N +/TeXscale { 65781.76 div } def + +%/DocumentInitState [ matrix currentmatrix currentlinewidth currentlinecap +%currentlinejoin currentdash currentgray currentmiterlimit ] cvx def +% +% Since dvi2ps has an initgraphics at the beginning of texpre.ps, we can +% assume: +gsave initgraphics +/DocumentInitState [ matrix currentmatrix currentlinewidth currentlinecap +currentlinejoin currentdash currentgray currentmiterlimit ] cvx def +grestore + +/startTexFig { +% usage : x y bb-llx bb-lly bb-urx bb-ury startFig + /SavedState save def + userdict maxlength dict begin + currentpoint transform + + DocumentInitState setmiterlimit setgray setdash setlinejoin setlinecap + setlinewidth setmatrix + + itransform moveto + + /ury exch TeXscale def + /urx exch TeXscale def + /lly exch TeXscale def + /llx exch TeXscale def + /y exch TeXscale def + /x exch TeXscale def + + currentpoint /cy exch def /cx exch def + + /sx x urx llx sub div def % scaling for x + /sy y ury lly sub div def % scaling for y + + sx sy scale % scale by (sx,sy) + + cx sx div llx sub + cy sy div ury sub translate + + /DefFigCTM matrix currentmatrix def + + /initmatrix { + DefFigCTM setmatrix + } def + /defaultmatrix { + DefFigCTM exch copy + } def + + /initgraphics { + DocumentInitState setmiterlimit setgray setdash + setlinejoin setlinecap setlinewidth setmatrix + DefFigCTM setmatrix + } def + + /showpage { + initgraphics + } def +% /erasepage and /copypage added for MatLab support (tli) + /erasepage { + initgraphics + } def + /copypage {} def + +} def +% Args are llx lly urx ury (in figure coordinates) +/clipFig { + currentpoint 6 2 roll + newpath 4 copy + 4 2 roll moveto + 6 -1 roll exch lineto + exch lineto + exch lineto + closepath clip + newpath + moveto +} def +% doclip, if called, will always be just after a `startfig' +/doclip { llx lly urx ury clipFig } def +/endTexFig { + end SavedState restore +} def diff --git a/Master/texmf-dist/source/generic/psfig/unsupported/dospecial.frag b/Master/texmf-dist/source/generic/psfig/unsupported/dospecial.frag new file mode 100644 index 00000000000..90aa1cd5cbc --- /dev/null +++ b/Master/texmf-dist/source/generic/psfig/unsupported/dospecial.frag @@ -0,0 +1,43 @@ +/* + * This is a code fragment from a patched version of dospecial.c + * dvips version 5.47 + * + * The changed lines are between the TJD comments. + * The patch allows for zcat input to plotfile commands. + * + */ + + + if (strncmp(p, "ps:", 3)==0) { + hvpos() ; + psflush() ; /* now anything can happen. */ + if (p[3]==':') { + if (strncmp(p+4, "[begin]", 7) == 0) + nlcmdout(&p[11]); + else if (strncmp(p+4, "[end]", 5) == 0) + nlcmdout(&p[9]); + else nlcmdout(&p[4]); + } else if (strncmp(p+3, " plotfile ", 10) == 0) { + char *sfp ; + p += 13; + /* + * Fixed to allow popen input for plotfile + * TJD 10/20/91 + */ + while (*p == ' ') p++; + if (*p == '"') { + p++; + for (sfp = p; *sfp && *sfp != '"'; sfp++) ; + } else { + for (sfp = p; *sfp && *sfp != ' '; sfp++) ; + } + *sfp = '\0'; + if (*p == '`') + figcopyfile(p+1, 1); + else + figcopyfile (p, 0); + /* End TJD changes */ + } else + nlcmdout(&p[3]); + return; + } diff --git a/Master/texmf-dist/source/generic/psfig/unsupported/dospecial.patch b/Master/texmf-dist/source/generic/psfig/unsupported/dospecial.patch new file mode 100644 index 00000000000..690fbfaa193 --- /dev/null +++ b/Master/texmf-dist/source/generic/psfig/unsupported/dospecial.patch @@ -0,0 +1,37 @@ +*** dospecial.c Tue Jan 15 16:17:59 1991 +--- dospecial.c.new Sun Oct 20 13:14:10 1991 +*************** +*** 620,628 **** + } else if (strncmp(p+3, " plotfile ", 10) == 0) { + char *sfp ; + p += 13; +! for (sfp = p; *sfp && *sfp != ' '; sfp++) ; + *sfp = '\0'; +! figcopyfile (p, 0); + } else + nlcmdout(&p[3]); + return; +--- 620,642 ---- + } else if (strncmp(p+3, " plotfile ", 10) == 0) { + char *sfp ; + p += 13; +! /* +! * Fixed to allow popen input for plotfile +! * TJD 10/20/91 +! */ +! while (*p == ' ') p++; +! if (*p == '"') { +! p++; +! for (sfp = p; *sfp && *sfp != '"'; sfp++) ; +! } else { +! for (sfp = p; *sfp && *sfp != ' '; sfp++) ; +! } + *sfp = '\0'; +! if (*p == '`') +! figcopyfile(p+1, 1); +! else +! figcopyfile (p, 0); +! /* End TJD changes */ + } else + nlcmdout(&p[3]); + return; diff --git a/Master/texmf-dist/source/generic/psfig/unsupported/graphpaper.ps.gz b/Master/texmf-dist/source/generic/psfig/unsupported/graphpaper.ps.gz new file mode 100644 index 00000000000..d4ef1ea6329 Binary files /dev/null and b/Master/texmf-dist/source/generic/psfig/unsupported/graphpaper.ps.gz differ diff --git a/Master/texmf-dist/source/generic/psfig/unsupported/macdemo/README b/Master/texmf-dist/source/generic/psfig/unsupported/macdemo/README new file mode 100644 index 00000000000..bc0bc81e8a3 --- /dev/null +++ b/Master/texmf-dist/source/generic/psfig/unsupported/macdemo/README @@ -0,0 +1,76 @@ +NOTE: Much of this information and code is now obselete, since +robust EPSF postscript can be obtained from many Mac applications +(such as canvas and photoshop.) With system 7, Postscript can often +be routed to a file using a dialog box option rather than cmd-F/K. + +===================================================================== +===================================================================== +Tips on redirecting Mac postscript (when there is no "Save as...EPSF") + +1) How to capture a figure and the LaserPrep prolog into a disk file: + +Many different methods exist to appempt to do this, some of which As +of this writing, it is possible to convince MacDraw to place a Postscript +description of a figure in a file rather than sending it directly to a +LaserWriter by hitting clover-F immediately after clicking +`OK' on the print dialog box. The file is always called `PostScript' +and is left in the folder MacDraw was started in. Use a communications +program to move the file over to the host on which TeX is running. + +MacDraw creates a output file in the form of `QuickDraw' calls, which +are interpreted as a set of PostScript procedures. These procedures +are defined in what we call the Macintosh LaserPrep prolog, which must +be downloaded before Macintosh figures are sent to the printer. By +using clover-K rather than clover-F in the key sequence above both the +prolog and figure will be captured in the PostScript file. The prolog +can be extracted by hand-editing out the portion of the clover-K file +not also present in the clover-F file. + +You need to always make sure that you keep a version of the prolog +that was resident in the Mac when the figures was generated, +since the prolog is usually not backward compatible. E.g. figures +which rely on laseprep version 68 will not print using laserprep +verion 70. (Thanks Apple!) + +2) Make the postscript suitible for including as an encapsulated +postscript figure. + +Unfortunately, the postscript produced by most versions of the +LaserWriter driver is not well suited to be included directly as a +psfig figure. Most versions of the LaserPrep do not include an +accurate bounding box comment in the PostScript files they produce; +figures created by these systems will have to have their bounding box +added by hand. "graphpaper.ps" is often useful for determining the +bounding box of a figure. The "cleanfig" shell script adds a default +bounding box, removes nasty "%%EOF" lines, converts CF-LF (useful for +files that have been moved across appletalk), and strips away +downloaded fonts. + +NOTE: fonts are stripped by the cleanfig program because I found that +my documents were crashing on figures that were downloading fonts that +were already printer-resident. Cleanfig will remove all fonts, so if +you are using non-resident fonts in your figures you will have to +modify cleanfig to not stip out the downloading of those fonts. + +3) Make sure the Laserprep prolog is loaded in the printer +before printing your document. + +Other Macintoshes will often automatically download the Laserprep +code into the printer whenever access the printer and find it +does not have the code already downloaded. + +The laserprep prolog can be manually sent down by either +by prepending it using /bin/cat: + cat lprep70.pro doc.ps | lpr +or with the dvips special header command at the top of your latex file: + \special{header=lprep70.procs} +The only difference between the ".pro" and ".procs" version is what +structuring comments are included. The ".procs" version works well +as the argument to a \special{header=..} within dvips (e.g. it +will preview correctly under NeWS). + +4) Good luck! (you may need it.) +"macdemo.tex" containts a test document that including four version 68 +mac figures. + +====================================================================== diff --git a/Master/texmf-dist/source/generic/psfig/unsupported/macdemo/cleanfig b/Master/texmf-dist/source/generic/psfig/unsupported/macdemo/cleanfig new file mode 100644 index 00000000000..c4eced5b1bb --- /dev/null +++ b/Master/texmf-dist/source/generic/psfig/unsupported/macdemo/cleanfig @@ -0,0 +1,3 @@ +#!/bin/csh -f +tr \\15 \\12 | grep -v %%EOF | sed -e 's/^%%BoundingBox: ? ? ? ?/%%BoundingBox: 0 0 600 800/g' | awk -f stripfonts.awk + diff --git a/Master/texmf-dist/source/generic/psfig/unsupported/macdemo/figs/box.ps.gz b/Master/texmf-dist/source/generic/psfig/unsupported/macdemo/figs/box.ps.gz new file mode 100644 index 00000000000..fbef126e669 Binary files /dev/null and b/Master/texmf-dist/source/generic/psfig/unsupported/macdemo/figs/box.ps.gz differ diff --git a/Master/texmf-dist/source/generic/psfig/unsupported/macdemo/figs/cm.ps.gz b/Master/texmf-dist/source/generic/psfig/unsupported/macdemo/figs/cm.ps.gz new file mode 100644 index 00000000000..c484627082e Binary files /dev/null and b/Master/texmf-dist/source/generic/psfig/unsupported/macdemo/figs/cm.ps.gz differ diff --git a/Master/texmf-dist/source/generic/psfig/unsupported/macdemo/figs/piechart.ps.gz b/Master/texmf-dist/source/generic/psfig/unsupported/macdemo/figs/piechart.ps.gz new file mode 100644 index 00000000000..6ce7ca21d05 Binary files /dev/null and b/Master/texmf-dist/source/generic/psfig/unsupported/macdemo/figs/piechart.ps.gz differ diff --git a/Master/texmf-dist/source/generic/psfig/unsupported/macdemo/figs/pretzel.ps.gz b/Master/texmf-dist/source/generic/psfig/unsupported/macdemo/figs/pretzel.ps.gz new file mode 100644 index 00000000000..de0837c61c1 Binary files /dev/null and b/Master/texmf-dist/source/generic/psfig/unsupported/macdemo/figs/pretzel.ps.gz differ diff --git a/Master/texmf-dist/source/generic/psfig/unsupported/macdemo/figs/rosette.ps.gz b/Master/texmf-dist/source/generic/psfig/unsupported/macdemo/figs/rosette.ps.gz new file mode 100644 index 00000000000..a6552bee437 Binary files /dev/null and b/Master/texmf-dist/source/generic/psfig/unsupported/macdemo/figs/rosette.ps.gz differ diff --git a/Master/texmf-dist/source/generic/psfig/unsupported/macdemo/figs/starlines.ps.gz b/Master/texmf-dist/source/generic/psfig/unsupported/macdemo/figs/starlines.ps.gz new file mode 100644 index 00000000000..aa807b5c18d Binary files /dev/null and b/Master/texmf-dist/source/generic/psfig/unsupported/macdemo/figs/starlines.ps.gz differ diff --git a/Master/texmf-dist/source/generic/psfig/unsupported/macdemo/figs/trevor.ps.gz b/Master/texmf-dist/source/generic/psfig/unsupported/macdemo/figs/trevor.ps.gz new file mode 100644 index 00000000000..87326bcb668 Binary files /dev/null and b/Master/texmf-dist/source/generic/psfig/unsupported/macdemo/figs/trevor.ps.gz differ diff --git a/Master/texmf-dist/source/generic/psfig/unsupported/macdemo/figs/zip.ps.gz b/Master/texmf-dist/source/generic/psfig/unsupported/macdemo/figs/zip.ps.gz new file mode 100644 index 00000000000..9023fd994c3 Binary files /dev/null and b/Master/texmf-dist/source/generic/psfig/unsupported/macdemo/figs/zip.ps.gz differ diff --git a/Master/texmf-dist/source/generic/psfig/unsupported/macdemo/lprep68.pro b/Master/texmf-dist/source/generic/psfig/unsupported/macdemo/lprep68.pro new file mode 100644 index 00000000000..0d6510011b5 --- /dev/null +++ b/Master/texmf-dist/source/generic/psfig/unsupported/macdemo/lprep68.pro @@ -0,0 +1,446 @@ +%!Title: "Laser Prep -- The Apple PostScript Dictionary (md)" +%%Creator: Apple Software Engineering +%%CreationDate: Thursday, March 19, 1987 +%{appledict version #68 0 +% Modified by T. Darrell 1/89 [TJD] +% © CopyRight Apple Computer, Inc. 1984,1985,1986,1987,1988 All Rights Reserved. +%%EndComments +%%BeginProcSet: "(AppleDict md)" 68 0 +%%[TJD]%statusdict begin waittimeout 300 lt{0 60 300 setdefaulttimeouts}if end +%%[TJD]%currentfile statusdict begin serverdict begin product (LaserWriter II NT) eq revision 1 eq and {/setrealdevice {//setrealdevice exec 31 sendpcmd 4 eq tonerlight} bind def +%%[TJD]%/execjob {31 sendpcmd 4 eq tonerlight //execjob exec} bind def end end eexec}{end end 722{currentfile read pop pop}repeat}ifelse +%%[TJD]% HEX CODE DELETED +%%[TJD]%/sc {60 45 {abs exch abs 2 copy add 1 gt{1.0 sub dup mul exch 1.0 sub dup mul add 1.0 sub}{dup mul exch dup mul add 1.0 exch sub} +%%[TJD]%ifelse}setscreen} bind def statusdict begin product(LaserWriter II)anchorsearch end +%%[TJD]%{pop pop/letter [/letter load /exec load /sc load /exec load]cvx def/legal [/legal load /exec load /sc load /exec load]cvx def/a4 [/a4 load /exec load /sc load /exec load]cvx def/b5 [/b5 load /exec load /sc load /exec load]cvx def +%%[TJD]%/lettersmall [/lettersmall load /exec load /sc load /exec load]cvx def/a4small [/a4small load /exec load /sc load /exec load]cvx def/note [/note load /exec load /sc load /exec load]cvx def}{pop}ifelse +systemdict/currentpacking known{currentpacking true setpacking}if +%%[TJD]%/LW{save statusdict/product get(LaserWriter)anchorsearch +%%[TJD]%exch pop{length 0 eq{1}{2}ifelse}{0}ifelse exch restore}bind def +/LW{0}def +/LW+{LW 2 eq}bind def +/ok{systemdict/statusdict known dup{LW 0 gt and}if}bind def +%%[TJD]%ok{statusdict begin 9 sccinteractive 3 ne exch 0 ne or{9 0 3 setsccinteractive}if end}if +/md 250 dict def md begin +/av 0 def +/T true def/F false def/mtx matrix def/s75 75 string def/s8 8 string def/s1 ( ) def/pxs 1 def/pys 1 def +1 0 mtx defaultmatrix dtransform exch atan/pa exch def/nlw .24 def/ppr [-32 -29.52 762 582.48] def +/pgs 1 def/por true def/xb 500 array def/so true def/tso true def/fillflag false def/pnm 1 def/fmv true def +/sfl false def/ma 0 def/invertflag false def/dbinvertflag false def/xflip false def/yflip false def/noflips true def/scaleby96 false def/fNote true def/fBitStretch true def +/fg (Rvd\001\001\000\000\177) def +/bdf{bind def}bind def +/xdf{exch def}bdf +/xl{neg exch neg translate}bdf +/fp{pnsh 0 ne pnsv 0 ne and}bdf +/nop{}bdf/lnop[/nop load]cvx bdf +/vrb[ +{fp{fg 6 get 0 ne{gsave stroke grestore}{gsave 1 setlinewidth pnsh pnsv scale stroke grestore}ifelse}if newpath}bind +/eofill load +dup +/newpath load +2 index +dup +{clip newpath}bind +{}bind +dup +2 copy +]def +currentscreen/spf xdf/rot xdf/freq xdf +/doop{vrb exch get exec}bdf +/psu{/tso xdf /fNote xdf/fBitStretch xdf/scaleby96 xdf/yflip xdf/xflip xdf +/invertflag xdf/dbinvertflag invertflag statusdict begin version cvr 47.0 ge product (LaserWriter) eq not and end invertflag and {not}if def +xflip yflip or{/noflips false def}if +/pgs xdf 2 index .72 mul exch div/pys xdf div .72 mul/pxs xdf ppr astore pop/por xdf sn and/so xdf}bdf +/tab{statusdict /11x17 known{statusdict begin /11x17 load end}{statusdict /setpage known{statusdict begin 792 1224 1 setpage end}{statusdict /setpageparams known{statusdict begin 792 1224 0 1 setpageparams end}if}ifelse}ifelse}bdf +/txpose{ +%[TJD] fNote{smalls}{bigs}ifelse pgs get exec + pxs pys scale + ppr aload pop por{ + noflips{ + pop exch neg exch translate pop 1 -1 scale + }if + xflip yflip and{ + pop exch neg exch translate 180 rotate 1 -1 scale + ppr 3 get ppr 1 get neg sub neg ppr 2 get + ppr 0 get neg sub neg translate + }if + xflip yflip not and{ + pop exch neg exch translate pop 180 rotate + ppr 3 get ppr 1 get neg sub neg 0 translate + }if + yflip xflip not and{ + ppr 1 get neg ppr 0 get neg translate + }if + }{ + noflips{ + translate pop pop 270 rotate 1 -1 scale + }if + xflip yflip and{ + translate pop pop 90 rotate 1 -1 scale + ppr 3 get ppr 1 get neg sub neg ppr 2 get + ppr 0 get neg sub neg translate + }if + xflip yflip not and{ + translate pop pop 90 rotate ppr 3 get ppr 1 get + neg sub neg 0 translate + }if + yflip xflip not and{ + translate pop pop 270 rotate ppr 2 get ppr 0 get + neg sub neg 0 exch translate + }if + }ifelse + statusdict begin waittimeout 300 lt{ + /waittimeout 300 def + }if end + scaleby96{ + ppr aload pop 4 -1 roll add 2 div 3 1 roll add 2 div + 2 copy translate .96 dup scale neg exch neg exch translate + }if +}bdf +/fr{4 copy ppr aload pop 3 -1 roll add 3 1 roll exch add 6 2 roll 3 -1 roll +sub 3 1 roll exch sub 3 -1 roll exch div 3 1 roll div exch scale pop pop xl}bdf +/obl{{0.212557 mul}{pop 0}ifelse}bdf +/sfd{ps fg 5 -1 roll get mul 100 div 0 ps 5 -1 roll obl ps neg 0 0 6a astore makefont setfont}bdf +/fnt{findfont sfd}bdf +/bt{sa 3 1 roll 3 index and put}bdf +/sa(\000\000\000\000\000\000\000\000\000\000)def +/fs{0 1 bt 1 2 bt 2 4 bt 3 8 bt 4 16 bt 5 32 bt 6 64 bt 7 128 bt sa exch 8 exch put}bdf +/mx1 matrix def +/mx2 matrix def +/mx3 matrix def +/bu{currentpoint currentgray currentlinewidth currentlinecap currentlinejoin currentdash exch aload length +fg 5 sfl{1}{0}ifelse put pnsv pnsh +2t aload pop 3a aload pop mx2 aload pop mx1 aload pop mtx currentmatrix aload pop +mx3 aload pop ps pm restore/ps xdf mx3 astore pop}bdf +/bn{/pm save def mx3 setmatrix newpath 0 0 moveto ct dup 39 get 0 exch getinterval cvx exec +mtx astore setmatrix mx1 astore pop mx2 astore pop 3a astore pop +2t astore pop/pnsh xdf/pnsv xdf gw +/sfl fg 5 get 0 ne def array astore exch setdash setlinejoin setlinecap +setlinewidth setgray moveto}bdf +/fc{save vmstatus exch sub 50000 lt +{(%%[|0|]%%)=print flush}if pop restore}bdf +/tc{32768 div add 3 1 roll 32768 div add 2t astore pop}bdf +/3a [0 0 0] def +/2t 2 array def +/tp{3a astore pop}bdf +/tt{mx2 currentmatrix pop currentpoint 2 copy 2t aload pop qa 2 copy translate 3a aload pop exch dup 0 eq +{pop}{1 eq{-1 1}{1 -1}ifelse scale}ifelse rotate pop neg exch neg exch translate moveto}bdf +/te{mx2 setmatrix}bdf +/th{3 -1 roll div 3 1 roll exch div 2 copy mx1 scale pop scale/sfl true def}bdf +/tu{1 1 mx1 itransform scale/sfl false def}bdf +/ts{1 1 mx1 transform scale/sfl true def}bdf +/fz{/ps xdf}bdf +/dv{dup 0 ne{div}{pop}ifelse}bdf +/pop4{pop pop pop pop}bdf +/it{sfl{mx1 itransform}if}bdf +/gm{exch it moveto}bdf/rm{it rmoveto}bdf +/lm{currentpoint sfl{mx1 transform}if exch pop sub 0 exch it rmoveto}bdf +/fm{statusdict/manualfeed known}bdf +/se{statusdict exch/manualfeed exch put}bdf +/mf{dup/ma exch def 0 gt{fm se/t1 5 st ok ma 1 gt and{/t2 0 st/t3 0 st +statusdict/manualfeedtimeout 3600 put +}if}if}bdf +/jn{/statusdict where exch pop{statusdict exch /jobname exch put}if}bdf +/pen{pnm mul/pnsh xdf pnm mul/pnsv xdf pnsh setlinewidth}bdf +/min{2 copy gt{exch}if pop}bdf +/max{2 copy lt{exch}if pop}bdf +/dh{fg 6 1 put array astore dup {1 pxs div mul exch}forall astore exch pop exch pop exch setdash}bdf +/ih[currentdash]def +/rh{fg 6 0 put ih aload pop setdash}bdf +/dl{gsave nlw pys div setlinewidth 0 setgray}bdf +/dlin{exch currentpoint currentlinewidth 2 div dup +translate newpath moveto lineto currentpoint stroke grestore moveto}bdf +/lin{fg 6 get 0 ne{exch lineto currentpoint 0 doop moveto} +{exch currentpoint/pnlv xdf/pnlh xdf gsave newpath/@1 xdf/@2 xdf fp{pnlh @2 lt{pnlv @1 ge +{pnlh pnlv moveto @2 @1 lineto pnsh 0 rlineto +0 pnsv rlineto pnlh pnsh add pnlv pnsv add lineto pnsh neg 0 rlineto} +{pnlh pnlv moveto pnsh 0 rlineto @2 pnsh add @1 lineto 0 pnsv rlineto +pnsh neg 0 rlineto pnlh pnlv pnsv add lineto}ifelse}{pnlv @1 gt +{@2 @1 moveto pnsh 0 rlineto pnlh pnsh add pnlv lineto 0 pnsv rlineto +pnsh neg 0 rlineto @2 @1 pnsv add lineto}{pnlh pnlv moveto pnsh 0 rlineto +0 pnsv rlineto @2 pnsh add @1 pnsv add lineto pnsh neg 0 rlineto +0 pnsv neg rlineto}ifelse}ifelse +closepath fill}if @2 @1 grestore moveto}ifelse}bdf +/gw{/pnm fg 3 get fg 4 get div def}bdf +/lw{fg exch 4 exch put fg exch 3 exch put gw pnsv pnsh pen}bdf +/barc{/@1 xdf/@2 xdf/@3 xdf/@4 xdf/@5 xdf +/@6 xdf/@7 xdf/@8 xdf gsave +@5 @7 add 2 div @6 @8 add 2 div translate newpath 0 0 moveto +@5 @7 sub @6 @8 sub mtx currentmatrix pop scale @1{newpath}if +0 0 0.5 @4 @3 arc @4 @3 sub abs 360 ge{closepath}if +mtx setmatrix @2 doop grestore}bdf +/ar{dup 0 eq barc}bdf +/ov{0 exch 360 exch true barc}bdf +/rc{/@t xdf currentpoint 6 2 roll newpath 4 copy 4 2 roll exch moveto +6 -1 roll lineto lineto lineto closepath @t doop moveto}bdf +/mup{dup pnsh 2 div le exch pnsv 2 div le or}bdf +/rr{/@1 xdf 2. div/@2 xdf 2. div/@3 xdf +/@4 xdf/@5 xdf/@6 xdf/@7 xdf +@7 @5 eq @6 @4 eq @2 mup or or{@7 @6 @5 @4 @1 rc} +{@4 @6 sub 2. div dup @2 lt{/@2 xdf}{pop}ifelse +@5 @7 sub 2. div dup @2 lt{/@2 xdf}{pop}ifelse +@1 0 eq{/@2 @2 pnsh 2 div 2 copy gt{sub def}{0 pop4}ifelse}if +currentpoint newpath +@4 @6 add 2. div @7 moveto +@4 @7 @4 @5 @2 arcto pop4 +@4 @5 @6 @5 @2 arcto pop4 +@6 @5 @6 @7 @2 arcto pop4 +@6 @7 @4 @7 @2 arcto pop4 +closepath @1 doop moveto}ifelse}bdf +/pr{gsave newpath/pl{exch moveto/pl{exch lineto}def}def}bdf +/pl{exch lineto}bdf +/ep{dup 0 eq{{moveto}{exch lin}{}{(%%[|1|]%%)= flush}pathforall +pop grestore}{doop grestore}ifelse currentpoint newpath moveto}bdf +/gr{64. div setgray}bdf +/pat{s8 copy pop 9.375 pa por not{90 add}if{1 add 4 mul cvi s8 exch get exch 1 add 4 mul cvi 7 sub bitshift 1 and}setscreen gr}bdf +/sg{freq rot/spf load setscreen gr}bdf +/dc{transform round .5 sub exch round .5 sub exch itransform}bdf +/sn{userdict/smooth4 known}bdf +/x8{3 bitshift}bdf +/x4{2 bitshift}bdf +/d4{-2 bitshift}bdf +/d8{-3 bitshift}bdf +/rb{15 add -4 bitshift 1 bitshift}bdf +/db{/@7 save def/@1 xdf/@2 xdf/@3 xdf/@4 xdf/@5 xdf/@6 @5 @3 4 add mul def +dc translate scale/xdbit 1 1 idtransform abs/ydbit exch def abs def{0 0 1 ydbit add 1 10 rc clip}if +@1 0 eq @1 4 eq or{1 setgray ydbit 0 1 ydbit add 1 2 rc}if +@1 3 eq @1 7 eq or{1}{0}ifelse setgray/@9 @1 0 eq @1 1 eq @1 3 eq or or dbinvertflag xor def/@13 @6 def +@2 fBitStretch or{/@10 @4 x4 def/@11 @3 x4 def/@12 @10 rb def/@13 @12 @11 mul def/@15 1 1 dtransform abs/calcY 1 index def round cvi/@14 exch def +abs/calcX 1 index def round cvi scaleby96 not{1 add}if def/@16 @15 rb def/@17 @16 @14 mul def}if +sn @13 60000 lt and @2 fBitStretch or and{mtx currentmatrix dup 1 get exch 2 get 0. eq exch 0. eq and @17 60000 lt and fBitStretch and{@16 3 bitshift @14 @9 [calcX 0 0 calcY 0 0]{@17 string @13 string +currentfile @6 string readhexstring pop 1 index @4 @3 @5 @12 @2 smooth4 +@10 @11 @12 dup string 5 index @15 @14 @16 dup string stretch}imagemask}{@12 x8 @11 @9 [@10 0 0 @11 0 0]{@13 string +currentfile @6 string readhexstring pop 1 index @4 @3 @5 @12 @2 smooth4}imagemask}ifelse}{@5 3 bitshift @3 4 add @9 [@4 0 0 @3 0 2]{currentfile @6 string readhexstring pop}imagemask}ifelse +@7 restore}bdf +/multibit{/mbdeep exch def/mbY exch def/mbX exch def +save mbX mbY mbdeep[mbX 0 0 mbY 0 0]{currentfile picstr readhexstring pop}image +restore}bdf +/wd 16 dict def +/mfont 14 dict def +/mdf{mfont wcheck not{/mfont 14 dict def}if mfont begin xdf end}bdf +/cf{{1 index/FID ne{def}{pop pop}ifelse}forall}bdf/rf{/@1 exch def/@2 exch def +FontDirectory @2 known{cleartomark pop}{findfont dup begin dup length @1 add dict begin +cf{/Encoding macvec def}{Encoding dup length array copy/Encoding exch def +counttomark 2 idiv{Encoding 3 1 roll put}repeat}ifelse +pop +exec currentdict end end @2 exch definefont pop}ifelse}bdf +/bmbc{exch begin wd begin +/cr xdf +save +CharTable cr 6 mul 6 getinterval{}forall +/bitheight xdf/bitwidth xdf +.96 div/width xdf +Gkernmax add/XOffset xdf Gdescent add/YOffset xdf/rowbytes xdf +rowbytes 255 eq{0 0 0 0 0 0 setcachedevice} +{Gnormsize dup scale +width 0 XOffset YOffset bitwidth XOffset add bitheight YOffset add +setcachedevice +rowbytes 0 ne{ +XOffset YOffset translate newpath 0 0 moveto +bitwidth bitheight scale +sn{ +/xSmt bitwidth x4 def +/ySmt bitheight x4 def +/rSmt xSmt rb def +rSmt x8 ySmt true +[xSmt 0 0 ySmt neg 0 ySmt] +{rSmt ySmt mul string CharData cr get +1 index bitwidth bitheight rowbytes rSmt tso smooth4} +}{rowbytes 3 bitshift bitheight 4 add true +[bitwidth 0 0 bitheight neg 0 bitheight 2 add] +{CharData cr get} +}ifelse +imagemask +}if +}ifelse +restore +end end +}bdf +/bb{.96 exch div/Gnormsize mdf 2 index +/Gkernmax mdf 1 index/Gdescent mdf +3 index div 4 1 roll +2 index div 1. 5 2 roll +exch div 4 1 roll +4 array astore/FontBBox mdf +}bdf +/cdf{mfont/CharData get 3 1 roll put}bdf +/bf{ +mfont begin +/FontType 3 def +/FontMatrix [1 0 0 1 0 0] def +/Encoding macvec def +/BuildChar/bmbc load def +end +mfont definefont pop +}bdf +/wi LW 1 eq{{gsave 0 0 0 0 0 0 0 0 moveto lineto lineto lineto closepath clip stringwidth grestore}bind}{/stringwidth load}ifelse def +/aps{0 get 124 eq}bdf +/xc{s75 cvs dup}bdf +/xp{put cvn}bdf +/scs{xc 3 67 put dup 0 95 xp}bdf +/sos{xc 3 79 xp}bdf +/sbs{xc 1 66 xp}bdf +/sis{xc 2 73 xp}bdf +/sob{xc 2 79 xp}bdf +/sss{xc 4 83 xp}bdf +/dd{exch 1 index add 3 1 roll add exch}bdf +/smc{moveto dup show}bdf +/kwn{FontDirectory 1 index known{findfont exch pop}}bdf +/gl{1 currentgray sub setgray}bdf +/mm{/mfont 10 dict def mfont begin +/FontMatrix [1 0 0 1 0 0] def +/FontType 3 def +/Encoding macvec def +/df 4 index findfont def +/FontBBox [0 0 1 1] def +/xda xdf/mbc xdf +/BuildChar{wd begin/cr xdf/fd xdf/cs s1 dup 0 cr put def fd/mbc get exec end}def +exec end mfont definefont}bdf +/ac{dup scs kwn{exch findfont dup length 1 add dict begin{1 index/FID ne 2 index/UniqueID ne and{def}{pop pop}ifelse}forall +fmv{/Encoding macvec def}if/StrokeWidth nlw 1000 mul pys div ps div dup 12 lt{pop 12}if def +/PaintType 2 def currentdict end definefont}ifelse}bdf +/mb{dup sbs kwn{exch{pop}{bbc}{}mm}ifelse sfd}bdf +/mo{dup sos kwn{exch{pop}{boc}{}mm}ifelse sfd}bdf +/ms{dup sss kwn{exch{pop}{bsc}{}mm}ifelse sfd}bdf +/ou{dup sos kwn{exch dup ac pop{scs findfont /df2 xdf}{aoc}{}mm}ifelse sfd}bdf +/su{dup sss kwn{exch dup ac pop{scs findfont /df2 xdf}{asc}{}mm}ifelse sfd}bdf +/ao{/fmv true def ou}bdf/as{/fmv true def su}bdf +/vo{/fmv false def ou}bdf/vs{/fmv false def su}bdf +/bbc{/da .03 def fd/df get setfont +gsave cs wi 1 index 0 ne{exch da add exch}if grestore setcharwidth +cs 0 0 smc da 0 smc da da smc 0 da moveto show}bdf +/boc{/da 1 ps div def fd/df get setfont +gsave cs wi 1 index 0 ne{exch da add exch}if grestore setcharwidth +cs 0 0 smc da 0 smc da da smc 0 da smc gl da 2. div dup moveto show}bdf +/bsc{/da 1 ps div def +/ds .05 def/da2 da 2. div def fd/df get setfont +gsave cs wi 1 index 0 ne{exch ds add da2 add exch}if grestore setcharwidth +cs ds da2 add .01 add 0 smc 0 ds da2 sub translate 0 0 smc +da 0 smc da da smc 0 da smc gl da 2. div dup moveto show}bdf +/aoc{fd/df get setfont +gsave cs wi grestore setcharwidth +gl cs 0 0 smc fd/df2 get setfont gl 0 0 moveto show}bdf +/asc{/da .05 def fd/df get setfont +gsave cs wi 1 index 0 ne{exch da add exch}if grestore setcharwidth +cs da .01 add 0 smc 0 da translate gl 0 0 smc gl fd/df2 get setfont 0 0 moveto show}bdf +/st{1000 mul usertime add dup 2147483647 gt{2147483647 sub}if def}bdf +/the{usertime sub dup 0 lt exch -2147483648 gt and}bdf +/6a 6 array def +/2a 2 array def +/3q 3 array def +/qs{3 -1 roll sub exch 3 -1 roll sub exch}bdf +/qa{3 -1 roll add exch 3 -1 roll add exch}bdf +/qm{3 -1 roll 1 index mul 3 1 roll mul}bdf +/qn{6a exch get mul}bdf +/qA .166667 def/qB .833333 def/qC .5 def +/qx{6a astore pop +qA 0 qn qB 2 qn add qA 1 qn qB 3 qn add +qB 2 qn qA 4 qn add qB 3 qn qA 5 qn add +qC 2 qn qC 4 qn add qC 3 qn qC 5 qn add}bdf +/qp{6 copy 12 -2 roll pop pop}bdf +/qc{exch qp qx curveto}bdf +/qi{{exch 4 copy 2a astore aload pop qa .5 qm newpath moveto}{exch 2 copy 6 -2 roll 2 qm qs 4 2 roll}ifelse}bdf +/qq{{qc 2a aload pop qx curveto}{exch 4 copy qs qa qx curveto}ifelse}bdf +/pt{currentpoint newpath moveto}bdf +/qf{/fillflag true def}bdf +/ec{1 and 0 ne{0 doop}if grestore currentpoint newpath moveto/fillflag false def}bdf +/eu{currentpoint fp{0 ep}{grestore newpath}ifelse moveto/fillflag false def}bdf +/bp{currentpoint newpath 2 copy moveto}bdf +/ef{gsave fillflag{gsave eofill grestore}if}bdf +/sm{0 exch{@1 eq{1 add}if}forall}bdf +/lshow{4 1 roll exch/@1 exch def{1 index wi pop sub 1 index sm dv 0 @1 4 -1 roll widthshow}{1 index wi pop sub +1 index dup sm 10 mul exch length 1 sub add dv dup 10. mul 0 @1 4 -1 roll 0 6 -1 roll awidthshow}ifelse}bdf +/setTxMode{sa 9 2 index put 3 eq{1}{0}ifelse setgray}bdf +/SwToSym{{}mark false/Symbol/|______Symbol 0 rf 0 sa 6 get 0 ne{pop 1}{sa 7 get 0 eq{pop 2}if}ifelse +sa 1 get 0 ne/|______Symbol +sa 4 get 0 ne{vs}{sa 3 get 0 ne{vo}{fnt}ifelse}ifelse}bdf +/mc{0 3 1 roll transform neg exch pop}bdf +/ul{dup 0 ne sa 2 get 0 ne and{gsave 0 0 +/UnderlinePosition kif{mc}{ps -10 div}ifelse/UnderlineThickness kif{mc}{ps 15 div}ifelse +abs setlinewidth neg rmoveto +sa 4 get 0 ne{gsave currentlinewidth 2. div dup rmoveto currentpoint newpath moveto +2 copy rlineto stroke grestore}if +sa 3 get sa 4 get or 0 ne{gsave gl 2 copy rlineto stroke grestore rlineto strokepath nlw pys div setlinewidth}{rlineto}ifelse +stroke grestore}{pop}ifelse}bdf +/sgt{2 copy known{get true}{pop pop false}ifelse}bdf +/kif{currentfont dup/FontMatrix get exch/FontInfo sgt{true}{currentfont/df sgt +{dup/FontInfo sgt{3 1 roll/FontMatrix get mtx concatmatrix exch true}{pop pop pop false} +ifelse}{pop pop false}ifelse}ifelse{3 -1 roll sgt{exch true}{pop false}ifelse}{false}ifelse}bdf +/blank/Times-Roman findfont/CharStrings get/space get def +/macvec 256 array def +/NUL/SOH/STX/ETX/EOT/ENQ/ACK/BEL/BS/HT/LF/VT/FF/CR/SO/SI +/DLE/DC1/DC2/DC3/DC4/NAK/SYN/ETB/CAN/EM/SUB/ESC/FS/GS/RS/US +macvec 0 32 getinterval astore pop +macvec 32/Times-Roman findfont/Encoding get +32 96 getinterval putinterval macvec dup 39/quotesingle put 96/grave put +/Adieresis/Aring/Ccedilla/Eacute/Ntilde/Odieresis/Udieresis/aacute +/agrave/acircumflex/adieresis/atilde/aring/ccedilla/eacute/egrave +/ecircumflex/edieresis/iacute/igrave/icircumflex/idieresis/ntilde/oacute +/ograve/ocircumflex/odieresis/otilde/uacute/ugrave/ucircumflex/udieresis +/dagger/degree/cent/sterling/section/bullet/paragraph/germandbls +/registered/copyright/trademark/acute/dieresis/notequal/AE/Oslash +/infinity/plusminus/lessequal/greaterequal/yen/mu/partialdiff/summation +/product/pi/integral/ordfeminine/ordmasculine/Omega/ae/oslash +/questiondown/exclamdown/logicalnot/radical/florin/approxequal/Delta/guillemotleft +/guillemotright/ellipsis/blank/Agrave/Atilde/Otilde/OE/oe +/endash/emdash/quotedblleft/quotedblright/quoteleft/quoteright/divide/lozenge +/ydieresis/Ydieresis/fraction/currency/guilsinglleft/guilsinglright/fi/fl +/daggerdbl/periodcentered/quotesinglbase/quotedblbase/perthousand/Acircumflex/Ecircumflex/Aacute +/Edieresis/Egrave/Iacute/Icircumflex/Idieresis/Igrave/Oacute/Ocircumflex +/apple/Ograve/Uacute/Ucircumflex/Ugrave/dotlessi/circumflex/tilde +/macron/breve/dotaccent/ring/cedilla/hungarumlaut/ogonek/caron +macvec 128 128 getinterval astore pop +{}mark true/Courier/|______Courier 0 rf +{/Metrics 21 dict begin/zero 600 def/one 600 def/two 600 def/three 600 def/four 600 def/five 600 def/six 600 def/seven 600 def/eight 600 def +/nine 600 def/comma 600 def/period 600 def/dollar 600 def/numbersign 600 def/percent 600 def/plus 600 def/hyphen 600 def/E 600 def/parenleft 600 def/parenright 600 def/space 600 def +currentdict end def currentdict/UniqueID known{/UniqueID 16#800000 def}if/FontBBox FontBBox 4 array astore def}mark true/Helvetica/|______Seattle 1 rf +/oldsettransfer/settransfer load def +/concatprocs{/proc2 exch cvlit def/proc1 exch cvlit def/newproc proc1 length proc2 length add array def +newproc 0 proc1 putinterval newproc proc1 length proc2 putinterval newproc cvx}def +/settransfer{currenttransfer concatprocs oldsettransfer}def +/PaintBlack{{1 exch sub}settransfer gsave newpath clippath 1 setgray fill grestore}def +/od{(Rvd\001\001\000\000\177) fg copy pop txpose +1 0 mtx defaultmatrix dtransform exch atan/pa exch def +newpath clippath mark +{transform{itransform moveto}}{transform{itransform lineto}} +{6 -2 roll transform 6 -2 roll transform 6 -2 roll transform +{itransform 6 2 roll itransform 6 2 roll itransform 6 2 roll curveto}} +{{closepath}}pathforall newpath counttomark array astore/gc xdf pop ct 39 0 put +10 fz 0 fs 2 F/|______Courier fnt invertflag{PaintBlack}if}bdf +/cd{}bdf +/op{/sfl false def/pm save def}bdf +%%[TJD]%/cp{not{userdict/#copies 0 put}if ma 0 gt{{t1 the{exit}if}loop}if{copypage}{showpage}ifelse pm restore}bdf +/cp{ pop pop pm restore } bdf +/px{0 3 1 roll tp tt}bdf +/psb{/us save def}bdf +/pse{us restore}bdf +/ct 40 string def +/nc{currentpoint initclip newpath gc{dup type dup/arraytype eq exch/packedarraytype eq or{exec}if} +forall clip newpath moveto}def +/kp{ct 0 2 index length 2 index 39 2 index put getinterval copy cvx exec mx3 currentmatrix pop}bdf +/av 68 def +end +LW 1 eq userdict/a4small known not and{/a4small +[[300 72 div 0 0 -300 72 div -120 3381] +280 3255 +{statusdict/jobstate (printing) put 0 setblink +margins +exch 196 add exch 304 add 8 div round cvi frametoroket +statusdict/jobstate (busy) put +1 setblink} +/framedevice load +60 45{dup mul exch dup mul add 1.0 exch sub}/setscreen load +{}/settransfer load/initgraphics load/erasepage load]cvx +statusdict begin bind end readonly def}if +md begin/bigs[lnop userdict/letter known{/letter load}{lnop}ifelse userdict/legal known{/legal load}{lnop}ifelse userdict/a4 known{/a4 load}{lnop}ifelse userdict/b5 known{/b5 load}{lnop}ifelse +lnop lnop lnop /tab load]def +/smalls[lnop userdict/lettersmall known{/lettersmall load}{userdict/note known{/note load}{lnop}ifelse}ifelse +userdict/legal known{/legal load}{lnop}ifelse userdict/a4small known{/a4small load}{lnop}ifelse +userdict/b5 known{/b5 load}{userdict/note known{/note load}{lnop}ifelse}ifelse lnop lnop lnop /tab load]def end +systemdict/currentpacking known{setpacking}if +%%[TJD]%currentfile ok userdict/stretch known not and{eexec}{flushfile}ifelse +%%[TJD]% +%%[TJD]%currentfile ok userdict/smooth4 known not and{eexec}{flushfile}ifelse +%%[TJD]% +%%EndProcSet + diff --git a/Master/texmf-dist/source/generic/psfig/unsupported/macdemo/lprep68.procs b/Master/texmf-dist/source/generic/psfig/unsupported/macdemo/lprep68.procs new file mode 100644 index 00000000000..5b3631c6a5e --- /dev/null +++ b/Master/texmf-dist/source/generic/psfig/unsupported/macdemo/lprep68.procs @@ -0,0 +1,439 @@ +%%BeginProcSet: "(AppleDict md)" 68 0 +%%[TJD]%statusdict begin waittimeout 300 lt{0 60 300 setdefaulttimeouts}if end +%%[TJD]%currentfile statusdict begin serverdict begin product (LaserWriter II NT) eq revision 1 eq and {/setrealdevice {//setrealdevice exec 31 sendpcmd 4 eq tonerlight} bind def +%%[TJD]%/execjob {31 sendpcmd 4 eq tonerlight //execjob exec} bind def end end eexec}{end end 722{currentfile read pop pop}repeat}ifelse +%%[TJD]% HEX CODE DELETED +%%[TJD]%/sc {60 45 {abs exch abs 2 copy add 1 gt{1.0 sub dup mul exch 1.0 sub dup mul add 1.0 sub}{dup mul exch dup mul add 1.0 exch sub} +%%[TJD]%ifelse}setscreen} bind def statusdict begin product(LaserWriter II)anchorsearch end +%%[TJD]%{pop pop/letter [/letter load /exec load /sc load /exec load]cvx def/legal [/legal load /exec load /sc load /exec load]cvx def/a4 [/a4 load /exec load /sc load /exec load]cvx def/b5 [/b5 load /exec load /sc load /exec load]cvx def +%%[TJD]%/lettersmall [/lettersmall load /exec load /sc load /exec load]cvx def/a4small [/a4small load /exec load /sc load /exec load]cvx def/note [/note load /exec load /sc load /exec load]cvx def}{pop}ifelse +systemdict/currentpacking known{currentpacking true setpacking}if +%%[TJD]%/LW{save statusdict/product get(LaserWriter)anchorsearch +%%[TJD]%exch pop{length 0 eq{1}{2}ifelse}{0}ifelse exch restore}bind def +/LW{0}def +/LW+{LW 2 eq}bind def +/ok{systemdict/statusdict known dup{LW 0 gt and}if}bind def +%%[TJD]%ok{statusdict begin 9 sccinteractive 3 ne exch 0 ne or{9 0 3 setsccinteractive}if end}if +/md 250 dict def md begin +/av 0 def +/T true def/F false def/mtx matrix def/s75 75 string def/s8 8 string def/s1 ( ) def/pxs 1 def/pys 1 def +1 0 mtx defaultmatrix dtransform exch atan/pa exch def/nlw .24 def/ppr [-32 -29.52 762 582.48] def +/pgs 1 def/por true def/xb 500 array def/so true def/tso true def/fillflag false def/pnm 1 def/fmv true def +/sfl false def/ma 0 def/invertflag false def/dbinvertflag false def/xflip false def/yflip false def/noflips true def/scaleby96 false def/fNote true def/fBitStretch true def +/fg (Rvd\001\001\000\000\177) def +/bdf{bind def}bind def +/xdf{exch def}bdf +/xl{neg exch neg translate}bdf +/fp{pnsh 0 ne pnsv 0 ne and}bdf +/nop{}bdf/lnop[/nop load]cvx bdf +/vrb[ +{fp{fg 6 get 0 ne{gsave stroke grestore}{gsave 1 setlinewidth pnsh pnsv scale stroke grestore}ifelse}if newpath}bind +/eofill load +dup +/newpath load +2 index +dup +{clip newpath}bind +{}bind +dup +2 copy +]def +currentscreen/spf xdf/rot xdf/freq xdf +/doop{vrb exch get exec}bdf +/psu{/tso xdf /fNote xdf/fBitStretch xdf/scaleby96 xdf/yflip xdf/xflip xdf +/invertflag xdf/dbinvertflag invertflag statusdict begin version cvr 47.0 ge product (LaserWriter) eq not and end invertflag and {not}if def +xflip yflip or{/noflips false def}if +/pgs xdf 2 index .72 mul exch div/pys xdf div .72 mul/pxs xdf ppr astore pop/por xdf sn and/so xdf}bdf +/tab{statusdict /11x17 known{statusdict begin /11x17 load end}{statusdict /setpage known{statusdict begin 792 1224 1 setpage end}{statusdict /setpageparams known{statusdict begin 792 1224 0 1 setpageparams end}if}ifelse}ifelse}bdf +/txpose{ +%[TJD] fNote{smalls}{bigs}ifelse pgs get exec + pxs pys scale + ppr aload pop por{ + noflips{ + pop exch neg exch translate pop 1 -1 scale + }if + xflip yflip and{ + pop exch neg exch translate 180 rotate 1 -1 scale + ppr 3 get ppr 1 get neg sub neg ppr 2 get + ppr 0 get neg sub neg translate + }if + xflip yflip not and{ + pop exch neg exch translate pop 180 rotate + ppr 3 get ppr 1 get neg sub neg 0 translate + }if + yflip xflip not and{ + ppr 1 get neg ppr 0 get neg translate + }if + }{ + noflips{ + translate pop pop 270 rotate 1 -1 scale + }if + xflip yflip and{ + translate pop pop 90 rotate 1 -1 scale + ppr 3 get ppr 1 get neg sub neg ppr 2 get + ppr 0 get neg sub neg translate + }if + xflip yflip not and{ + translate pop pop 90 rotate ppr 3 get ppr 1 get + neg sub neg 0 translate + }if + yflip xflip not and{ + translate pop pop 270 rotate ppr 2 get ppr 0 get + neg sub neg 0 exch translate + }if + }ifelse + statusdict begin waittimeout 300 lt{ + /waittimeout 300 def + }if end + scaleby96{ + ppr aload pop 4 -1 roll add 2 div 3 1 roll add 2 div + 2 copy translate .96 dup scale neg exch neg exch translate + }if +}bdf +/fr{4 copy ppr aload pop 3 -1 roll add 3 1 roll exch add 6 2 roll 3 -1 roll +sub 3 1 roll exch sub 3 -1 roll exch div 3 1 roll div exch scale pop pop xl}bdf +/obl{{0.212557 mul}{pop 0}ifelse}bdf +/sfd{ps fg 5 -1 roll get mul 100 div 0 ps 5 -1 roll obl ps neg 0 0 6a astore makefont setfont}bdf +/fnt{findfont sfd}bdf +/bt{sa 3 1 roll 3 index and put}bdf +/sa(\000\000\000\000\000\000\000\000\000\000)def +/fs{0 1 bt 1 2 bt 2 4 bt 3 8 bt 4 16 bt 5 32 bt 6 64 bt 7 128 bt sa exch 8 exch put}bdf +/mx1 matrix def +/mx2 matrix def +/mx3 matrix def +/bu{currentpoint currentgray currentlinewidth currentlinecap currentlinejoin currentdash exch aload length +fg 5 sfl{1}{0}ifelse put pnsv pnsh +2t aload pop 3a aload pop mx2 aload pop mx1 aload pop mtx currentmatrix aload pop +mx3 aload pop ps pm restore/ps xdf mx3 astore pop}bdf +/bn{/pm save def mx3 setmatrix newpath 0 0 moveto ct dup 39 get 0 exch getinterval cvx exec +mtx astore setmatrix mx1 astore pop mx2 astore pop 3a astore pop +2t astore pop/pnsh xdf/pnsv xdf gw +/sfl fg 5 get 0 ne def array astore exch setdash setlinejoin setlinecap +setlinewidth setgray moveto}bdf +/fc{save vmstatus exch sub 50000 lt +{(%%[|0|]%%)=print flush}if pop restore}bdf +/tc{32768 div add 3 1 roll 32768 div add 2t astore pop}bdf +/3a [0 0 0] def +/2t 2 array def +/tp{3a astore pop}bdf +/tt{mx2 currentmatrix pop currentpoint 2 copy 2t aload pop qa 2 copy translate 3a aload pop exch dup 0 eq +{pop}{1 eq{-1 1}{1 -1}ifelse scale}ifelse rotate pop neg exch neg exch translate moveto}bdf +/te{mx2 setmatrix}bdf +/th{3 -1 roll div 3 1 roll exch div 2 copy mx1 scale pop scale/sfl true def}bdf +/tu{1 1 mx1 itransform scale/sfl false def}bdf +/ts{1 1 mx1 transform scale/sfl true def}bdf +/fz{/ps xdf}bdf +/dv{dup 0 ne{div}{pop}ifelse}bdf +/pop4{pop pop pop pop}bdf +/it{sfl{mx1 itransform}if}bdf +/gm{exch it moveto}bdf/rm{it rmoveto}bdf +/lm{currentpoint sfl{mx1 transform}if exch pop sub 0 exch it rmoveto}bdf +/fm{statusdict/manualfeed known}bdf +/se{statusdict exch/manualfeed exch put}bdf +/mf{dup/ma exch def 0 gt{fm se/t1 5 st ok ma 1 gt and{/t2 0 st/t3 0 st +statusdict/manualfeedtimeout 3600 put +}if}if}bdf +/jn{/statusdict where exch pop{statusdict exch /jobname exch put}if}bdf +/pen{pnm mul/pnsh xdf pnm mul/pnsv xdf pnsh setlinewidth}bdf +/min{2 copy gt{exch}if pop}bdf +/max{2 copy lt{exch}if pop}bdf +/dh{fg 6 1 put array astore dup {1 pxs div mul exch}forall astore exch pop exch pop exch setdash}bdf +/ih[currentdash]def +/rh{fg 6 0 put ih aload pop setdash}bdf +/dl{gsave nlw pys div setlinewidth 0 setgray}bdf +/dlin{exch currentpoint currentlinewidth 2 div dup +translate newpath moveto lineto currentpoint stroke grestore moveto}bdf +/lin{fg 6 get 0 ne{exch lineto currentpoint 0 doop moveto} +{exch currentpoint/pnlv xdf/pnlh xdf gsave newpath/@1 xdf/@2 xdf fp{pnlh @2 lt{pnlv @1 ge +{pnlh pnlv moveto @2 @1 lineto pnsh 0 rlineto +0 pnsv rlineto pnlh pnsh add pnlv pnsv add lineto pnsh neg 0 rlineto} +{pnlh pnlv moveto pnsh 0 rlineto @2 pnsh add @1 lineto 0 pnsv rlineto +pnsh neg 0 rlineto pnlh pnlv pnsv add lineto}ifelse}{pnlv @1 gt +{@2 @1 moveto pnsh 0 rlineto pnlh pnsh add pnlv lineto 0 pnsv rlineto +pnsh neg 0 rlineto @2 @1 pnsv add lineto}{pnlh pnlv moveto pnsh 0 rlineto +0 pnsv rlineto @2 pnsh add @1 pnsv add lineto pnsh neg 0 rlineto +0 pnsv neg rlineto}ifelse}ifelse +closepath fill}if @2 @1 grestore moveto}ifelse}bdf +/gw{/pnm fg 3 get fg 4 get div def}bdf +/lw{fg exch 4 exch put fg exch 3 exch put gw pnsv pnsh pen}bdf +/barc{/@1 xdf/@2 xdf/@3 xdf/@4 xdf/@5 xdf +/@6 xdf/@7 xdf/@8 xdf gsave +@5 @7 add 2 div @6 @8 add 2 div translate newpath 0 0 moveto +@5 @7 sub @6 @8 sub mtx currentmatrix pop scale @1{newpath}if +0 0 0.5 @4 @3 arc @4 @3 sub abs 360 ge{closepath}if +mtx setmatrix @2 doop grestore}bdf +/ar{dup 0 eq barc}bdf +/ov{0 exch 360 exch true barc}bdf +/rc{/@t xdf currentpoint 6 2 roll newpath 4 copy 4 2 roll exch moveto +6 -1 roll lineto lineto lineto closepath @t doop moveto}bdf +/mup{dup pnsh 2 div le exch pnsv 2 div le or}bdf +/rr{/@1 xdf 2. div/@2 xdf 2. div/@3 xdf +/@4 xdf/@5 xdf/@6 xdf/@7 xdf +@7 @5 eq @6 @4 eq @2 mup or or{@7 @6 @5 @4 @1 rc} +{@4 @6 sub 2. div dup @2 lt{/@2 xdf}{pop}ifelse +@5 @7 sub 2. div dup @2 lt{/@2 xdf}{pop}ifelse +@1 0 eq{/@2 @2 pnsh 2 div 2 copy gt{sub def}{0 pop4}ifelse}if +currentpoint newpath +@4 @6 add 2. div @7 moveto +@4 @7 @4 @5 @2 arcto pop4 +@4 @5 @6 @5 @2 arcto pop4 +@6 @5 @6 @7 @2 arcto pop4 +@6 @7 @4 @7 @2 arcto pop4 +closepath @1 doop moveto}ifelse}bdf +/pr{gsave newpath/pl{exch moveto/pl{exch lineto}def}def}bdf +/pl{exch lineto}bdf +/ep{dup 0 eq{{moveto}{exch lin}{}{(%%[|1|]%%)= flush}pathforall +pop grestore}{doop grestore}ifelse currentpoint newpath moveto}bdf +/gr{64. div setgray}bdf +/pat{s8 copy pop 9.375 pa por not{90 add}if{1 add 4 mul cvi s8 exch get exch 1 add 4 mul cvi 7 sub bitshift 1 and}setscreen gr}bdf +/sg{freq rot/spf load setscreen gr}bdf +/dc{transform round .5 sub exch round .5 sub exch itransform}bdf +/sn{userdict/smooth4 known}bdf +/x8{3 bitshift}bdf +/x4{2 bitshift}bdf +/d4{-2 bitshift}bdf +/d8{-3 bitshift}bdf +/rb{15 add -4 bitshift 1 bitshift}bdf +/db{/@7 save def/@1 xdf/@2 xdf/@3 xdf/@4 xdf/@5 xdf/@6 @5 @3 4 add mul def +dc translate scale/xdbit 1 1 idtransform abs/ydbit exch def abs def{0 0 1 ydbit add 1 10 rc clip}if +@1 0 eq @1 4 eq or{1 setgray ydbit 0 1 ydbit add 1 2 rc}if +@1 3 eq @1 7 eq or{1}{0}ifelse setgray/@9 @1 0 eq @1 1 eq @1 3 eq or or dbinvertflag xor def/@13 @6 def +@2 fBitStretch or{/@10 @4 x4 def/@11 @3 x4 def/@12 @10 rb def/@13 @12 @11 mul def/@15 1 1 dtransform abs/calcY 1 index def round cvi/@14 exch def +abs/calcX 1 index def round cvi scaleby96 not{1 add}if def/@16 @15 rb def/@17 @16 @14 mul def}if +sn @13 60000 lt and @2 fBitStretch or and{mtx currentmatrix dup 1 get exch 2 get 0. eq exch 0. eq and @17 60000 lt and fBitStretch and{@16 3 bitshift @14 @9 [calcX 0 0 calcY 0 0]{@17 string @13 string +currentfile @6 string readhexstring pop 1 index @4 @3 @5 @12 @2 smooth4 +@10 @11 @12 dup string 5 index @15 @14 @16 dup string stretch}imagemask}{@12 x8 @11 @9 [@10 0 0 @11 0 0]{@13 string +currentfile @6 string readhexstring pop 1 index @4 @3 @5 @12 @2 smooth4}imagemask}ifelse}{@5 3 bitshift @3 4 add @9 [@4 0 0 @3 0 2]{currentfile @6 string readhexstring pop}imagemask}ifelse +@7 restore}bdf +/multibit{/mbdeep exch def/mbY exch def/mbX exch def +save mbX mbY mbdeep[mbX 0 0 mbY 0 0]{currentfile picstr readhexstring pop}image +restore}bdf +/wd 16 dict def +/mfont 14 dict def +/mdf{mfont wcheck not{/mfont 14 dict def}if mfont begin xdf end}bdf +/cf{{1 index/FID ne{def}{pop pop}ifelse}forall}bdf/rf{/@1 exch def/@2 exch def +FontDirectory @2 known{cleartomark pop}{findfont dup begin dup length @1 add dict begin +cf{/Encoding macvec def}{Encoding dup length array copy/Encoding exch def +counttomark 2 idiv{Encoding 3 1 roll put}repeat}ifelse +pop +exec currentdict end end @2 exch definefont pop}ifelse}bdf +/bmbc{exch begin wd begin +/cr xdf +save +CharTable cr 6 mul 6 getinterval{}forall +/bitheight xdf/bitwidth xdf +.96 div/width xdf +Gkernmax add/XOffset xdf Gdescent add/YOffset xdf/rowbytes xdf +rowbytes 255 eq{0 0 0 0 0 0 setcachedevice} +{Gnormsize dup scale +width 0 XOffset YOffset bitwidth XOffset add bitheight YOffset add +setcachedevice +rowbytes 0 ne{ +XOffset YOffset translate newpath 0 0 moveto +bitwidth bitheight scale +sn{ +/xSmt bitwidth x4 def +/ySmt bitheight x4 def +/rSmt xSmt rb def +rSmt x8 ySmt true +[xSmt 0 0 ySmt neg 0 ySmt] +{rSmt ySmt mul string CharData cr get +1 index bitwidth bitheight rowbytes rSmt tso smooth4} +}{rowbytes 3 bitshift bitheight 4 add true +[bitwidth 0 0 bitheight neg 0 bitheight 2 add] +{CharData cr get} +}ifelse +imagemask +}if +}ifelse +restore +end end +}bdf +/bb{.96 exch div/Gnormsize mdf 2 index +/Gkernmax mdf 1 index/Gdescent mdf +3 index div 4 1 roll +2 index div 1. 5 2 roll +exch div 4 1 roll +4 array astore/FontBBox mdf +}bdf +/cdf{mfont/CharData get 3 1 roll put}bdf +/bf{ +mfont begin +/FontType 3 def +/FontMatrix [1 0 0 1 0 0] def +/Encoding macvec def +/BuildChar/bmbc load def +end +mfont definefont pop +}bdf +/wi LW 1 eq{{gsave 0 0 0 0 0 0 0 0 moveto lineto lineto lineto closepath clip stringwidth grestore}bind}{/stringwidth load}ifelse def +/aps{0 get 124 eq}bdf +/xc{s75 cvs dup}bdf +/xp{put cvn}bdf +/scs{xc 3 67 put dup 0 95 xp}bdf +/sos{xc 3 79 xp}bdf +/sbs{xc 1 66 xp}bdf +/sis{xc 2 73 xp}bdf +/sob{xc 2 79 xp}bdf +/sss{xc 4 83 xp}bdf +/dd{exch 1 index add 3 1 roll add exch}bdf +/smc{moveto dup show}bdf +/kwn{FontDirectory 1 index known{findfont exch pop}}bdf +/gl{1 currentgray sub setgray}bdf +/mm{/mfont 10 dict def mfont begin +/FontMatrix [1 0 0 1 0 0] def +/FontType 3 def +/Encoding macvec def +/df 4 index findfont def +/FontBBox [0 0 1 1] def +/xda xdf/mbc xdf +/BuildChar{wd begin/cr xdf/fd xdf/cs s1 dup 0 cr put def fd/mbc get exec end}def +exec end mfont definefont}bdf +/ac{dup scs kwn{exch findfont dup length 1 add dict begin{1 index/FID ne 2 index/UniqueID ne and{def}{pop pop}ifelse}forall +fmv{/Encoding macvec def}if/StrokeWidth nlw 1000 mul pys div ps div dup 12 lt{pop 12}if def +/PaintType 2 def currentdict end definefont}ifelse}bdf +/mb{dup sbs kwn{exch{pop}{bbc}{}mm}ifelse sfd}bdf +/mo{dup sos kwn{exch{pop}{boc}{}mm}ifelse sfd}bdf +/ms{dup sss kwn{exch{pop}{bsc}{}mm}ifelse sfd}bdf +/ou{dup sos kwn{exch dup ac pop{scs findfont /df2 xdf}{aoc}{}mm}ifelse sfd}bdf +/su{dup sss kwn{exch dup ac pop{scs findfont /df2 xdf}{asc}{}mm}ifelse sfd}bdf +/ao{/fmv true def ou}bdf/as{/fmv true def su}bdf +/vo{/fmv false def ou}bdf/vs{/fmv false def su}bdf +/bbc{/da .03 def fd/df get setfont +gsave cs wi 1 index 0 ne{exch da add exch}if grestore setcharwidth +cs 0 0 smc da 0 smc da da smc 0 da moveto show}bdf +/boc{/da 1 ps div def fd/df get setfont +gsave cs wi 1 index 0 ne{exch da add exch}if grestore setcharwidth +cs 0 0 smc da 0 smc da da smc 0 da smc gl da 2. div dup moveto show}bdf +/bsc{/da 1 ps div def +/ds .05 def/da2 da 2. div def fd/df get setfont +gsave cs wi 1 index 0 ne{exch ds add da2 add exch}if grestore setcharwidth +cs ds da2 add .01 add 0 smc 0 ds da2 sub translate 0 0 smc +da 0 smc da da smc 0 da smc gl da 2. div dup moveto show}bdf +/aoc{fd/df get setfont +gsave cs wi grestore setcharwidth +gl cs 0 0 smc fd/df2 get setfont gl 0 0 moveto show}bdf +/asc{/da .05 def fd/df get setfont +gsave cs wi 1 index 0 ne{exch da add exch}if grestore setcharwidth +cs da .01 add 0 smc 0 da translate gl 0 0 smc gl fd/df2 get setfont 0 0 moveto show}bdf +/st{1000 mul usertime add dup 2147483647 gt{2147483647 sub}if def}bdf +/the{usertime sub dup 0 lt exch -2147483648 gt and}bdf +/6a 6 array def +/2a 2 array def +/3q 3 array def +/qs{3 -1 roll sub exch 3 -1 roll sub exch}bdf +/qa{3 -1 roll add exch 3 -1 roll add exch}bdf +/qm{3 -1 roll 1 index mul 3 1 roll mul}bdf +/qn{6a exch get mul}bdf +/qA .166667 def/qB .833333 def/qC .5 def +/qx{6a astore pop +qA 0 qn qB 2 qn add qA 1 qn qB 3 qn add +qB 2 qn qA 4 qn add qB 3 qn qA 5 qn add +qC 2 qn qC 4 qn add qC 3 qn qC 5 qn add}bdf +/qp{6 copy 12 -2 roll pop pop}bdf +/qc{exch qp qx curveto}bdf +/qi{{exch 4 copy 2a astore aload pop qa .5 qm newpath moveto}{exch 2 copy 6 -2 roll 2 qm qs 4 2 roll}ifelse}bdf +/qq{{qc 2a aload pop qx curveto}{exch 4 copy qs qa qx curveto}ifelse}bdf +/pt{currentpoint newpath moveto}bdf +/qf{/fillflag true def}bdf +/ec{1 and 0 ne{0 doop}if grestore currentpoint newpath moveto/fillflag false def}bdf +/eu{currentpoint fp{0 ep}{grestore newpath}ifelse moveto/fillflag false def}bdf +/bp{currentpoint newpath 2 copy moveto}bdf +/ef{gsave fillflag{gsave eofill grestore}if}bdf +/sm{0 exch{@1 eq{1 add}if}forall}bdf +/lshow{4 1 roll exch/@1 exch def{1 index wi pop sub 1 index sm dv 0 @1 4 -1 roll widthshow}{1 index wi pop sub +1 index dup sm 10 mul exch length 1 sub add dv dup 10. mul 0 @1 4 -1 roll 0 6 -1 roll awidthshow}ifelse}bdf +/setTxMode{sa 9 2 index put 3 eq{1}{0}ifelse setgray}bdf +/SwToSym{{}mark false/Symbol/|______Symbol 0 rf 0 sa 6 get 0 ne{pop 1}{sa 7 get 0 eq{pop 2}if}ifelse +sa 1 get 0 ne/|______Symbol +sa 4 get 0 ne{vs}{sa 3 get 0 ne{vo}{fnt}ifelse}ifelse}bdf +/mc{0 3 1 roll transform neg exch pop}bdf +/ul{dup 0 ne sa 2 get 0 ne and{gsave 0 0 +/UnderlinePosition kif{mc}{ps -10 div}ifelse/UnderlineThickness kif{mc}{ps 15 div}ifelse +abs setlinewidth neg rmoveto +sa 4 get 0 ne{gsave currentlinewidth 2. div dup rmoveto currentpoint newpath moveto +2 copy rlineto stroke grestore}if +sa 3 get sa 4 get or 0 ne{gsave gl 2 copy rlineto stroke grestore rlineto strokepath nlw pys div setlinewidth}{rlineto}ifelse +stroke grestore}{pop}ifelse}bdf +/sgt{2 copy known{get true}{pop pop false}ifelse}bdf +/kif{currentfont dup/FontMatrix get exch/FontInfo sgt{true}{currentfont/df sgt +{dup/FontInfo sgt{3 1 roll/FontMatrix get mtx concatmatrix exch true}{pop pop pop false} +ifelse}{pop pop false}ifelse}ifelse{3 -1 roll sgt{exch true}{pop false}ifelse}{false}ifelse}bdf +/blank/Times-Roman findfont/CharStrings get/space get def +/macvec 256 array def +/NUL/SOH/STX/ETX/EOT/ENQ/ACK/BEL/BS/HT/LF/VT/FF/CR/SO/SI +/DLE/DC1/DC2/DC3/DC4/NAK/SYN/ETB/CAN/EM/SUB/ESC/FS/GS/RS/US +macvec 0 32 getinterval astore pop +macvec 32/Times-Roman findfont/Encoding get +32 96 getinterval putinterval macvec dup 39/quotesingle put 96/grave put +/Adieresis/Aring/Ccedilla/Eacute/Ntilde/Odieresis/Udieresis/aacute +/agrave/acircumflex/adieresis/atilde/aring/ccedilla/eacute/egrave +/ecircumflex/edieresis/iacute/igrave/icircumflex/idieresis/ntilde/oacute +/ograve/ocircumflex/odieresis/otilde/uacute/ugrave/ucircumflex/udieresis +/dagger/degree/cent/sterling/section/bullet/paragraph/germandbls +/registered/copyright/trademark/acute/dieresis/notequal/AE/Oslash +/infinity/plusminus/lessequal/greaterequal/yen/mu/partialdiff/summation +/product/pi/integral/ordfeminine/ordmasculine/Omega/ae/oslash +/questiondown/exclamdown/logicalnot/radical/florin/approxequal/Delta/guillemotleft +/guillemotright/ellipsis/blank/Agrave/Atilde/Otilde/OE/oe +/endash/emdash/quotedblleft/quotedblright/quoteleft/quoteright/divide/lozenge +/ydieresis/Ydieresis/fraction/currency/guilsinglleft/guilsinglright/fi/fl +/daggerdbl/periodcentered/quotesinglbase/quotedblbase/perthousand/Acircumflex/Ecircumflex/Aacute +/Edieresis/Egrave/Iacute/Icircumflex/Idieresis/Igrave/Oacute/Ocircumflex +/apple/Ograve/Uacute/Ucircumflex/Ugrave/dotlessi/circumflex/tilde +/macron/breve/dotaccent/ring/cedilla/hungarumlaut/ogonek/caron +macvec 128 128 getinterval astore pop +{}mark true/Courier/|______Courier 0 rf +{/Metrics 21 dict begin/zero 600 def/one 600 def/two 600 def/three 600 def/four 600 def/five 600 def/six 600 def/seven 600 def/eight 600 def +/nine 600 def/comma 600 def/period 600 def/dollar 600 def/numbersign 600 def/percent 600 def/plus 600 def/hyphen 600 def/E 600 def/parenleft 600 def/parenright 600 def/space 600 def +currentdict end def currentdict/UniqueID known{/UniqueID 16#800000 def}if/FontBBox FontBBox 4 array astore def}mark true/Helvetica/|______Seattle 1 rf +/oldsettransfer/settransfer load def +/concatprocs{/proc2 exch cvlit def/proc1 exch cvlit def/newproc proc1 length proc2 length add array def +newproc 0 proc1 putinterval newproc proc1 length proc2 putinterval newproc cvx}def +/settransfer{currenttransfer concatprocs oldsettransfer}def +/PaintBlack{{1 exch sub}settransfer gsave newpath clippath 1 setgray fill grestore}def +/od{(Rvd\001\001\000\000\177) fg copy pop txpose +1 0 mtx defaultmatrix dtransform exch atan/pa exch def +newpath clippath mark +{transform{itransform moveto}}{transform{itransform lineto}} +{6 -2 roll transform 6 -2 roll transform 6 -2 roll transform +{itransform 6 2 roll itransform 6 2 roll itransform 6 2 roll curveto}} +{{closepath}}pathforall newpath counttomark array astore/gc xdf pop ct 39 0 put +10 fz 0 fs 2 F/|______Courier fnt invertflag{PaintBlack}if}bdf +/cd{}bdf +/op{/sfl false def/pm save def}bdf +%%[TJD]%/cp{not{userdict/#copies 0 put}if ma 0 gt{{t1 the{exit}if}loop}if{copypage}{showpage}ifelse pm restore}bdf +/cp{ pop pop pm restore } bdf +/px{0 3 1 roll tp tt}bdf +/psb{/us save def}bdf +/pse{us restore}bdf +/ct 40 string def +/nc{currentpoint initclip newpath gc{dup type dup/arraytype eq exch/packedarraytype eq or{exec}if} +forall clip newpath moveto}def +/kp{ct 0 2 index length 2 index 39 2 index put getinterval copy cvx exec mx3 currentmatrix pop}bdf +/av 68 def +end +LW 1 eq userdict/a4small known not and{/a4small +[[300 72 div 0 0 -300 72 div -120 3381] +280 3255 +{statusdict/jobstate (printing) put 0 setblink +margins +exch 196 add exch 304 add 8 div round cvi frametoroket +statusdict/jobstate (busy) put +1 setblink} +/framedevice load +60 45{dup mul exch dup mul add 1.0 exch sub}/setscreen load +{}/settransfer load/initgraphics load/erasepage load]cvx +statusdict begin bind end readonly def}if +md begin/bigs[lnop userdict/letter known{/letter load}{lnop}ifelse userdict/legal known{/legal load}{lnop}ifelse userdict/a4 known{/a4 load}{lnop}ifelse userdict/b5 known{/b5 load}{lnop}ifelse +lnop lnop lnop /tab load]def +/smalls[lnop userdict/lettersmall known{/lettersmall load}{userdict/note known{/note load}{lnop}ifelse}ifelse +userdict/legal known{/legal load}{lnop}ifelse userdict/a4small known{/a4small load}{lnop}ifelse +userdict/b5 known{/b5 load}{userdict/note known{/note load}{lnop}ifelse}ifelse lnop lnop lnop /tab load]def end +systemdict/currentpacking known{setpacking}if +%%[TJD]%currentfile ok userdict/stretch known not and{eexec}{flushfile}ifelse +%%[TJD]% +%%[TJD]%currentfile ok userdict/smooth4 known not and{eexec}{flushfile}ifelse +%%[TJD]% +%%EndProcSet + diff --git a/Master/texmf-dist/source/generic/psfig/unsupported/macdemo/lprep70.pro b/Master/texmf-dist/source/generic/psfig/unsupported/macdemo/lprep70.pro new file mode 100644 index 00000000000..cd0ad2a2792 --- /dev/null +++ b/Master/texmf-dist/source/generic/psfig/unsupported/macdemo/lprep70.pro @@ -0,0 +1,451 @@ +%!PS-Adobe-2.0 +%%BeginProcSet: "(AppleDict md)" 70 0 +statusdict begin product(LaserWriter II NT)eq revision 1 eq and +{userdict begin/oldcds/cleardictstack load def/cleardictstack{31 sendpcmd 4 eq tonerlight/oldcds load exec}bind def +end +currentfile eexec +}{save currentfile 359 string readhexstring pop pop restore}ifelse +35de8eabfc7fa5eac0431edc501ad43f5fcbdf9fdd321cce93b525f4439dd94696bf56ac13a0a2aad1e6bcf444711e941d7217138d20ae0500145f815439cc14e697ad201df728ea4ccad4ac +331aa03a7aacde10760bf4ee12bbf73c77cdcbf1796f26f0dd255d2407e1ac41 +d27489a69d6b69c6a841468b46720b75ad65650700e0c528e7af61e7e3e821b59445c44b69831ebc9deaf0e3aecc14b7a1c2e18bc1fa42a59219f1e36f236e3d6c89114b1f231999c3dbce6b43f3e2918fcb85575941a9d1e65c86aa08e6eea86cc66ce90e5e4add57f2585e +7b1c0b5203cfc46868d6e3c0d66db79174e7091e32e307679732da062e440e41dabd36a161b611a7e4523a49694026206803dbfd5be5c5fe433f0f18a40057db6f1302848c8da4a10a7f14c6 +3d512806362b1be092ad5dbd36d75fe63e4cae2ba9b72390f580cac344a08bdf6eb9e36ec45bad2a0b82829a72e0efa2d87332c482196e690361168271c55053341ab3 +end +/sc {60 45 {abs exch abs 2 copy add 1 gt{1.0 sub dup mul exch 1.0 sub dup mul add 1.0 sub}{dup mul exch dup mul add 1.0 exch sub} +ifelse}setscreen} bind def statusdict begin product(LaserWriter II)anchorsearch end +{pop pop/letter [/letter load /exec load /sc load /exec load]cvx def/legal [/legal load /exec load /sc load /exec load]cvx def/a4 [/a4 load /exec load /sc load /exec load]cvx def/b5 [/b5 load /exec load /sc load /exec load]cvx def +/lettersmall [/lettersmall load /exec load /sc load /exec load]cvx def/a4small [/a4small load /exec load /sc load /exec load]cvx def/note [/note load /exec load /sc load /exec load]cvx def}{pop}ifelse +systemdict/currentpacking known{currentpacking true setpacking}if +/LW{save statusdict/product get(LaserWriter)anchorsearch +exch pop{length 0 eq{1}{2}ifelse}{0}ifelse exch restore}bind def +/LW+{LW 2 eq}bind def +/ok{systemdict/statusdict known dup{LW 0 gt and}if}bind def +ok{statusdict begin 9 sccinteractive 3 ne exch 0 ne or{9 0 3 setsccinteractive}if end}if +/md 270 dict def md begin +/av 0 def +/T true def/F false def/mtx matrix def/s75 75 string def/sa8 8 string def/sb8 8 string def +/sc8 8 string def/sd8 8 string def/s1 ( ) def/pxs 1 def/pys 1 def +/ns false def +1 0 mtx defaultmatrix dtransform exch atan/pa exch def/nlw .24 def/ppr [-32 -29.52 762 582.48] def +/pgr [0 0 0 0] def +/pgs 1 def/por true def/xb 500 array def/so true def/tso true def/fillflag false def/pnm 1 def/fmv true def +/sfl false def/ma 0 def/invertflag false def/dbinvertflag false def/xflip false def/yflip false def/noflips true def/scaleby96 false def/fNote true def/fBitStretch true def +/4colors false def/3colors false def/2colors false def +/wtkey false def +statusdict begin/waittimeout where{pop waittimeout 300 lt{md /wtkey true put}if}if end +wtkey{statusdict begin/setdefaulttimeouts where{pop 0 60 300 setdefaulttimeouts}if end}if +/fg (Rvd\001\001\000\000\177) def +/bdf{bind def}bind def +/xdf{exch def}bdf +/xl{neg exch neg translate}bdf +/fp{pnsh 0 ne pnsv 0 ne and}bdf +/nop{}bdf/lnop[/nop load]cvx bdf +/vrb[ +{fp{fg 6 get 0 ne{gsave stroke grestore}{gsave 1 setlinewidth pnsh pnsv scale stroke grestore}ifelse}if newpath}bind +/eofill load +dup +/newpath load +2 index +dup +{clip newpath}bind +{}bind +dup +2 copy +]def +systemdict/currentcolorscreen known{currentcolorscreen/dkspf xdf/dkrot xdf/dkfreq xdf/dyspf xdf/dyrot xdf/dyfreq xdf/dmspf xdf/dmrot xdf/dmfreq xdf +/dcspf xdf/dcrot xdf/dcfreq xdf}{currentscreen/spf xdf/rot xdf/freq xdf}ifelse +/doop{vrb exch get exec}bdf +/psu{/udf xdf/tso xdf /fNote xdf/fBitStretch xdf/scaleby96 xdf/yflip xdf/xflip xdf +/invertflag xdf/dbinvertflag invertflag statusdict begin version cvr 47.0 ge product (LaserWriter) eq not and end invertflag and {not}if def +xflip yflip or{/noflips false def}if +/pgs xdf 2 index .72 mul exch div/pys xdf div .72 mul/pxs xdf ppr astore pop pgr astore pop/por xdf sn and/so xdf}bdf +/tab{statusdict /11x17 known{statusdict begin /11x17 load end}{statusdict /setpage known{statusdict begin 792 1224 1 setpage end}{statusdict /setpageparams known{statusdict begin 792 1224 0 1 setpageparams end}if}ifelse}ifelse}bdf +/a3Size{statusdict /a3 known{statusdict begin /a3 load end}{statusdict /setpageparams known{statusdict begin 842 1191 0 1 setpageparams end}if}ifelse}bdf +/txpose{fNote{smalls}{bigs}ifelse pgs get exec pxs pys scale ppr aload pop por{noflips{pop exch neg exch translate pop 1 -1 scale}if +xflip yflip and{pop exch neg exch translate 180 rotate 1 -1 scale ppr 3 get ppr 1 get neg sub neg ppr 2 get ppr 0 get neg sub neg translate}if +xflip yflip not and{pop exch neg exch translate pop 180 rotate ppr 3 get ppr 1 get neg sub neg 0 translate}if yflip xflip not and{ppr 1 get neg ppr 0 get neg translate}if} +{noflips{translate pop pop 270 rotate 1 -1 scale}if xflip yflip and{translate pop pop 90 rotate 1 -1 scale ppr 3 get ppr 1 get neg sub neg ppr 2 get ppr 0 get neg sub neg translate}if +xflip yflip not and{translate pop pop 90 rotate ppr 3 get ppr 1 get neg sub neg 0 translate}if yflip xflip not and{translate pop pop 270 rotate ppr 2 get ppr 0 get neg sub neg 0 exch translate}if}ifelse +wtkey{statusdict/waittimeout 300 put}if +scaleby96{ppr aload pop 4 -1 roll add 2 div 3 1 roll add 2 div 2 copy translate .96 dup scale neg exch neg exch translate}if}bdf +/fr{4 copy pgr aload pop 3 -1 roll add 3 1 roll exch add 6 2 roll 3 -1 roll +sub 3 1 roll exch sub 3 -1 roll exch div 3 1 roll div exch scale pop pop xl}bdf +/obl{{0.212557 mul}{pop 0}ifelse}bdf +/sfd{ps fg 5 -1 roll get mul 100 div 0 ps 5 -1 roll obl ps neg 0 0 6a astore makefont setfont}bdf +/fnt{findfont sfd}bdf +/bt{sa 3 1 roll 3 index and put}bdf +/sa(\000\000\000\000\000\000\000\000\000\000)def +/fs{0 1 bt 1 2 bt 2 4 bt 3 8 bt 4 16 bt 5 32 bt 6 64 bt 7 128 bt sa exch 8 exch put}bdf +/mx1 matrix def +/mx2 matrix def +/mx3 matrix def +/bu{currentpoint 4colors{currentcmykcolor}{currentrgbcolor}ifelse currentlinewidth currentlinecap currentlinejoin +currentdash exch aload length fg 5 sfl{1}{0}ifelse put pnsv pnsh +2t aload pop 3a aload pop mx2 aload pop mx1 aload pop mtx currentmatrix aload pop +mx3 aload pop ps pm restore/ps xdf mx3 astore pop}bdf +/bn{/pm save def mx3 setmatrix newpath 0 0 moveto ct dup 39 get 0 exch getinterval cvx exec mtx astore setmatrix mx1 astore pop mx2 astore pop 3a +astore pop 2t astore pop/pnsh xdf/pnsv xdf gw +/sfl fg 5 get 0 ne def array astore exch setdash setlinejoin setlinecap +setlinewidth 4colors{setcmykcolor}{setrgbcolor}ifelse moveto}bdf +/fc{save vmstatus exch sub 50000 lt +{(%%[|0|]%%)=print flush}if pop restore}bdf +/tc{32768 div add 3 1 roll 32768 div add 2t astore pop}bdf +/3a [0 0 0] def +/2t 2 array def +/tp{3a astore pop}bdf +/tt{mx2 currentmatrix pop currentpoint 2 copy 2t aload pop qa 2 copy translate 3a aload pop exch dup 0 eq +{pop}{1 eq{-1 1}{1 -1}ifelse scale}ifelse rotate pop neg exch neg exch translate moveto}bdf +/te{mx2 setmatrix}bdf +/th{3 -1 roll div 3 1 roll exch div 2 copy mx1 scale pop scale/sfl true def}bdf +/tu{1 1 mx1 itransform scale/sfl false def}bdf +/ts{1 1 mx1 transform scale/sfl true def}bdf +/fz{/ps xdf}bdf +/dv{dup 0 ne{div}{pop}ifelse}bdf +/pop4{pop pop pop pop}bdf +/it{sfl{mx1 itransform}if}bdf +/gm{exch it moveto}bdf/rm{it rmoveto}bdf +/lm{currentpoint sfl{mx1 transform}if exch pop sub 0 exch it rmoveto}bdf +/fm{statusdict/manualfeed known}bdf +/se{statusdict exch/manualfeed exch put}bdf +/mf{dup/ma exch def 0 gt{fm se/t1 5 st ok ma 1 gt and{/t2 0 st/t3 0 st +statusdict/manualfeedtimeout 3600 put +}if}if}bdf +/jn{/statusdict where exch pop{statusdict exch /jobname exch put}if}bdf +/pen{pnm mul/pnsh xdf pnm mul/pnsv xdf pnsh setlinewidth}bdf +/min{2 copy gt{exch}if pop}bdf +/max{2 copy lt{exch}if pop}bdf +/dh{fg 6 1 put array astore dup {1 pxs div mul exch}forall astore exch pop exch pop exch setdash}bdf +/ih[currentdash]def +/rh{fg 6 0 put ih aload pop setdash}bdf +/dl{gsave nlw pys div setlinewidth 0 setgray}bdf +/dlin{exch currentpoint currentlinewidth 2 div dup +translate newpath moveto lineto currentpoint stroke grestore moveto}bdf +/lin{fg 6 get 0 ne{exch lineto currentpoint 0 doop moveto} +{exch currentpoint/pnlv xdf/pnlh xdf gsave newpath/@1 xdf/@2 xdf fp{pnlh @2 lt{pnlv @1 ge +{pnlh pnlv moveto @2 @1 lineto pnsh 0 rlineto +0 pnsv rlineto pnlh pnsh add pnlv pnsv add lineto pnsh neg 0 rlineto} +{pnlh pnlv moveto pnsh 0 rlineto @2 pnsh add @1 lineto 0 pnsv rlineto +pnsh neg 0 rlineto pnlh pnlv pnsv add lineto}ifelse}{pnlv @1 gt +{@2 @1 moveto pnsh 0 rlineto pnlh pnsh add pnlv lineto 0 pnsv rlineto +pnsh neg 0 rlineto @2 @1 pnsv add lineto}{pnlh pnlv moveto pnsh 0 rlineto +0 pnsv rlineto @2 pnsh add @1 pnsv add lineto pnsh neg 0 rlineto +0 pnsv neg rlineto}ifelse}ifelse +closepath fill}if @2 @1 grestore moveto}ifelse}bdf +/gw{/pnm fg 3 get fg 4 get div def}bdf +/lw{fg exch 4 exch put fg exch 3 exch put gw pnsv pnsh pen}bdf +/barc{/@1 xdf/@2 xdf/@3 xdf/@4 xdf/@5 xdf +/@6 xdf/@7 xdf/@8 xdf gsave +@5 @7 add 2 div @6 @8 add 2 div translate newpath 0 0 moveto +@5 @7 sub @6 @8 sub mtx currentmatrix pop scale @1{newpath}if +0 0 0.5 @4 @3 arc @4 @3 sub abs 360 ge{closepath}if +mtx setmatrix @2 doop grestore}bdf +/ar{dup 0 eq barc}bdf +/ov{0 exch 360 exch true barc}bdf +/rc{/@t xdf currentpoint 6 2 roll newpath 4 copy 4 2 roll exch moveto +6 -1 roll lineto lineto lineto closepath @t doop moveto}bdf +/mup{dup pnsh 2 div le exch pnsv 2 div le or}bdf +/rr{/@1 xdf 2. div/@2 xdf 2. div/@3 xdf +/@4 xdf/@5 xdf/@6 xdf/@7 xdf +@7 @5 eq @6 @4 eq @2 mup or or{@7 @6 @5 @4 @1 rc} +{@4 @6 sub 2. div dup @2 lt{/@2 xdf}{pop}ifelse +@5 @7 sub 2. div dup @2 lt{/@2 xdf}{pop}ifelse +@1 0 eq{/@2 @2 pnsh 2 div 2 copy gt{sub def}{0 pop4}ifelse}if +currentpoint newpath +@4 @6 add 2. div @7 moveto +@4 @7 @4 @5 @2 arcto pop4 +@4 @5 @6 @5 @2 arcto pop4 +@6 @5 @6 @7 @2 arcto pop4 +@6 @7 @4 @7 @2 arcto pop4 +closepath @1 doop moveto}ifelse}bdf +/pr{gsave newpath/pl{exch moveto/pl{exch lineto}def}def}bdf +/pl{exch lineto}bdf +/ep{dup 0 eq{{moveto}{exch lin}{}{(%%[|1|]%%)= flush}pathforall +pop grestore}{doop grestore}ifelse currentpoint newpath moveto}bdf +/gr{64. div setgray}bdf +/savescreen{ns not{/ns true def systemdict/currentcolorscreen known{currentcolorscreen/pkspf xdf/pkrot xdf/pkfreq xdf/pyspf xdf/pyrot xdf/pyfreq xdf/pmspf xdf/pmrot xdf/pmfreq xdf +/pcspf xdf/pcrot xdf/pcfreq xdf}{currentscreen/sspf xdf/srot xdf/sfreq xdf}ifelse}if}bdf +/restorescreen{/ns false def systemdict/setcolorscreen known{pcfreq pcrot/pcspf load pmfreq pmrot/pmspf load pyfreq pyrot/pyspf load +pkfreq pkrot/pkspf load setcolorscreen}{sfreq srot/sspf load setscreen}ifelse}bdf +/pat{savescreen sa8 +copy pop 9.375 pa por not{90 add}if{1 add 4 mul cvi sa8 exch get exch 1 add 4 mul cvi 7 sub bitshift 1 and}setscreen exch not{gr}{pop}ifelse}bdf +/sg{restorescreen gr}bdf +/cpat{savescreen 10 2 roll 7 -1 roll sa8 copy pop 9.375 pa por not{90 add}if{1 add 4 mul cvi sa8 exch get exch 1 add 4 mul cvi 7 sub bitshift 1 and}8 -1 roll sb8 copy pop 9.375 pa por not{90 add}if{1 add 4 mul cvi sb8 +exch get exch 1 add 4 mul cvi 7 sub bitshift 1 and}9 -1 roll sc8 copy pop 9.375 pa por not{90 add}if{1 add 4 mul cvi sc8 exch get exch 1 add 4 mul cvi 7 sub bitshift 1 and}10 -1 roll sd8 copy pop 9.375 pa por not{90 add}if{1 add 4 mul cvi sd8 +exch get exch 1 add 4 mul cvi 7 sub bitshift 1 and}psuedo1 dsc 4{4 -1 roll 1 exch 64 div sub}repeat setcmykcolor pop pop}bdf +systemdict/setcolorscreen known{/psuedo1 lnop bdf/dsc/setcolorscreen load def}{/psuedo1{16{pop}repeat sa8 copy pop 9.375 pa por not{90 add}if{1 add 4 mul cvi sa8 exch get exch 1 add 4 mul cvi 7 sub bitshift 1 and}}bdf +/bwsc{setscreen dup gr 0 exch 0 exch 64 exch 64 exch 64 exch}bdf/dsc/bwsc load def +}ifelse +systemdict/setcmykcolor known not{/setcmykcolor{1 sub 4 1 roll 3{3 index add neg dup 0 lt{pop 0}if 3 1 roll}repeat setrgbcolor pop}bdf}if +/dc{transform round .5 sub exch round .5 sub exch itransform}bdf +/sn{userdict/smooth4 known}bdf +/x8{3 bitshift}bdf +/x4{2 bitshift}bdf +/d4{-2 bitshift}bdf +/d8{-3 bitshift}bdf +/rb{15 add -4 bitshift 1 bitshift}bdf +/db{/@7 save def/@1 xdf/@2 xdf/@3 xdf/@4 xdf/@5 xdf/@6 @5 @3 4 add mul def +dc translate scale/xdbit 1 1 idtransform abs/ydbit exch def abs def{0 0 1 ydbit add 1 10 rc clip}if +@1 0 eq @1 4 eq or{currentrgbcolor 1 setgray ydbit 0 1 ydbit add 1 2 rc setrgbcolor}if +@1 3 eq @1 7 eq or{1 setgray}{currentrgbcolor 2 index eq exch 2 index eq and exch pop{0 setgray}if}ifelse/@9 @1 0 eq @1 1 eq @1 3 eq or or dbinvertflag xor def/@13 @6 def +@2 fBitStretch or{/@10 @4 x4 def/@11 @3 x4 def/@12 @10 rb def/@13 @12 @11 mul def/@15 1 1 dtransform abs/calcY 1 index def round cvi/@14 exch def +abs/calcX 1 index def round cvi scaleby96 not{1 add}if def/@16 @15 rb def/@17 @16 @14 mul def}if +sn @13 60000 lt and @2 fBitStretch or and{mtx currentmatrix dup 1 get exch 2 get 0. eq exch 0. eq and @17 60000 lt and fBitStretch and{@16 3 bitshift @14 @9 [calcX 0 0 calcY 0 0]{@17 string @13 string +currentfile @6 string readhexstring pop 1 index @4 @3 @5 @12 @2 smooth4 +@10 @11 @12 dup string 5 index @15 @14 @16 dup string stretch}imagemask}{@12 x8 @11 @9 [@10 0 0 @11 0 0]{@13 string +currentfile @6 string readhexstring pop 1 index @4 @3 @5 @12 @2 smooth4}imagemask}ifelse}{@5 3 bitshift @3 4 add @9 [@4 0 0 @3 0 2]{currentfile @6 string readhexstring pop}imagemask}ifelse +@7 restore}bdf +systemdict/setcmykcolor known{/psuedo lnop bdf/di/colorimage load def}{/routines[{.3 mul add 1}bind{.59 mul add 2}bind{.11 mul add round cvi str exch i exch put/i i 1 add def 0 0}bind]def +/psuedo{/i 0 def 0 exch 0 exch{exch routines exch get exec}forall pop pop str}bdf/bwi{pop pop image}bdf/di/bwi load def}ifelse +/cdb{/@7 save def/@1 xdf/@2 xdf/@3 xdf/@4 xdf/@5 xdf +systemdict/setcmykcolor known not{dc}if translate scale /@6 xdf +/@18 @5 dup 60000 ge{pop 60000}if string def @6 not{/str @18 0 @18 length 3 idiv getinterval def}if @4 @3 8 [@4 0 0 @3 0 0]@6{{currentfile @18 readhexstring pop}image}{{currentfile @18 readhexstring pop psuedo}false 3 di}ifelse @7 restore}bdf +/wd 16 dict def +/mfont 14 dict def +/mdf{mfont wcheck not{/mfont 14 dict def}if mfont begin xdf end}bdf +/cf{{1 index/FID ne{def}{pop pop}ifelse}forall}bdf/rf{/@1 exch def/@2 exch def +FontDirectory @2 known{cleartomark pop}{findfont dup begin dup length @1 add dict begin +cf{/Encoding macvec def}{Encoding dup length array copy/Encoding exch def +counttomark 2 idiv{Encoding 3 1 roll put}repeat}ifelse +pop +exec currentdict end end @2 exch definefont pop}ifelse}bdf +/bmbc{exch begin wd begin +/cr xdf +save +CharTable cr 6 mul 6 getinterval{}forall +/bitheight xdf/bitwidth xdf +.96 div/width xdf +Gkernmax add/XOffset xdf Gdescent add/YOffset xdf/rowbytes xdf +rowbytes 255 eq{0 0 0 0 0 0 setcachedevice} +{Gnormsize dup scale +width 0 XOffset YOffset bitwidth XOffset add bitheight YOffset add +setcachedevice +rowbytes 0 ne{ +XOffset YOffset translate newpath 0 0 moveto +bitwidth bitheight scale +sn{ +/xSmt bitwidth x4 def +/ySmt bitheight x4 def +/rSmt xSmt rb def +rSmt x8 ySmt true +[xSmt 0 0 ySmt neg 0 ySmt] +{rSmt ySmt mul string CharData cr get +1 index bitwidth bitheight rowbytes rSmt tso smooth4} +}{rowbytes 3 bitshift bitheight 4 add true +[bitwidth 0 0 bitheight neg 0 bitheight 2 add] +{CharData cr get} +}ifelse +imagemask +}if +}ifelse +restore +end end +}bdf +/bb{.96 exch div/Gnormsize mdf 2 index +/Gkernmax mdf 1 index/Gdescent mdf +3 index div 4 1 roll +2 index div 1. 5 2 roll +exch div 4 1 roll +4 array astore/FontBBox mdf +}bdf +/cdf{mfont/CharData get 3 1 roll put}bdf +/bf{ +mfont begin +/FontType 3 def +/FontMatrix [1 0 0 1 0 0] def +/Encoding macvec def +/MFontType 0 def +/BuildChar/bmbc load def +end +mfont definefont pop +}bdf +/wi LW 1 eq{{gsave 0 0 0 0 0 0 0 0 moveto lineto lineto lineto closepath clip stringwidth grestore}bind}{/stringwidth load}ifelse def +/aps{0 get 124 eq}bdf +/xc{s75 cvs dup}bdf +/xp{put cvn}bdf +/scs{xc 3 67 put dup 0 95 xp}bdf +/sos{xc 3 79 xp}bdf +/sbs{xc 1 66 xp}bdf +/sis{xc 2 73 xp}bdf +/sob{xc 2 79 xp}bdf +/sss{xc 4 83 xp}bdf +/dd{exch 1 index add 3 1 roll add exch}bdf +/smc{moveto dup show}bdf +/ndf2{udf{dup /FontType get 0 eq{/FDepVector get{dup /FontType get 0 eq{ndf2}{dup /df2 known{begin df2 0 null put end +}{pop}ifelse}ifelse}forall}{/df2 known{dup begin df2 0 null put end}if}ifelse}{pop}ifelse}bdf +/kwn{FontDirectory 1 index known{findfont dup ndf2 exch pop}}bdf +/gl{1 currentgray sub setgray}bdf +/newmm{dup /FontType get 0 eq{dup maxlength dict begin{1 index/FID ne 2 index/UniqueID ne and{def}{pop pop}ifelse}forall currentdict end +dup /FDepVector 2 copy get[exch 6 index exch 6 index exch{newmm 3 1 roll}forall pop pop] put dup +}{/mfont 10 dict def mfont begin/FontMatrix [1 0 0 1 0 0] def +/FontType 3 def/Encoding macvec def/df 1 index def/df2 1 array def/FontBBox [0 0 1 1] def/StyleCode 2 index def +/mbc{bcarray StyleCode get}def/BuildChar{exch begin wd begin/cr exch def/cs s1 dup 0 cr put def df /MFontType known not{ +df2 0 get null eq{df dup length 2 add dict begin{1 index/FID ne 2 index/UniqueID ne and{def}{pop pop}ifelse}forall +/StrokeWidth nlw 1000 mul pys div ps div dup 12 lt{pop 12}if def/PaintType 2 def currentdict end +/q exch definefont df2 exch 0 exch put}if}if mbc exec end end}def end mfont}ifelse +3 index exch definefont exch pop}bdf +/mb{dup sbs kwn{0 2 index findfont newmm exch pop exch pop exch pop}ifelse sfd}bdf +/mo{dup sos kwn{2 2 index findfont newmm exch pop exch pop exch pop}ifelse sfd}bdf +/ms{dup sss kwn{4 2 index findfont newmm exch pop exch pop exch pop}ifelse sfd}bdf +/ou{dup sos kwn{mfont/df2 known{mfont begin df2 0 null put end}if 3 2 index findfont newmm exch pop exch pop exch pop}ifelse sfd}bdf +/su{dup sss kwn{mfont/df2 known{mfont begin df2 0 null put end}if 5 2 index findfont newmm exch pop exch pop exch pop}ifelse sfd}bdf +/ao{/fmv true def ou}bdf/as{/fmv true def su}bdf +/vo{/fmv false def ou}bdf/vs{/fmv false def su}bdf +/c{currentrgbcolor dup 4 1 roll eq 3 1 roll eq and/gray xdf}bdf +/bcarray[{/da .03 def df setfont gsave cs wi 1 index 0 ne{exch da add exch}if grestore setcharwidth +cs 0 0 smc da 0 smc da da smc 0 da moveto show}bind dup{/da 1 ps div def df setfont gsave cs wi 1 index 0 ne{exch da add exch}if grestore setcharwidth +cs 0 0 smc da 0 smc da da smc 0 da smc c gray{gl}{1 setgray}ifelse da 2. div dup moveto show}bind +{df setfont gsave cs wi grestore setcharwidth c gray{gl}{currentrgbcolor 1 setgray}ifelse cs 0 0 smc df2 0 get setfont +gray{gl}{4 1 roll setrgbcolor}ifelse 0 0 moveto show}bind +{/da 1 ps div def/ds .05 def/da2 da 2. div def df setfont gsave cs wi 1 index 0 ne{exch ds add da2 add exch}if grestore setcharwidth +cs ds da2 add .01 add 0 smc 0 ds da2 sub translate 0 0 smc da 0 smc da da smc 0 da smc c gray{gl}{1 setgray}ifelse da 2. div dup moveto show}bind +{/da .05 def df setfont gsave cs wi 1 index 0 ne{exch da add exch}if grestore setcharwidth c cs da .01 add 0 smc 0 da translate +gray{gl}{currentrgbcolor 1 setgray 4 -1 roll}ifelse 0 0 smc gray{gl}{4 1 roll setrgbcolor}ifelse df2 0 get setfont 0 0 moveto show}bind]def +/st{1000 mul usertime add dup 2147483647 gt{2147483647 sub}if def}bdf +/the{usertime sub dup 0 lt exch -2147483648 gt and}bdf +/6a 6 array def +/2a 2 array def +/3q 3 array def +/qs{3 -1 roll sub exch 3 -1 roll sub exch}bdf +/qa{3 -1 roll add exch 3 -1 roll add exch}bdf +/qm{3 -1 roll 1 index mul 3 1 roll mul}bdf +/qn{6a exch get mul}bdf +/qA .166667 def/qB .833333 def/qC .5 def +/qx{6a astore pop +qA 0 qn qB 2 qn add qA 1 qn qB 3 qn add +qB 2 qn qA 4 qn add qB 3 qn qA 5 qn add +qC 2 qn qC 4 qn add qC 3 qn qC 5 qn add}bdf +/qp{6 copy 12 -2 roll pop pop}bdf +/qc{exch qp qx curveto}bdf +/qi{{exch 4 copy 2a astore aload pop qa .5 qm newpath moveto}{exch 2 copy 6 -2 roll 2 qm qs 4 2 roll}ifelse}bdf +/qq{{qc 2a aload pop qx curveto}{exch 4 copy qs qa qx curveto}ifelse}bdf +/pt{currentpoint newpath moveto}bdf +/qf{/fillflag true def}bdf +/ec{dup 4 and 0 ne{closepath}if 1 and 0 ne{0 doop}if grestore currentpoint newpath moveto/fillflag false def}bdf +/eu{currentpoint fp{0 ep}{grestore newpath}ifelse moveto/fillflag false def}bdf +/bp{currentpoint newpath 2 copy moveto}bdf +/ef{gsave fillflag{gsave eofill grestore}if}bdf +/sm{0 exch{@1 eq{1 add}if}forall}bdf +/lshow{4 1 roll exch/@1 exch def{1 index wi pop sub 1 index sm dv 0 @1 4 -1 roll widthshow}{1 index wi pop sub +1 index dup sm 10 mul exch length 1 sub add dv dup 10. mul 0 @1 4 -1 roll 0 6 -1 roll awidthshow}ifelse}bdf +/setTxMode{sa 9 2 index put exch not{3 eq{1}{0}ifelse setgray}{pop}ifelse}bdf +/SwToSym{{}mark false/Symbol/|______Symbol 0 rf 0 sa 6 get 0 ne{pop 1}{sa 7 get 0 eq{pop 2}if}ifelse +sa 1 get 0 ne/|______Symbol +sa 4 get 0 ne{vs}{sa 3 get 0 ne{vo}{fnt}ifelse}ifelse}bdf +/mc{0 3 1 roll transform neg exch pop}bdf +/ul{dup 0 ne sa 2 get 0 ne and{gsave 0 0 +/UnderlinePosition kif{mc}{ps -10 div}ifelse/UnderlineThickness kif{mc}{ps 15 div}ifelse +abs setlinewidth neg rmoveto +sa 4 get 0 ne{gsave currentlinewidth 2. div dup rmoveto currentpoint newpath moveto +2 copy rlineto stroke grestore}if +sa 3 get sa 4 get or 0 ne{gsave currentrgbcolor dup 4 1 roll eq 3 1 roll eq and{gl}{1 setgray}ifelse 2 copy rlineto stroke grestore rlineto strokepath nlw pys div setlinewidth}{rlineto}ifelse +stroke grestore}{pop}ifelse}bdf +/sgt{2 copy known{get true}{pop pop false}ifelse}bdf +/kif{currentfont dup/FontMatrix get exch/FontInfo sgt{true}{currentfont/df sgt +{dup/FontInfo sgt{3 1 roll/FontMatrix get mtx concatmatrix exch true}{pop pop pop false} +ifelse}{pop pop false}ifelse}ifelse{3 -1 roll sgt{exch true}{pop false}ifelse}{false}ifelse}bdf +/blank/Times-Roman findfont/CharStrings get/space get def +/macvec 256 array def +/NUL/SOH/STX/ETX/EOT/ENQ/ACK/BEL/BS/HT/LF/VT/FF/CR/SO/SI +/DLE/DC1/DC2/DC3/DC4/NAK/SYN/ETB/CAN/EM/SUB/ESC/FS/GS/RS/US +macvec 0 32 getinterval astore pop +macvec 32/Times-Roman findfont/Encoding get +32 96 getinterval putinterval macvec dup 39/quotesingle put 96/grave put +/Adieresis/Aring/Ccedilla/Eacute/Ntilde/Odieresis/Udieresis/aacute +/agrave/acircumflex/adieresis/atilde/aring/ccedilla/eacute/egrave +/ecircumflex/edieresis/iacute/igrave/icircumflex/idieresis/ntilde/oacute +/ograve/ocircumflex/odieresis/otilde/uacute/ugrave/ucircumflex/udieresis +/dagger/degree/cent/sterling/section/bullet/paragraph/germandbls +/registered/copyright/trademark/acute/dieresis/notequal/AE/Oslash +/infinity/plusminus/lessequal/greaterequal/yen/mu/partialdiff/summation +/product/pi/integral/ordfeminine/ordmasculine/Omega/ae/oslash +/questiondown/exclamdown/logicalnot/radical/florin/approxequal/Delta/guillemotleft +/guillemotright/ellipsis/blank/Agrave/Atilde/Otilde/OE/oe +/endash/emdash/quotedblleft/quotedblright/quoteleft/quoteright/divide/lozenge +/ydieresis/Ydieresis/fraction/currency/guilsinglleft/guilsinglright/fi/fl +/daggerdbl/periodcentered/quotesinglbase/quotedblbase/perthousand/Acircumflex/Ecircumflex/Aacute +/Edieresis/Egrave/Iacute/Icircumflex/Idieresis/Igrave/Oacute/Ocircumflex +/apple/Ograve/Uacute/Ucircumflex/Ugrave/dotlessi/circumflex/tilde +/macron/breve/dotaccent/ring/cedilla/hungarumlaut/ogonek/caron +macvec 128 128 getinterval astore pop +{}mark true/Courier/|______Courier 0 rf +{/Metrics 21 dict begin/zero 600 def/one 600 def/two 600 def/three 600 def/four 600 def/five 600 def/six 600 def/seven 600 def/eight 600 def +/nine 600 def/comma 600 def/period 600 def/dollar 600 def/numbersign 600 def/percent 600 def/plus 600 def/hyphen 600 def/E 600 def/parenleft 600 def/parenright 600 def/space 600 def +currentdict end def currentdict/UniqueID known{/UniqueID 16#800000 def}if/FontBBox FontBBox 4 array astore def}mark true/Helvetica/|______Seattle 1 rf +/oldsettransfer/settransfer load def +/concatprocs{/proc2 exch cvlit def/proc1 exch cvlit def/newproc proc1 length proc2 length add array def +newproc 0 proc1 putinterval newproc proc1 length proc2 putinterval newproc cvx}def +/settransfer{currenttransfer concatprocs oldsettransfer}def +/PaintBlack{{1 exch sub}settransfer gsave newpath clippath 1 setgray fill grestore}def +/od{(Rvd\001\001\000\000\177) fg copy pop txpose +1 0 mtx defaultmatrix dtransform exch atan/pa exch def +newpath clippath mark +{transform{itransform moveto}}{transform{itransform lineto}} +{6 -2 roll transform 6 -2 roll transform 6 -2 roll transform +{itransform 6 2 roll itransform 6 2 roll itransform 6 2 roll curveto}} +{{closepath}}pathforall newpath counttomark array astore/gc xdf pop ct 39 0 put +10 fz 0 fs 2 F/|______Courier fnt invertflag{PaintBlack}if +statusdict/processcolors known{statusdict begin processcolors end dup 4 eq{/4colors true def pop}{3 eq{/3colors true def}{/2color true def}ifelse}ifelse}{/2colors true def}ifelse}bdf +/cd{}bdf +/op{/sfl false def systemdict/currentcolorscreen known{dcfreq dcrot/dcspf load dmfreq dmrot/dmspf load dyfreq dyrot/dyspf load +dkfreq dkrot/dkspf load setcolorscreen}{freq rot/spf load setscreen}ifelse savescreen +/ns false def/pm save def}bdf +/cp{not{userdict/#copies 0 put}if ma 0 gt{{t1 the{exit}if}loop}if{copypage}{showpage}ifelse pm restore}bdf +/px{0 3 1 roll tp tt}bdf +/psb{/us save def}bdf +/pse{us restore}bdf +/ct 40 string def +/nc{currentpoint initclip newpath gc{dup type dup/arraytype eq exch/packedarraytype eq or{exec}if} +forall clip newpath moveto}def +/kp{ct 0 2 index length 2 index 39 2 index put getinterval copy cvx exec mx3 currentmatrix pop}bdf +/av 70 def +end +LW 1 eq userdict/a4small known not and{/a4small +[[300 72 div 0 0 -300 72 div -120 3381] +280 3255 +{statusdict/jobstate (printing) put 0 setblink +margins +exch 196 add exch 304 add 8 div round cvi frametoroket +statusdict/jobstate (busy) put +1 setblink} +/framedevice load +60 45{dup mul exch dup mul add 1.0 exch sub}/setscreen load +{}/settransfer load/initgraphics load/erasepage load]cvx +statusdict begin bind end readonly def}if +md begin/bigs[lnop userdict/letter known{/letter load}{lnop}ifelse userdict/legal known{/legal load}{lnop}ifelse userdict/a4 known{/a4 load}{lnop}ifelse userdict/b5 known{/b5 load}{lnop}ifelse +lnop lnop lnop /tab load/a3Size load]def +/smalls[lnop userdict/lettersmall known{/lettersmall load}{userdict/note known{/note load}{lnop}ifelse}ifelse +userdict/legal known{/legal load}{lnop}ifelse userdict/a4small known{/a4small load}{lnop}ifelse +userdict/b5 known{/b5 load}{userdict/note known{/note load}{lnop}ifelse}ifelse lnop lnop lnop /tab load/a3Size load]def end +systemdict/currentpacking known{setpacking}if +/checkload{{currentfile eexec} {/junk save def/mystring 65000 string def +/endexec (e%endeexec) def{currentfile mystring readline not{stop}if endexec eq{exit}if}loop junk restore}ifelse}bind def +ok userdict/stretch known not and checkload +373A767D4B7FD94FE5903B7014B1B8D3BED02632C855D56F458B118ACF3AF73FC4EF5E81F5749042B5F9CF1016D093B75F250B7D8280B2EACE05A37037F7BDF6E12226D7D4E2DF2C52FAFD5FD40FE72A0D3AC4BD485D8369D4C87636E920D1DAF222D92155A9CB1667E715F0B82799B37CC8F5B32B74B39CF494536DC39C7EF04A7BCB29E2CEC79073CADCCFB23B4AA1363F876F5121B618071B7B4EB1E5DE75FAA2368A3E5DB2B198623AFE92AE9484270FE7F57A850E88C0D3EEA156611C91D8E480D4370B025CCA6929A2BF40AD3D01B2CB7EE6DFB46E12A830542337F7819B67F9765210F76DB06F34DA5B13A11759305C582E16D2B854939F6D9121F2A4F285282F5DCD3D15896D121E3D6F5BE79E087451BB0ED233CDBEF090D3B4AC2DC34B97E70C61D95FB072B8C12D2ABD843520949A39DCF99E2C1AA8FBCD025E47E0A82A8D96E75BAF40F52AD402495BBD4DE0F356C8B14E764874E639C9F045A0D1908EC6456EB6C5B8A6F826192F767EF2C55A21C58F5F9CC1F59247B55F2387828C7FE89D5E7D8484D1BC86CB6673BDBE4FE17DD9BDE95224FE645136F41330BF155A4DDE1B0A32233BF471CE58FBC660DC7E641B0A0D30018454E2191C414A3011FF3FED1C0D88FE1FF9F75DCC456D097947226FBEC92509146D3A4CFFC0471B31C53222ED9DD88566F60F6C0D705AD79DACF53B070026F083ED28B5CF757AAA0A169F6F320A75E9D2ED50ABD939AF85B6346C2ADB25D168F10508E1516D194C635E6B187FADEA0829DBF0390C0F003F0265E215BC96CA3CC13D4A8E01570BE193CA75A620728CD275ACF1986EFFB3A13419FE55EA7C4467B7E7EEDC1FC29C9F8C46A557D2CCDB914EF7B93E7530D555DFC2398AFC68CAD991F062EF85BAA1884EC166C7C5DF8543666D8C41BE267D706BD1588F1F662F705CAE4D29DC38EF66BFAA89470D8A099B6F1B4587F7B024412276106FCD3EB5AE17A5D1DF1781992DC40EA0A992F706F701304CEA9D9073E7A74F1E687D81C3E5841D31CF86855BAAAD9B5D30317C75150A857C6B114735315CDD1AEF36C26BBB0645499406DEE2F24B3B1C72FEC97C7BA31AA2CDAB25418BB1DC4C7E4757F1D625087B0FD0300C03A65F2A72CE734925735277E034CDCF599129679F70CC8B66E03878851DB75041F275E1E5761F3EC753BE1359CA364A22047AE4886217F9259FE19FF5B116E8019B98B143114B313E8BEF87EC949D85C82E0812E6F50525E73890AF362CC8EE8A85F4197E6AC18638EF12E56A808D439AF1BFD363F140314BF4E534485C42F1856688CC35288E8D770120A420FB9F1FCF8AE8BD6D6156CC23E6C51119FE4DE1B68C9DF3487E9974BF9ED31F8D3CE93FF101867319F2FF492D5D398B4F09A66F2F55BCAB34B99173B7EE89039D00DD21A7B3A52E9F028F8301B5FC12D409412E064513BC579AAC498F577EA8ECD1FE3E42DC3CC320786C7B00194FEDF344402C33FC492D4BA86992B01683F440220FFE756BC88A94223D316078D69D33560E8EAB76B24CB7AA4320CF435593D76F624324ABE00B5587A4F283C725EA24567133F25F472B5E2E4474DDB5A16AC5F2DF32350395D3E3892FE361F4D5C9A610C654C9227614FBBAFF3356A90A2266E00F66234061075491571A65616211257F160000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +cleartomark +e%endeexec + +ok userdict/smooth4 known not and checkload +F94E00EE41A71C59E5CAEED1EDBCF23D1DBA1EE99B9BB356492923BD8B1BA83A87CEB0E07377A31FD6241E814681118E17DC7CACE570399506E6E441B871B6043831BD03EFC11DBBD8001EE2FF8CFBD485065D455A2E15AC36F1A84AD8789FA6461199C7CD14CB9FD64D4B06452B7FC0A8FC263F70F1CCB893295D4DE70ADAB771C0F84396FA98C60B11DA02ABA157298DF0A23621853BEF167443A985ADC09BEFFD51CB4D29179E2B34609EF38A49DA61F4BFC256A3DE0732D7D29754A194857B9C9E9971227AA1DD0611FBB10E44E5FF66C062D9C24ED3290529330BC317825E876929582DB0E39B9FC5EFD20CC1D4F94920EB9C534D0DA90DE70D25BC7287319CF28602B3F46633C242CAFC8905E960317E3C2FA20AB8DB06ADBAF292FC7BA2CA14EE65DF28B99CC11666B70AD33E8E1D57D63D4B89ECC615AE5747C1CA752C833D8D6DE54CD4A0350B44310555CE3BD2C615ADD27B634CDB350AF3A432CE78AACD2909A5B586F666CD87919A36DB1CBE86B3CE281DFD01CD7E1B8A18A4B415CECBFF79A5C4390A15EA77D14D6BE12BAB5A8268C3F286D0590060647CABED674443CD258F11415E866AB330A251691B61F2422A61AFE59B6B4FBDCF85ED9BA0F8E483C034089E6877FF5923698D3A0DC0EED6B9CFD32DF0839BC4EA5F6D1FCB6DD0920391E57E84745131D02D100179F4E0A68EC0A5FF6680A6F463D038B04AF63FFA13D743B995A26A743C26D387209023C91DE43DF047A16F328AC9DDC08573B38BE9EA341EA16C78EC32F3A1B36B90D95A50610F4D050EC1C33497F3F3A81A1B4C8BEF0BA84EE2FAA32DC112DAC490AF53E1749C4A0D866CAF7B893E52383B0D38065C333FB122B700D7246F7EE87D942AE3DB5C1DD77E9E76C80CC5AD63D28DFED0E229CE604673F78CD47F258FDF5BF3A3EAEC5C9BC8E482D8DBA9D268A35DA8C095A690679ED2123E8B8F5E4826FA3B199EAA5D482D4B6AA86572E387CECEB7149C8947F41D6339328A748A17F8C4AD3B0555F1E409450BA0C564F1F488BB5096EB003568D4D5EF6489897E27409547D0EE4487D30184793B0F27BD265A64BDB3EA6761569DA955620C612E718677B77D6D81B999C6298877AFE0D1D6F6F358377A8BD2402F669C64B972B3A065EF7DD4BDEFFFE17E63DB8898FA6E69166B710AAD6BA2EA9AF61E4B8C8701638D4D6E4DFFFC192AEF6BC027095C4C72D748979675BA29FAF61E75343E14E61034602E5A79CD2519796ED6A9CC4EDEA46A9B59D4A807E786B5EE46F25B0360BC8E7C12D723122CDEEF247C9776F4C99C8EBED6828AA19744B5ADF0D07D95D98B3072372388D41B0FAB1CCE2775170679575ECDCA13B22A17FE9C6605C3445F58F1A829512DAB6C528F83580C8AA53C35D605F626F5AD0B7FC1EA87D69A835E3F53A1F450FB0AF42A5772F89D92A50D10F15BDBDA409F50C0B8AB93FE8A16D029DD8BB5C480D1466735ED4D9CAF637E5ECD6C2ECB6BF3B3EFBEE7AB936D2C568E3009D156B87CACB1FB3A48A70BC91B2EC35CC9147FFB1A524E2B2F2E4E2C1B12F1C1C63768BB95CD62FEC01CBA79B9FA282DD4DF49990F27FF8EE4E2DDE2F0ACD83BC9D4BE0090192C7A799967EC4DC2D63C0835E22D4C4B366D7FDCF3A05A4B53DF780F986EF25C79B665D5C00EFF7F17C0BB6D544F9D83A7FDAC47D9C5683A656011374253C918FF6EA64749DD971B2300DD5320033E01EC591F6318CCE94CE2B81C04322EC52B624E50643B52391CCD2AB56396A2AD8E2D3CA61B80D9D4CC363B2DF7863526958CDF3497E36648406C317E58EC563E7C26149A2A3C643ADFB39A8DD92974C6D2A2A9D7B71CDF3FEBBF32BB02E7B45CF53AAEAD5E963A4AA4AF9A149A08A4EC303D5F2369977E93F54897EEAD31B06C5845D63F49D65F8E5573962241A57CCD717CE6CA8C784A11192943616EA059B51BC38429E18D0121FCBB6FBD5D909B0D89E616C66DEF6A0F165A7030BD911A1B120468329CBB006C8D37720E531CF31E878CB4AAAC137633675C3D546F5162487AB35F470C042BDEB945E0F2532BF92AA6FD53434440221ECD3533A7AA89900CB19EFE2CD872DF8B7969AF0D3B72BF31DC5DD69CA6460966F61AB17CB507964098DBA3AF122EEC3128A9BAFE1034493F372B36BD1351205E9043A67C544402D8BCE24358C8A5CE33867A00794CF7097D59C88279A11EE9C854E7E7AAE881F9828C569D208F5F33375F59E9A3818CFA38AAD0CBFBA32F9F44A8BB79DE4C40E3886457C16DA4A27953AA1E99472E35F2323F0BAA5E37DC28CBA46FEFB73B190016055ADD4D27615D748499A0E1C4B8C7EC339C1C4D95A813A85918A8D01EEB485DDCDCEA6EA3F2C2A9D85C139CD90CCB352634F9AFE836BCAC0C274E352BA2071B5269D5DE4CCDE3FF990CBA974980C7332AE1545A9C60D5D1459D3AE95C1AC065733AF14FADB440A110DD539563B8D850CD0704C52F3F7CCCB53630D776560CBD22D8FF08F5B354487A171AEC15F5F54DE9CAB668BCAC573E788D92762EF63E76087005F4AC2D02E0CAC173C11BE62ACE5DC4D3374F2F9746C9981E125FF9AB8CAE76D13039E2C54DFD708E028A619EA1ED78E6B46F06DF0D0B74BBEDD8C190C7C0CEBDE8F7A4888CC36575313478DD2CFE392E9BB7B2416955D44B7024A3BA43FBF37293B386D64746D7748895411D243FAEC50638F2AA33337D7FA018ADDAC5835A0DDFAE99AD6299DFB4CA6872C59853E3AC12FC9E3D26629C5B49CF844C87B3C4BFBE3074E3A1CE6984758C20C661084381CD6B4582D84F19C0000B5FC0DCB42B567E396031601C095D7016283EBE5F13CD8A3A374A74DDBBABD36081149F8BC242085F2F7297CC97FD3B8BAD206D8AC9707A39ECCC7963B522E08DA391A1EF12DD4D746DBDDDCC0834F88160CF189A9645567CEC2F023A571AF0DFD15DB85B744C28C000DF53B05F8F210841F6E87A04F20C777B7C0BE6182BE2E90226E5301A12532A745F2FAAA81637CF11B78CD2B99A4D18B862D6C5DBD31793FB16A2D9AAD376D4484D75AA833D0068B1D34DB74E3302480854E3B5484D8A47E39A89A2FA927BC3641EA7F8E004FDE4C2F08D40D99F1ACB47CAF6887629BF6DFE12968D297596D28CE0CF148B12E7DCB49FB94F5ADBD214C3A6CE1E249831BA9EB8A189F2CE1ABE39A7B537253E369A508A2AF2ADB9463F9B56BBBFF31D535FF997F537C6675C196E7ECBD493F652FA7CC6D9C1CA3379BFDB5AF7513C6E834054494296B91A6EE800114363D5D5D0759F41B4DECB653B9DE3E94583579EF549ED5F3FAFB12661ABC0C57A332406517ED3454EDED34B386C60F78DC976266E0EAF54FC245FB0E3EFC8016236436B599C1C97A8C5E0AC8F7836161873C71F01ED9CC25C236420F41FD8277993D3959205912FA0927B59E3DAE7377D82079447D6E41EE5AEC0DFFF79AF8F4ED47F17EE708FEA45877860D56F8CBCE65A061E8E1CA4A5FBAF0E13429A7F0ADB6F178FA449F46CC539BBC0107E3A53B1C362A04B20E6D721E7E6E1E4976A11DDC98C7614D22B53DFBB6DAE533AC9BE882021A735C30DAA4A44AED09F49A390E8CFF59BD9C30667AF21B03EC5CEBD5C2C3AA2769E8D714191A48E7DDF50B13D1560E82EFB65FCE601AE9E8C351FBA1DED80B7351314E7F9F9A784BFE3759B7E322A84E7B51F9DC5F5D9C8050CD79B27C0A4B0DD68A3C27A948AD6858E35B960D2DEA838C479CAEA83B1A912174ACB2100E55E7A14892D7A9B3711FF0B20065C1995B49E1F23464A92DD140642E3A7B1973849E64D1A3CF60000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +cleartomark +e%endeexec +%% TJD hacks 6/91 to get lprep 70 and psfig to work with pageview: +md begin +/nc{currentpoint initclip newpath gc{dup type dup/arraytype eq exch/packedarraytype eq or{exec}if} +forall % clip +newpath moveto}def +end +%%EndProcSet diff --git a/Master/texmf-dist/source/generic/psfig/unsupported/macdemo/lprep70.procs b/Master/texmf-dist/source/generic/psfig/unsupported/macdemo/lprep70.procs new file mode 100644 index 00000000000..4ecbfc62ec9 --- /dev/null +++ b/Master/texmf-dist/source/generic/psfig/unsupported/macdemo/lprep70.procs @@ -0,0 +1,450 @@ +%%BeginProcSet: "(AppleDict md)" 70 0 +statusdict begin product(LaserWriter II NT)eq revision 1 eq and +{userdict begin/oldcds/cleardictstack load def/cleardictstack{31 sendpcmd 4 eq tonerlight/oldcds load exec}bind def +end +currentfile eexec +}{save currentfile 359 string readhexstring pop pop restore}ifelse +35de8eabfc7fa5eac0431edc501ad43f5fcbdf9fdd321cce93b525f4439dd94696bf56ac13a0a2aad1e6bcf444711e941d7217138d20ae0500145f815439cc14e697ad201df728ea4ccad4ac +331aa03a7aacde10760bf4ee12bbf73c77cdcbf1796f26f0dd255d2407e1ac41 +d27489a69d6b69c6a841468b46720b75ad65650700e0c528e7af61e7e3e821b59445c44b69831ebc9deaf0e3aecc14b7a1c2e18bc1fa42a59219f1e36f236e3d6c89114b1f231999c3dbce6b43f3e2918fcb85575941a9d1e65c86aa08e6eea86cc66ce90e5e4add57f2585e +7b1c0b5203cfc46868d6e3c0d66db79174e7091e32e307679732da062e440e41dabd36a161b611a7e4523a49694026206803dbfd5be5c5fe433f0f18a40057db6f1302848c8da4a10a7f14c6 +3d512806362b1be092ad5dbd36d75fe63e4cae2ba9b72390f580cac344a08bdf6eb9e36ec45bad2a0b82829a72e0efa2d87332c482196e690361168271c55053341ab3 +end +/sc {60 45 {abs exch abs 2 copy add 1 gt{1.0 sub dup mul exch 1.0 sub dup mul add 1.0 sub}{dup mul exch dup mul add 1.0 exch sub} +ifelse}setscreen} bind def statusdict begin product(LaserWriter II)anchorsearch end +{pop pop/letter [/letter load /exec load /sc load /exec load]cvx def/legal [/legal load /exec load /sc load /exec load]cvx def/a4 [/a4 load /exec load /sc load /exec load]cvx def/b5 [/b5 load /exec load /sc load /exec load]cvx def +/lettersmall [/lettersmall load /exec load /sc load /exec load]cvx def/a4small [/a4small load /exec load /sc load /exec load]cvx def/note [/note load /exec load /sc load /exec load]cvx def}{pop}ifelse +systemdict/currentpacking known{currentpacking true setpacking}if +/LW{save statusdict/product get(LaserWriter)anchorsearch +exch pop{length 0 eq{1}{2}ifelse}{0}ifelse exch restore}bind def +/LW+{LW 2 eq}bind def +/ok{systemdict/statusdict known dup{LW 0 gt and}if}bind def +ok{statusdict begin 9 sccinteractive 3 ne exch 0 ne or{9 0 3 setsccinteractive}if end}if +/md 270 dict def md begin +/av 0 def +/T true def/F false def/mtx matrix def/s75 75 string def/sa8 8 string def/sb8 8 string def +/sc8 8 string def/sd8 8 string def/s1 ( ) def/pxs 1 def/pys 1 def +/ns false def +1 0 mtx defaultmatrix dtransform exch atan/pa exch def/nlw .24 def/ppr [-32 -29.52 762 582.48] def +/pgr [0 0 0 0] def +/pgs 1 def/por true def/xb 500 array def/so true def/tso true def/fillflag false def/pnm 1 def/fmv true def +/sfl false def/ma 0 def/invertflag false def/dbinvertflag false def/xflip false def/yflip false def/noflips true def/scaleby96 false def/fNote true def/fBitStretch true def +/4colors false def/3colors false def/2colors false def +/wtkey false def +statusdict begin/waittimeout where{pop waittimeout 300 lt{md /wtkey true put}if}if end +wtkey{statusdict begin/setdefaulttimeouts where{pop 0 60 300 setdefaulttimeouts}if end}if +/fg (Rvd\001\001\000\000\177) def +/bdf{bind def}bind def +/xdf{exch def}bdf +/xl{neg exch neg translate}bdf +/fp{pnsh 0 ne pnsv 0 ne and}bdf +/nop{}bdf/lnop[/nop load]cvx bdf +/vrb[ +{fp{fg 6 get 0 ne{gsave stroke grestore}{gsave 1 setlinewidth pnsh pnsv scale stroke grestore}ifelse}if newpath}bind +/eofill load +dup +/newpath load +2 index +dup +{clip newpath}bind +{}bind +dup +2 copy +]def +systemdict/currentcolorscreen known{currentcolorscreen/dkspf xdf/dkrot xdf/dkfreq xdf/dyspf xdf/dyrot xdf/dyfreq xdf/dmspf xdf/dmrot xdf/dmfreq xdf +/dcspf xdf/dcrot xdf/dcfreq xdf}{currentscreen/spf xdf/rot xdf/freq xdf}ifelse +/doop{vrb exch get exec}bdf +/psu{/udf xdf/tso xdf /fNote xdf/fBitStretch xdf/scaleby96 xdf/yflip xdf/xflip xdf +/invertflag xdf/dbinvertflag invertflag statusdict begin version cvr 47.0 ge product (LaserWriter) eq not and end invertflag and {not}if def +xflip yflip or{/noflips false def}if +/pgs xdf 2 index .72 mul exch div/pys xdf div .72 mul/pxs xdf ppr astore pop pgr astore pop/por xdf sn and/so xdf}bdf +/tab{statusdict /11x17 known{statusdict begin /11x17 load end}{statusdict /setpage known{statusdict begin 792 1224 1 setpage end}{statusdict /setpageparams known{statusdict begin 792 1224 0 1 setpageparams end}if}ifelse}ifelse}bdf +/a3Size{statusdict /a3 known{statusdict begin /a3 load end}{statusdict /setpageparams known{statusdict begin 842 1191 0 1 setpageparams end}if}ifelse}bdf +/txpose{fNote{smalls}{bigs}ifelse pgs get exec pxs pys scale ppr aload pop por{noflips{pop exch neg exch translate pop 1 -1 scale}if +xflip yflip and{pop exch neg exch translate 180 rotate 1 -1 scale ppr 3 get ppr 1 get neg sub neg ppr 2 get ppr 0 get neg sub neg translate}if +xflip yflip not and{pop exch neg exch translate pop 180 rotate ppr 3 get ppr 1 get neg sub neg 0 translate}if yflip xflip not and{ppr 1 get neg ppr 0 get neg translate}if} +{noflips{translate pop pop 270 rotate 1 -1 scale}if xflip yflip and{translate pop pop 90 rotate 1 -1 scale ppr 3 get ppr 1 get neg sub neg ppr 2 get ppr 0 get neg sub neg translate}if +xflip yflip not and{translate pop pop 90 rotate ppr 3 get ppr 1 get neg sub neg 0 translate}if yflip xflip not and{translate pop pop 270 rotate ppr 2 get ppr 0 get neg sub neg 0 exch translate}if}ifelse +wtkey{statusdict/waittimeout 300 put}if +scaleby96{ppr aload pop 4 -1 roll add 2 div 3 1 roll add 2 div 2 copy translate .96 dup scale neg exch neg exch translate}if}bdf +/fr{4 copy pgr aload pop 3 -1 roll add 3 1 roll exch add 6 2 roll 3 -1 roll +sub 3 1 roll exch sub 3 -1 roll exch div 3 1 roll div exch scale pop pop xl}bdf +/obl{{0.212557 mul}{pop 0}ifelse}bdf +/sfd{ps fg 5 -1 roll get mul 100 div 0 ps 5 -1 roll obl ps neg 0 0 6a astore makefont setfont}bdf +/fnt{findfont sfd}bdf +/bt{sa 3 1 roll 3 index and put}bdf +/sa(\000\000\000\000\000\000\000\000\000\000)def +/fs{0 1 bt 1 2 bt 2 4 bt 3 8 bt 4 16 bt 5 32 bt 6 64 bt 7 128 bt sa exch 8 exch put}bdf +/mx1 matrix def +/mx2 matrix def +/mx3 matrix def +/bu{currentpoint 4colors{currentcmykcolor}{currentrgbcolor}ifelse currentlinewidth currentlinecap currentlinejoin +currentdash exch aload length fg 5 sfl{1}{0}ifelse put pnsv pnsh +2t aload pop 3a aload pop mx2 aload pop mx1 aload pop mtx currentmatrix aload pop +mx3 aload pop ps pm restore/ps xdf mx3 astore pop}bdf +/bn{/pm save def mx3 setmatrix newpath 0 0 moveto ct dup 39 get 0 exch getinterval cvx exec mtx astore setmatrix mx1 astore pop mx2 astore pop 3a +astore pop 2t astore pop/pnsh xdf/pnsv xdf gw +/sfl fg 5 get 0 ne def array astore exch setdash setlinejoin setlinecap +setlinewidth 4colors{setcmykcolor}{setrgbcolor}ifelse moveto}bdf +/fc{save vmstatus exch sub 50000 lt +{(%%[|0|]%%)=print flush}if pop restore}bdf +/tc{32768 div add 3 1 roll 32768 div add 2t astore pop}bdf +/3a [0 0 0] def +/2t 2 array def +/tp{3a astore pop}bdf +/tt{mx2 currentmatrix pop currentpoint 2 copy 2t aload pop qa 2 copy translate 3a aload pop exch dup 0 eq +{pop}{1 eq{-1 1}{1 -1}ifelse scale}ifelse rotate pop neg exch neg exch translate moveto}bdf +/te{mx2 setmatrix}bdf +/th{3 -1 roll div 3 1 roll exch div 2 copy mx1 scale pop scale/sfl true def}bdf +/tu{1 1 mx1 itransform scale/sfl false def}bdf +/ts{1 1 mx1 transform scale/sfl true def}bdf +/fz{/ps xdf}bdf +/dv{dup 0 ne{div}{pop}ifelse}bdf +/pop4{pop pop pop pop}bdf +/it{sfl{mx1 itransform}if}bdf +/gm{exch it moveto}bdf/rm{it rmoveto}bdf +/lm{currentpoint sfl{mx1 transform}if exch pop sub 0 exch it rmoveto}bdf +/fm{statusdict/manualfeed known}bdf +/se{statusdict exch/manualfeed exch put}bdf +/mf{dup/ma exch def 0 gt{fm se/t1 5 st ok ma 1 gt and{/t2 0 st/t3 0 st +statusdict/manualfeedtimeout 3600 put +}if}if}bdf +/jn{/statusdict where exch pop{statusdict exch /jobname exch put}if}bdf +/pen{pnm mul/pnsh xdf pnm mul/pnsv xdf pnsh setlinewidth}bdf +/min{2 copy gt{exch}if pop}bdf +/max{2 copy lt{exch}if pop}bdf +/dh{fg 6 1 put array astore dup {1 pxs div mul exch}forall astore exch pop exch pop exch setdash}bdf +/ih[currentdash]def +/rh{fg 6 0 put ih aload pop setdash}bdf +/dl{gsave nlw pys div setlinewidth 0 setgray}bdf +/dlin{exch currentpoint currentlinewidth 2 div dup +translate newpath moveto lineto currentpoint stroke grestore moveto}bdf +/lin{fg 6 get 0 ne{exch lineto currentpoint 0 doop moveto} +{exch currentpoint/pnlv xdf/pnlh xdf gsave newpath/@1 xdf/@2 xdf fp{pnlh @2 lt{pnlv @1 ge +{pnlh pnlv moveto @2 @1 lineto pnsh 0 rlineto +0 pnsv rlineto pnlh pnsh add pnlv pnsv add lineto pnsh neg 0 rlineto} +{pnlh pnlv moveto pnsh 0 rlineto @2 pnsh add @1 lineto 0 pnsv rlineto +pnsh neg 0 rlineto pnlh pnlv pnsv add lineto}ifelse}{pnlv @1 gt +{@2 @1 moveto pnsh 0 rlineto pnlh pnsh add pnlv lineto 0 pnsv rlineto +pnsh neg 0 rlineto @2 @1 pnsv add lineto}{pnlh pnlv moveto pnsh 0 rlineto +0 pnsv rlineto @2 pnsh add @1 pnsv add lineto pnsh neg 0 rlineto +0 pnsv neg rlineto}ifelse}ifelse +closepath fill}if @2 @1 grestore moveto}ifelse}bdf +/gw{/pnm fg 3 get fg 4 get div def}bdf +/lw{fg exch 4 exch put fg exch 3 exch put gw pnsv pnsh pen}bdf +/barc{/@1 xdf/@2 xdf/@3 xdf/@4 xdf/@5 xdf +/@6 xdf/@7 xdf/@8 xdf gsave +@5 @7 add 2 div @6 @8 add 2 div translate newpath 0 0 moveto +@5 @7 sub @6 @8 sub mtx currentmatrix pop scale @1{newpath}if +0 0 0.5 @4 @3 arc @4 @3 sub abs 360 ge{closepath}if +mtx setmatrix @2 doop grestore}bdf +/ar{dup 0 eq barc}bdf +/ov{0 exch 360 exch true barc}bdf +/rc{/@t xdf currentpoint 6 2 roll newpath 4 copy 4 2 roll exch moveto +6 -1 roll lineto lineto lineto closepath @t doop moveto}bdf +/mup{dup pnsh 2 div le exch pnsv 2 div le or}bdf +/rr{/@1 xdf 2. div/@2 xdf 2. div/@3 xdf +/@4 xdf/@5 xdf/@6 xdf/@7 xdf +@7 @5 eq @6 @4 eq @2 mup or or{@7 @6 @5 @4 @1 rc} +{@4 @6 sub 2. div dup @2 lt{/@2 xdf}{pop}ifelse +@5 @7 sub 2. div dup @2 lt{/@2 xdf}{pop}ifelse +@1 0 eq{/@2 @2 pnsh 2 div 2 copy gt{sub def}{0 pop4}ifelse}if +currentpoint newpath +@4 @6 add 2. div @7 moveto +@4 @7 @4 @5 @2 arcto pop4 +@4 @5 @6 @5 @2 arcto pop4 +@6 @5 @6 @7 @2 arcto pop4 +@6 @7 @4 @7 @2 arcto pop4 +closepath @1 doop moveto}ifelse}bdf +/pr{gsave newpath/pl{exch moveto/pl{exch lineto}def}def}bdf +/pl{exch lineto}bdf +/ep{dup 0 eq{{moveto}{exch lin}{}{(%%[|1|]%%)= flush}pathforall +pop grestore}{doop grestore}ifelse currentpoint newpath moveto}bdf +/gr{64. div setgray}bdf +/savescreen{ns not{/ns true def systemdict/currentcolorscreen known{currentcolorscreen/pkspf xdf/pkrot xdf/pkfreq xdf/pyspf xdf/pyrot xdf/pyfreq xdf/pmspf xdf/pmrot xdf/pmfreq xdf +/pcspf xdf/pcrot xdf/pcfreq xdf}{currentscreen/sspf xdf/srot xdf/sfreq xdf}ifelse}if}bdf +/restorescreen{/ns false def systemdict/setcolorscreen known{pcfreq pcrot/pcspf load pmfreq pmrot/pmspf load pyfreq pyrot/pyspf load +pkfreq pkrot/pkspf load setcolorscreen}{sfreq srot/sspf load setscreen}ifelse}bdf +/pat{savescreen sa8 +copy pop 9.375 pa por not{90 add}if{1 add 4 mul cvi sa8 exch get exch 1 add 4 mul cvi 7 sub bitshift 1 and}setscreen exch not{gr}{pop}ifelse}bdf +/sg{restorescreen gr}bdf +/cpat{savescreen 10 2 roll 7 -1 roll sa8 copy pop 9.375 pa por not{90 add}if{1 add 4 mul cvi sa8 exch get exch 1 add 4 mul cvi 7 sub bitshift 1 and}8 -1 roll sb8 copy pop 9.375 pa por not{90 add}if{1 add 4 mul cvi sb8 +exch get exch 1 add 4 mul cvi 7 sub bitshift 1 and}9 -1 roll sc8 copy pop 9.375 pa por not{90 add}if{1 add 4 mul cvi sc8 exch get exch 1 add 4 mul cvi 7 sub bitshift 1 and}10 -1 roll sd8 copy pop 9.375 pa por not{90 add}if{1 add 4 mul cvi sd8 +exch get exch 1 add 4 mul cvi 7 sub bitshift 1 and}psuedo1 dsc 4{4 -1 roll 1 exch 64 div sub}repeat setcmykcolor pop pop}bdf +systemdict/setcolorscreen known{/psuedo1 lnop bdf/dsc/setcolorscreen load def}{/psuedo1{16{pop}repeat sa8 copy pop 9.375 pa por not{90 add}if{1 add 4 mul cvi sa8 exch get exch 1 add 4 mul cvi 7 sub bitshift 1 and}}bdf +/bwsc{setscreen dup gr 0 exch 0 exch 64 exch 64 exch 64 exch}bdf/dsc/bwsc load def +}ifelse +systemdict/setcmykcolor known not{/setcmykcolor{1 sub 4 1 roll 3{3 index add neg dup 0 lt{pop 0}if 3 1 roll}repeat setrgbcolor pop}bdf}if +/dc{transform round .5 sub exch round .5 sub exch itransform}bdf +/sn{userdict/smooth4 known}bdf +/x8{3 bitshift}bdf +/x4{2 bitshift}bdf +/d4{-2 bitshift}bdf +/d8{-3 bitshift}bdf +/rb{15 add -4 bitshift 1 bitshift}bdf +/db{/@7 save def/@1 xdf/@2 xdf/@3 xdf/@4 xdf/@5 xdf/@6 @5 @3 4 add mul def +dc translate scale/xdbit 1 1 idtransform abs/ydbit exch def abs def{0 0 1 ydbit add 1 10 rc clip}if +@1 0 eq @1 4 eq or{currentrgbcolor 1 setgray ydbit 0 1 ydbit add 1 2 rc setrgbcolor}if +@1 3 eq @1 7 eq or{1 setgray}{currentrgbcolor 2 index eq exch 2 index eq and exch pop{0 setgray}if}ifelse/@9 @1 0 eq @1 1 eq @1 3 eq or or dbinvertflag xor def/@13 @6 def +@2 fBitStretch or{/@10 @4 x4 def/@11 @3 x4 def/@12 @10 rb def/@13 @12 @11 mul def/@15 1 1 dtransform abs/calcY 1 index def round cvi/@14 exch def +abs/calcX 1 index def round cvi scaleby96 not{1 add}if def/@16 @15 rb def/@17 @16 @14 mul def}if +sn @13 60000 lt and @2 fBitStretch or and{mtx currentmatrix dup 1 get exch 2 get 0. eq exch 0. eq and @17 60000 lt and fBitStretch and{@16 3 bitshift @14 @9 [calcX 0 0 calcY 0 0]{@17 string @13 string +currentfile @6 string readhexstring pop 1 index @4 @3 @5 @12 @2 smooth4 +@10 @11 @12 dup string 5 index @15 @14 @16 dup string stretch}imagemask}{@12 x8 @11 @9 [@10 0 0 @11 0 0]{@13 string +currentfile @6 string readhexstring pop 1 index @4 @3 @5 @12 @2 smooth4}imagemask}ifelse}{@5 3 bitshift @3 4 add @9 [@4 0 0 @3 0 2]{currentfile @6 string readhexstring pop}imagemask}ifelse +@7 restore}bdf +systemdict/setcmykcolor known{/psuedo lnop bdf/di/colorimage load def}{/routines[{.3 mul add 1}bind{.59 mul add 2}bind{.11 mul add round cvi str exch i exch put/i i 1 add def 0 0}bind]def +/psuedo{/i 0 def 0 exch 0 exch{exch routines exch get exec}forall pop pop str}bdf/bwi{pop pop image}bdf/di/bwi load def}ifelse +/cdb{/@7 save def/@1 xdf/@2 xdf/@3 xdf/@4 xdf/@5 xdf +systemdict/setcmykcolor known not{dc}if translate scale /@6 xdf +/@18 @5 dup 60000 ge{pop 60000}if string def @6 not{/str @18 0 @18 length 3 idiv getinterval def}if @4 @3 8 [@4 0 0 @3 0 0]@6{{currentfile @18 readhexstring pop}image}{{currentfile @18 readhexstring pop psuedo}false 3 di}ifelse @7 restore}bdf +/wd 16 dict def +/mfont 14 dict def +/mdf{mfont wcheck not{/mfont 14 dict def}if mfont begin xdf end}bdf +/cf{{1 index/FID ne{def}{pop pop}ifelse}forall}bdf/rf{/@1 exch def/@2 exch def +FontDirectory @2 known{cleartomark pop}{findfont dup begin dup length @1 add dict begin +cf{/Encoding macvec def}{Encoding dup length array copy/Encoding exch def +counttomark 2 idiv{Encoding 3 1 roll put}repeat}ifelse +pop +exec currentdict end end @2 exch definefont pop}ifelse}bdf +/bmbc{exch begin wd begin +/cr xdf +save +CharTable cr 6 mul 6 getinterval{}forall +/bitheight xdf/bitwidth xdf +.96 div/width xdf +Gkernmax add/XOffset xdf Gdescent add/YOffset xdf/rowbytes xdf +rowbytes 255 eq{0 0 0 0 0 0 setcachedevice} +{Gnormsize dup scale +width 0 XOffset YOffset bitwidth XOffset add bitheight YOffset add +setcachedevice +rowbytes 0 ne{ +XOffset YOffset translate newpath 0 0 moveto +bitwidth bitheight scale +sn{ +/xSmt bitwidth x4 def +/ySmt bitheight x4 def +/rSmt xSmt rb def +rSmt x8 ySmt true +[xSmt 0 0 ySmt neg 0 ySmt] +{rSmt ySmt mul string CharData cr get +1 index bitwidth bitheight rowbytes rSmt tso smooth4} +}{rowbytes 3 bitshift bitheight 4 add true +[bitwidth 0 0 bitheight neg 0 bitheight 2 add] +{CharData cr get} +}ifelse +imagemask +}if +}ifelse +restore +end end +}bdf +/bb{.96 exch div/Gnormsize mdf 2 index +/Gkernmax mdf 1 index/Gdescent mdf +3 index div 4 1 roll +2 index div 1. 5 2 roll +exch div 4 1 roll +4 array astore/FontBBox mdf +}bdf +/cdf{mfont/CharData get 3 1 roll put}bdf +/bf{ +mfont begin +/FontType 3 def +/FontMatrix [1 0 0 1 0 0] def +/Encoding macvec def +/MFontType 0 def +/BuildChar/bmbc load def +end +mfont definefont pop +}bdf +/wi LW 1 eq{{gsave 0 0 0 0 0 0 0 0 moveto lineto lineto lineto closepath clip stringwidth grestore}bind}{/stringwidth load}ifelse def +/aps{0 get 124 eq}bdf +/xc{s75 cvs dup}bdf +/xp{put cvn}bdf +/scs{xc 3 67 put dup 0 95 xp}bdf +/sos{xc 3 79 xp}bdf +/sbs{xc 1 66 xp}bdf +/sis{xc 2 73 xp}bdf +/sob{xc 2 79 xp}bdf +/sss{xc 4 83 xp}bdf +/dd{exch 1 index add 3 1 roll add exch}bdf +/smc{moveto dup show}bdf +/ndf2{udf{dup /FontType get 0 eq{/FDepVector get{dup /FontType get 0 eq{ndf2}{dup /df2 known{begin df2 0 null put end +}{pop}ifelse}ifelse}forall}{/df2 known{dup begin df2 0 null put end}if}ifelse}{pop}ifelse}bdf +/kwn{FontDirectory 1 index known{findfont dup ndf2 exch pop}}bdf +/gl{1 currentgray sub setgray}bdf +/newmm{dup /FontType get 0 eq{dup maxlength dict begin{1 index/FID ne 2 index/UniqueID ne and{def}{pop pop}ifelse}forall currentdict end +dup /FDepVector 2 copy get[exch 6 index exch 6 index exch{newmm 3 1 roll}forall pop pop] put dup +}{/mfont 10 dict def mfont begin/FontMatrix [1 0 0 1 0 0] def +/FontType 3 def/Encoding macvec def/df 1 index def/df2 1 array def/FontBBox [0 0 1 1] def/StyleCode 2 index def +/mbc{bcarray StyleCode get}def/BuildChar{exch begin wd begin/cr exch def/cs s1 dup 0 cr put def df /MFontType known not{ +df2 0 get null eq{df dup length 2 add dict begin{1 index/FID ne 2 index/UniqueID ne and{def}{pop pop}ifelse}forall +/StrokeWidth nlw 1000 mul pys div ps div dup 12 lt{pop 12}if def/PaintType 2 def currentdict end +/q exch definefont df2 exch 0 exch put}if}if mbc exec end end}def end mfont}ifelse +3 index exch definefont exch pop}bdf +/mb{dup sbs kwn{0 2 index findfont newmm exch pop exch pop exch pop}ifelse sfd}bdf +/mo{dup sos kwn{2 2 index findfont newmm exch pop exch pop exch pop}ifelse sfd}bdf +/ms{dup sss kwn{4 2 index findfont newmm exch pop exch pop exch pop}ifelse sfd}bdf +/ou{dup sos kwn{mfont/df2 known{mfont begin df2 0 null put end}if 3 2 index findfont newmm exch pop exch pop exch pop}ifelse sfd}bdf +/su{dup sss kwn{mfont/df2 known{mfont begin df2 0 null put end}if 5 2 index findfont newmm exch pop exch pop exch pop}ifelse sfd}bdf +/ao{/fmv true def ou}bdf/as{/fmv true def su}bdf +/vo{/fmv false def ou}bdf/vs{/fmv false def su}bdf +/c{currentrgbcolor dup 4 1 roll eq 3 1 roll eq and/gray xdf}bdf +/bcarray[{/da .03 def df setfont gsave cs wi 1 index 0 ne{exch da add exch}if grestore setcharwidth +cs 0 0 smc da 0 smc da da smc 0 da moveto show}bind dup{/da 1 ps div def df setfont gsave cs wi 1 index 0 ne{exch da add exch}if grestore setcharwidth +cs 0 0 smc da 0 smc da da smc 0 da smc c gray{gl}{1 setgray}ifelse da 2. div dup moveto show}bind +{df setfont gsave cs wi grestore setcharwidth c gray{gl}{currentrgbcolor 1 setgray}ifelse cs 0 0 smc df2 0 get setfont +gray{gl}{4 1 roll setrgbcolor}ifelse 0 0 moveto show}bind +{/da 1 ps div def/ds .05 def/da2 da 2. div def df setfont gsave cs wi 1 index 0 ne{exch ds add da2 add exch}if grestore setcharwidth +cs ds da2 add .01 add 0 smc 0 ds da2 sub translate 0 0 smc da 0 smc da da smc 0 da smc c gray{gl}{1 setgray}ifelse da 2. div dup moveto show}bind +{/da .05 def df setfont gsave cs wi 1 index 0 ne{exch da add exch}if grestore setcharwidth c cs da .01 add 0 smc 0 da translate +gray{gl}{currentrgbcolor 1 setgray 4 -1 roll}ifelse 0 0 smc gray{gl}{4 1 roll setrgbcolor}ifelse df2 0 get setfont 0 0 moveto show}bind]def +/st{1000 mul usertime add dup 2147483647 gt{2147483647 sub}if def}bdf +/the{usertime sub dup 0 lt exch -2147483648 gt and}bdf +/6a 6 array def +/2a 2 array def +/3q 3 array def +/qs{3 -1 roll sub exch 3 -1 roll sub exch}bdf +/qa{3 -1 roll add exch 3 -1 roll add exch}bdf +/qm{3 -1 roll 1 index mul 3 1 roll mul}bdf +/qn{6a exch get mul}bdf +/qA .166667 def/qB .833333 def/qC .5 def +/qx{6a astore pop +qA 0 qn qB 2 qn add qA 1 qn qB 3 qn add +qB 2 qn qA 4 qn add qB 3 qn qA 5 qn add +qC 2 qn qC 4 qn add qC 3 qn qC 5 qn add}bdf +/qp{6 copy 12 -2 roll pop pop}bdf +/qc{exch qp qx curveto}bdf +/qi{{exch 4 copy 2a astore aload pop qa .5 qm newpath moveto}{exch 2 copy 6 -2 roll 2 qm qs 4 2 roll}ifelse}bdf +/qq{{qc 2a aload pop qx curveto}{exch 4 copy qs qa qx curveto}ifelse}bdf +/pt{currentpoint newpath moveto}bdf +/qf{/fillflag true def}bdf +/ec{dup 4 and 0 ne{closepath}if 1 and 0 ne{0 doop}if grestore currentpoint newpath moveto/fillflag false def}bdf +/eu{currentpoint fp{0 ep}{grestore newpath}ifelse moveto/fillflag false def}bdf +/bp{currentpoint newpath 2 copy moveto}bdf +/ef{gsave fillflag{gsave eofill grestore}if}bdf +/sm{0 exch{@1 eq{1 add}if}forall}bdf +/lshow{4 1 roll exch/@1 exch def{1 index wi pop sub 1 index sm dv 0 @1 4 -1 roll widthshow}{1 index wi pop sub +1 index dup sm 10 mul exch length 1 sub add dv dup 10. mul 0 @1 4 -1 roll 0 6 -1 roll awidthshow}ifelse}bdf +/setTxMode{sa 9 2 index put exch not{3 eq{1}{0}ifelse setgray}{pop}ifelse}bdf +/SwToSym{{}mark false/Symbol/|______Symbol 0 rf 0 sa 6 get 0 ne{pop 1}{sa 7 get 0 eq{pop 2}if}ifelse +sa 1 get 0 ne/|______Symbol +sa 4 get 0 ne{vs}{sa 3 get 0 ne{vo}{fnt}ifelse}ifelse}bdf +/mc{0 3 1 roll transform neg exch pop}bdf +/ul{dup 0 ne sa 2 get 0 ne and{gsave 0 0 +/UnderlinePosition kif{mc}{ps -10 div}ifelse/UnderlineThickness kif{mc}{ps 15 div}ifelse +abs setlinewidth neg rmoveto +sa 4 get 0 ne{gsave currentlinewidth 2. div dup rmoveto currentpoint newpath moveto +2 copy rlineto stroke grestore}if +sa 3 get sa 4 get or 0 ne{gsave currentrgbcolor dup 4 1 roll eq 3 1 roll eq and{gl}{1 setgray}ifelse 2 copy rlineto stroke grestore rlineto strokepath nlw pys div setlinewidth}{rlineto}ifelse +stroke grestore}{pop}ifelse}bdf +/sgt{2 copy known{get true}{pop pop false}ifelse}bdf +/kif{currentfont dup/FontMatrix get exch/FontInfo sgt{true}{currentfont/df sgt +{dup/FontInfo sgt{3 1 roll/FontMatrix get mtx concatmatrix exch true}{pop pop pop false} +ifelse}{pop pop false}ifelse}ifelse{3 -1 roll sgt{exch true}{pop false}ifelse}{false}ifelse}bdf +/blank/Times-Roman findfont/CharStrings get/space get def +/macvec 256 array def +/NUL/SOH/STX/ETX/EOT/ENQ/ACK/BEL/BS/HT/LF/VT/FF/CR/SO/SI +/DLE/DC1/DC2/DC3/DC4/NAK/SYN/ETB/CAN/EM/SUB/ESC/FS/GS/RS/US +macvec 0 32 getinterval astore pop +macvec 32/Times-Roman findfont/Encoding get +32 96 getinterval putinterval macvec dup 39/quotesingle put 96/grave put +/Adieresis/Aring/Ccedilla/Eacute/Ntilde/Odieresis/Udieresis/aacute +/agrave/acircumflex/adieresis/atilde/aring/ccedilla/eacute/egrave +/ecircumflex/edieresis/iacute/igrave/icircumflex/idieresis/ntilde/oacute +/ograve/ocircumflex/odieresis/otilde/uacute/ugrave/ucircumflex/udieresis +/dagger/degree/cent/sterling/section/bullet/paragraph/germandbls +/registered/copyright/trademark/acute/dieresis/notequal/AE/Oslash +/infinity/plusminus/lessequal/greaterequal/yen/mu/partialdiff/summation +/product/pi/integral/ordfeminine/ordmasculine/Omega/ae/oslash +/questiondown/exclamdown/logicalnot/radical/florin/approxequal/Delta/guillemotleft +/guillemotright/ellipsis/blank/Agrave/Atilde/Otilde/OE/oe +/endash/emdash/quotedblleft/quotedblright/quoteleft/quoteright/divide/lozenge +/ydieresis/Ydieresis/fraction/currency/guilsinglleft/guilsinglright/fi/fl +/daggerdbl/periodcentered/quotesinglbase/quotedblbase/perthousand/Acircumflex/Ecircumflex/Aacute +/Edieresis/Egrave/Iacute/Icircumflex/Idieresis/Igrave/Oacute/Ocircumflex +/apple/Ograve/Uacute/Ucircumflex/Ugrave/dotlessi/circumflex/tilde +/macron/breve/dotaccent/ring/cedilla/hungarumlaut/ogonek/caron +macvec 128 128 getinterval astore pop +{}mark true/Courier/|______Courier 0 rf +{/Metrics 21 dict begin/zero 600 def/one 600 def/two 600 def/three 600 def/four 600 def/five 600 def/six 600 def/seven 600 def/eight 600 def +/nine 600 def/comma 600 def/period 600 def/dollar 600 def/numbersign 600 def/percent 600 def/plus 600 def/hyphen 600 def/E 600 def/parenleft 600 def/parenright 600 def/space 600 def +currentdict end def currentdict/UniqueID known{/UniqueID 16#800000 def}if/FontBBox FontBBox 4 array astore def}mark true/Helvetica/|______Seattle 1 rf +/oldsettransfer/settransfer load def +/concatprocs{/proc2 exch cvlit def/proc1 exch cvlit def/newproc proc1 length proc2 length add array def +newproc 0 proc1 putinterval newproc proc1 length proc2 putinterval newproc cvx}def +/settransfer{currenttransfer concatprocs oldsettransfer}def +/PaintBlack{{1 exch sub}settransfer gsave newpath clippath 1 setgray fill grestore}def +/od{(Rvd\001\001\000\000\177) fg copy pop txpose +1 0 mtx defaultmatrix dtransform exch atan/pa exch def +newpath clippath mark +{transform{itransform moveto}}{transform{itransform lineto}} +{6 -2 roll transform 6 -2 roll transform 6 -2 roll transform +{itransform 6 2 roll itransform 6 2 roll itransform 6 2 roll curveto}} +{{closepath}}pathforall newpath counttomark array astore/gc xdf pop ct 39 0 put +10 fz 0 fs 2 F/|______Courier fnt invertflag{PaintBlack}if +statusdict/processcolors known{statusdict begin processcolors end dup 4 eq{/4colors true def pop}{3 eq{/3colors true def}{/2color true def}ifelse}ifelse}{/2colors true def}ifelse}bdf +/cd{}bdf +/op{/sfl false def systemdict/currentcolorscreen known{dcfreq dcrot/dcspf load dmfreq dmrot/dmspf load dyfreq dyrot/dyspf load +dkfreq dkrot/dkspf load setcolorscreen}{freq rot/spf load setscreen}ifelse savescreen +/ns false def/pm save def}bdf +/cp{not{userdict/#copies 0 put}if ma 0 gt{{t1 the{exit}if}loop}if{copypage}{showpage}ifelse pm restore}bdf +/px{0 3 1 roll tp tt}bdf +/psb{/us save def}bdf +/pse{us restore}bdf +/ct 40 string def +/nc{currentpoint initclip newpath gc{dup type dup/arraytype eq exch/packedarraytype eq or{exec}if} +forall clip newpath moveto}def +/kp{ct 0 2 index length 2 index 39 2 index put getinterval copy cvx exec mx3 currentmatrix pop}bdf +/av 70 def +end +LW 1 eq userdict/a4small known not and{/a4small +[[300 72 div 0 0 -300 72 div -120 3381] +280 3255 +{statusdict/jobstate (printing) put 0 setblink +margins +exch 196 add exch 304 add 8 div round cvi frametoroket +statusdict/jobstate (busy) put +1 setblink} +/framedevice load +60 45{dup mul exch dup mul add 1.0 exch sub}/setscreen load +{}/settransfer load/initgraphics load/erasepage load]cvx +statusdict begin bind end readonly def}if +md begin/bigs[lnop userdict/letter known{/letter load}{lnop}ifelse userdict/legal known{/legal load}{lnop}ifelse userdict/a4 known{/a4 load}{lnop}ifelse userdict/b5 known{/b5 load}{lnop}ifelse +lnop lnop lnop /tab load/a3Size load]def +/smalls[lnop userdict/lettersmall known{/lettersmall load}{userdict/note known{/note load}{lnop}ifelse}ifelse +userdict/legal known{/legal load}{lnop}ifelse userdict/a4small known{/a4small load}{lnop}ifelse +userdict/b5 known{/b5 load}{userdict/note known{/note load}{lnop}ifelse}ifelse lnop lnop lnop /tab load/a3Size load]def end +systemdict/currentpacking known{setpacking}if +/checkload{{currentfile eexec} {/junk save def/mystring 65000 string def +/endexec (e%endeexec) def{currentfile mystring readline not{stop}if endexec eq{exit}if}loop junk restore}ifelse}bind def +ok userdict/stretch known not and checkload +373A767D4B7FD94FE5903B7014B1B8D3BED02632C855D56F458B118ACF3AF73FC4EF5E81F5749042B5F9CF1016D093B75F250B7D8280B2EACE05A37037F7BDF6E12226D7D4E2DF2C52FAFD5FD40FE72A0D3AC4BD485D8369D4C87636E920D1DAF222D92155A9CB1667E715F0B82799B37CC8F5B32B74B39CF494536DC39C7EF04A7BCB29E2CEC79073CADCCFB23B4AA1363F876F5121B618071B7B4EB1E5DE75FAA2368A3E5DB2B198623AFE92AE9484270FE7F57A850E88C0D3EEA156611C91D8E480D4370B025CCA6929A2BF40AD3D01B2CB7EE6DFB46E12A830542337F7819B67F9765210F76DB06F34DA5B13A11759305C582E16D2B854939F6D9121F2A4F285282F5DCD3D15896D121E3D6F5BE79E087451BB0ED233CDBEF090D3B4AC2DC34B97E70C61D95FB072B8C12D2ABD843520949A39DCF99E2C1AA8FBCD025E47E0A82A8D96E75BAF40F52AD402495BBD4DE0F356C8B14E764874E639C9F045A0D1908EC6456EB6C5B8A6F826192F767EF2C55A21C58F5F9CC1F59247B55F2387828C7FE89D5E7D8484D1BC86CB6673BDBE4FE17DD9BDE95224FE645136F41330BF155A4DDE1B0A32233BF471CE58FBC660DC7E641B0A0D30018454E2191C414A3011FF3FED1C0D88FE1FF9F75DCC456D097947226FBEC92509146D3A4CFFC0471B31C53222ED9DD88566F60F6C0D705AD79DACF53B070026F083ED28B5CF757AAA0A169F6F320A75E9D2ED50ABD939AF85B6346C2ADB25D168F10508E1516D194C635E6B187FADEA0829DBF0390C0F003F0265E215BC96CA3CC13D4A8E01570BE193CA75A620728CD275ACF1986EFFB3A13419FE55EA7C4467B7E7EEDC1FC29C9F8C46A557D2CCDB914EF7B93E7530D555DFC2398AFC68CAD991F062EF85BAA1884EC166C7C5DF8543666D8C41BE267D706BD1588F1F662F705CAE4D29DC38EF66BFAA89470D8A099B6F1B4587F7B024412276106FCD3EB5AE17A5D1DF1781992DC40EA0A992F706F701304CEA9D9073E7A74F1E687D81C3E5841D31CF86855BAAAD9B5D30317C75150A857C6B114735315CDD1AEF36C26BBB0645499406DEE2F24B3B1C72FEC97C7BA31AA2CDAB25418BB1DC4C7E4757F1D625087B0FD0300C03A65F2A72CE734925735277E034CDCF599129679F70CC8B66E03878851DB75041F275E1E5761F3EC753BE1359CA364A22047AE4886217F9259FE19FF5B116E8019B98B143114B313E8BEF87EC949D85C82E0812E6F50525E73890AF362CC8EE8A85F4197E6AC18638EF12E56A808D439AF1BFD363F140314BF4E534485C42F1856688CC35288E8D770120A420FB9F1FCF8AE8BD6D6156CC23E6C51119FE4DE1B68C9DF3487E9974BF9ED31F8D3CE93FF101867319F2FF492D5D398B4F09A66F2F55BCAB34B99173B7EE89039D00DD21A7B3A52E9F028F8301B5FC12D409412E064513BC579AAC498F577EA8ECD1FE3E42DC3CC320786C7B00194FEDF344402C33FC492D4BA86992B01683F440220FFE756BC88A94223D316078D69D33560E8EAB76B24CB7AA4320CF435593D76F624324ABE00B5587A4F283C725EA24567133F25F472B5E2E4474DDB5A16AC5F2DF32350395D3E3892FE361F4D5C9A610C654C9227614FBBAFF3356A90A2266E00F66234061075491571A65616211257F160000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +cleartomark +e%endeexec + +ok userdict/smooth4 known not and checkload +F94E00EE41A71C59E5CAEED1EDBCF23D1DBA1EE99B9BB356492923BD8B1BA83A87CEB0E07377A31FD6241E814681118E17DC7CACE570399506E6E441B871B6043831BD03EFC11DBBD8001EE2FF8CFBD485065D455A2E15AC36F1A84AD8789FA6461199C7CD14CB9FD64D4B06452B7FC0A8FC263F70F1CCB893295D4DE70ADAB771C0F84396FA98C60B11DA02ABA157298DF0A23621853BEF167443A985ADC09BEFFD51CB4D29179E2B34609EF38A49DA61F4BFC256A3DE0732D7D29754A194857B9C9E9971227AA1DD0611FBB10E44E5FF66C062D9C24ED3290529330BC317825E876929582DB0E39B9FC5EFD20CC1D4F94920EB9C534D0DA90DE70D25BC7287319CF28602B3F46633C242CAFC8905E960317E3C2FA20AB8DB06ADBAF292FC7BA2CA14EE65DF28B99CC11666B70AD33E8E1D57D63D4B89ECC615AE5747C1CA752C833D8D6DE54CD4A0350B44310555CE3BD2C615ADD27B634CDB350AF3A432CE78AACD2909A5B586F666CD87919A36DB1CBE86B3CE281DFD01CD7E1B8A18A4B415CECBFF79A5C4390A15EA77D14D6BE12BAB5A8268C3F286D0590060647CABED674443CD258F11415E866AB330A251691B61F2422A61AFE59B6B4FBDCF85ED9BA0F8E483C034089E6877FF5923698D3A0DC0EED6B9CFD32DF0839BC4EA5F6D1FCB6DD0920391E57E84745131D02D100179F4E0A68EC0A5FF6680A6F463D038B04AF63FFA13D743B995A26A743C26D387209023C91DE43DF047A16F328AC9DDC08573B38BE9EA341EA16C78EC32F3A1B36B90D95A50610F4D050EC1C33497F3F3A81A1B4C8BEF0BA84EE2FAA32DC112DAC490AF53E1749C4A0D866CAF7B893E52383B0D38065C333FB122B700D7246F7EE87D942AE3DB5C1DD77E9E76C80CC5AD63D28DFED0E229CE604673F78CD47F258FDF5BF3A3EAEC5C9BC8E482D8DBA9D268A35DA8C095A690679ED2123E8B8F5E4826FA3B199EAA5D482D4B6AA86572E387CECEB7149C8947F41D6339328A748A17F8C4AD3B0555F1E409450BA0C564F1F488BB5096EB003568D4D5EF6489897E27409547D0EE4487D30184793B0F27BD265A64BDB3EA6761569DA955620C612E718677B77D6D81B999C6298877AFE0D1D6F6F358377A8BD2402F669C64B972B3A065EF7DD4BDEFFFE17E63DB8898FA6E69166B710AAD6BA2EA9AF61E4B8C8701638D4D6E4DFFFC192AEF6BC027095C4C72D748979675BA29FAF61E75343E14E61034602E5A79CD2519796ED6A9CC4EDEA46A9B59D4A807E786B5EE46F25B0360BC8E7C12D723122CDEEF247C9776F4C99C8EBED6828AA19744B5ADF0D07D95D98B3072372388D41B0FAB1CCE2775170679575ECDCA13B22A17FE9C6605C3445F58F1A829512DAB6C528F83580C8AA53C35D605F626F5AD0B7FC1EA87D69A835E3F53A1F450FB0AF42A5772F89D92A50D10F15BDBDA409F50C0B8AB93FE8A16D029DD8BB5C480D1466735ED4D9CAF637E5ECD6C2ECB6BF3B3EFBEE7AB936D2C568E3009D156B87CACB1FB3A48A70BC91B2EC35CC9147FFB1A524E2B2F2E4E2C1B12F1C1C63768BB95CD62FEC01CBA79B9FA282DD4DF49990F27FF8EE4E2DDE2F0ACD83BC9D4BE0090192C7A799967EC4DC2D63C0835E22D4C4B366D7FDCF3A05A4B53DF780F986EF25C79B665D5C00EFF7F17C0BB6D544F9D83A7FDAC47D9C5683A656011374253C918FF6EA64749DD971B2300DD5320033E01EC591F6318CCE94CE2B81C04322EC52B624E50643B52391CCD2AB56396A2AD8E2D3CA61B80D9D4CC363B2DF7863526958CDF3497E36648406C317E58EC563E7C26149A2A3C643ADFB39A8DD92974C6D2A2A9D7B71CDF3FEBBF32BB02E7B45CF53AAEAD5E963A4AA4AF9A149A08A4EC303D5F2369977E93F54897EEAD31B06C5845D63F49D65F8E5573962241A57CCD717CE6CA8C784A11192943616EA059B51BC38429E18D0121FCBB6FBD5D909B0D89E616C66DEF6A0F165A7030BD911A1B120468329CBB006C8D37720E531CF31E878CB4AAAC137633675C3D546F5162487AB35F470C042BDEB945E0F2532BF92AA6FD53434440221ECD3533A7AA89900CB19EFE2CD872DF8B7969AF0D3B72BF31DC5DD69CA6460966F61AB17CB507964098DBA3AF122EEC3128A9BAFE1034493F372B36BD1351205E9043A67C544402D8BCE24358C8A5CE33867A00794CF7097D59C88279A11EE9C854E7E7AAE881F9828C569D208F5F33375F59E9A3818CFA38AAD0CBFBA32F9F44A8BB79DE4C40E3886457C16DA4A27953AA1E99472E35F2323F0BAA5E37DC28CBA46FEFB73B190016055ADD4D27615D748499A0E1C4B8C7EC339C1C4D95A813A85918A8D01EEB485DDCDCEA6EA3F2C2A9D85C139CD90CCB352634F9AFE836BCAC0C274E352BA2071B5269D5DE4CCDE3FF990CBA974980C7332AE1545A9C60D5D1459D3AE95C1AC065733AF14FADB440A110DD539563B8D850CD0704C52F3F7CCCB53630D776560CBD22D8FF08F5B354487A171AEC15F5F54DE9CAB668BCAC573E788D92762EF63E76087005F4AC2D02E0CAC173C11BE62ACE5DC4D3374F2F9746C9981E125FF9AB8CAE76D13039E2C54DFD708E028A619EA1ED78E6B46F06DF0D0B74BBEDD8C190C7C0CEBDE8F7A4888CC36575313478DD2CFE392E9BB7B2416955D44B7024A3BA43FBF37293B386D64746D7748895411D243FAEC50638F2AA33337D7FA018ADDAC5835A0DDFAE99AD6299DFB4CA6872C59853E3AC12FC9E3D26629C5B49CF844C87B3C4BFBE3074E3A1CE6984758C20C661084381CD6B4582D84F19C0000B5FC0DCB42B567E396031601C095D7016283EBE5F13CD8A3A374A74DDBBABD36081149F8BC242085F2F7297CC97FD3B8BAD206D8AC9707A39ECCC7963B522E08DA391A1EF12DD4D746DBDDDCC0834F88160CF189A9645567CEC2F023A571AF0DFD15DB85B744C28C000DF53B05F8F210841F6E87A04F20C777B7C0BE6182BE2E90226E5301A12532A745F2FAAA81637CF11B78CD2B99A4D18B862D6C5DBD31793FB16A2D9AAD376D4484D75AA833D0068B1D34DB74E3302480854E3B5484D8A47E39A89A2FA927BC3641EA7F8E004FDE4C2F08D40D99F1ACB47CAF6887629BF6DFE12968D297596D28CE0CF148B12E7DCB49FB94F5ADBD214C3A6CE1E249831BA9EB8A189F2CE1ABE39A7B537253E369A508A2AF2ADB9463F9B56BBBFF31D535FF997F537C6675C196E7ECBD493F652FA7CC6D9C1CA3379BFDB5AF7513C6E834054494296B91A6EE800114363D5D5D0759F41B4DECB653B9DE3E94583579EF549ED5F3FAFB12661ABC0C57A332406517ED3454EDED34B386C60F78DC976266E0EAF54FC245FB0E3EFC8016236436B599C1C97A8C5E0AC8F7836161873C71F01ED9CC25C236420F41FD8277993D3959205912FA0927B59E3DAE7377D82079447D6E41EE5AEC0DFFF79AF8F4ED47F17EE708FEA45877860D56F8CBCE65A061E8E1CA4A5FBAF0E13429A7F0ADB6F178FA449F46CC539BBC0107E3A53B1C362A04B20E6D721E7E6E1E4976A11DDC98C7614D22B53DFBB6DAE533AC9BE882021A735C30DAA4A44AED09F49A390E8CFF59BD9C30667AF21B03EC5CEBD5C2C3AA2769E8D714191A48E7DDF50B13D1560E82EFB65FCE601AE9E8C351FBA1DED80B7351314E7F9F9A784BFE3759B7E322A84E7B51F9DC5F5D9C8050CD79B27C0A4B0DD68A3C27A948AD6858E35B960D2DEA838C479CAEA83B1A912174ACB2100E55E7A14892D7A9B3711FF0B20065C1995B49E1F23464A92DD140642E3A7B1973849E64D1A3CF60000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +cleartomark +e%endeexec +%% TJD hacks 6/91 to get lprep 70 and psfig to work with pageview: +md begin +/nc{currentpoint initclip newpath gc{dup type dup/arraytype eq exch/packedarraytype eq or{exec}if} +forall % clip +newpath moveto}def +end +%%EndProcSet diff --git a/Master/texmf-dist/source/generic/psfig/unsupported/macdemo/macdemo.tex b/Master/texmf-dist/source/generic/psfig/unsupported/macdemo/macdemo.tex new file mode 100644 index 00000000000..70fd42c7d3a --- /dev/null +++ b/Master/texmf-dist/source/generic/psfig/unsupported/macdemo/macdemo.tex @@ -0,0 +1,19 @@ +\documentstyle[psfig]{article} +\psfigurepath{macfigs:figs} +\special{header=lprep68.pro} +\begin{document} +This is a rosette and some MacDraw output: + +\centerline{\psfig{figure=rosette.ps,height=2in}\hspace{.25in} + \psfig{figure=macdraw.fig68,height=2in}} + +This is what hacking Mac Postscript is like: + +\centerline{\psfig{figure=bullet.fig68,height=2in}} + +And now a graph: + +\centerline{\psfig{figure=dave.fig68,height=2in,clip=}} + +Thats all folks. +\end{document} diff --git a/Master/texmf-dist/source/generic/psfig/unsupported/macdemo/macfigs/bullet.fig68.Z b/Master/texmf-dist/source/generic/psfig/unsupported/macdemo/macfigs/bullet.fig68.Z new file mode 100644 index 00000000000..d46556690b7 Binary files /dev/null and b/Master/texmf-dist/source/generic/psfig/unsupported/macdemo/macfigs/bullet.fig68.Z differ diff --git a/Master/texmf-dist/source/generic/psfig/unsupported/macdemo/macfigs/bullet.fig68.bb b/Master/texmf-dist/source/generic/psfig/unsupported/macdemo/macfigs/bullet.fig68.bb new file mode 100644 index 00000000000..e58060028b1 --- /dev/null +++ b/Master/texmf-dist/source/generic/psfig/unsupported/macdemo/macfigs/bullet.fig68.bb @@ -0,0 +1,2 @@ +%! +%%BoundingBox: 0 500 500 800 diff --git a/Master/texmf-dist/source/generic/psfig/unsupported/macdemo/macfigs/dave.fig68.Z b/Master/texmf-dist/source/generic/psfig/unsupported/macdemo/macfigs/dave.fig68.Z new file mode 100644 index 00000000000..4795f24ed05 Binary files /dev/null and b/Master/texmf-dist/source/generic/psfig/unsupported/macdemo/macfigs/dave.fig68.Z differ diff --git a/Master/texmf-dist/source/generic/psfig/unsupported/macdemo/macfigs/dave.fig68.bb b/Master/texmf-dist/source/generic/psfig/unsupported/macdemo/macfigs/dave.fig68.bb new file mode 100644 index 00000000000..c4708324c1b --- /dev/null +++ b/Master/texmf-dist/source/generic/psfig/unsupported/macdemo/macfigs/dave.fig68.bb @@ -0,0 +1,2 @@ +%! +%%BoundingBox: 80 280 460 600 diff --git a/Master/texmf-dist/source/generic/psfig/unsupported/macdemo/macfigs/macdraw.fig68.Z b/Master/texmf-dist/source/generic/psfig/unsupported/macdemo/macfigs/macdraw.fig68.Z new file mode 100644 index 00000000000..b3f34d5e809 --- /dev/null +++ b/Master/texmf-dist/source/generic/psfig/unsupported/macdemo/macfigs/macdraw.fig68.Z @@ -0,0 +1,4 @@ +%B@™Ò"™7bʴᆂ%¨¤¡Ã¦ŒUÜЙX‘ÌÃCä” C看MÂŒ!"'Ì1\äpQãcÈ‘߸!BÒ"ˆ+eȸ)3‡L˜<,@)#FN0ròÀL#Ž¡„9Cô"ŠžnȤø(äM°iÜœ)‹ç" 5`¼û‡ÜFL^¼ƒfb™1hÂÀ)Ãæc7cØÔ!SŠœ7c¦”¡sQŠ pàT$’f mÈ´0“æL‘)D€°„CˆEÂyÓ¦Ms>Æ&ãø ›7gÈ–9“–ä:¶5J¦SŽ‚Ð w£@×[̈BûÛ6¸×À!¦\7ʧ‡©´½‘ö×ダ3§Ž|ýLxˆƒc weiÄQP)¨AÝ[m˜¡ÀÁ–q&GÇrÍeµ•O?Àô so½…GaÜq7Ø‚®pF÷!–âw2ÌEÃ[6€ Ç)¬áœ åÍpƒŠ,r7ÇdTàÑ„e(𖹉QfŒ¡À}´ÕØð„Ù1YgahÉÇd–É%^n4F˜oÉá ÔÅÀ 7äwfè¡€“PJYÞ{/ŒY&™g¦ &”íIC5Ì0ƒ 5Âàºæ‚ V*) +S„цfe€ÒJ-½ÓL5€`pÔAG +.¥AhÌÆw(à¢g”æb«t(C ?ÊðãŠ{:g'8p÷^i;Cª9¼‡”ÍÂÔ(× +K,L7p×mµ0]Å­”1˜+ 3œëm±9üØm¶ÒànU­Í`ƒµè~ËnyÝÆ°- qÝ.4Ðà,·q(P†ƒo!‡° üÕâ/¢#\3®f#Ž:*™"²6Ø+±Ù “Ê1è‹°ªvˆ|r³4!\CÍ1$Œó´5¿õFÌ%«8±Àín—jºÜ)œª½?Ë +%% +%% February 25, 2002 +%% +%% This program 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. +%% +%% DESCRIPTION: +%% `pst-fr3d' is a PSTricks package to draw three dimensional grids +%% with various customizations. +%% +% \fi +% +% \DoNotIndex{\\,\^,\@} +% \DoNotIndex{\@ifnextchar,\@nameuse,\@nil,\@undefined} +% \DoNotIndex{\advance} +% \DoNotIndex{\begin} +% \DoNotIndex{\catcode,\CodelineIndex,\csname} +% \DoNotIndex{\def,\define@key,\definecolor,\divide,\DocInput} +% \DoNotIndex{\documentclass,\dp} +% \DoNotIndex{\edef,\else,\EnableCrossrefs,\end,\endcsname,\endinput} +% \DoNotIndex{\endpspicture} +% \DoNotIndex{\fi,\filedate,\fileversion} +% \DoNotIndex{\GetFileInfo} +% \DoNotIndex{\hbadness,\hbox,\hfuzz,\ht} +% \DoNotIndex{\ifdim,\ifx,\input} +% \DoNotIndex{\let} +% \DoNotIndex{\message} +% \DoNotIndex{\newhsbcolor,\newif} +% \DoNotIndex{\OnlyDescription} +% \DoNotIndex{\p@,\ProvidesPackage,\psframebox,\psframesep} +% \DoNotIndex{\psline,\pslinewidth,\pspolygon,\psset,\PstAtCode,\pst@boxg} +% \DoNotIndex{\pst@dima,\pst@dimb,\pst@dimc,\pst@dimd,\pst@dimh} +% \DoNotIndex{\pst@dimtonum,\pst@expandafter,\pst@getnumiii,\pst@hbox} +% \DoNotIndex{\pst@tempa,\pst@tempb,\pst@tempc,\pst@tempg,\pst@temph} +% \DoNotIndex{\pst@tempi,\PSTricksLoaded} +% \DoNotIndex{\RecordChanges,\relax} +% \DoNotIndex{\setbox,\setkeys,\space} +% \DoNotIndex{\the,\tw@} +% \DoNotIndex{\usepackage} +% \DoNotIndex{\wd} +% \DoNotIndex{\z@} +% +% \setcounter{IndexColumns}{2} +% +% \newcommand{\PstFrameBoxThreeDPackage}{`\textsf{pst-fr3d}'} +% \newcommand{\PstFrameBoxThreeDMacro}{\cs{PstFrameBoxThreeD}} +% \newcommand{\ColorPackage}{`\textsf{color}'} +% \newcommand{\PstColPackage}{`\textsf{pstricks}'} +% +% ^^A From ltugboat.cls +% +% ^^A Typeset the name of an environment +% \providecommand\env[1]{\textsf{#1}} +% \providecommand\clsname[1]{\textsf{#1}} +% \providecommand\pkgname[1]{\textsf{#1}} +% \providecommand\optname[1]{\textsf{#1}} +% \providecommand\progname[1]{\textsf{#1}} +% +% ^^A A list of options for a package/class +% \newenvironment{optlist}{\begin{description}% +% \renewcommand\makelabel[1]{% +% \descriptionlabel{\mdseries\optname{##1}}}% +% \itemsep0.25\itemsep}% +% {\end{description}} +% +% ^^A Utility macros +% +% +% ^^A Example macros - adapted from the `fvrb-ex' package +% ^^A --------------------------------------------------- +% +% ^^A Take care that we use here the four /?_W characters as escape +% ^^A characters, so we can't use these characters in the examples! +% +% \makeatletter +% +% ^^A To highlight some verbatim sequences (comments, macro names, etc.) +% \def\HLEmphasize#1{\textit{#1}} +% \newcommand{\BS}{\texttt{\symbol{`\\}}} +% \def\HLMacro#1{\BS{}def\HLMacro@i#1\@nil} +% \def\HLMacro@i#1def#2\@nil{\HLReverse{#2}} +% \def\HLReverse#1{{\setlength{\fboxsep}{1pt}\HLReverse@i{#1}}} +% \def\HLReverse@i#1{\colorbox{black}{\textcolor{white}{\textbf{#1}}}} +% +% \def\Example{\FV@Environment{}{Example}} +% \def\endExample{% +% \end{VerbatimOut} +% \Below@Example{\input{\jobname.tmp}} +% \endgroup} +% +% \def\CenterExample{\FV@Environment{}{Example}} +% \def\endCenterExample{% +% \end{VerbatimOut} +% \begin{center} +% \Below@Example{\input{\jobname.tmp}} +% \end{center} +% \endgroup} +% +% \def\SideBySideExample{\FV@Environment{}{Example}} +% \def\endSideBySideExample{% +% \end{VerbatimOut} +% \SideBySide@Example{\input{\jobname.tmp}} +% \endgroup} +% +% \def\FVB@Example{% +% \begingroup +% \FV@UseKeyValues +% \parindent=0pt +% \multiply\topsep by 2 +% \VerbatimEnvironment +% \begin{VerbatimOut}[gobble=4,codes={\catcode`\W=12}]{\jobname.tmp}} +% +% \def\Below@Example#1{% +% \VerbatimInput[gobble=0,commentchar=W,commandchars=/?_,frame=single, +% numbers=left,numbersep=3pt]{\jobname.tmp} +% \catcode`\%=14\relax +% \catcode`\W=9\relax +% ^^A We suppress the effect of the highlighting macros +% \catcode`/=0\relax +% \catcode`?=1\relax +% \catcode`_=2\relax +% \def\HLEmphasize##1{##1}% +% \def\HLMacro##1{##1}% +% \def\HLReverse##1{##1}% +% #1 +% \par} +% +% \def\SideBySide@Example#1{% +% \vskip 1mm +% \@tempdimb=\FV@XRightMargin +% \advance\@tempdimb -5mm +% \begin{minipage}[c]{\@tempdimb} +% \fvset{xrightmargin=0pt} +% \catcode`\%=14\relax +% \catcode`\W=9\relax +% ^^A We suppress the effect of the highlighting macros +% \catcode`/=0\relax +% \catcode`?=1\relax +% \catcode`_=2\relax +% \def\HLEmphasize##1{##1}% +% \def\HLMacro##1{##1}% +% \def\HLReverse##1{##1}% +% #1 +% \end{minipage}% +% \@tempdimb=\textwidth +% \advance\@tempdimb -\FV@XRightMargin +% \advance\@tempdimb 5mm +% \begin{minipage}[c]{\@tempdimb} +% \VerbatimInput[gobble=0,commentchar=W,commandchars=/?_, +% frame=single,numbers=left,numbersep=3pt, +% xleftmargin=5mm,xrightmargin=0pt]{\jobname.tmp} +% \end{minipage} +% \vskip 1mm} +% +% \makeatother +% +% ^^A End of example macros from `fvrb-ex' +% +% ^^A For the possible index and changes log +% \setlength{\columnseprule}{0.6pt} +% +% ^^A Beginning of the documentation itself +% +% \title{The \PstFrameBoxThreeDPackage{} package\\ +% A PSTricks package\\ +% for three dimensional framed boxes} +% \author{Denis \textsc{Girou}\thanks{CNRS/IDRIS --- +% Centre National de la Recherche Scientifique / +% Institut du D\'eveloppement et des Ressources en Informatique +% Scientifique --- Orsay --- France --- +% \mbox{\texttt{}}.}} +% \date{Version 1.0\\February 25, 2002\\ +% {\small Documentation revised February 25, 2002}} +% +% \maketitle +% +% \begin{abstract} +% This package allow to draw three dimensional framed boxes using the +% macro \PstFrameBoxThreeDMacro. This is specially useful to draw 3d-like +% buttons. +% \end{abstract} +% +% \tableofcontents +% +% \section{Introduction} +% +% \PstFrameBoxThreeDPackage{} offer a unique main macro with few parameters to +% interact on it. This is just a small extension of the \cs{psframebox} macro. +% +% All the relevant PSTricks parameters can be use with it, but the +% \texttt{linestyle}, \texttt{linecolor}, \texttt{doubleline} and +% \texttt{doublecolor} ones must not be used, as they would be overridden. +% Nevertheless, some usual parameters are not relevant for this kind of boxes +% and would produce ``strange'' results (for instance \texttt{border}, +% \texttt{linearc} and \texttt{shadow}). +% +% As usual, \LaTeX{} users are supposed to have loaded the \PstColPackage{} +% package before this one, to ensure the compatibility with the standard +% \ColorPackage{} \LaTeX{} package. +% +% The syntax of the macro is the same than the one for the other macros for +% framed boxes, so simply: +% +% \vspace{1mm} +% \noindent% +% \fbox{\PstFrameBoxThreeDMacro\texttt{[optional\_parameters]\{\emph{stuff}\}}} +% +% \vspace{1mm} +% We can put all the valid material inside such 3d boxes, including other +% framed boxes. +% +% Note also that, obviously, this documentation is very color oriented, and +% is done to be read on a screen or a colored paper. +% +% \section{Usage} +% +% \subsection{Default behavior} +% +% The default behavior is the following: +% +% \begin{CenterExample} +% \PstFrameBoxThreeD{Button}\hfill +% \PstFrameBoxThreeD{\shortstack{Yes!\\Yes!\\Yes!}}\hfill +% \PstFrameBoxThreeD{\Huge$\frac{1}{\sqrt{3}}$}% +% \end{CenterExample} +% +% Of course, we can use all the relevant generic PSTricks parameters for the +% framed boxes (but not those relative to \emph{double} lines), specially +% those applying to boxes: +% +% \begin{CenterExample} +% \PstFrameBoxThreeD[doublesep=0.1]{Button}\hfill +% \PstFrameBoxThreeD[doublesep=0.2]{Button}\hfill +% \PstFrameBoxThreeD[doublesep=0.5]{Button}% +% \end{CenterExample} +% +% Specially look at the behavior of the \texttt{framesep}, +% \texttt{doublesep} and \texttt{linewidth} parameters: +% +% \begin{CenterExample} +% \PstFrameBoxThreeD[framesep=0.3]{Button}\hfill +% \PstFrameBoxThreeD[doublesep=0.3]{Button}\hfill +% \PstFrameBoxThreeD[linewidth=0.3]{Button}\hfill +% \PstFrameBoxThreeD[doublesep=0.3,linewidth=0.3]{Button}\hfill +% \PstFrameBoxThreeD[framearc=0.5]{Button}% +% \end{CenterExample} +% +% \subsection{Parameters} +% +% To change the way the boxes are drawn, we can also use \textbf{four} +% specific parameters: +% +% \begin{optlist} +% \item [FrameBoxThreeDColorHSB (real real real)]: to define the colors +% used, in the HSB (\emph{hue}, \emph{saturation}, \emph{brightness}) model. +% This is a sequence of three real values, separated by spaces. This will +% define the color of the interior of the frame. And for the borders we will +% use it too, changing it brightness in light and dark. +% +% Note also that if the \emph{brightness} value is negative, no color +% will fill the interior of the box (this is useful if the general background +% is not white). +% (\emph{Default:~0~0~0.5} --- it must be three numbers between 0~and~1, but +% as explained the last one can be negative, which has a special meaning). +% \end{optlist} +% +% \begin{CenterExample} +% \psset{doublesep=0.1} +% \PstFrameBoxThreeD[/HLEmphasize?FrameBoxThreeDColorHSB_=/HLReverse?0.1 0.3 0.5_]{% +% Button}\hfill +% \PstFrameBoxThreeD[/HLEmphasize?FrameBoxThreeDColorHSB_=/HLReverse?0.6 0.3 0.5_]{% +% Button}\hfill +% \PstFrameBoxThreeD[/HLEmphasize?FrameBoxThreeDColorHSB_=/HLReverse?0.4 0.1 0.5_]{% +% \Huge$\frac{1}{\sqrt{3}}$}\hfill +% \PstFrameBoxThreeD[/HLEmphasize?FrameBoxThreeDColorHSB_=/HLReverse?0.9 0.5 0.5_]{% +% \psovalbox[fillstyle=solid,fillcolor=yellow]{Button}}\hfill +% \PstFrameBoxThreeD[/HLEmphasize?FrameBoxThreeDColorHSB_=/HLReverse?0.4 0.7 0.2_]{% +% \PstFrameBoxThreeD[/HLEmphasize?FrameBoxThreeDColorHSB_=/HLReverse?0.4 0.7 0.5_]{% +% \PstFrameBoxThreeD[/HLEmphasize?FrameBoxThreeDColorHSB_=/HLReverse?0.4 0.7 0.8_]{% +% Button}}}% +% \end{CenterExample} +% +% \begin{CenterExample} +% \psset{doublesep=0.2} +% \PstFrameBoxThreeD[/HLEmphasize?FrameBoxThreeDColorHSB_=/HLReverse?0 0 0.3_]{Button}\hfill +% \PstFrameBoxThreeD[/HLEmphasize?FrameBoxThreeDColorHSB_=/HLReverse?0 0 0.7_]{Button}\hfill +% \PstFrameBoxThreeD[/HLEmphasize?FrameBoxThreeDColorHSB_=/HLReverse?0 0 -1_]{Button}\hfill +% \definecolor{MyGray}{gray}{0.85} +% \psframe*[linecolor=MyGray](-0.3,-0.65)(2.1,0.9) +% \PstFrameBoxThreeD[/HLEmphasize?FrameBoxThreeDColorHSB_=/HLReverse?0 0 -1_]{Button}% +% \end{CenterExample} +% +% \begin{SideBySideExample}[xrightmargin=3cm] +% \PstFrameBoxThreeD% +% [linewidth=0.2, +% /HLEmphasize?FrameBoxThreeDColorHSB_=/HLReverse?0.3 0.2 0.5_]{% +% \Huge\textcolor{white}{\textbf{21}}} +% \end{SideBySideExample} +% +% \begin{optlist} +% \item [FrameBoxThreeDOn (boolean)]: to simulate an ON / OFF button, by +% exchange of the dark and light colors of the borders (this will give the +% same result that to use a negative value for the +% \texttt{FrameBoxThreeDBrightnessDistance} parameter) +% (\emph{Default:~true}). +% \end{optlist} +% +% \begin{CenterExample} +% \PstFrameBoxThreeD[/HLEmphasize?FrameBoxThreeDColorHSB_=/HLReverse?0.1 0.9 0.5_]{% +% Button}\hfill +% \PstFrameBoxThreeD[/HLEmphasize?FrameBoxThreeDColorHSB_=/HLReverse?0.1 0.9 0.5_, +% /HLEmphasize?FrameBoxThreeDOn_=/HLReverse?false_]{Button}\hfill +% \PstFrameBoxThreeD[/HLEmphasize?FrameBoxThreeDColorHSB_=/HLReverse?0.1 0.9 0.5_, +% /HLEmphasize?FrameBoxThreeDOn_=/HLReverse?false_,linewidth=0.2]{Button}% +% \end{CenterExample} +% +% \begin{CenterExample} +% \PstFrameBoxThreeD[linewidth=0.5,/HLEmphasize?FrameBoxThreeDOn_=/HLReverse?false_, +% /HLEmphasize?FrameBoxThreeDColorHSB_=/HLReverse?0.8 0.5 0.5_]{% +% \Large\textcolor{yellow}{\textbf{This is your last chance...}}} +% \end{CenterExample} +% +% \begin{optlist} +% \item [FrameBoxThreeDOpposite (boolean)]: to use the same color for the +% left and right borders, and the same other for the bottom and top ones, or +% rather for left and top and right and bottom. +% (\emph{Default:~false}). +% \end{optlist} +% +% \begin{CenterExample} +% \psset{linewidth=0.2} +% \newcommand{\Button}{\textcolor{white}{\textbf{Button}}} +% \PstFrameBoxThreeD[/HLEmphasize?FrameBoxThreeDColorHSB_=/HLReverse?0.7 0.8 0.8_]{% +% \Button}\hfill +% \PstFrameBoxThreeD[/HLEmphasize?FrameBoxThreeDColorHSB_=/HLReverse?0.7 0.8 0.8_, +% /HLEmphasize?FrameBoxThreeDOn_=/HLReverse?false_]{\Button}\hfill +% \PstFrameBoxThreeD[/HLEmphasize?FrameBoxThreeDColorHSB_=/HLReverse?0.7 0.8 0.8_, +% /HLEmphasize?FrameBoxThreeDOpposite_=/HLReverse?true_]{\Button}\hfill +% \PstFrameBoxThreeD[/HLEmphasize?FrameBoxThreeDColorHSB_=/HLReverse?0.7 0.8 0.8_, +% /HLEmphasize?FrameBoxThreeDOn_=/HLReverse?false_, +% /HLEmphasize?FrameBoxThreeDOpposite_=/HLReverse?true_]{\Button}% +% \end{CenterExample} +% +% \begin{optlist} +% \item [FrameBoxThreeDBrightnessDistance (real)]: the distance brightness +% of the color used to fill the interior of the box. If this is a negative +% number, we will got the same effect that the one of setting +% \texttt{FrameBoxThreeDOn} to false. And if it value is 0, the borders will +% have obviously the same color that the interior. +% (\emph{Default:~0.15} --- it must be a number between -0.5~and~0.5, but the +% \emph{brightness} plus and minus it must stay between 0~and~1). +% \end{optlist} +% +% \begin{CenterExample} +% \psset{doublesep=0.2} +% \PstFrameBoxThreeD[/HLEmphasize?FrameBoxThreeDColorHSB_=/HLReverse?0.6 0.3 0.5_]{% +% Button}\hfill % /HLEmphasize?Default = 0.15_ +% \PstFrameBoxThreeD[/HLEmphasize?FrameBoxThreeDColorHSB_=/HLReverse?0.6 0.3 0.5_, +% /HLEmphasize?FrameBoxThreeDBrightnessDistance_=/HLReverse?0.3_]{% +% Button}\hfill +% \PstFrameBoxThreeD[/HLEmphasize?FrameBoxThreeDColorHSB_=/HLReverse?0.6 0.3 0.5_, +% /HLEmphasize?FrameBoxThreeDBrightnessDistance_=/HLReverse?0.5_]{% +% Button}\hfill +% \PstFrameBoxThreeD[/HLEmphasize?FrameBoxThreeDColorHSB_=/HLReverse?0.6 0.3 0.7_, +% /HLEmphasize?FrameBoxThreeDBrightnessDistance_=/HLReverse?0.3_]{% +% Button}\hfill +% \PstFrameBoxThreeD[/HLEmphasize?FrameBoxThreeDColorHSB_=/HLReverse?0.6 0.3 0.5_, +% /HLEmphasize?FrameBoxThreeDBrightnessDistance_=/HLReverse?-0.2_]{% +% Button}% +% \end{CenterExample} +% +% \section{Examples} +% +% We give here more advanced examples. +% +% \begin{CenterExample} +% \psset{doublesep=0.12} +% \multido{\nButtonA=0.1+0.4}{3}{% +% \multido{\nButtonB=0+0.05}{11}{% +% \PstFrameBoxThreeD% +% [FrameBoxThreeDColorHSB=\nButtonA\space 0.5 0.5, +% FrameBoxThreeDBrightnessDistance=\nButtonB]{OK}}\\} +% \end{CenterExample} +% +% \begin{CenterExample} +% \psset{doublesep=0.05} +% \multido{\nButtonA=0+0.1}{11}{% +% \multido{\nButtonB=0+0.05}{21}{% +% \PstFrameBoxThreeD[FrameBoxThreeDColorHSB=% +% \nButtonB\space \nButtonA\space 0.8]{\$}}\\} +% \end{CenterExample} +% +% \begin{CenterExample} +% \psset{gradmidpoint=1,gradangle=90} +% \psdblframebox[framesep=0.3,fillstyle=gradient, +% gradbegin=yellow,gradend=LemonChiffon]{% +% \shortstack[l]{% +% \makebox[8cm]{\LARGE\textbf{Introduction}\dotfill}\\ +% {\Large by Catherine \textsc{Parker}}\hfill +% \raisebox{5.5mm}{% +% \PstFrameBoxThreeD[linewidth=0.15, +% FrameBoxThreeDColorHSB=0.3 0.2 0.5]{% +% \LARGE\textcolor{white}{3}}}}} +% \end{CenterExample} +% +% \begin{CenterExample} +% \psshadowbox[framesep=0.3,fillstyle=gradient, +% gradbegin=Orange,gradend=yellow]{% +% \setlength{\tabcolsep}{0mm}% +% \begin{tabular}{ll} +% \makebox[10cm]{% +% \LARGE\textbf{Description of the problem\dotfill}} & +% \raisebox{-5mm}{% +% \PstFrameBoxThreeD[linewidth=0.15, +% FrameBoxThreeDColorHSB=0.9 0.5 0.5]{% +% \LARGE\textcolor{white}{\textbf{25}}}}\\[-3mm] +% \textcolor{red}{\large by Helen \textsc{Mitchell} +% and Ann \textsc{Cartridge}} +% \end{tabular}} +% \end{CenterExample} +% +% \begin{CenterExample} +% \newcommand{\MyNode}[2]{% +% \TR{\PstFrameBoxThreeD[linewidth=0.1,FrameBoxThreeDOn=#2, +% FrameBoxThreeDColorHSB=0.2 0.4 0.5, +% FrameBoxThreeDBrightnessDistance=0.2]{#1}}} +% \renewcommand{\psedge}[2]{\ncangle{#2}{#1}} +% +% \psset{angleB=-90,angleA=90,levelsep=2,treesep=3} +% \pstree{\MyNode{Richard}{true}} +% {\pstree{\MyNode{Paul}{true}} +% {\pstree{\MyNode{Jack}{true}} +% {\MyNode{Michel}{false}} +% \MyNode{Adam}{false}} +% \MyNode{Herbert}{false}} +% \end{CenterExample} +% +% \begin{CenterExample} +% \newcommand{\EntryA}[1]{% +% \PstFrameBoxThreeD[FrameBoxThreeDColorHSB=0.4 0.6 0.5]{% +% \makebox[2.2cm]{#1}}} +% \newcommand{\EntryB}[1]{% +% \PstFrameBoxThreeD[FrameBoxThreeDColorHSB=0.16 1 0.8]{% +% \makebox[0.5cm]{#1}}} +% \newcommand{\EntryC}[1]{% +% \PstFrameBoxThreeD[FrameBoxThreeDColorHSB=0.7 0.2 0.8]{% +% \makebox[1.4cm]{#1}}} +% \newcommand{\EntryD}[1]{% +% \PstFrameBoxThreeD[FrameBoxThreeDColorHSB=0.9 0.5 0.5]{% +% \makebox[1.4cm]{#1}}} +% +% \begin{table}[htbp] +% \centering +% \large\bfseries +% \setlength{\tabcolsep}{5mm}% +% \setlength{\belowcaptionskip}{3mm}% +% \caption{Results of the year} +% \PstFrameBoxThreeD[framesep=0.4,doublesep=0.5, +% FrameBoxThreeDColorHSB=0.3 0.2 0.4]{% +% \psset{framesep=0.3,doublesep=0.2}% +% \begin{tabular}{lrr} +% \\ +% \EntryA{1st Quarter}&\EntryB{723}& \\[1.5cm] +% \EntryA{2nd Quarter}&\EntryB{819}&\EntryC{+13 \%} \\[1.5cm] +% \EntryA{3rd Quarter}&\EntryB{687}&\EntryD{--16.1 \%}\\[1.5cm] +% \EntryA{4th Quarter}&\EntryB{894}&\EntryC{+30.1 \%} \\[1cm] +% \end{tabular}} +% \end{table} +% \end{CenterExample} +% +% +% \StopEventually{} +% +% ^^A .................... End of the documentation part .................... +% +% \section{Driver file} +% +% The next bit of code contains the documentation driver file for \TeX{}, +% i.e., the file that will produce the documentation you are currently +% reading. It will be extracted from this file by the \texttt{docstrip} +% program. +% +% \begin{macrocode} +%<*driver> +\documentclass{ltxdoc} +\GetFileInfo{pst-fr3d.dtx} +\usepackage{fancyvrb} +\usepackage{multido} +\usepackage{pstricks} +\usepackage{pst-fr3d} +\usepackage{pst-grad} +\usepackage{pst-tree} +\EnableCrossrefs +\CodelineIndex +\RecordChanges +\OnlyDescription % Comment it for implementation details +\hbadness=7000 % Over and under full box warnings +\hfuzz=3pt +\definecolor{LemonChiffon}{rgb}{1.,0.98,0.8} +\definecolor{Orange} {rgb}{1.,0.65,0.} +\definecolor{Pink} {rgb}{1.,0.75,0.8} +\begin{document} + \DocInput{pst-fr3d.dtx} +\end{document} +% +% \end{macrocode} +% +% \section{\PstFrameBoxThreeDPackage{} \LaTeX{} wrapper} +% +% \begin{macrocode} +%<*latex-wrapper> +\ProvidesPackage{pst-fr3d}[2002/02/25 package wrapper for PSTricks pst-fr3d.tex] +\input pst-fr3d.tex +% +% \end{macrocode} +% +% \section{\PstFrameBoxThreeDPackage{} code} +% +% \begin{macrocode} +%<*pst-fr3d> +% \end{macrocode} +% +% \subsection{Preambule} +% +% Who we are. +% +% \begin{macrocode} +\csname PstFrameBoxThreeDLoaded\endcsname +\let\PstFrameBoxThreeDLoaded\endinput +% \end{macrocode} +% +% Require the PSTricks package. +% +% \begin{macrocode} +\ifx\PSTricksLoaded\endinput\else\input pstricks.tex\fi +% \end{macrocode} +% +% David \textsc{Carlisle} interface to the `\textsf{keyval}' package. +% +% \begin{macrocode} +\ifx\PSTXKeyLoaded\endinput\else\input pst-xkey \fi +% \end{macrocode} +% +% Catcodes changes. +% +% \begin{macrocode} +\edef\PstAtCode{\the\catcode`\@} +\catcode`\@=11\relax +\pst@addfams{pst-fr3d} +\def\fileversion{1.01} +\def\filedate{2004/11/14} +\message{`Pst-FrameBox3d' v\fileversion, \filedate\space (Denis Girou)} +% \end{macrocode} +% +% \subsection{Definition of the parameters} +% +% \texttt{FrameBoxThreeDOn} to draw the 3d framed box with an ON / OFF +% effect. +% +% \begin{macrocode} +\newif\ifPstFrameBoxThreeD@On +\define@key[psset]{pst-fr3d}{FrameBoxThreeDOn}[true]{\@nameuse{PstFrameBoxThreeD@On#1}} +% \end{macrocode} +% +% \texttt{FrameBoxThreeDOpposite} to use the same colors for the opposite +% sides or the contiguous ones. +% +% \begin{macrocode} +\newif\ifPstFrameBoxThreeD@Opposite +\define@key[psset]{pst-fr3d}{FrameBoxThreeDOpposite}[true]{% +\@nameuse{PstFrameBoxThreeD@Opposite#1}} +% \end{macrocode} +% +% \texttt{FrameBoxThreeDColorHSB} to define the colors used, in the HSB +% (\emph{hue}, \emph{saturation}, \emph{brightness}) model. This is a sequence +% of three real values, separated by spaces. This will define the color of the +% interior of the frame. And for the borders we will use it too, changing it +% brightness in light and dark. +% +% \begin{macrocode} +\define@key[psset]{pst-fr3d}{FrameBoxThreeDColorHSB}{% +\PstFrameBoxThreeD@ColorHSB@i#1\@nil} +\def\PstFrameBoxThreeD@ColorHSB@i#1\@nil{% +\pst@expandafter\pst@getnumiii{#1} {} {} {} {}\@nil +\edef\PstFrameBoxThreeD@Hue{\pst@tempg}% +\edef\PstFrameBoxThreeD@Saturation{\pst@temph}% +\edef\PstFrameBoxThreeD@Brightness{\pst@tempi}} +% \end{macrocode} +% +% \texttt{FrameBoxThreeDBrightnessDistance} to define the brightness +% distance between the brightness used for the material of the box +% (\texttt{BrightnessC}) and the two brightnesss used for the borders +% (\texttt{BrightnessA} and \texttt{BrightnessB}): \texttt{BrightnessA} = +% \texttt{BrightnessC} + \texttt{FrameBoxThreeDBrightnessDistance} and +% \texttt{BrightnessB} = \texttt{BrightnessC} -- +% \texttt{FrameBoxThreeDBrightnessDistance}. It can be a negative number. And +% if the brightness is negative, we will use a value of 0.5 to compute the two +% other colors. +% +% \begin{macrocode} +\define@key[psset]{pst-fr3d}{FrameBoxThreeDBrightnessDistance}{% +\edef\PstFrameBoxThreeD@BrightnessDistance{#1}} +% \end{macrocode} +% +% Next, we set the default values for all these new parameters. +% +% \begin{macrocode} +\psset{% + FrameBoxThreeDOn=true,FrameBoxThreeDOpposite=false, + FrameBoxThreeDColorHSB=0 0 0.5,FrameBoxThreeDBrightnessDistance=0.15}% +% \end{macrocode} +% +% \subsection{Main macro} +% +% The general \cs{PstFrameBoxThreeD} macro to draw three dimensional boxed +% frames. +% +% \begin{macro}{\PstFrameBoxThreeD} +% \begin{macrocode} +\def\PstFrameBoxThreeD{% +\@ifnextchar[{\PstFrameBoxThreeD@i}{\PstFrameBoxThreeD@i[]}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\PstFrameBoxThreeD@i} +% \begin{macrocode} +\def\PstFrameBoxThreeD@i[#1]#2{{% +% \end{macrocode} +% +% We force ``dimmen=middle''. +% +% \begin{macrocode} +\psset{dimen=middle}% +% \end{macrocode} +% +% Then we set the local changes of parameters. +% +% \begin{macrocode} +\psset{#1}% +% \end{macrocode} +% +% +% If the brightness is negative, the interior of the frame will not be +% filled with color, and a value of 0.5 will be used to compute the two colors +% of the borders. +% +% \begin{macrocode} +\ifdim\PstFrameBoxThreeD@Brightness\p@<\z@% + \def\PstFrameBoxThreeD@FillStyle{none}% + \def\pst@tempa{0.5}% +\else + \def\PstFrameBoxThreeD@FillStyle{solid}% + \def\pst@tempa{\PstFrameBoxThreeD@Brightness}% +\fi +% \end{macrocode} +% +% Computation of the colors of the borders. +% +% \begin{macrocode} +\pst@dimh=\pst@tempa\p@ +\advance\pst@dimh\PstFrameBoxThreeD@BrightnessDistance\p@ +\pst@dimtonum{\pst@dimh}{\pst@tempb}% +\advance\pst@dimh-\PstFrameBoxThreeD@BrightnessDistance\p@ +\advance\pst@dimh-\PstFrameBoxThreeD@BrightnessDistance\p@ +\pst@dimtonum{\pst@dimh}{\pst@tempc}% +% \end{macrocode} +% +% If the \ColorPackage{} \LaTeX{} package was not loaded (using the +% \PstColPackage{} compatibility package which is hightly recommanded for +% \LaTeX{} users), we will use the PSTricks color model. +% +% \begin{macrocode} +\ifx\definecolor\@undefined + \newhsbcolor{PstFrameBoxThreeD@ColorC}{% + \PstFrameBoxThreeD@Hue \PstFrameBoxThreeD@Saturation \pst@tempa}% + \ifPstFrameBoxThreeD@On + \newhsbcolor{PstFrameBoxThreeD@ColorA}{% + \PstFrameBoxThreeD@Hue \PstFrameBoxThreeD@Saturation \pst@tempc}% + \newhsbcolor{PstFrameBoxThreeD@ColorB}{% + \PstFrameBoxThreeD@Hue \PstFrameBoxThreeD@Saturation \pst@tempb}% + \else + \newhsbcolor{PstFrameBoxThreeD@ColorA}{% + \PstFrameBoxThreeD@Hue \PstFrameBoxThreeD@Saturation \pst@tempb}% + \newhsbcolor{PstFrameBoxThreeD@ColorB}{% + \PstFrameBoxThreeD@Hue \PstFrameBoxThreeD@Saturation \pst@tempc}% + \fi +% \end{macrocode} +% +% If the \ColorPackage{} \LaTeX{} package was loaded, we will use it as +% color model. +% +% \begin{macrocode} +\else + \definecolor{PstFrameBoxThreeD@ColorC}{hsb}{% + \PstFrameBoxThreeD@Hue,\PstFrameBoxThreeD@Saturation,\pst@tempa}% + \ifPstFrameBoxThreeD@On + \definecolor{PstFrameBoxThreeD@ColorA}{hsb}{% + \PstFrameBoxThreeD@Hue,\PstFrameBoxThreeD@Saturation,\pst@tempc}% + \definecolor{PstFrameBoxThreeD@ColorB}{hsb}{% + \PstFrameBoxThreeD@Hue,\PstFrameBoxThreeD@Saturation,\pst@tempb}% + \else + \definecolor{PstFrameBoxThreeD@ColorA}{hsb}{% + \PstFrameBoxThreeD@Hue,\PstFrameBoxThreeD@Saturation,\pst@tempb}% + \definecolor{PstFrameBoxThreeD@ColorB}{hsb}{% + \PstFrameBoxThreeD@Hue,\PstFrameBoxThreeD@Saturation,\pst@tempc}% + \fi +\fi +% \end{macrocode} +% +% Now, we can \emph{really} draw the box and the borders. +% +% No lines here. +% +% \begin{macrocode} +\psset{linestyle=none}% +% \end{macrocode} +% +% We draw the material in a standard \cs{psframebox} macro, defining +% \texttt{doubleline} to \texttt{true}, to compute correctly the bounding box +% of the box with it borders. +% +% \begin{macrocode} +\psframebox[fillstyle=\PstFrameBoxThreeD@FillStyle, + fillcolor=PstFrameBoxThreeD@ColorC,doubleline=true]{#2}% +% \end{macrocode} +% +% We save the material to frame in an internal box, without the size of it +% borders. +% +% \begin{macrocode} +\setbox\pst@boxg=\hbox{\psframebox{#2}}% +% \end{macrocode} +% +% Then we save in another internal box the same thing, this time with the +% size of it borders. +% +% \begin{macrocode} +\setbox\pst@hbox=\hbox{\psframebox[doubleline=true]{#2}}% +% \end{macrocode} +% +% We compute the four internal coordinates for the borders. +% +% \begin{macrocode} +\pst@dima=\wd\pst@hbox +\advance\pst@dima-\wd\pst@boxg +\divide\pst@dima\tw@ +% \end{macrocode} +% +% \begin{macrocode} +\pst@dimb=\pst@dima +% \end{macrocode} +% +% \begin{macrocode} +\advance\pst@dima\wd\pst@boxg +% \end{macrocode} +% +% Now, we can draw the borders, of course in a \texttt{solid} mode. +% +% \begin{macrocode} +\psset{fillstyle=solid}% +% \end{macrocode} +% +% We draw first the left then the top borders. +% +% \begin{macrocode} +\pspolygon[fillcolor=PstFrameBoxThreeD@ColorA] + (-\wd\pst@hbox,-\dp\pst@hbox)(-\pst@dima,-\dp\pst@boxg) + (-\pst@dima,\ht\pst@boxg)(-\wd\pst@hbox,\ht\pst@hbox) +\pspolygon[fillcolor=PstFrameBoxThreeD@ColorB] + (-\wd\pst@hbox,\ht\pst@hbox)(-\pst@dima,\ht\pst@boxg) + (-\pst@dimb,\ht\pst@boxg)(0,\ht\pst@hbox) +% \end{macrocode} +% +% We must compute the colors of the two other borders. +% +% \begin{macrocode} +\ifPstFrameBoxThreeD@Opposite + \def\pst@tempa{PstFrameBoxThreeD@ColorA}% + \def\pst@tempb{PstFrameBoxThreeD@ColorB}% +\else + \def\pst@tempa{PstFrameBoxThreeD@ColorB}% + \def\pst@tempb{PstFrameBoxThreeD@ColorA}% +\fi +% \end{macrocode} +% +% Now, we draw the right then the bottom borders. +% +% \begin{macrocode} +\pspolygon[fillcolor=\pst@tempa] + (0,-\dp\pst@hbox)(-\pst@dimb,-\dp\pst@boxg) + (-\pst@dimb,\ht\pst@boxg)(0,\ht\pst@hbox) +\pspolygon[fillcolor=\pst@tempb] + (-\wd\pst@hbox,-\dp\pst@hbox)(-\pst@dima,-\dp\pst@boxg) + (-\pst@dimb,-\dp\pst@boxg)(0,-\dp\pst@hbox) +% \end{macrocode} +% +% And, to finish, a dark oblique line in the middle of the light border and +% a light oblique line in the middle of the dark border, if the identical +% colors are contiguous. +% +% \begin{macrocode} +\ifPstFrameBoxThreeD@Opposite +\else + \psset{linestyle=solid,linewidth=0.2pt,arrows=cc-cc}% + \psline[linecolor=PstFrameBoxThreeD@ColorA] + (-\pst@dimb,\ht\pst@boxg)(0,\ht\pst@hbox) + \psline[linecolor=PstFrameBoxThreeD@ColorB] + (-\wd\pst@hbox,-\dp\pst@hbox)(-\pst@dima,-\dp\pst@boxg) +\fi}} +% \end{macrocode} +% \end{macro} +% +% \subsection{Closing} +% +% Catcodes restoration. +% +% \begin{macrocode} +\catcode`\@=\PstAtCode\relax +% \end{macrocode} +% +% \begin{macrocode} +% +% \end{macrocode} +% +% \Finale +% \PrintIndex +% \PrintChanges +% +\endinput +%% +%% End of file `pst-fr3d.dtx' diff --git a/Master/texmf-dist/source/generic/pst-fr3d/pst-fr3d.ins b/Master/texmf-dist/source/generic/pst-fr3d/pst-fr3d.ins new file mode 100644 index 00000000000..9bcc8406cf9 --- /dev/null +++ b/Master/texmf-dist/source/generic/pst-fr3d/pst-fr3d.ins @@ -0,0 +1,37 @@ +%% `pst-fr3d.ins' +%% +%% Docstrip installation instruction file for docstyle `pst-fr3d' +%% +%% Denis Girou (CNRS/IDRIS - France) +%% +%% February 25, 2002 + +\def\batchfile{pst-fr3d.ins} +\input docstrip.tex +\keepsilent +\Msg{*** Generating the `pst-fr3d' package ***} +\askforoverwritefalse +\generate{\file{pst-fr3d.tex}{\from{pst-fr3d.dtx}{pst-fr3d}}} +\generate{\file{pst-fr3d.sty}{\from{pst-fr3d.dtx}{latex-wrapper}}} + +\ifToplevel{% +\Msg{***********************************************************} +\Msg{*} +\Msg{* To finish the installation you have to move the files} +\Msg{* pst-fr3d.sty and pst-fr3d.tex in a directory/folder searched by TeX.} +\Msg{*} +\Msg{* To produce the documentation, run the file `pst-fr3d.dtx'} +\Msg{* through LaTeX.} +\Msg{*} +\Msg{* If you require the commented code, desactivating the} +\Msg{* OnlyDescription macro, you must recompile, execute:} +\Msg{* `makeindex -s gind.ist pst-fr3d'} +\Msg{* `makeindex -s gglo.ist -o pst-fr3d.gls pst-fr3d.glo'} +\Msg{* and recompile.} +\Msg{*} +\Msg{***********************************************************} +} + +\endinput +%% +%% End of file `pst-fr3d.ins' diff --git a/Master/texmf-dist/source/generic/realcalc/readme b/Master/texmf-dist/source/generic/realcalc/readme new file mode 100644 index 00000000000..aa152337fb9 --- /dev/null +++ b/Master/texmf-dist/source/generic/realcalc/readme @@ -0,0 +1,39 @@ +realcalc.tex + +(Copyright) Frank Buchholz, Jan. 1993 +e-mail: buchholz@lusty.informatik.uni-dortmund.de + +Real arithmetic with big values and high precision. +Calculations are done with 9 decimal digits. +Usable with TeX and LaTeX. + +Files: + readme This file + realcalc.tex You have to \input realcalc.tex to use it. + realdemo.tex Demo with LaTeX. + realtest.tex Demo with TeX (Type \test\bye after the prompt) + +Installation: + Put the file realcalc.tex where your TeX looks for inputs. + Name a copy realcalc.sty to use as a LaTeX style option, + or create a file realcalc.sty with the lines: + \input realcalc.tex + \endinput + +Documentation: + Use following command to extract the documentation: + grep %% realcalc.tex + +COPYING: + Copying of part or all of this file is allowed under the following + conditions only: + (1) You may freely distribute unchanged copies of the files. You have + to include this file when you do so. + (2) You may modify a renamed copy of the files, but only for personal + use or use within an organization. + (3) You may copy fragments from the files, for personal use or for + distribution, as long as credit is given where credit is due. + + You are NOT ALLOWED to take money for the distribution or use of + this file or modified versions or fragments thereof, except for + a nominal charge for copying etc. diff --git a/Master/texmf-dist/source/generic/ruhyphen/BUGS b/Master/texmf-dist/source/generic/ruhyphen/BUGS new file mode 100644 index 00000000000..84456e41f64 --- /dev/null +++ b/Master/texmf-dist/source/generic/ruhyphen/BUGS @@ -0,0 +1,75 @@ +-*-coding: koi8-r;-*- + +1) the following command shows useless (because of \lefthyphenmin=2) +or incorrect patterns which set hyphenation after the first letter: + +grep '^\..[0-9]' ruhyph*.tex + +ruhyphas.tex: +.×8Ó8Ô8Ò8 +.Ï5×Ø4 +.Ï4Ô×ÅÒÄ +.Ï4Ô×ÅÒÖÄ + +2) the following command shows useless (because of \righthyphenmin=2) +or incorrect patterns which set hyphenation before the last letter: + +grep '[0-9].\.$' ruhyph*.tex + +ruhyphas.tex: +.ÕÌØ5Å. +.Ä×Ï5Å6Ë. + +3) the patterns for the whole words shown by the command + +grep '^\..*\.$' ruhyph*.tex + +are also questionable (probably it is better to store them in +\hyphenation list). Such patterns occur in ruhyphas.tex and +ruhyphzn.tex. + +4) the following command will show patterns which contain letter +combinations absent in the full dictionary: + +./reduce-patt < ruhyphXX.tex | diff - ruhyphXX.tex | perl -n -e 'print if (s/^> //)' + +where XX should be replaced accordingly, and it is assumed that the +script `reduce-patt' refers to the full lowercased wordlist (e.g. +generated from the rus-ispell dictionary by Alexander Lebedev). + +There may be 3 reasons for such `wrong' patterns: + + a) there are no existing words which could be influenced by these + patterns. In this case, such patterns should be removed. + + b) the pattern corresponds to the word with letter `cyre', but + the orthographically-correct word uses the letter `cyryo'. + In this case, the pattern should be leaved, because it + corresponds to the (relatively common) case when `cyryo' is + replaced by `cyre'. + + c) the patterns are correct (correspond to existing words), but + the dictionary does not contain such words. In this case, the + dictionary should be supplemented. + +5) to ensure that there will be absolutely no -xx breaks for English +words when the combined Russian-English hyphenation is used, a changed +English patterns should be used, with removed `strange' patterns +matching the regexp "[0-9][a-z][a-z]\." (see the file enrhm2.tex). + +6) [not a bug] should the main hyphenation files be sorted using +`sorthyph' script? + +7) Known cases of bad hyphenation (to be fixed by authors of +corresponding patterns). All found hyphenation positions are shown. +Bad positions are marked with `='. Please send additional examples of +bad hyphenation for various patterns in this collection to email +addresses given at the end of README. See also some other examples +in the release notes of Alexander Lebedev's patterns in the file +README.ruhyphal. + +ruhyphas.tex: + + ÓÉÎ-È-ÒÏÔ=ÒÏÎ-ÎÙÊ + ÍÅ=ÖÁ=ÔÏÍ-ÎÙÊ + ÐÏÄ-Ô×ÅÒÖ=ÄÁ-ÀÔ diff --git a/Master/texmf-dist/source/generic/ruhyphen/Makefile b/Master/texmf-dist/source/generic/ruhyphen/Makefile new file mode 100644 index 00000000000..ab1ec67813a --- /dev/null +++ b/Master/texmf-dist/source/generic/ruhyphen/Makefile @@ -0,0 +1,10 @@ +PATTERNS = al as ct dv mg vl zn +CYRYO = $(patsubst %,cyryo%.tex,$(PATTERNS)) + +cyryo: $(CYRYO) + +distclean: + rm -f $(CYRYO) + +cyryo%.tex: ruhyph%.tex + ./mkcyryo $< > $@ diff --git a/Master/texmf-dist/source/generic/ruhyphen/README b/Master/texmf-dist/source/generic/ruhyphen/README new file mode 100644 index 00000000000..a490b42259d --- /dev/null +++ b/Master/texmf-dist/source/generic/ruhyphen/README @@ -0,0 +1,368 @@ +-*-coding: koi8-r;-*- + + ruhyphen package + (Collection of Russian hyphenation patterns) + + Version 1.7 (March 23, 2003) + + +This package contains hyphenation patterns for Russian language, +which can be used for various Cyrillic font encodings. It contains +all Russian hyphenation patterns we know of (currently, these are +seven different patterns, --- see below), so you can choose your +favorite pattern. :-) + +Copyright notice and distribution conditions are given in the +beginning of the file `ruhyphen.tex'. It applies to all *.tex files +in this package (listed below). Note that seven pattern files +(ruhyph*.tex, except ruhyphen.tex) are copyrighted by their +authors. + +Thus, all patterns are freely distributable. + +To install, copy all *.tex files to your texmf tree. For example, +create a directory $TEXMF/tex/generic/ruhyphen/ and put all *.tex +files there. + +Before creating a format file, edit the file ruhyphen.tex and select +the pattern and font encoding to use (see below for the list of +patterns and supported font encodings). + +Usually, hyphenation setup is based on file `hyphen.cfg' which loads +hyphenation patterns in proper encodings for languages which you will +use. It is highly recommended to install BABEL package which provides +a unified mechanism for hyphenation configurations, and comes with +it's own `hyphen.cfg'. This is recommended not only to LaTeX users, +but also if you will use a `cyrplain' bundle of the T2 package to +`russify' plain TeX-based formats. + +You have two options: either use patterns for Russian language in +separate TeX \language (so to get proper hyphenation you must switch +languages explicitly in your documents using commands like \Russian, +\English, \French, etc), or use one `combined' Russian-English +language. If you will use only Russian and English languages in your +documents, the latter option is more convenient (in this case, there +will be no need to switch between Russian and English languages to get +proper hyphenation). This option is recommended especially for +Plain-TeX based macro packages: Plain TeX, AMS-TeX, Texinfo, BLUe TeX, +etc; it can be convenient for LaTeX as well, if you mostly typeset +bilingual Russian-English documents. + +In case of using BABEL's mechanism of hyphenation setup, edit the file +language.dat (it is part of BABEL, and could usually be found in the +`tex/generic/config' directory of the TDS-compliant TEXMF tree). In +the case of using separate languages, use `ruhyphen.tex' as the +Russian hyphenation file, i.e. put the following lines: + +english hyphen +russian ruhyphen + +For combined Russian-English patterns, use `ruenhyph.tex' as the +hyphenation file, i.e. put the following lines: + +ruseng ruenhyph +=russian +=english + +In both cases, lines for other languages could be commented or leaved +depending on your needs. + +Note that it is better in general to have original English patterns +preloaded for the default language, so you may use also the following: + +english hyphen +ruseng ruenhyph +=russian + +In this case, documents in English will be hyphenated exactly as they +should, and English fragments inside a Russian text will be hyphenated +as close as possible to this. This variant requires, however, more TeX +memory for patterns, and you should not forget to switch \language to +Russian when needed (using babel with `russian' as the last option +will do this automatically). + +If you refuse to install BABEL, you can create your own `hyphen.cfg' +file containing e.g. the following lines: + +---------------------------------------------------------------------- +%\def\English{\language0 } +%\def\Russian{\language1 } +%\English +\input hyphen +%\Russian +\input ruhyphen +\lefthyphenmin=2 \righthyphenmin=2 % disallow x- or -x breaks; -xx OK +%\English +%\lefthyphenmin=2 \righthyphenmin=3 % disallow x- or -xx breaks +---------------------------------------------------------------------- + +or simply + +---------------------------------------------------------------------- +\input ruenhyph +---------------------------------------------------------------------- + +Basically, if you need to typeset multilingual documents, --- you +should use LaTeX and T2* Cyrillic encodings. :-) + +Note that, when running the file ruhyphen.tex (or ruenhyph.tex) +through TeX, the only global effect is execution of \patterns (and +\hyphenation for exceptions) for the current language, and also +setting the \lefthyphenmin and \righthyphenmin to 2. In particular, +no global changes of \lccode, \uccode, \catcode, etc. values are +made. So, to activate hyphenation, you have to set (at least) the +\lccode values for lowercase and uppercase Russian letters globally in +your TeX file to match the font encoding (and maybe also make other +settings, like \uccode and \sfcode). This is usually done in separate +packages (where those font encodings are defined). + +Files in this package are organized in a very flexible and compact +way, sharing the same hyphenation pattern files for different font +encodings. Thus, having (currently available) seven different patterns +and five different font encodings, we have 7*5=35 different possible +combinations of pattern and encoding (which is specified in the file +ruhyphen.tex), or, adding also combined `Russian-English' patterns +(loaded via ruenhyph.tex), we have 70 different combinations +supported! It is very easy to add the support for any new pattern or +font encoding, --- just add an additional file ruhyph.tex for +new patterns (and generate the corresponding file cyryo.tex +using `mkcyryo' script), or a file koi2.tex for new +encoding, and add corresponding lines to `ruhyphen.tex'. + +Descriptions of files: + +1) main hyphenation files + +These are Russian hyphenation patterns created by different people. +Some patterns were generated with `patgen', some were created +manually. The quality of all patterns is comparable. Nevertheless, for +the highest quality of hyphenation we recommend using ruhyphal.tex +(which is switched on by default). The patterns are stored in koi8-r +Cyrillic encoding (in a form both compact and convenient for reading +and editing by humans), but we provide a means for re-encoding of +patterns (using some TeX hackery) to any desired font encoding (see +below), so there is no need to modify these main files. All patterns +were (re)named according to the standard scheme ruhyph*.tex, where `*' +denotes the origin of patterns. The following files are included into +this collection (in alphabetical order): + +ruhyphal.tex + 10-Mar-03 created by Alexander I. Lebedev + (previously were an extended and corrected variant of Dimitri Vulis' + patterns, but now are independenly generated with patgen, using + the rus-ispell dictionary). + ftp://scon155.phys.msu.su/pub/russian/hyphen/ruhyphal.tar.gz +ruhyphas.tex + v1.0b4a 23-Jul-98 of `ashyphen' created by Andrey Slepuhin + , ftp://forest.nmd.msu.ru/pub/tex/hyphenation/ +ruhyphct.tex + 31-Dec-89 is a version found in a CyrTUG TeX distribution +ruhyphdv.tex + The original patterns created by Dimitri Vulis , + re-encoded to koi8-r. +ruhyphmg.tex + 30-May-98 patterns created by Mikhail Grinchuk . + Created manually, with the aim to get more or less good results + with smallest feasible memory usage. Current version hyphenates + with relatively big number of errors, but patterns are really small. +ruhyphvl.tex + 22-Jul-00 Dimitri Vulis' patterns extended by M. Vorontsova and + S. Lvovski , and later modified by A.Cherepanov, + V.Kryukov and A.Shen, + ftp://mccme.ru/users/shen/texkoi/ +ruhyphzn.tex + v2.01 beta 23-Mar-03 of `znhyphen' created by Sergei V. Znamenskii + , + ftp://ftp.botik.ru/rented/znamensk/tex_dists/03_97/rusifika.zip + + +2) additional patterns for the letter `cyryo' + +Generated from the base files using `mkcyryo' script, these files +provide patterns for the `cyryo' letter to make its behavior with +respect to hyphenation identical to `cyre'. This can be done by +making \lccode of `cyryo' equal to the code of `cyre' -- this is not the +best solution because it will lead to incorrect work of \lowercase, +and, moreover, in LaTeX it is forbidden to change \lccode values. +These files should be used with the corresponding main hyphenation +files. + +There are some words with two `cyryo' letters (the following examples +were provided by Alexander I. Lebedev): + +ÔÒ£È×£ÄÅÒÎÙÊ ÔÒ£È×£ÒÓÔÎÙÊ ÔÒ£ÈÚ×£ÚÄÏÞÎÙÊ ÔÒ£ÈËÏÌ£ÓÎÙÊ ÔÒ£ÈÒÕÂÌ£×ËÁ +ÔÒ£ÈÒÕÂÌ£×ÙÊ ÔÒ£ÈÛ£ÒÓÔÎÙÊ ÞÅÔÙÒ£È×£ÓÅÌØÎÙÊ ÞÅÔÙÒ£ÈÚ×£ÚÄÏÞÎÙÊ ÞÅÔÙÒ£ÈËÏÌ£ÓÎÙÊ + +because of this, it is insufficient to add patterns with only one +`cyryo' letter, so we generate also patterns with two `cyryo' (however, +in practice all of them are `reduced' by the `reduce-patt' script :). + +cyryoal.tex + generated from ruhyphal.tex +cyryoas.tex + generated from ruhyphas.tex +cyryoct.tex + generated from ruhyphct.tex +cyryodv.tex + generated from ruhyphdv.tex +cyryomg.tex + generated from ruhyphmg.tex +cyryovl.tex + generated from ruhyphvl.tex +cyryozn.tex + generated from ruhyphzn.tex + +Makefile + rules for generation of `cyryo*.tex' files. Run `make distclean' + to remove all `cyryo*.tex' files; run `make' to regenerate them. +mkcyryo + shell script used for generation of `cyryo*.tex' files +reduce-patt + a perl script which could be used to verify which patterns do not + correspond to `real' words present in a wordlist. It is used by + `mkcyryo' script to remove unnecessary patterns. This was suggested + by Alexander Lebedev, and requires his excellent rus-ispell dictionary + available at ftp://scon155.phys.msu.su/pub/russian/ispell/rus-ispell.tar.gz + (we used version 0.99f4 in preparation of this package). + + The following command will generate a lowercased wordlist with + letter `cyryo', needed for `mkcyryo' and `reduce-patt' scripts: + + cat russian.dict | ispell -d russian -e | tr ' à-ÿ' '\012À-ß' | \ + grep £ | ./sortkoi8 | uniq > /tmp/.wl-lc-cyryo + + Remove `grep £' from a pipe to get a full lowercased wordlist + /tmp/.wl-lc-full useful for `reduce-patt' in general. + + +3) TeX files for re-encoding of patterns from koi8-r to various TeX + font encodings. + +These files use commands like \lccode `\= (instead of +\lccode =), where is an 8-bit letter code (in +koi8-r encoding, in which patterns are stored) and is the +slot number in the destination font encoding. This makes the patterns +"stable" against reencoding to any Cyrillic encoding, and also usable +with non-standard "on the fly" reencoding mechanisms like TCX or TCP +(switched on at TeX format creation phase) used in some TeX +implementations (provided that these transformations are 1-to-1 in +*all* the range 128--255, -- otherwise the results may be incorrect). +This was suggested by Alexander Cherepanov (we'd +like to thank him also for other useful suggestions on the ruhyphen +package). However, we do not recommend using non-standard mechanisms +like TCX or TCP in general (in favor of the portable and more powerful +approach with active characters provided by inputenc LaTeX package and +also used in cyrplain package). + +As suggested by Alexander Fryntov, these files also include support +for five additional Cyrillic letters present in koi8-ru encoding, so +that they could be used e.g. for the Ukrainian hyphenation patterns. + +koi2t2a.tex + koi8-r to T2A encoding (for Russian letters, also T2B, T2C, T2D, X2). + This is the main font encoding to be used for typesetting Cyrillic + with TeX. +koi2ucy.tex + koi8-r to UCY (Omega Unicode Cyrillic) encoding. +koi2lcy.tex + koi8-r to LCY (similar to cp866) encoding used e.g. in `old' LH + fonts. +koi2ot2.tex + koi8-r to OT2 7-bit Cyrillic TeX encoding used e.g. in + AMS Washington Cyrillic fonts (wncy*) and LH fonts (wn*). + To get better hyphenation and kerning, you may use virtual fonts + without WN-ligatures, like WLCY or WL fonts. +koi2koi.tex + koi8-r to koi8-r setup (needed anyway to setup \lccode values). + Note, that `koi' is bad name for TeX font encoding. + +catkoi.tex + Set the \catcode values of the lowercase Russian letters in the + koi8-r encoding to 12. The purpose of this file is to avoid strange + effects in case of unusual catcodes (e.g. active) for the letters + used in hyphenation files. + + +4) files to be used by users + +ruhyphen.tex + main `head' file which inputs the specified patterns and re-encodes + them to the specified font encoding. Users can edit this file, + selecting the patterns and font encodings. +ruenhyph.tex + alternative `head' file which inputs combined Russian-English + patterns. Do not mix patterns for 7-bit Cyrillic font encodings + (OT2) with English patterns! This can be used only for 8-bit + Cyrillic font encodings (and, of course, for UCY). + + +5) other files + +README + this file +enrhm2.tex + Avoid -xx breaks for English when \righthyphenmin=2. Used by + ruenhyph.tex. +hypht2.tex + This file contains additional hyphenation patterns including the + character hyphen `-'. It enables the hyphenation of words containing + explicit hyphens when using fonts with \hyphenchar\font <> `\- + (e.g. T2* encoded fonts). Derived from `hypht1.tex' by Bernd Raichle; + see comments there. :-) To switch on hyphenation of words containing + explicit hyphens, one should (apart from preloading this file into + format) set \lccode`\-=`\-, and also \defaulthyphenchar=127 before + loading fonts (i.e. before \usepackage[T2A]{fontenc}), or set + \hyphenchar\font=127 for already preloaded font. Note that loading + these additional patterns requires significant additional amount + of TeX hyphenation trie size. + +sortkoi8 + shell script; simple wrapper for `sort' to sort Russian texts + in koi8-r encoding alphabetically. +sorthyph + Perl script for sorting hyphenation files (Latin or Cyrillic in + koi8-r encoding). +trans + shell script for re-encoding between cp1251, koi8-r, cp866, + iso-8859-5, and Mac Cyrillic charsets (not used here). + + +The following properties of patterns are customizable in the file +ruhyphen.tex: + +* which font encoding to use. Note that this setting has nothing to do + with the input encodings of your (La)TeX documents! + +* which of seven available pattern files to use. + +* [1st optional line] whether to load patterns for the letter `cyryo'. + +* [2nd optional line] whether to load patterns which enable + hyphenation of words containing explicit hyphens (only in case of + using T2* font encodings). See the above description of hypht2.tex + for additional information. + +* [3rd optional line] whether to load two patterns .ne8 and 8ne. which + disallow breaking off the `ne' from a word (where `n' and `e' are + corresponding Russian letters; `ne' in Russian means `not' and breaking + it can confuse the reader). This was suggested by Alexander Lebedev. + +* [4th optional line] whether to load patterns which disallow breaking + a consonant followed by hard sign from a word. Such words are absent + in `modern' Russian language, but were used when `old orthography' + was in use. This was suggested by Alexander V. Lukyanov. + +And last but not least, + +* whether to load the file ruhyphen.tex or ruenhyph.tex (for combined + Russian-English hyphenation). + + +Happy TeXing! + + +Mail your comments, questions, and Russian hyphenation patterns which +are absent in this collection to: + + Werner Lemberg + Vladimir Volovich diff --git a/Master/texmf-dist/source/generic/ruhyphen/README.ruhyphal b/Master/texmf-dist/source/generic/ruhyphen/README.ruhyphal new file mode 100644 index 00000000000..0b736af3a41 --- /dev/null +++ b/Master/texmf-dist/source/generic/ruhyphen/README.ruhyphal @@ -0,0 +1,118 @@ + + ëÏÍÍÅÎÔÁÒÉÉ Ë ×ÙÐÕÓËÕ ÎÏ×ÙÈ ÔÁÂÌÉà ÐÅÒÅÎÏÓÏ× ruhyphal.tex + +úÁÞÅÍ ÅÝÅ ÏÄÎÁ ÔÁÂÌÉÃÁ ÐÅÒÅÎÏÓÏ× ÄÌÑ ÒÕÓÓËÏÇÏ ÑÚÙËÁ? + +÷ ÎÁÓÔÏÑÝÅÅ ×ÒÅÍÑ ÄÌÑ ÒÁÂÏÔÙ × TeX Ó ÔÅËÓÔÁÍÉ ÎÁ ÒÕÓÓËÏÍ ÑÚÙËÅ ÐÏÌÕÞÉÌÉ +ÒÁÓÐÒÏÓÔÒÁÎÅÎÉÅ ÛÅÓÔØ ÔÁÂÌÉà ÇÅÎÅÒÁÃÉÉ ÐÅÒÅÎÏÓÏ×, ÉÓÐÏÌØÚÕÀÝÉÈ × Ó×ÏÅÊ +ÏÓÎÏ×Å ÁÌÇÏÒÉÔÍ æÒÁÎËÁ ìÑÎÇÁ. üÔÉ ÔÁÂÌÉÃÙ ÓÏÂÒÁÎÙ × ÐÁËÅÔ ruhyphen +÷ÌÁÄÉÍÉÒÏÍ ÷ÏÌÏ×ÉÞÅÍ É ÷ÅÒÎÅÒÏÍ ìÅÍÂÅÒÇÏÍ É × ÎÁÓÔÏÑÝÅÅ ×ÒÅÍÑ Ñ×ÌÑÀÔÓÑ +ÞÁÓÔØÀ ÓÔÁÎÄÁÒÔÎÏÇÏ ÄÅÒÅ×Á ËÁÔÁÌÏÇÏ× texmf. üÔÏ -- ÔÁÂÌÉÃÙ, ÓÏÚÄÁÎÎÙÅ +äÍÉÔÒÉÅÍ ÷ÕÌÉÓÏÍ (ruhyphdv.tex × ÏÂÏÚÎÁÞÅÎÉÑÈ ÐÁËÅÔÁ ruhyphen, ÄÁÌÅÅ +ÓÏËÒÁÝÅÎÎÏ ÐÏ ÉÍÅÎÉ ÓÏÓÔÁ×ÉÔÅÌÑ -- dv), ÉÈ ÐÏÓÌÅÄÕÀÝÁÑ ÍÏÄÉÆÉËÁÃÉÑ +í.÷ÏÒÏÎÃÏ×ÏÊ É ó.ìØ×Ï×ÓËÉÍ (ruhyphvl.tex, vl), ÉÈ ÂÏÌÅÅ ÓÕÝÅÓÔ×ÅÎÎÁÑ +ÐÅÒÅÒÁÂÏÔËÁ, ÓÄÅÌÁÎÎÁÑ ÄÌÑ CyrTUG (ruhyphct.tex, ct), Á ÔÁËÖÅ Ä×Å ÎÅÚÁ×ÉÓÉÍÙÅ +ÒÁÚÒÁÂÏÔËÉ, ÓÄÅÌÁÎÎÙÅ óÅÒÇÅÅÍ úÎÁÍÅÎÓËÉÍ (ruhyphzn.tex, zn) É áÎÄÒÅÅÍ +óÌÅÐÕÈÉÎÙÍ (ruhyphas.tex, as). óÏ×ÓÅÍ ÎÅÄÁ×ÎÏ × ÐÁËÅÔ ÂÙÌÁ ×ËÌÀÞÅÎÁ ÅÝÅ +ÏÄÎÁ ÔÁÂÌÉÃÁ ÐÅÒÅÎÏÓÏ× (ruhyphmg.tex, mg), ÓÏÓÔÁ×ÌÅÎÎÁÑ íÉÈÁÉÌÏÍ çÒÉÎÞÕËÏÍ. + +ë ÓÏÖÁÌÅÎÉÀ, ×ÓÅ ÜÔÉ ÔÁÂÌÉÃÙ ÄÁÌÅËÉ ÏÔ ÓÏ×ÅÒÛÅÎÓÔ×Á. óÒÁ×ÎÅÎÉÑ, ÐÒÏ×ÅÄÅÎÎÙÅ +ÎÁ ÒÅÁÌØÎÙÈ ÔÅËÓÔÁÈ (ÏÄÉÎ É ÔÏÔ ÖÅ TeX'Ï×ÓËÉÊ ÔÅËÓÔ ÆÏÒÍÁÔÉÒÏ×ÁÌÓÑ Ó +ËÁÖÄÏÊ ÉÚ ÕËÁÚÁÎÎÙÈ ÔÁÂÌÉÃ É ÚÁÔÅÍ ÁÎÁÌÉÚÉÒÏ×ÁÌÓÑ ÎÁ ÐÒÅÄÍÅÔ ÐÏÑ×ÌÅÎÉÑ +ÏÛÉÂÏË É "ÎÅÂÌÁÇÏÚ×ÕÞÎÏÓÔÅÊ" ÐÒÉ ÐÅÒÅÎÏÓÅ), ÐÏËÁÚÁÌÉ, ÞÔÏ ×ÓÅ (!) ÔÁÂÌÉÃÙ +ÄÁÀÔ ÏÛÉÂËÉ × ÐÅÒÅÎÏÓÁÈ, ÐÒÉÞÅÍ ÎÁÉÌÕÞÛÉÅ ÒÅÚÕÌØÔÁÔÙ, ÎÁ ÐÅÒ×ÙÊ ×ÚÇÌÑÄ, +ÐÏÌÕÞÁÌÉÓØ ÐÒÉ ÉÓÐÏÌØÚÏ×ÁÎÉÉ ÔÁÂÌÉà ÷ÕÌÉÓÁ (dv) É ÅÅ ÐÒÏÉÚ×ÏÄÎÙÈ (vl, ct). + +äÌÑ ÂÏÌÅÅ ×ÎÉÍÁÔÅÌØÎÏÇÏ ÁÎÁÌÉÚÁ ÒÁÚÌÉÞÉÊ ÔÁÂÌÉà ÂÙÌÉ ÉÚÕÞÅÎÙ ÆÁÊÌÙ ÒÁÚÌÉÞÉÊ +× ÐÅÒÅÎÏÓÁÈ ÄÌÑ ÓÌÏ×, ÓÇÅÎÅÒÉÒÏ×ÁÎÎÙÈ ÉÚ ÍÏÅÇÏ ÏÒÆÏÇÒÁÆÉÞÅÓËÏÇÏ ÓÌÏ×ÁÒÑ +(ftp://scon155.phys.msu.su/pub/russian/ispell/rus-ispell.tar.gz), ËÏÔÏÒÙÅ +ÐÏËÁÚÁÌÉ, ÞÔÏ ÒÁÚÌÉÞÉÑ ÎÏÓÑÔ ÓÉÓÔÅÍÁÔÉÞÅÓËÉÊ ÈÁÒÁËÔÅÒ. + +ôÁË, ÔÁÂÌÉÃÁ vl Ñ×ÌÑÅÔÓÑ ÐÒÏÓÔÙÍ ÒÁÓÛÉÒÅÎÉÅÍ ÔÁÂÌÉà dv, × ËÏÔÏÒÏÊ ÚÁÐÒÅÝÅÎÙ +×ÓÅ ÐÅÒÅÎÏÓÙ, ÐÒÉ ËÏÔÏÒÙÈ ÐÏÓÌÅÄÎÉÊ ÓÌÏÇ ÏÓÔÁÅÔÓÑ ÂÅÚ ÇÌÁÓÎÏÊ (ÎÁÐÒÉÍÅÒ, +ÂÅÚ-ÄÎ), Á ÔÁËÖÅ ÒÑÄ ÐÅÒÅÎÏÓÏ×, ÐÏÚ×ÏÌÑÀÝÉÈ ÐÏÌÕÞÉÔØ × ÐÅÒÅÎÅÓÅÎÎÏÊ ÓÔÒÏËÅ +ÎÅÐÒÉÌÉÞÎÙÅ ÓÌÏ×Á. ÷ÓÅ ÏÓÔÁÌØÎÙÅ ÎÅÔÏÞÎÏÓÔÉ ÔÁÂÌÉà dv ÔÁÂÌÉÃÁ vl ÐÒÏÓÔÏ +ËÏÐÉÒÕÅÔ. + +÷ ÔÁÂÌÉÃÁÈ ct ÉÓÐÒÁ×ÌÅÎÏ ÍÎÏÖÅÓÔ×Ï ÎÅÔÏÞÎÏÓÔÅÊ ÔÁÂÌÉà dv (ÄÏÂÁ×ÌÅÎÏ, +ÎÁÐÒÉÍÅÒ, ÍÎÏÖÅÓÔ×Ï ÏÔÓÕÔÓÔ×Ï×Á×ÛÉÈ ÐÅÒÅÎÏÓÏ×, ÓËÏÒÒÅËÔÉÒÏ×ÁÎ ÒÑÄ ÏÛÉÂÏË +ÐÅÒÅÎÏÓÏ× ÎÁ ÇÒÁÎÉÃÅ ÐÒÉÓÔÁ×ËÁ-ËÏÒÅÎØ), ÎÏ ×ÓÅ ÒÁ×ÎÏ ÏÛÉÂËÉ ÏÓÔÁÌÉÓØ, +ÎÁÐÒÉÍÅÒ: ×Á-ËÕ-ÕÍ-É-ÒÏ-×Á-ÎÉÅ, ×Ù-Ó-ËÁ-ÖÕ, ÄÒÅ×-ÎÅÅ-×ÒÅÊ-ÓËÉÊ, +ÉÓ-ËÏ-ÒÅ-ÖØ-ÔÅ, ÎÅÏ-ÐÁÓ-ÎÙÊ, ÏÄ-Õ-ÒÉ, ÐÌÁÃ-Ä-ÁÒ-ÍÅ, ÐÏÄ-ÕÒ-ÎÅ-Å-ÔÅ, ÓÏ-ÓÎ, +ÓÒÁ-ÚÉ-ÍÓÑ (ÚÎÁËÉ ÐÅÒÅÎÏÓÁ ÕËÁÚÙ×ÁÀÔ ÎÁ ÍÅÓÔÁ ×ÏÚÍÏÖÎÙÈ ÐÅÒÅÎÏÓÏ×; ÐÒÁ×ÉÌÁ +ÐÅÒÅÎÏÓÏ× ÓÍÏÔÒÉ × ÓÏÐÒÏ×ÏÖÄÁÀÝÅÍ ÆÁÊÌÅ hyphen.rules). ðÒÉ ÜÔÏÍ ÎÅ ×ÓÅ +ÉÓÐÒÁ×ÌÅÎÉÑ ÍÏÖÎÏ ÐÒÉÚÎÁÔØ ÕÄÁÞÎÙÍÉ (ÐÒÏÐÁÄÁÅÔ ÞÁÓÔØ ÐÅÒÅÎÏÓÏ×, ÉÎÏÇÄÁ +×ÏÚÎÉËÁÀÔ ÏÛÉÂËÉ). + +ôÁÂÌÉÃÙ as, zn ÓÏÄÅÒÖÁÔ ÚÁÍÅÔÎÏ ÂÏÌØÛÅ ÏÛÉÂÏË, ËÏÔÏÒÙÅ ÐÒÉ ÆÏÒÍÁÔÉÒÏ×ÁÎÉÉ +ÔÅËÓÔÁ ÓÒÅÄÓÔ×ÁÍÉ TeX ÐÒÏÑ×ÌÑÀÔÓÑ ËÁË ÎÅÕÄÁÞÎÙÊ ÐÅÒÅÎÏÓ × ÓÕÆÆÉËÓÅ ÉÌÉ +ËÁË ÎÅÐÒÁ×ÉÌØÎÏÅ ÏÔÄÅÌÅÎÉÅ ÐÒÉÓÔÁ×ËÉ ÏÔ ËÏÒÎÑ. ôÁË, × ÔÁÂÌÉÃÁÈ as +ÐÏÑ×ÌÑÅÔÓÑ ÒÁÚÂÉÅÎÉÅ ÂÕË× ÓÔ × ÓÕÆÆÉËÓÁÈ (Á×-ÔÏÒ-ÓÔ-×Ï, ÁËÕÛÅÒÓ-Ô-×Ï, +ÁÎÏ-ÎÉÍ-ÎÏÓ-ÔÉ), É ÒÑÄ ÄÒÕÇÉÈ ÏÛÉÂÏË (ÁÎÔÉË-ÒÉ-ÚÉÓ-ÎÙÊ, ×Â-ÌÉ-ÚÉ, +×ÎÅÓ-ÌÕ-ÖÅÂ-ÎÙÊ, Ä×Õ-Èß-ÑÒÕÓ-ÎÙÊ, ÍÅ-ÖÁ-ÔÏÍ-ÎÙÊ, ÏÄÕ-ÈÏÔ-×Ï-ÒÅÎ-ÎÏ, +ÓÔÒÏÊÐ-ÌÏ-ÝÁÄ-ËÁ, ÔÅ-ÈÏÔ-ÄÅ-ÌÅ, ÞÅ-ÈÏÓ-ÌÏ-×ÁÃ-ËÉÊ, ÔÒÅÈ-Ð-ÒÏ-ÃÅÎÔ-ÎÙÊ, +ÆÅÌØ-Äß-ÅÇÅ-ÒÀ, ÆÕÔ-ÂÏ-ÌÉÓ-ÔÙ, ÞÉÓ-ÔÏÐ-ÌÀ-Å×, ÛÅÒÓ-ÔÑ-ÎÏÊ). îÅÓËÏÌØËÏ +ÌÕÞÛÅÅ ×ÐÅÞÁÔÌÅÎÉÅ ÏÓÔÁÅÔÓÑ ÏÔ ÔÁÂÌÉà zn, ÈÏÔÑ × ÎÉÈ ÐÒÉÓÕÔÓÔ×ÕÅÔ ÔÏ ÖÅ +ÎÁÄÏÅÄÌÉ×ÏÅ ÒÁÚÂÉÅÎÉÅ ÂÕË× ÓÔ × ÓÕÆÆÉËÓÁÈ (ÁÒ-ÔÉÓ-ÔÉÞ-ÎÏÓ-ÔØÀ, +ÉÚ-ÄÁ-ÔÅÌØ-ÓÔ-×Ï, ÓÔÒÏ-ÇÏÓ-ÔÉ, ÛÅÓ-ÔØÀ) É ÏÛÉÂËÉ (ÂÅ-ÓÔÁÒ-ÎÁÑ, +ÂÏ-ÇÏÐ-ÒÏ-ÔÉ×-ÎÙÊ, ÚÁ-×ÏÔ-ÄÅ-ÌÏÍ, ËÉ-ÎÏ-Óß-ÅÍÏÞ-ÎÙÊ, ÍÅ-ÔÅÏÓ-×ÏÄ-ËÏÊ, +ÍÏ-ÎÏ-ËÌØ, ÐÅ-ÒÅ-ÊÄÅÎ-ÎÙÊ, ÆØ-ÏÒ-ÄÙ, ÛØ-ÅÔ). + +ôÁÂÌÉÃÙ mg ÏÔÌÉÞÁÅÔ ÉÈ ÍÁÌÙÊ ÒÁÚÍÅÒ (ÎÅÂÏÌØÛÏÅ ÞÉÓÌÏ ÐÒÁ×ÉÌ ÐÅÒÅÎÏÓÁ), +ÏÄÎÁËÏ ÐÒÉ ÜÔÏÍ ËÏÌÉÞÅÓÔ×Ï ÏÛÉÂÏË × ÎÉÈ ÏËÁÚÙ×ÁÅÔÓÑ ÎÁÍÎÏÇÏ ÂÏÌØÛÅ. + +âÅÚÕÓÌÏ×ÎÏ, ÏÛÉÂËÉ ÐÒÉ ÐÅÒÅÎÏÓÅ ÎÅÉÚÂÅÖÎÙ, ÔÅÍ ÂÏÌÅÅ ÞÔÏ ÓÔÒÏÇÉÅ ÐÒÁ×ÉÌÁ +ÐÅÒÅÎÏÓÏ× ÏÔÓÕÔÓÔ×ÕÀÔ, Á ÓÁÍÉ ÐÒÁ×ÉÌÁ ÓÏÄÅÒÖÁÔ ÉÓËÌÀÞÅÎÉÑ (ÎÁÐÒÉÍÅÒ, +ÐÅÒ×ÙÊ ÐÅÒÅÎÏÓ × ÓÌÏ×Å ÉÚÕ-ÞÅ-ÎÉÅ ÏÔÒÙ×ÁÅÔ ÇÌÁÓÎÕÀ ÏÔ ËÏÒÎÑ, ÞÔÏ ÚÁÐÒÅÝÅÎÏ +ÆÏÒÍÁÌØÎÙÍÉ ÐÒÁ×ÉÌÁÍÉ, ÎÏ ÔÅÍ ÎÅ ÍÅÎÅÅ ÓÞÉÔÁÅÔÓÑ ÐÒÁ×ÉÌØÎÙÍ). ëÒÏÍÅ ÔÏÇÏ, +ÐÅÒÅÎÏÓÙ ÄÏÌÖÎÙ ÒÁÓÓÔÁ×ÌÑÔØÓÑ ÔÁË, ÞÔÏÂÙ ÒÁÚÏÒ×ÁÎÎÏÅ ÓÌÏ×Ï ÏÓÔÁ×ÁÌÏÓØ +ÌÅÇËÏ ÕÚÎÁ×ÁÅÍÙÍ. îÁÐÒÉÍÅÒ, ÓÌÏ×Á ÐÅÒÅ-ÏÆÏÒÍÌÅÎÎÙÊ, ÎÁÉ-×ÁÖÎÅÊÛÉÊ, +ÇÅÏ-ÇÒÁÆÉÑ ÕÚÎÁÀÔÓÑ ÇÏÒÁÚÄÏ ÌÅÇÞÅ, ÞÅÍ ÆÏÒÍÁÌØÎÏ ×ÅÒÎÙÅ × ÓÍÙÓÌÅ ÐÅÒÅÎÏÓÏ× +ÓÌÏ×Á ÐÅÒÅÏ-ÆÏÒÍÌÅÎÎÙÊ, ÎÁ-É×ÁÖÎÅÊÛÉÊ, ÇÅ-ÏÇÒÁÆÉÑ. ðÏ ÜÔÏÊ ÐÒÉÞÉÎÅ ÎÅËÏÔÏÒÙÅ +ÐÅÒÅÎÏÓÙ ÌÕÞÛÅ ÚÁÐÒÅÔÉÔØ. + +ôÁË ÐÏÑ×ÉÌÁÓØ ÉÄÅÑ ÓÏÚÄÁÔØ (ÐÏ ËÒÁÊÎÅÊ ÍÅÒÅ ÄÌÑ Ó×ÏÅÊ ÒÁÂÏÔÙ) ÔÁÂÌÉÃÙ, +ÓÏÄÅÒÖÁÝÉÅ ×ÏÚÍÏÖÎÏ ÍÅÎØÛÅÅ ÞÉÓÌÏ ÏÛÉÂÏË. îÁ ÐÅÒ×ÏÍ ÜÔÁÐÅ ÂÙÌÏ ÒÅÛÅÎÏ +ÍÏÄÉÆÉÃÉÒÏ×ÁÔØ ÔÁÂÌÉÃÙ ÷ÕÌÉÓÁ, ËÏÔÏÒÙÅ Ñ×ÌÑÀÔÓÑ public domain, ÒÁÚÒÅÛÅÎÙ +ÄÌÑ ÍÏÄÉÆÉËÁÃÉÉ É, ËÁË ÍÎÅ ÐÏËÁÚÁÌÏÓØ, ÓÏÄÅÒÖÁÔ ÓÒÁ×ÎÉÔÅÌØÎÏ ÎÅÍÎÏÇÏ ÏÛÉÂÏË. +÷ÏÚÍÏÖÎÏ, ÍÏÄÉÆÉËÁÃÉÑ ÔÁÂÌÉà úÎÁÍÅÎÓËÏÇÏ ÂÙÌÁ ÂÙ ÂÏÌÅÅ ÜÆÆÅËÔÉ×ÎÏÊ, ÎÏ ÏÎÁ +ÚÁÐÒÅÝÅÎÁ ÌÉÃÅÎÚÉÅÊ. îÏ×ÁÑ ÔÁÂÌÉÃÁ ÂÙÌÁ ÎÁÚ×ÁÎÁ (× ÓÏÏÔ×ÅÔÓÔ×ÉÉ ÓÏ ÓÈÅÍÏÊ +ÎÁÉÍÅÎÏ×ÁÎÉÑ, ÐÒÅÄÌÏÖÅÎÎÏÊ × ÐÁËÅÔÅ ruhyphen) ruhyphal.tex. + +îÁ ÐÅÒ×ÏÍ ÜÔÁÐÅ × ÔÁÂÌÉÃÕ ÂÙÌÉ ×ËÌÀÞÅÎÙ ÐÒÁ×ÉÌÁ, ÉÓËÌÀÞÁÀÝÉÅ ÇÅÎÅÒÁÃÉÀ +ÐÏÓÌÅÄÎÅÇÏ ÓÌÏÇÁ ÂÅÚ ÇÌÁÓÎÏÊ (ÔÉÐÁ ÍÏ-ÎÏ-ËÌØ); ÎÁÊÄÅÎÙ É ÄÏÂÁ×ÌÅÎÙ ÁÎÁÌÏÇÉÞÎÙÅ +ÐÒÁ×ÉÌÁ ÄÌÑ ÉÓËÌÀÞÅÎÉÑ ÐÏÑ×ÌÅÎÉÑ ÐÅÒ×ÏÇÏ ÓÌÏÇÁ ÂÅÚ ÇÌÁÓÎÏÊ (ÔÁËÉÈ ËÁË ÛØ-ÅÔ); +ÉÓËÌÀÞÅÎÏ ÂÏÌØÛÉÎÓÔ×Ï ÓÌÕÞÁÅ× ÐÏÑ×ÌÅÎÉÑ × ÓÅÒÅÄÉÎÅ ÓÌÏ×Á ÓÌÏÇÏ×, ÓÏÓÔÏÑÝÉÈ +ÉÚ ÏÄÎÉÈ ÓÏÇÌÁÓÎÙÈ; ÐÅÒÅÐÉÓÁÎÙ ÐÒÁ×ÉÌÁ ÐÅÒÅÎÏÓÏ× ÓÌÏ×, ÓÏÄÅÒÖÁÝÉÈ ÂÕË×Ù Ê, ß. +ðÏ ÓÒÁ×ÎÅÎÉÀ Ó ÉÓÈÏÄÎÙÍÉ ÔÁÂÌÉÃÁÍÉ dv ÂÙÌÏ ÉÚÍÅÎÅÎÏ (ÉÓËÌÀÞÅÎÏ ÉÌÉ ÐÅÒÅÄÅÌÁÎÏ) +ÐÒÉÍÅÒÎÏ 25% ÐÒÁ×ÉÌ. âÙÌ ÉÓÐÒÁ×ÌÅÎ ÒÑÄ ÏÛÉÂÏË, ×ÏÚÎÉËÁÀÝÉÈ ÎÁ ÇÒÁÎÉÃÅ +ÐÒÉÓÔÁ×ËÁ-ËÏÒÅÎØ, É ÐÒÁËÔÉÞÅÓËÉ ×ÓÅ ÏÛÉÂËÉ ÐÒÉ ÇÅÎÅÒÁÃÉÉ ÏËÏÎÞÁÎÉÊ. +ëÒÏÍÅ ÔÏÇÏ, ÉÚ ÜÓÔÅÔÉÞÅÓËÉÈ ÓÏÏÂÒÁÖÅÎÉÊ ÄÏÂÁ×ÌÅÎÏ ÐÒÁ×ÉÌÏ, ÐÏ ËÏÔÏÒÏÍÕ ÎÅ +ÍÏÇÕÔ ÐÅÒÅÎÏÓÉÔØÓÑ ÓÌÏÇÉ, ÓÏÓÔÏÑÝÉÅ ÉÚ Ä×ÕÈ ÇÌÁÓÎÙÈ ÂÅÚ ÓÏÇÌÁÓÎÏÊ (ÔÉÐÁ +ÁÕ-ÄÉÔÏÒÉÑ). óÄÅÌÁÎÎÙÅ ÉÓÐÒÁ×ÌÅÎÉÑ ËÏÓÎÕÌÉÓØ ÎÁÐÉÓÁÎÉÑ ÂÏÌÅÅ 51 ÔÙÓÑÞ +ÓÌÏ×. + +óÌÅÄÕÀÝÁÑ (×ÔÏÒÁÑ) ×ÅÒÓÉÑ ÔÁÂÌÉà ruhyphal.tex ÓÏÚÄÁÎÁ Ó ÐÏÍÏÝØÀ ÐÒÏÇÒÁÍÍÙ +patgen ÎÁ ÏÓÎÏ×Å ÄÏÓÔÁÔÏÞÎÏ ÔÝÁÔÅÌØÎÏ ×Ù×ÅÒÅÎÎÏÇÏ ÓÐÉÓËÁ ÓÌÏ× Ó ÐÅÒÅÎÏÓÁÍÉ, +ÐÏÌÕÞÅÎÎÙÈ ÎÁ ÐÅÒ×ÏÍ ÜÔÁÐÅ. ðÏ ÓÒÁ×ÎÅÎÉÀ Ó ÐÅÒ×ÙÍ ÜÔÁÐÏÍ, ÎÁ ×ÔÏÒÏÍ +ÜÔÁÐÅ × ÓÐÉÓËÅ ÂÙÌÏ ÓËÏÒÒÅËÔÉÒÏ×ÁÎÏ ÎÁÐÉÓÁÎÉÅ ÏËÏÌÏ 24 ÔÙÓÑÞ ÓÌÏ×. +ðÏÓÌÅÄÎÑÑ (ÎÁÓÔÏÑÝÁÑ) ×ÅÒÓÉÑ ÔÁÂÌÉà ruhyphal.tex ÔÁËÖÅ ÓÏÚÄÁÎÁ Ó ÐÏÍÏÝØÀ +ÐÒÏÇÒÁÍÍÙ patgen ÎÁ ÏÓÎÏ×Å ÒÁÓÛÉÒÅÎÎÏÇÏ ÓÐÉÓËÁ ÓÌÏ× (990 ÔÙÓÑÞ ÓÌÏ×ÏÆÏÒÍ) +Ó ÍÎÏÖÅÓÔ×ÏÍ ÄÏÐÏÌÎÅÎÉÊ É ÕÌÕÞÛÅÎÉÊ × ÐÅÒÅÎÏÓÁÈ. + +ïÄÎÏ×ÒÅÍÅÎÎÏ Ó ÔÁÂÌÉÃÁÍÉ ruhyphal.tex × ÐÁËÅÔ ×ËÌÀÞÅÎÁ ÄÏÐÏÌÎÉÔÅÌØÎÁÑ +ÔÁÂÌÉÃÁ cyryoal.tex, ÓÏÄÅÒÖÁÝÁÑ ×ÓÅ ÓÕÝÅÓÔ×ÅÎÎÙÅ ÐÒÁ×ÉÌÁ ÆÏÒÍÉÒÏ×ÁÎÉÑ +ÐÅÒÅÎÏÓÏ× × ÓÌÏ×ÁÈ, ÓÏÄÅÒÖÁÝÉÈ ÂÕË×Õ £. üÔÉ ÔÁÂÌÉÃÙ ÇÅÎÅÒÉÒÕÀÔÓÑ Ó ÐÏÍÏÝØÀ +ÐÒÏÇÒÁÍÍÙ mkcyryo, ÉÚ ËÏÔÏÒÙÈ ÚÁÔÅÍ Ó ÐÏÍÏÝØÀ ÍÏÅÇÏ ÏÒÆÏÇÒÁÆÉÞÅÓËÏÇÏ +ÓÌÏ×ÁÒÑ (ÁÄÒÅÓ ËÏÔÏÒÏÇÏ ÂÙÌ ÕËÁÚÁÎ ×ÙÛÅ) ÕÄÁÌÑÀÔÓÑ ×ÓÅ ÎÅÉÓÐÏÌØÚÕÅÍÙÅ ÐÒÁ×ÉÌÁ. + +ðÏÓÌÅ ÞÅÔÙÒÅÈ ÌÅÔ ÒÁÂÏÔÙ ÎÁÄ ÔÁÂÌÉÃÁÍÉ, ËÁË ÍÎÅ ËÁÖÅÔÓÑ, ÉÈ ËÁÞÅÓÔ×Ï ÓÔÁÌÏ +ÌÕÞÛÅ, ÞÅÍ ËÁÞÅÓÔ×Ï ÏÓÔÁÌØÎÙÈ ÔÁÂÌÉà ÐÅÒÅÎÏÓÁ. ïÄÎÁËÏ ÏËÏÎÞÁÔÅÌØÎÏÅ +ÓÕÖÄÅÎÉÅ ÐÏ ÜÔÏÍÕ ×ÏÐÒÏÓÕ ÍÏÇÕÔ ÓÄÅÌÁÔØ ÔÏÌØËÏ ÐÏÌØÚÏ×ÁÔÅÌÉ. óÁÍÉ ÔÁÂÌÉÃÙ +× ËÏÄÉÒÏ×ËÅ koi8-r ÍÏÖÎÏ ÎÁÊÔÉ ÐÏ ÁÄÒÅÓÕ: + + ftp://scon155.phys.msu.su/pub/russian/hyphen/ruhyphal.tar.gz + +ó×ÏÉ ËÏÍÍÅÎÔÁÒÉÉ É ÐÏÖÅÌÁÎÉÑ ×Ù ÍÏÖÅÔÅ ÎÁÐÒÁ×ÌÑÔØ ÓÏÓÔÁ×ÉÔÅÌÀ ÔÁÂÌÉÃ, +áÌÅËÓÁÎÄÒÕ ìÅÂÅÄÅ×Õ . + diff --git a/Master/texmf-dist/source/generic/ruhyphen/hyphen.rules b/Master/texmf-dist/source/generic/ruhyphen/hyphen.rules new file mode 100644 index 00000000000..996e146b5d8 --- /dev/null +++ b/Master/texmf-dist/source/generic/ruhyphen/hyphen.rules @@ -0,0 +1,129 @@ +ðÒÁ×ÉÌÁ ÐÅÒÅÎÏÓÁ × ÒÕÓÓËÏÍ ÑÚÙËÅ (ÚÁÉÍÓÔ×Ï×ÁÎÏ ÉÚ ËÎÉÇÉ ë.é.âÙÌÉÎÓËÏÇÏ +É î.î.îÉËÏÌØÓËÏÇÏ "óÐÒÁ×ÏÞÎÉË ÐÏ ÏÒÆÏÇÒÁÆÉÉ É ÐÕÎËÔÕÁÃÉÉ ÄÌÑ ÒÁÂÏÔÎÉËÏ× +ÐÅÞÁÔÉ" (íÏÓË×Á, éÓËÕÓÓÔ×Ï, 1952). + +1. óÌÏ×Ï ÐÅÒÅÎÏÓÉÔÓÑ ÐÏ ÓÌÏÇÁÍ: ÓÔÏ-ÌÉË, ÷Á-ÓÉ-ÌÉ-ÓÁ. + +2. îÅÌØÚÑ ÏÓÔÁ×ÌÑÔØ ÎÁ ÐÒÅÄÙÄÕÝÅÊ ÓÔÒÏËÅ ÉÌÉ ÐÅÒÅÎÏÓÉÔØ ÎÁ ÓÌÅÄÕÀÝÕÀ +ÓÔÒÏËÕ ÏÄÎÕ ÂÕË×Õ ÓÌÏ×Á. + +3. âÕË×Ù ß, Ø, Ê ÎÅÌØÚÑ ÏÔÄÅÌÑÔØ ÏÔ ÐÒÅÄÛÅÓÔ×ÕÀÝÅÊ ÂÕË×Ù; ÍÏÖÎÏ ÐÅÒÅÎÅÓÔÉ +ÔÁË: ÐÏÄß-ÅÚÄ, ÐÏÌØ-ÚÁ, ×ÏÊ-ÎÁ, ÒÁÊ-ÏÎ. + +4. ðÒÉ ÐÅÒÅÎÏÓÅ ÓÌÏ× ÎÁ ÍÅÓÔÅ ÓÏÅÄÉÎÅÎÉÑ Ä×ÕÈ ÉÌÉ ÂÏÌØÛÅ ÓÏÇÌÁÓÎÙÈ ÜÔÉ +ÓÏÇÌÁÓÎÙÅ ÍÏÖÎÏ ÏÔÎÅÓÔÉ É Ë ÐÒÅÄÛÅÓÔ×ÕÀÝÅÍÕ ÓÌÏÇÕ É Ë ÐÏÓÌÅÄÕÀÝÅÍÕ: +ÓÅ-ÓÔÒÁ, ÓÅÓ-ÔÒÁ, ÓÅÓÔ-ÒÁ. + +5. ðÒÉ ÄÅÌÅÎÉÉ ÎÁ ÓÌÏÇÉ É ÐÒÉ ÐÅÒÅÎÏÓÅ ÎÅ ÓÌÅÄÕÅÔ ÓÏÇÌÁÓÎÕÀ ËÏÒÎÑ, +ÓÔÏÑÝÕÀ ÎÁ ÓÔÙËÅ Ó ÓÕÆÆÉËÓÏÍ, ÏÔÎÏÓÉÔØ Ë ÓÕÆÆÉËÓÕ. îÅÐÒÁ×ÉÌØÎÏ: ÌÏ-×ÞÉÊ, +ÍÏÓËÏ-×ÓËÉÊ, ÒÏ-ÄÎÏÊ; ÓÌÅÄÕÅÔ: ÌÏ×-ÞÉÊ, ÍÏÓËÏ×-ÓËÉÊ, ÒÏÄ-ÎÏÊ. + +ðÒÉ ÓÔÅÞÅÎÉÉ ÓÏÇÌÁÓÎÙÈ, ÏÔÎÏÓÑÝÉÈÓÑ Ë ÒÁÚÎÙÍ ÓÕÆÆÉËÓÁÍ, ÌÕÞÛÅ ÒÁÚÄÅÌÑÔØ +ÐÏ ÓÕÆÆÉËÓÁÍ. îÁÐÒÉÍÅÒ: ÍÅÝÁÎ-ÓÔ×Ï, Á ÎÅ ÍÅÝÁ-ÎÓÔ×Ï; ÉÌÉ ÓÔÒÏÉÔÅÌØ-ÓÔ×Ï, +Á ÎÅ ÓÔÒÏÉÔÅ-ÌØÓÔ×Ï É ÎÅ ÓÔÒÏÉÔÅÌØÓ-Ô×Ï. + +6. îÅ ÓÌÅÄÕÅÔ ÓÏÇÌÁÓÎÕÀ ÐÒÉÓÔÁ×ËÉ ÏÔÎÏÓÉÔØ Ë ÓÌÅÄÕÀÝÅÍÕ ÚÁ ÎÅÊ ÓÌÏÇÕ +ÉÌÉ ÓÏÇÌÁÓÎÕÀ ËÏÒÎÑ (ÂÅÚ ÇÌÁÓÎÏÊ) ÏÓÔÁ×ÌÑÔØ ÐÒÉ ÐÒÉÓÔÁ×ËÅ. îÅÐÒÁ×ÉÌØÎÏ: +ÐÏ-ÄÂÅÖÁÔØ, ÂÅ-ÓÐÒÅÓÔÁÎÎÏ, ×ÙÓ-ÔÉÒÁÔØ, ÐÒÅË-ÒÁÓÎÙÊ, ÐÒÅÓ-ÌÅÄÏ×ÁÔØ; +ÓÌÅÄÕÅÔ: ÐÏÄ-ÂÅÖÁÔØ, ÂÅÓ-ÐÒÅÓÔÁÎÎÏ, ×Ù-ÓÔÉÒÁÔØ, ÐÒÅ-ËÒÁÓÎÙÊ, ÐÒÅ-ÓÌÅÄÏ×ÁÔØ. + +éÓËÌÀÞÅÎÉÅ: ÓÌÏ×Á, ÇÄÅ ÐÒÉÓÔÁ×ËÁ ÐÏÔÅÒÑÌÁ ÕÖÅ Ó×ÏÅ ÓÁÍÏÓÔÏÑÔÅÌØÎÏÅ ÚÎÁÞÅÎÉÅ +É ÓÌÉÌÁÓØ Ó ËÏÒÎÅÍ: ÒÁ-ÚÕÍ, ÐÏ-ÄÕÛËÁ. + +7. åÓÌÉ ËÏÒÅÎØ ÓÌÏ×Á ÎÁÞÉÎÁÅÔÓÑ Ó ÇÌÁÓÎÏÊ, ÔÏ ÎÅ ÓÌÅÄÕÅÔ ÏÓÔÁ×ÌÑÔØ ÎÁ +ÏÄÎÏÊ ÓÔÒÏËÅ ÐÒÉÓÔÁ×ËÕ Ó ÐÅÒ×ÏÊ ÇÌÁÓÎÏÊ ËÏÒÎÑ, Á ÏÓÔÁÌØÎÕÀ ÞÁÓÔØ ÓÌÏ×Á +ÐÅÒÅÎÏÓÉÔØ. óÌÅÄÕÅÔ ÉÌÉ ÏÔÄÅÌÉÔØ ÐÒÉÓÔÁ×ËÕ ÏÔ ËÏÒÎÑ ÉÌÉ ÏÓÔÁ×ÉÔØ ÐÒÉ ÎÅÊ +Ä×Á ÓÌÏÇÁ ËÏÒÎÑ. îÅÐÒÁ×ÉÌØÎÏ: ÂÅÚÁ-×ÁÒÉÊÎÙÊ, ÏÂÏ-ÓÔÒÅÎÉÅ, ÐÒÉÕ-ÒÏÞÉÔØ, +ÐÏÄÏ-ÓÉÎÏ×ÉË; ÓÌÅÄÕÅÔ: ÂÅÚ-Á×ÁÒÉÊÎÙÊ, ÏÂ-ÏÓÔÒÅÎÉÅ, ÐÒÉ-ÕÒÏÞÉÔØ, ÐÏÄ-ÏÓÉÎÏ×ÉË +ÉÌÉ ÐÒÉÕÒÏ-ÞÉÔØ, ÐÏÄÏÓÉ-ÎÏ×ÉË. + +ëÏÎÅÞÎÏ, ÎÁÄÏ ÏÔÌÉÞÁÔØ ÎÁÞÁÌØÎÕÀ ÇÌÁÓÎÕÀ ËÏÒÎÑ ÏÔ ×ÁÒÉÁÎÔÏ× ÐÒÉÓÔÁ×ËÉ. +îÁÐÒÉÍÅÒ, ÐÒÁ×ÉÌØÎÏ ÐÅÒÅÎÅÓÔÉ ÔÁË: ÎÁÄÏ-Ò×ÁÔØÓÑ, ÏÂÏ-ÇÎÁÔØ, ÐÒÅÄÏ-ÓÔÁ×ÉÔØ. + +8. ðÒÉ ÐÅÒÅÎÏÓÅ ÓÌÏÖÎÙÅ ÓÏËÒÁÝÅÎÎÙÅ ÓÌÏ×Á ÓÌÅÄÕÅÔ ÒÁÚÂÉ×ÁÔØ ÎÁ ÓÏÓÔÁ×ÌÑÀÝÉÅ +ÉÈ ÞÁÓÔÉ: ÐÁÒÔ-ÏÒÇ, ÓÐÅÃ-ÓÔÁ×ËÁ, ÎÏ ÎÅ ÔÁË: ÐÁÒ-ÔÏÒÇ, ÓÐÅÃÓ-ÔÁ×ËÁ. îÅ +ÓÌÅÄÕÅÔ ÔÁËÖÅ ÏÂÅÓÓÍÙÓÌÉ×ÁÔØ ÓÌÏÖÎÙÅ ÓÌÏ×Á ÐÅÒÅÎÏÓÏÍ. íÏÖÎÏ ÐÅÒÅÎÅÓÔÉ: +ÄÕÒ-ÁÌÀÍÉÎÉÊ, Á ÎÅ ÄÕÒÁ-ÌÀÍÉÎÉÊ. + +9. ðÒÉ ÐÅÒÅÎÏÓÅ ÎÁ ÍÅÓÔÅ ÓÔÙËÁ Ä×ÕÈ ÏÄÉÎÁËÏ×ÙÈ ÓÏÇÌÁÓÎÙÈ ÐÅÒÅÄ ÇÌÁÓÎÏÊ +ÏÄÎÁ ÉÚ ÎÉÈ ÐÅÒÅÎÏÓÉÔÓÑ, ÄÒÕÇÁÑ ÏÓÔÁÅÔÓÑ ÎÁ ÐÒÅÄÙÄÕÝÅÊ ÓÔÒÏËÅ: +ÐÒÏÍÙÛÌÅÎ-ÎÏÓÔØ, ËÌÁÓ-ÓÙ. îÏ: ËÌÁÓÓ-ÎÙÊ, ÐÒÏÇÒÁÍÍ-ÎÙÊ. + +ðÒÉÓÔÁ×ËÉ × É Ó ÐÅÒÅÄ ËÏÒÎÑÍÉ, ÎÁÞÉÎÁÀÝÉÍÉÓÑ Ó × É Ó, Á ÔÁËÖÅ Ä×ÏÊÎÙÅ +ÓÏÇÌÁÓÎÙÅ × ÎÁÞÁÌÅ ËÏÒÎÑ ÐÒÉ ÐÅÒÅÎÏÓÅ ÎÅ ÒÁÚÄÅÌÑÀÔÓÑ: ÎÏ×Ï-××ÅÄÅÎÉÅ, +ÐÏ-ÓÓÏÒÉÔØ, ÐÏÄÏ-ÖÖÅÎÎÙÊ. + +10. ÷ ÓÌÏ×ÁÈ, ÉÍÅÀÝÉÈ ÐÏÓÌÅ ÐÒÉÓÔÁ×ËÉ Ù, ÜÔÁ ÂÕË×Á ÏÓÔÁÅÔÓÑ ÐÒÉ ÐÒÉÓÔÁ×ËÅ: +ÒÏÚÙ-ÇÒÙÛ, ÐÏÄÙ-ÓËÁÔØ. + + +ðÏÈÏÖÉÅ (ÞÕÔØ ÄÏÐÏÌÎÅÎÎÙÅ) ÐÒÁ×ÉÌÁ ÍÏÖÎÏ ÎÁÊÔÉ É × ËÎÉÇÅ ÔÅÈ ÖÅ Á×ÔÏÒÏ× +"òÕÓÓËÉÊ ÑÚÙË: óÐÒÁ×ÏÞÎÉË ÐÏ ÏÒÆÏÇÒÁÆÉÉ É ÐÕÎËÔÕÁÃÉÉ" (5-Å ÉÚÄÁÎÉÅ, í., +éÚÄ. íçõ, 1998). + + --------------------------------------------------------------- + +÷ÏÔ ÞÔÏ ÇÏ×ÏÒÉÔ ÂÏÌÅÅ Ó×ÅÖÉÊ ÉÓÔÏÞÎÉË (á.÷.äÕÄÎÉËÏ×, á.é.áÒÂÕÚÏ×Á, +é.é.÷ÏÒÏÖÂÉÃËÁÑ. òÕÓÓËÉÊ ÑÚÙË. í., ÷ÙÓÛ.ÛËÏÌÁ, 1977): + +ïÂÙÞÎÏ ÓÌÏ×Á ÐÅÒÅÎÏÓÑÔÓÑ ÐÏ ÓÌÏÇÁÍ (ÄÏ-ÒÏ-ÇÁ, ÐÒÅÄ-ÒÁÓ-Ó×ÅÔ-ÎÙÊ, +ÐÒÏ-ÄÏÌ-ÖÉ-ÔÅÌØ-ÎÏÓÔØ). + +äÁÎÎÏÅ ÐÒÁ×ÉÌÏ ÉÍÅÅÔ ÓÌÅÄÕÀÝÉÅ ÏÇÒÁÎÉÞÅÎÉÑ: + +1. ÎÁÞÁÌØÎÙÅ É ËÏÎÅÞÎÙÅ ÇÌÁÓÎÙÅ ÂÕË×Ù, ÏÂÏÚÎÁÞÁÀÝÉÅ ÏÔÄÅÌØÎÙÊ ÓÌÏÇ, ÎÅ +ÏÓÔÁ×ÌÑÀÔÓÑ ÎÁ ÓÔÒÏËÅ É ÎÅ ÐÅÒÅÎÏÓÑÔÓÑ ÎÁ ÓÔÒÏËÕ (ÁÍÅ-ÒÉ-ËÁÎ-ÓËÉÊ, +ÑÐÏÎ-ÓËÉÊ, ÐÏ-Ü-ÚÉÑ, ÔÒÕ-ÄÏ-ÌÀ-ÂÉÅ); + +2. ËÏÎÅÞÎÙÅ ÓÏÇÌÁÓÎÙÅ ÂÕË×Ù ÐÒÉÓÔÁ×ÏË ÎÅÏÂÈÏÄÉÍÏ ÏÓÔÁ×ÌÑÔØ ÎÁ ÓÔÒÏËÅ +(ÐÏÄ-ÂÒÏ-ÓÉÔØ, ×ÏÚ-ÒÁ-ÚÉÔØ, ÎÁÄ-ÂÒÏ×-ÎÙÊ); + +3. ÎÅÌØÚÑ ÐÅÒÅÎÏÓÉÔØ ÎÁ ÓÌÅÄÕÀÝÕÀ ÓÔÒÏËÕ ÞÁÓÔØ ÓÌÏ×Á, ÎÁÞÉÎÁÀÝÕÀÓÑ +ÂÕË×ÏÊ Ù (ÐÏ-ÄÙ-ÔÏ-ÖÉÔØ); + + [úÁÍÅÞÁÎÉÅ: ÎÅÔÒÕÄÎÏ ×ÉÄÅÔØ, ÞÔÏ ÐÅÒ×ÙÊ ÐÅÒÅÎÏÓ × ÐÒÉÍÅÒÅ + ÎÁÒÕÛÁÅÔ ÐÒÁ×ÉÌÏ 2. üÔÏÔ ÐÅÒÅÎÏÓ ÐÏ-×ÉÄÉÍÏÍÕ ÓÌÅÄÕÅÔ ÉÓËÌÀÞÉÔØ.] + +4. ÎÅÌØÚÑ ÐÒÉÓÏÅÄÉÎÑÔØ Ë ÐÒÉÓÔÁ×ËÅ ÎÁ ÇÌÁÓÎÕÀ ÐÅÒ×ÕÀ ÓÏÇÌÁÓÎÕÀ ÂÕË×Õ +ËÏÒÎÑ (ÐÏ-ÄÒÕ-ÇÉ, ÚÁ-Ó×ÅÔ-ÌÏ, ×Ï-Ò×ÁÔØ-ÓÑ); + +5. ÎÅÌØÚÑ ÒÁÚÂÉ×ÁÔØ ÐÒÉ ÐÅÒÅÎÏÓÅ ÓÕÆÆÉËÓ -ÓË- (ÓÏ-×ÅÔ-ÓËÉÊ, ÆÒÁÎ-ÃÕÚ-ÓËÉÊ, +ÒÕÓ-ÓËÉÊ); ÐÒÏÉÚ×ÏÄÎÙÅ ÏÔ ÎÅÇÏ ÓÕÆÆÉËÓÙ -ÅÓË-, -ÞÅÓË- É ÄÒ. ÐÒÉ ÐÅÒÅÎÏÓÅ +ÒÁÚÂÉ×ÁÀÔÓÑ (×ÒÁ-ÖÅÓ-ËÉÊ, ÕÐÁ-ÄÏÞ-ÎÉ-ÞÅÓ-ËÉÊ); + +6. ÎÅÌØÚÑ ÏÓÔÁ×ÌÑÔØ ÎÁ ÓÔÒÏËÅ ÉÌÉ ÐÅÒÅÎÏÓÉÔØ ÎÁ ÓÌÅÄÕÀÝÕÀ ÓÔÒÏËÕ Ä×Å +ÏÄÉÎÁËÏ×ÙÅ ÓÏÇÌÁÓÎÙÅ (ËÏÌ-ÌÅË-ÃÉÑ, ËÏÍ-ÍÕ-ÎÉÚÍ, ÏÓÅÎ-ÎÉÊ). + + ----------------------------------------------------------------- + +á ×ÏÔ ÞÔÏ ÎÁÐÉÓÁÎÏ × ËÎÉÇÅ æ.âÁÕÜÒÁ "áÚÂÕËÁ ÎÁÂÏÒÝÉËÁ" (éÚÄ. ãë óòðð óóóò, +ì., 1925) [ïÓÏÂÅÎÎÏÓÔÉ ÐÕÎËÔÕÁÃÉÉ ÓÏÈÒÁÎÅÎÙ]: + +1. ïÄÎÏÓÌÏÖÎÙÅ ÓÌÏ×Á ÎÅÌØÚÑ ÎÉËÏÇÄÁ ÒÁÚÄÅÌÑÔØ É ÉÈ ÓÌÅÄÕÅÔ ÉÌÉ ×ÙËÌÀÞÁÔØ +× ÔÕ ÖÅ ÓÔÒÏËÕ, ÉÌÉ ÃÅÌÉËÏÍ ÐÅÒÅÎÏÓÉÔØ ÎÁ ÓÌÅÄÕÀÝÕÀ, ÎÁÐÒ., ËÏÔ, ÄÏÖÄØ, +ÓÔÅÐØ. ëÒÏÍÅ ÔÏÇÏ ÎÅÌØÚÑ ÐÅÒÅÎÏÓÉÔØ ÏËÏÎÞÁÎÉÑ ÓÌÏ× ÉÌÉ ÖÅ ÏÔÄÅÌÑÔØ ÎÁÞÁÌÏ +ÓÌÏ×, ÓÏÓÔÏÑÝÉÈ ÉÚ ÏÄÎÉÈ ÔÏÌØËÏ ÓÏÇÌÁÓÎÙÈ ÂÕË×, ËÁË ÎÁÐÒÉÍÅÒ, ÓÌÏ×Ï +"×ÓÐÏÍÎÉ", ÍÏÖÎÏ ÒÁÚÄÅÌÉÔØ ÎÁ ×ÓÐÏ-ÍÎÉ, Á ÎÅ ×Ó-ÐÏÍÎÉ. + +2. îÁÈÏÄÑÝÁÑÓÑ ÍÅÖÄÕ Ä×ÕÍÑ ÇÌÁÓÎÙÍÉ ÏÄÎÁ ÓÏÇÌÁÓÎÁÑ ÐÒÉ ÐÅÒÅÎÏÓÅ ÏÔÎÏÓÉÔÓÑ +Ë ÓÌÅÄÕÀÝÅÍÕ ÓÌÏÇÕ, ËÁË ÎÁÐÒ., ÐÏ-ÌÅ, ÚÎÁ-ÍÑ, Ó×Ï-ÂÏ-ÄÁ. + +3. åÓÌÉ ÍÑÇËÉÊ ÚÎÁË "Ø" ÓÔÏÉÔ ÍÅÖÄÕ Ä×ÕÍÑ ÓÏÇÌÁÓÎÙÍÉ, ÔÏ ÅÇÏ ÎÅÌØÚÑ +ÏÔÄÅÌÑÔØ, Á ÓÌÅÄÕÅÔ ×ÓÅÇÄÁ ÏÓÔÁ×ÌÑÔØ ÎÁ ÐÅÒ×ÏÊ ÓÔÒÏËÅ, ÎÁÐÒ.: ÍÁÌÅÎØ-ËÉÊ, +ÍÁÌØ-ÞÉË. îÏ ÅÓÌÉ "Ø" ÒÁÚÄÅÌÑÅÔ ÇÌÁÓÎÙÅ Å, É, À, Ñ, ÏÔ ÓÏÇÌÁÓÎÏÊ, ÔÏ +ÔÏÇÄÁ ÓÌÏ×Ï ÎÅÌØÚÑ ÒÁÚÂÉÔØ Ó ÏÓÔÁ×ÌÅÎÉÅÍ "Ø" ÎÁ ÐÅÒ×ÏÊ ÓÔÒÏËÅ, Á ÅÇÏ +ÓÌÅÄÕÅÔ ÐÅÒÅÎÅÓÔÉ ÎÁ ÓÌÅÄÕÀÝÕÀ, ÎÁÐÒ. ÷ÏÒÏ-ÂØÅ×, óÏÌÏ-×ØÅ×. + +4. îÅÌØÚÑ ÒÁÚÄÅÌÑÔØ: ÂÌ, ×Ì, ÍÌ, ÐÌ, ÆÌ, ÖÄ, É ÐÏÜÔÏÍÕ ÓÌÅÄÕÅÔ ÐÅÒÅÎÏÓÉÔØ: +ÎÁÄÅ-ÖÄÁ, ÌÏ-×ÌÀ, ÌÀ-ÂÌÀ. + +5. óÕÆÆÉËÓÙ ÓËÉÊ É ÓÔ×Ï ÎÉËÏÇÄÁ ÎÅ ÒÁÚÄÅÌÑÀÔÓÑ, Á ÐÏÜÔÏÍÕ ÓÌÅÄÕÅÔ ÐÅÒÅÎÏÓÉÔØ: +ÈÉÍÉÞÅ-ÓËÉÊ, ÏÐÔÉÞÅ-ÓËÉÊ, ÔÏÒÖÅ-ÓÔ×Ï, ÐÒÁÚÄÎÅ-ÓÔ×Ï. + +6. ðÒÉ ÐÅÒÅÎÏÓÅ ÓÌÏÖÎÙÈ ÓÌÏ× ÎÅÏÂÈÏÄÉÍÏ ÐÏÍÎÉÔØ, ÞÔÏ ÎÅÌØÚÑ ÏÔÎÉÍÁÔØ Õ ËÏÒÎÑ +ÏÄÎÕ ÉÌÉ ÎÅÓËÏÌØËÏ ÂÕË× É ÐÒÉÓÏÅÄÉÎÑÔØ ÉÈ Ë ÐÒÉÓÔÁ×ËÅ, Á ÓÌÅÄÕÅÔ ÄÅÌÉÔØ +ÔÏÞÎÏ ÎÁ ËÏÒÅÎØ É ÐÒÉÓÔÁ×ËÕ Ë ÎÅÍÕ; ÐÏÜÔÏÍÕ ÎÁÄÏ ÐÅÒÅÎÏÓÉÔØ ÐÅÒ×Ï-Ú×ÁÎÎÙÊ, +ÎÉÓ-ÈÏÄÉÔØ. + +7. óÌÏÖÎÙÅ ÓÌÏ×Á ÎÁÄÏ ÄÅÌÉÔØ ÎÁ ÉÈ ÓÏÓÔÁ×ÎÙÅ ÞÁÓÔÉ: ÒÅÓ-ÐÕÂÌÉËÁ, ÔÉÐÏ-ÇÒÁÆÉÑ, +ËÎÉÇÏ-ÐÅÞÁÔÁÎÉÅ, ÐÅÒÅ-ÐÌÅÔÞÉË, ÐÁÒÏ-ÈÏÄ. diff --git a/Master/texmf-dist/source/generic/ruhyphen/mkcyryo b/Master/texmf-dist/source/generic/ruhyphen/mkcyryo new file mode 100755 index 00000000000..286c8657549 --- /dev/null +++ b/Master/texmf-dist/source/generic/ruhyphen/mkcyryo @@ -0,0 +1,22 @@ +#!/bin/sh +# make patterns for the cyryo by repeating patterns for cyre + +TMP=.cyryo-tmp + +awk '/^\\patterns{/ {p=1;next} /^}/ {p=0;next} p {print}' $1 > $TMP +cat $TMP | grep 'Å' | grep -v 'Å[^Å]*Å' > ${TMP}1 +cat $TMP | grep 'Å[^Å]*Å' | grep -v 'Å[^Å]*Å[^Å]*Å' > ${TMP}2 +cat $TMP | grep 'Å[^Å]*Å[^Å]*Å' > ${TMP}3 +test ! -s ${TMP}3 || { echo "*** triple cyre detected in $1:" 1>&2; cat ${TMP}3 1>&2; } + +{ +echo "% accompanying patterns for cyryo generated from $1" +echo "\patterns{" +cat ${TMP}1 | sed 's,Å,£,' +cat ${TMP}2 | sed 'y,Å,£,' +cat ${TMP}2 | sed 's,Å,£,' +cat ${TMP}2 | sed 's,Å,£,2' +echo "}" +} | ./reduce-patt | ./sorthyph + +rm -f $TMP ${TMP}[123] diff --git a/Master/texmf-dist/source/generic/ruhyphen/reduce-patt b/Master/texmf-dist/source/generic/ruhyphen/reduce-patt new file mode 100755 index 00000000000..3d146e09c26 --- /dev/null +++ b/Master/texmf-dist/source/generic/ruhyphen/reduce-patt @@ -0,0 +1,8 @@ +#!/usr/bin/perl -n + +if (/^\\patterns{/) { $p=1; print; next; } +if (/^}/) { $p=0; print; next; } +if (!$p) { print; next; } + +$p=$_; chomp; y/0-9//d; s/^\./^/; s/\.$/\$/; +print $p if (!system "grep", "-q", "$_", "/tmp/.wl-lc-cyryo"); diff --git a/Master/texmf-dist/source/generic/ruhyphen/sorthyph b/Master/texmf-dist/source/generic/ruhyphen/sorthyph new file mode 100755 index 00000000000..13680ee5931 --- /dev/null +++ b/Master/texmf-dist/source/generic/ruhyphen/sorthyph @@ -0,0 +1,9 @@ +#!/usr/bin/perl +# sort a hyphenation file +$| = 1; +while (<>) { print; last if /^\\patterns{/ } +open (SORT, "| sh sortkoi8 | awk '{print \$2}'"); +while (<>) { last if /^}/; chomp; $temp=$_; s/[0-9.]//g; print SORT "$_\t$temp\n" } +close (SORT); +print; +while (<>) { print } diff --git a/Master/texmf-dist/source/generic/ruhyphen/sortkoi8 b/Master/texmf-dist/source/generic/ruhyphen/sortkoi8 new file mode 100755 index 00000000000..ac990400ba3 --- /dev/null +++ b/Master/texmf-dist/source/generic/ruhyphen/sortkoi8 @@ -0,0 +1,16 @@ +#!/bin/sh +# sort a file in Cyrillic koi8-r encoding alphabetically +# +# -f Fold lower case characters into the equivalent upper case +# characters when sorting so that, for example, `B' is greater +# than `a' (without `-f', uppercase characters precede lowercase). + +if [ "$1" = "-f" ]; then + FOLD="-f" + ALPH='áÁâÂ÷×çÇäÄåų£öÖúÚéÉêÊëËìÌíÍîÎïÏðÐòÒóÓôÔõÕæÆèÈãÃþÞûÛýÝÿßùÙøØüÜàÀñÑ' +else + ALPH='áâ÷çäå³öúéêëìíîïðòóôõæèãþûýÿùøüàñÁÂ×ÇÄÅ£ÖÚÉÊËÌÍÎÏÐÒÓÔÕÆÈÃÞÛÝßÙØÜÀÑ' +fi +TEMP='¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ' + +tr $ALPH $TEMP | sort $FOLD | tr $TEMP $ALPH diff --git a/Master/texmf-dist/source/generic/ruhyphen/trans b/Master/texmf-dist/source/generic/ruhyphen/trans new file mode 100755 index 00000000000..1a65ffaec36 --- /dev/null +++ b/Master/texmf-dist/source/generic/ruhyphen/trans @@ -0,0 +1,9 @@ +#!/bin/sh + +koi='áâ÷çäåöúéêëìíîïðòóôõæèãþûýÿùøüàñÁÂ×ÇÄÅÖÚÉÊËÌÍÎÏÐÒÓÔÕÆÈÃÞÛÝßÙØÜÀѳ£' +iso='°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîï¡ñ' +win='ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¨¸' +alt='€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯àáâãäåæçèéêëìíîïðñ' +mac='€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþßÝÞ' + +eval tr \$$1 \$$2 diff --git a/Master/texmf-dist/source/generic/shapepar/proshap.py b/Master/texmf-dist/source/generic/shapepar/proshap.py new file mode 100644 index 00000000000..e91e65e0a55 --- /dev/null +++ b/Master/texmf-dist/source/generic/shapepar/proshap.py @@ -0,0 +1,350 @@ +""" +proshap.py v. 1.1 + +Desc: +Rasterizer for producing shapes useful for the LaTeX package +shapepar. It's a python script. www.python.org. + + +Copyright Manuel Gutierrez Algaba January 2003 +All rights reserved. +Released under GPL license. + +Contact: algaba@gmx.net + +Changes: +1.1 : New {10}{0}b{5.6} command, automatic now. +1.1 : New copyright notice + +known Bugs: + + Watch when have two forks at the same line. Example: + -------------------------------------------- + ----- --------------- -------- + +Solution: Increase the resolution (number of lines and height) and +don't put the two forks at the same line. + +It _may_ fail a 'bit'. + +""" + +import string + +test1 = """ + 3333 + 33333333333 + 33333333333333 + 3333333333333333 + 333333 + 333333 + 3333333 + 3333333 + 3333333 3333 + 3333333 33333333 + 3333333 33333333333 3 + 3333333 333333 33333 33 + 333333 333333 33333 3333 + 333333 333333 33333 3333 + 33333333333333333 3333333333 + 33333333333333 33333333 +""" + +test3 = """ + 33333333333333333 + 33333333333333333333333333333 + 333333333333333333333333333333333 + 33333333333333333333333333333333333 + 3333333333333333333333333333333333333 + 333333 3333333 333333 + 33333 33333 33333 + 333333 3333333 33333 + 33333333333333333 33333333333333333 + 333333333333333 333333333333333 + 3333333333333 3333333333333 + 333333333333333333333333333333 + 3333333333333333333333333333 + 33 333 + 333333 333333333 + 3333333333333333333333 +""" + +test4 = """ + 33 + 333333 + 33333333 + 3333333333 + 333333333333 + 33333333 + 3333333333333333 + 3333 + 3333 +""" + + +test5 = """ + + 333333333333333333333 + 3333333333333333333333 + 33333333333 3333 + 3333333 333 + 33333333 + 33333333333 + 3333333333333333333333333333333333333333333333 + 3333333333333333333333333333333333333333333333 + 3333333333333333333333333333333333333333333333 + 3333333333333333333333333333333333333333333333 + 3333333333333333333333333333333333333333333333 + 33333 333333333 3333333 + 333 3333333 33333 + 33 33333333333 333 + 3 3333333333333333 33 + +""" + +test6 = """ +3 +333 +333333333 + 333333333333 + 33333333333333333 + 33333333333333333 + 33333333333333333 + 33333333333333333 + 333333333333333333 + 3333333333333333333 + 3333333333333333333 + 33333333333333333333 + 33333333333333333 +""" + +test7 = """ + + 3333 33333 333333 333 33 + 333333333333 333 333 33 33 33 + 333 333 333 333 33 333 333 3333 +3333 33333333 333333 33 + + +""" +test8 = """ + + 33333333333333333333333333333333 + 33333333333333333333333333 + 33333 33333 + 3333333 3333333 + 333333333 333333333 + 333333333 333333333 + 3333333 3333333 + 33333333333333333333333333 +""" + +test9 = """ +333333333333333333333333333333333333333333333333333333333333 +333333333333333333333333333333333333333333333333333333333333 + 3333333333333333333333333333333333333333333333 + 33333333333333333333333333333333333333 + 33333333333333333333333333333333 + 333333333333333333333 + 33333333333333333 + 33333333333333333 + 33333333333333333 + 333333333333333333333 + 33333333333333333333333333333333 + 333333333333333333333333333333333333333 + 3333333333333333333333333333333333333333333333 +333333333333333333333333333333333333333333333333333333333333 +""" +test10 = """ + 3 + 3 + 3 + 33333 + 3333333 + 333 + 3 + 3 +""" + +test11 = """ + + 3 + 3333 + 333 +33 +""" + +test12 = """ +3333 3333 3333 3333 +33333 333333 333333 33333 +3333333 333333333 3333333333 333333 +33333333333333333333333333333333333333333333333 +""" +test = test3 +list_of_lines = string.split(test,"\n") + +def detect_start(line, index = 0): + """ + line : not containing \n + """ + c = index + for i in line: + if i!=" ": + return c + c = c +1 + return None + +def detect_end(line, index): + """ + line : not containing \n + """ + c = index + for i in line: + if i==" " : + break + c = c + 1 + return c + +def generate(current, last): + """ + current, last : list of segments, perhaps requiring a + join or a split + + """ + for i in xrange(0,len(current)): + if i == len(current) -1: + break + for j in last: + if j.overlaps(current[i], current[i+1]): + j.make_joint() + #print "o" + + for i in xrange(0,len(last)): + if i == len(last) -1: + break + for j in current: + if j.splits(last[i], last[i+1]): + #print "s" + j.make_split() + +class segment: + def __init__(self, start, end, number ): + self._start = start + self._end = end + self._split = 0 + self._joint = 0 + self._numberofline = number + + def get_no_line(self): + return self._numberofline + + def make_height(self, h): + self._height = h + + def make_joint(self): + self._joint = self._joint + 1 + + def make_split(self): + self._split = self._split + 1 + + def overlaps(self, seg1, seg2): + """ + This segment is the 'father' of seg1 , seg2 , See drawing: + -------------------- <-- seg this + --------- -------- <-- seg1 and seg2 + """ + return seg1._end > self._start and seg2._start < self._end + + def splits(self, seg1, seg2): + """ + This segment is the 'son' of seg1 , seg2 , See drawing: + --------- -------- <-- seg1 and seg2 + -------------------- <-- seg this + """ + return seg1._end > self._start and seg2._start < self._end + + def generate_line(self, factor, heading = None): + dev = "" + if not heading is None : + dev = dev + "{"+ str(self._height)+ "}" + dev = dev +"t{" + l = self._end - self._start + l = l * factor + if self._split: + c = "j" + else: + c = "s" + if self._split or self._joint: + a = self._split + self._joint # one of them will be 0 + div_f = a + 1.0 + dev = dev + str(self._start* factor) + "}{" + str(l/div_f) + \ + "}" + for i in xrange(0,a): + dev = dev + c+ "t{"+ \ + str(self._start* factor + (i+1)*l/div_f)+ \ + "}{" + str(l/div_f) +"}" + else: + dev = dev = dev + str(self._start* factor) + "}{" + str(l)+ "}" + return dev + +list_of_segments = [] +last_line_segments = [] +current_line_segments = [] + +numberofline = 0 +for i in list_of_lines: + numberofline = numberofline + 1 + s = detect_start(i) + if s is None: + continue + e = detect_end(line = i[s:], index = s) + while 1: + #print s,e + current_line_segments.append(segment(s,e, numberofline)) + s = detect_start(line = i[e:], index = e) + if s is None: + break + e = detect_end(line = i[s:], index = s) + + generate(current_line_segments, last_line_segments) + list_of_segments = list_of_segments + current_line_segments + last_line_segments = current_line_segments + current_line_segments =[] + +each_char = 0.4 +height = 0 +inc_height = 0.8 +numberofline = -1 + +#{20}{0}b{1.6} +result = "" +max = -1 +for i in list_of_segments: + if i._end > max: + max = i._end + i.make_height(height) + height = height + inc_height + nl= i.get_no_line() + if nl != numberofline: + numberofline = nl + result = result + "\\\\" + result = result + i.generate_line(each_char,heading = 1) + "\n" + else: + result = result + i.generate_line(each_char) + "\n" + +height = height + inc_height + +# str(list_of_segments[0]._start) +middle = str(each_char *max/2.0) + +result = "\\gdef\\bassshape{{"+ middle + \ + "}{0}b{"+ middle +"}\n" + result + + +result = result+ "\\\\{"+str(height) +"}e{"+ middle +"}" + "}\n" +print result +f = open("result.tex","w") +f.write(result) +f.close() + + diff --git a/Master/texmf-dist/source/generic/tap/tabcv/sampdos/0sampdos.inf b/Master/texmf-dist/source/generic/tap/tabcv/sampdos/0sampdos.inf new file mode 100644 index 00000000000..b7bcb5379bf --- /dev/null +++ b/Master/texmf-dist/source/generic/tap/tabcv/sampdos/0sampdos.inf @@ -0,0 +1,5 @@ + All files in this directory belong to the TAP package + + Use TCV.BAT to translate *.RAW files into plain TeX. + (TCV.BAT makes use of Gnu AWK; the version 3.0.x is recommended) + diff --git a/Master/texmf-dist/source/generic/tap/tabcv/sampdos/post1.tex b/Master/texmf-dist/source/generic/tap/tabcv/sampdos/post1.tex new file mode 100644 index 00000000000..0e2330f2bfa --- /dev/null +++ b/Master/texmf-dist/source/generic/tap/tabcv/sampdos/post1.tex @@ -0,0 +1,3 @@ +\endtable + +\end diff --git a/Master/texmf-dist/source/generic/tap/tabcv/sampdos/post2.tex b/Master/texmf-dist/source/generic/tap/tabcv/sampdos/post2.tex new file mode 100644 index 00000000000..2a7a74853ad --- /dev/null +++ b/Master/texmf-dist/source/generic/tap/tabcv/sampdos/post2.tex @@ -0,0 +1,4 @@ +\B"\Z"\Z" "\Z"\Z" "\Z"\Z" "\Z"\Z" "\Z"\Z" "\Z"\Z" "\Z"\Z\E" +\endtable + +\end diff --git a/Master/texmf-dist/source/generic/tap/tabcv/sampdos/prea1.tex b/Master/texmf-dist/source/generic/tap/tabcv/sampdos/prea1.tex new file mode 100644 index 00000000000..9af340975b8 --- /dev/null +++ b/Master/texmf-dist/source/generic/tap/tabcv/sampdos/prea1.tex @@ -0,0 +1,5 @@ +\input tap +\nopagenumbers + +\begintable +\begintableformat &\center \endtableformat diff --git a/Master/texmf-dist/source/generic/tap/tabcv/sampdos/prea2.tex b/Master/texmf-dist/source/generic/tap/tabcv/sampdos/prea2.tex new file mode 100644 index 00000000000..a6af34ddb91 --- /dev/null +++ b/Master/texmf-dist/source/generic/tap/tabcv/sampdos/prea2.tex @@ -0,0 +1,7 @@ +\input tap +\nopagenumbers + +\def\Z{\hbox to5mm{}} + +\begintable +\begintableformat &\center \endtableformat diff --git a/Master/texmf-dist/source/generic/tap/tabcv/sampdos/prea3.tex b/Master/texmf-dist/source/generic/tap/tabcv/sampdos/prea3.tex new file mode 100644 index 00000000000..a6c581c8e82 --- /dev/null +++ b/Master/texmf-dist/source/generic/tap/tabcv/sampdos/prea3.tex @@ -0,0 +1,6 @@ +\input tap +\nopagenumbers + +\thistable{\desiredwidth36em} +\begintable +\begintableformat &\left \endtableformat diff --git a/Master/texmf-dist/source/generic/tap/tabcv/sampdos/tapcv0.raw b/Master/texmf-dist/source/generic/tap/tabcv/sampdos/tapcv0.raw new file mode 100644 index 00000000000..74403186b1d --- /dev/null +++ b/Master/texmf-dist/source/generic/tap/tabcv/sampdos/tapcv0.raw @@ -0,0 +1,5 @@ +ÉÍÍÍÍÑÍÍÍÍËÍÍÍÍÑÍÍÍÍ» +º 1 ³ 2 º 3 ³ 4 º +ÇÄÄÄÄÅÄÄÄÄ×ÄÄÄÄÅÄÄÄĶ +º 11 ³ 22 º 33 ³ 44 º +ÈÍÍÍÍÏÍÍÍÍÊÍÍÍÍÏÍÍÍͼ diff --git a/Master/texmf-dist/source/generic/tap/tabcv/sampdos/tapcv1.raw b/Master/texmf-dist/source/generic/tap/tabcv/sampdos/tapcv1.raw new file mode 100644 index 00000000000..be6f5924445 --- /dev/null +++ b/Master/texmf-dist/source/generic/tap/tabcv/sampdos/tapcv1.raw @@ -0,0 +1,9 @@ +ÉÍÍÍÍÑÍÍÍÍËÍÍÍÍÑÍÍÍÍ» +º 1 ³ 1 º 1 ³ 1 º +º 2 ³ 2 º 2 ³ 2 º +º 3 ³ 3 º 3 ³ 3 º +ÇÄÄÄÄÅÄÄÄÄ×ÄÄÄÄÅÄÄÄĶ +º 44 ³ 44 º 44 ³ 44 º +º 55 ³ 55 º 55 ³ 55 º +º 66 ³ 66 º 66 ³ 66 º +ÈÍÍÍÍÏÍÍÍÍÊÍÍÍÍÏÍÍÍͼ diff --git a/Master/texmf-dist/source/generic/tap/tabcv/sampdos/tapcv2.raw b/Master/texmf-dist/source/generic/tap/tabcv/sampdos/tapcv2.raw new file mode 100644 index 00000000000..5ca9a2c85c3 --- /dev/null +++ b/Master/texmf-dist/source/generic/tap/tabcv/sampdos/tapcv2.raw @@ -0,0 +1,11 @@ + + + ÉÍÍÍÍÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» + º rubryka 1 ³ rubryka 2 ³ rubryka 3 ³ rubryka 4 º + ÌÍÍÍÍÍÍÍÍÍÍÍÏÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÏÍÍÍÍÍÍÍÍÍÍÍÍÍ͹ + º rubryka 1 i 2 ³ rubryka 3 i 4 º + ÇÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄĶ + º ³ rubryka 2 i 3 ³ º + ÇÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ wiersz 3 i 4 º + º rubryka 1, 2, 3 ³ º + ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÏÍÍÍÍÍÍÍÍÍÍÍÍÍͼ diff --git a/Master/texmf-dist/source/generic/tap/tabcv/sampdos/tapcv3.raw b/Master/texmf-dist/source/generic/tap/tabcv/sampdos/tapcv3.raw new file mode 100644 index 00000000000..57ce13288d8 --- /dev/null +++ b/Master/texmf-dist/source/generic/tap/tabcv/sampdos/tapcv3.raw @@ -0,0 +1,15 @@ + J. H. B\"ohning, 1838 + ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ + M. J. H. B\"ohning, 1882 ³ + ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ ³ M. D. Blase, 1840 + ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ +L. M. Bohning, 1912 ³ +ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ E. F. Ehlert, 1845 + ³ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ + ³ P. A. M. Ehlert, 1884 ³ + ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ + ³ C. L. Wischmeyer, 1850 + ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ + diff --git a/Master/texmf-dist/source/generic/tap/tabcv/sampdos/tapcv4.raw b/Master/texmf-dist/source/generic/tap/tabcv/sampdos/tapcv4.raw new file mode 100644 index 00000000000..9af65fe2dd1 --- /dev/null +++ b/Master/texmf-dist/source/generic/tap/tabcv/sampdos/tapcv4.raw @@ -0,0 +1,8 @@ + COLUMN + OF NUMBERS +ÍÍÍÍÍÍÍÍÍÍÍÍ + 12,3 + 0,12 + 12345,678 + 0,1234 +123456,0 diff --git a/Master/texmf-dist/source/generic/tap/tabcv/sampdos/tapcv5.raw b/Master/texmf-dist/source/generic/tap/tabcv/sampdos/tapcv5.raw new file mode 100644 index 00000000000..d2ec5442dd5 --- /dev/null +++ b/Master/texmf-dist/source/generic/tap/tabcv/sampdos/tapcv5.raw @@ -0,0 +1,15 @@ + ÉÍÍÍÍÍÍÍ» + ºB O S Sº + ÈÍÍÍÑÍÍͼ + ³ + ³ + ³ + ³ + ÚÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄ¿ + ³ ³ ³ ³ ³ ³ + ³ ³ ³ ³ ³ ³ + ³ ³ ³ ³ ³ ³ + ÚÄÄÄÁÄÄÄ¿ ÚÄÄÄÁÄÄÄ¿ ÚÄÄÄÁÄÄÄ¿ ÚÄÄÄÁÄÄÄ¿ ÚÄÄÄÁÄÄÄ¿ ÚÄÄÄÁÄÄÄ¿ + ³ v-ce ³ ³ v-ce ³ ³ v-ce ³ ³ v-ce ³ ³ v-ce ³ ³ v-ce ³ + ³ boss 1³ ³ boss 2³ ³ boss 3³ ³ boss 4³ ³ boss 5³ ³ boss 6³ + ÀÄÄÄÄÄÄÄÙ ÀÄÄÄÄÄÄÄÙ ÀÄÄÄÄÄÄÄÙ ÀÄÄÄÄÄÄÄÙ ÀÄÄÄÄÄÄÄÙ ÀÄÄÄÄÄÄÄÙ diff --git a/Master/texmf-dist/source/generic/tap/tabcv/sampdos/tapcv6.raw b/Master/texmf-dist/source/generic/tap/tabcv/sampdos/tapcv6.raw new file mode 100644 index 00000000000..b3a3c4cca95 --- /dev/null +++ b/Master/texmf-dist/source/generic/tap/tabcv/sampdos/tapcv6.raw @@ -0,0 +1,36 @@ + + + + ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ + ³ ³ + ³ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ + ³ ³ ³ ³ + ³ ³ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ ³ + ³ ³ ³ ³ ³ ³ + ³ ³ ³ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ ³ ³ + ³ ³ ³ ³ ³ ³ ³ ³ + ³ ³ ³ ³ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ ³ ³ ³ + ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ + ³ ³ ³ ³ ³ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ ³ ³ ³ ³ + ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ + ³ ³ ³ ³ ³ ³ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ ³ ³ ³ ³ ³ + ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ + ³ ³ ³ ³ ³ ³ ³ ÉÍÍÍÍÍÍÍÍÍ» ³ ³ ³ ³ ³ ³ ³ + ³ ³ ³ ³ ³ ³ ³ º º ³ ³ ³ ³ ³ ³ ³ + ³ ³ ³ ³ ³ ³ ³ º T A P º ³ ³ ³ ³ ³ ³ ³ + ³ ³ ³ ³ ³ ³ ³ º º ³ ³ ³ ³ ³ ³ ³ + ³ ³ ³ ³ ³ ³ ³ ÈÍÍÍÍÍÍÍÍͼ ³ ³ ³ ³ ³ ³ ³ + ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ + ³ ³ ³ ³ ³ ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ³ ³ ³ ³ ³ ³ + ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ + ³ ³ ³ ³ ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ³ ³ ³ ³ ³ + ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ + ³ ³ ³ ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ³ ³ ³ ³ + ³ ³ ³ ³ ³ ³ ³ ³ + ³ ³ ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ³ ³ ³ + ³ ³ ³ ³ ³ ³ + ³ ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ³ ³ + ³ ³ ³ ³ + ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ³ + ³ ³ + ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ diff --git a/Master/texmf-dist/source/generic/tap/tabcv/sampdos/tcv.bat b/Master/texmf-dist/source/generic/tap/tabcv/sampdos/tcv.bat new file mode 100644 index 00000000000..660ff087ee2 --- /dev/null +++ b/Master/texmf-dist/source/generic/tap/tabcv/sampdos/tcv.bat @@ -0,0 +1,16 @@ +@echo off +:: %1 input file name +:: %2 output file name +:: %3 extra spaces added at sides of every cell +:: %4 span columns if %4=0, no spanning if %4=1 +:: %5 TeX text inserted in rows containing only vertical rules +:: %6 preamble file name +:: %7 postamble file name +call tcv_ tapcv0.raw tapcv0.tex prea1.tex post1.tex 2 0 +call tcv_ tapcv1.raw tapcv1.tex prea1.tex post1.tex 2 0 +call tcv_ tapcv2.raw tapcv2.tex prea1.tex post1.tex 2 0 +call tcv_ tapcv3.raw tapcv3.tex prea3.tex post1.tex 0 1 +call tcv_ tapcv4.raw tapcv4.tex prea1.tex post1.tex 2 0 +call tcv_ tapcv5.raw tapcv5.tex prea2.tex post2.tex 2 0 \\V{x} +call tcv_ tapcv6.raw tapcv6a.tex prea1.tex post1.tex 2 0 \\D+ +call tcv_ tapcv6.raw tapcv6b.tex prea1.tex post1.tex 2 0 diff --git a/Master/texmf-dist/source/generic/tap/tabcv/sampdos/tcv_.bat b/Master/texmf-dist/source/generic/tap/tabcv/sampdos/tcv_.bat new file mode 100644 index 00000000000..f8ffb442b9b --- /dev/null +++ b/Master/texmf-dist/source/generic/tap/tabcv/sampdos/tcv_.bat @@ -0,0 +1,4 @@ +echo converting %1 to %2 +gawk -f../tapcv.awk -vEXPROW=%5 -vNOSPAN=%6 -vINSROW=%7 %1 > tmp.tmp +copy /b %3 + tmp.tmp + %4 %2 > nul +del tmp.tmp diff --git a/Master/texmf-dist/source/generic/tap/tabcv/tapcv.awk b/Master/texmf-dist/source/generic/tap/tabcv/tapcv.awk new file mode 100644 index 00000000000..1be6213b475 --- /dev/null +++ b/Master/texmf-dist/source/generic/tap/tabcv/tapcv.awk @@ -0,0 +1,239 @@ +# --------------------------------------------------------------------------- + This file belongs to the TAP package +# --------------------------------------------------------------------------- +# This is an AWK translator of tables written in extended ASCII format +# to TeX/TAP format. + +# VERSION: 0.71, Tuesday, January 27th, 1998 -- essentially the +# same as ver. 0.5 of Friday, May 3rd, 1996 (BachoTeX 96 release) + +# AUTHORS' COORDINATES +# +# Names: Bogu\l{}aw Jackowski, Piotr Pianowski, Piotr Strzelczyk +# Mail: BOP s.c., ul. Piastowska 70, 80-363 Gda\'nsk, Poland +# Email: B.Jackowski@GUST.ORG.PL + +# =========================================================================== +BEGIN { + EXPROW=EXPROW+0 # pad each cell with at least EXPROW spaces + NOSPAN=NOSPAN+0 # use " mark instead of @ operator +# INSROW is inserted in rows ~ "^[ " U S "]+$" (if not empty) + H="Í"; V="¶·¹º»¼½ÇÈÉÊËÌÎÐÒÓÖ×"; h="Ä"; v="µ¸´³¿Ù¾ÆÀÚÁÂÃÅÏÑÔÕØ" + U=" º³" # U is the subset of V + v + " " + S="°" # the explicit mark of a strut column (converted later to ") +} +# =========================================================================== +function int_subst(u) {# task-specific substitutions for table interior + gsub("<","$<$",u); gsub(">","$>$",u); gsub("%","\\%",u); return u +} +function spaces(n) {return (n>0 ? sprintf("%" n "s", "") : "")} +function chars(n,c, t) {t=spaces(n); gsub(" ", c, t); return t} +function tildes(n) {return chars(n,"~")} +function center(l,s, k1,k2) { +# pads string s symmetrically with spaces such that result has length=l + k2=0; k1=int((l-length(s))/2); if (k1>=0) k2=l-length(s)-k1 + return spaces(k1) s spaces(k2) +} +# =========================================================================== +# STORE ALL THE STUFF +# =========================================================================== +/[^ ]/ { + if ( !(($0 ~ "^[ " U S "]+$") && (INSROW=="")) ) { + gsub(/ +$/,"") # trailing spaces are meaningless + line[++line_]=$0 + if (longest1) for (l=1; l<=line_; ++l) line[l]=substr(line[l],u) + longest=longest-u+1 +# 0b: check whether the first and the last columns contain vrules + i=1; j=1; + for (l=1; l<=line_; ++l) { + if (substr(line[l],1,1) ~ ("[" V v S "]")) i=0 + if (length(line[l])==longest) + if (substr(line[l],longest) ~ ("[" V v S "]")) j=0 + } +# 0c: pad with trailing spaces (make the length of all rows equal) + for (l=1; l<=line_; ++l) line[l]=line[l] spaces(longest-length(line[l])) +# 0d: add artificial begin and end strut, if needed + if (j) for (l=1; l<=line_; ++l) line[l]=line[l] S + if (i) for (l=1; l<=line_; ++l) line[l]=S line[l] + longest=longest+i+j +# 0e: fix prefixes + for (l=1; l<=line_-1; ++l) + if ((PFX[l]=="-") && (PFX[l+1]=="+")) PFX[l+1]="^" + for (l=1; l<=line_-1; ++l) { + if ((PFX[l]=="^") && (PFX[l+1]=="-")) PFX[l]=":" + if ((PFX[l]=="+") && (PFX[l+1]=="-")) PFX[l]="_" + } +# PASS 1: check input data +# 1a: find position of vrules for all rows + for (l=1; l<=line_; ++l) { + for (i=1; i<=length(line[l]); ++i) { + ch=substr(line[l],i,1) + if ((ch!=".") && (ch!="?") && (ch!="(") && (ch!=")")\ + && (ch!="+") && (ch!="*") && (ch!="[") && (ch!="]")) + if (match(V v S,ch)) C[i]=i + } + } + for (i in C) if ((i+0)>C_) C_=i+0 # index is a string, hence forced coercion + for (i=1; i<=C_; ++i) if (i in C) {D[++D_]=i; C[i]=D_} +# if (c in C) holds, a vrule has occured in c-th column; C_ is the maximal +# such c; for d such that 1<=d<=D_ (D[d] in C) holds; moreover, C[D[d]]=d +# 1b: check consistency of data (in the positions of vrules only spaces +# or vrules or struts may appear, unless NOSPAN==0) + for (l=1; l<=line_; ++l) for (i=1; i<=D_; ++i) + if ((NOSPAN) || (i==1) || (i==D_)) + if (!match(V v S " ",substr(line[l],D[i],1))) { + print "! INCONSISTENT DATA." + print "ROW:", l ", COLUMN:", i ", CHARACTER:", + substr(line[l],D[i],1) "." + exit + } +# 1c: put opening and closing struts, and all remaining struts if (NOSPAN==1) + for (l=1; l<=line_; ++l) for (i=1; i<=D_; ++i) + if ((NOSPAN) || (i==1) || (i==D_)) + if (substr(line[l],D[i],1)==" ") + line[l]=substr(line[l],1,D[i]-1) S substr(line[l],D[i]+1) +# PASS 2: check areas between vertical rules (find the longest one) + for (l=1; l<=line_; ++l) { + s=line[l]; t=""; u2=1 + while (s!="") { + if (match(s,"[" V v S "][^" V v S "]+[" V v S "]")) { + t=t substr(s,RSTART,1) + u=substr(s,RSTART+1,RLENGTH-2) + s=substr(s,RSTART+RLENGTH-1) + u_=length(u); gsub("^ +","",u); gsub(" +$","",u) + u1=u2+RSTART-1; u2=u1+RLENGTH-1; c1=C[u1]; c2=C[u2] + if (u ~ /^[0-9]+[\.,]?[0-9]*$/) { + if (match(u,/^[0-9]+$/)) { + if (DD[c1,c2]1) u="@" c2-c1 " " u + u=center(u_,u) + PAD[l,u2]=length(u)-u_ # PAD[l,u2] = shift of vrule u2 in line l + t=t u + } else {t=t s; s=""} + } + line[l]=t + } +# PASS 4: align distorted columns (surprisingly hard task...) +# 4a: find maximal shifts of vrules for all table rows + for (i=1; i<=D_; ++i) PADmax[D[i]]=EXPROW + for (l=1; l<=line_; ++l) + for (j=2; j<=D_; ++j) {i=D[j] + if ((l,i) in PAD) + PADmax[i]=(PAD[l,i]>PADmax[i] ? PAD[l,i] : PADmax[i]) + } + for (l=1; l<=line_; ++l) { +# 4b: find shifts of vrules for a given row + PAD_=0 + for (j=2; j<=D_; ++j) {i=D[j] + if ((l,i) in PAD) {PADloc[i]=PADmax[i]+PAD_; PAD_=0} + else {PADloc[i]=0; PAD_+=PADmax[i]} # slip over non-existant rules + } +# 4c: add spaces before appropriate vrules + cc=0; + for (j=2; j<=D_; ++j) {i=D[j] + if (PADloc[i]>0) { + line[l]=substr(line[l],1,i+cc-1+PAD[l,i]) spaces(PADloc[i]-PAD[l,i]) substr(line[l],i+cc+PAD[l,i]) + cc+=PADloc[i] + } + } + } +# 4d: center cells again + for (l=1; l<=line_; ++l) { + s=line[l]; t="" + while (s!="") { + if (match(s,"[" V v S "][^" V v S "]+[" V v S "]")) { + t=t substr(s,RSTART,1) + u=substr(s,RSTART+1,RLENGTH-2); s=substr(s,RSTART+RLENGTH-1) + u_=length(u); gsub("^ +","",u); gsub(" +$","",u); t=t center(u_,u) + } else {t=t s; s=""} + } + line[l]=t + } +# PASS 5: output results +# 5a: insert !, | and " + for (l=1; l<=line_; ++l) { + gsub("[" V "]","!",line[l]) + gsub("[" v "]","|",line[l]) + gsub("[" S "]","\"",line[l]) + p=line[l]; gsub(/(\\\|)|(\\!)|(\\")/," ",p); gsub(/[^\|!"]/," ",p); + PAT[p]=1 # fix row pattern + print "\\B" substr(line[l],1,1)\ + PFX[l] substr(line[l],2,length(line[l])-2)\ + "\\E" substr(line[l],length(line[l]),1) + } +# 5b: clear old values of C and D and fix new ones + for (i in C) delete C[i]; for (i in D) delete D[i]; C_=0; D_=0; + for (p in PAT) for (i=1; i<=length(p); ++i) if (substr(p,i,1)!=" ") + {C[i]=1; if (i>C_) C_=i} + for (i=1; i<=C_; ++i) if (i in C) {D[++D_]=i; C[i]=D_} +# 5c: write extra information + if (NOSPAN) {# add a row with complete column marks (a comment in fact) + p=spaces(D[D_]-D[1]) + for (i=1; i<=D_; ++i) p=substr(p,1,D[i]-1) "\"" substr(p,D[i]+1) + print "\\B" substr(p,1,1) " " substr(p,2,length(p)-2)\ + "\\E" substr(p,length(p),1) + } +# 5d: add the ``rear'' +# print "% ROW PATTERNS:" +# for (p in PAT) { +# for (i in C) if (substr(p,i,1)==" ") p=substr(p,1,i-1) "\"" substr(p,i+1) +# print "%\\B" substr(p,1,1)\ +# "0" substr(p,2,length(p)-2) "\\E" substr(p,length(p),1) +# } +# print "% VRULES FOUND IN THE FOLLOWING COLUMNS:" +# print "%" +# print "% No. Col.:" +# for (j=1; j<=D_; ++j) printf("%s %3d %4d\n", "%", j, D[j]) +} +# =========================================================================== diff --git a/Master/texmf-dist/source/generic/textmerg/textmerg.drv b/Master/texmf-dist/source/generic/textmerg/textmerg.drv new file mode 100644 index 00000000000..6358492a5ac --- /dev/null +++ b/Master/texmf-dist/source/generic/textmerg/textmerg.drv @@ -0,0 +1,18 @@ +%% +%% This is file `textmerg.drv', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% textmerg.dtx (with options: `driver') +%% +\documentclass{ltxdoc} +\RecordChanges +\begin{document} + \DocInput{textmerg.dtx} + \PrintIndex + \PrintChanges +\end{document} +\endinput +%% +%% End of file `textmerg.drv'. diff --git a/Master/texmf-dist/source/generic/textmerg/textmerg.dtx b/Master/texmf-dist/source/generic/textmerg/textmerg.dtx new file mode 100644 index 00000000000..58befcbfa2d --- /dev/null +++ b/Master/texmf-dist/source/generic/textmerg/textmerg.dtx @@ -0,0 +1,890 @@ +% \iffalse meta-comment +% \begin{macrocode} +%<*textmerg|plain> +\def\fileversion{2.01} +\def\filedate{1994/06/20} +\def\filename{textmerg.dtx} +\def\Copyright{Copyright (C) 1992,1994 Mike Piff, University of Sheffield, England} +% +% \end{macrocode} +% +% This file is placed in the public domain. No provision is made for +% support of the use of the facilities herein. +% +% For updates, contact your nearest CTAN site. +% +% \fi +% +% \changes{2.01}{1994/06/20}{First version for LaTeX2e} +% \changes{2.01a}{2000/08/25}{rf10@cam.ac.uk --- relaxation of licence +% terms} +% +%\CheckSum{349} +% +%\title{Text merges in \TeX\ and \LaTeX\thanks{This article originally +%appeared in TUGboat Vol 13(4), 1992, p518--523.}} +%\author{Mike Piff} +%\maketitle +%\thispagestyle{headings} +%\begin{abstract} +% In this article the author explains how to do some standard +% and not so standard word processor text merges in \TeX\ documents, +% using no other tools than \TeX\ itself. +% A common application is to the mail merge or form letter, +% where names and addresses are +% stored in a file, together with other bits of information, and a standard +% letter with variable fields embedded in it is customized for every name +% from this file. +% Another application is to the pretty-printing of the contents of a database. +% +% The macros described in |textmerg.sty| work equally +% in both plain \TeX\ and \LaTeX. However, this has meant heavy use +% of |\def| where |\newcommand| would have been preferable. +%\end{abstract} +% +%\tableofcontents +% +%\section{Introduction} +%It is often said that although \LaTeX\ is good at typesetting +%mathematics, it is wholly unsuitable for common word processor functions +%such as mail merges. +%The latter are easy to achieve in most ordinary word processors, +%but in its raw state \LaTeX\ is incapable of doing a mail merge, or, indeed, of +%generating the same block of text over and over again but with different +%parameters in each block, those parameters having been read from a subsidiary +%merge file. +%The latter file might possibly be the output from a database or any other +%program. +% +%This article aims to show the reader that such a repetitive task need not be +%as difficult as it at first appears. In \TeX, it is possible to hide many +%details of a facility inside a subsidiary style file, so that the user is +%unaware of what fearful processes are going on in the background. +%It is then possible to present the end-user with an extremely simple +%interface, perhaps simpler and more powerful than is available in other +%systems. +% +%In earlier TUGboat articles +%\cite{Bell:TB8-1-54,Garavelli:TB8-1-53,Lee:TB7-3-187,% +%McKinstry:TB8-1-60} it was shown how a standard letter could be +%customized by adding names and addresses from a separate file. I aim to show +%that it is possible to achieve far more than this with a fairly compact +%but general set of macros. +% +%\section{A simple example} +%Suppose that we have a list of student names and examination grades, one +%per student, and that we wish to send a letter to each student giving +%his/her exam grade. +%We must decide first what bits of information must be prepared in +%our subsidiary file, by looking at an example letter and finding out which +%items change from letter to letter. +% +%Suppose that one instance of our letter is the following, +%a \LaTeX\ example. +%\begin{verbatim} +%\begin{letter}{Miss Iusta Mo\\ +% 34 Winchester Road\\ +% Sheffield\\ +% England} +% \opening{Dear Miss Mo,} +% This letter is to inform you +% that you obtained grade A in +% your recent examinations. +% \closing{Yours faithfully,} +%\end{letter} +%\end{verbatim} +%We can see that we need to know the student's title, forename(s), surname, +%address and grade to compose such a letter. +% +%One of the simplest ways of achieving this effect is to prepare a file +%with lines of the form +%\begin{verbatim} +%\MyLetter{Mr}...{C} +%\end{verbatim} +%for each student and then simply |\input| it into a \LaTeX\ file in which +%|\MyLetter| has been defined as having five parameters. +%A problem with this approach is that we may not be able to coax the student +%database into producing such a file. +%Another problem is that we need something more subtle if there are fifty +%parameters. For example, we might want to print out the +%contents of the student database with one page per student, but it could be +%that there are fifty information fields per student. Even worse, +%the number of pieces of information per student might not be a +%constant number, because, say, we are printing out fields from a related +%file in which marks on individual examination papers are held. +% +%We shall tackle our simple example in a way that lends itself +%to more generality later on, and in a form that most database programs +%should be capable of handling. +% +%We thus prepare a subsidiary file |results.dat| +%with records of five fields in it. +%Each student is represented by five lines of this file, +% \begin{macrocode} +%<*results> +Miss +Iusta +Mo +34 Winchester Road\\Sheffield\\England +A +Mr +Arthur +Minit +43 Sheffield Road\\Winchester\\England +C +% +% \end{macrocode} +%and the student records appear one after another in this file. +%Thus both the field and record separators are carriage returns. +% +%\DescribeMacro{\Merge} +%\DescribeMacro{\Fields} +%\TeX\ itself needs to know three bits of information: +%\begin{enumerate} +% \item the name of the subsidiary file, +% \item the fields to read, and +% \item the template of the letter. +%\end{enumerate} +%We pass it this information in the following form +% \begin{macrocode} +%<*examp> +\documentclass[12pt]{letter} +\usepackage{textmerg} +\begin{document} +\Fields{\Title\Forenames\Surname + \Address\Grade} +\Merge{results.dat}{% +\begin{letter}{\Title\ \Forenames\ + \Surname\\\Address} + \opening{Dear \Title\ \Surname,} + This letter is to inform you + that you obtained grade \Grade\ in + your recent examinations. + \closing{Yours faithfully,} +\end{letter}} +\end{document} +% +% \end{macrocode} +%\LaTeX\ should +%open the subsidiary file and, for each set of five parameters, +%generate a letter in the |dvi| file. When it reaches the end of +%the merge file, \LaTeX\ should terminate execution of the |\Merge| +%command and presumably finish the document. +% +%\section{A few complications} +% +%Looking at the above example in a bit more generality, +%we see that we are reading +%records of $n$ fields from the merge file and placing them into a \TeX\ document +%in such a way that they replace $n$ preassigned control sequences. +%However, it may happen that the merge file is prepared by humans, who might +%possibly have inserted some extra blank lines into the file. Again, it +%could be that certain sorts of fields might be blank, +%whereas others can never be blank. +%Perhaps it would be better to build in some degree of error recovery. +% +%\DescribeMacro{\Fields} +%We shall make the assumption that the first field in any record is definitely +%a non-blank one and that we know beforehand whether each +%of the others might conceivably be blank. +%We make a modification to our |\Fields| statement. +%It can contain not only +%the field name control sequences but also the tokens |+| and~|-|, +%with the following interpretation. A |+| indicates that all following +%fields should be re-read until a non-blank result is obtained. +%A |-| indicates that any following fields could conceivably be blank, +%subject to the restriction that the very first field is always non-blank. +% +%Thus the command +%\begin{verbatim} +%\Fields{\a+\b\c-\d} +%\end{verbatim} +%would indicate that only |\d| is allowed to be blank, because the +%|+| token has no effect. +%In +%\begin{verbatim} +%\Fields{-\a\b+-\c+\d} +%\end{verbatim} +%the initial |-| token enables blank reading of data tokens, but the very +%first data token is not permitted to be blank anyway. +%Thus |\a| is read as a non-blank token and |\b| as a +%possibly blank token. +%The sequence |+-| now switches non-blank reading on and off again, +%so |\c| is read as possibly blank. +%Finally |\d| is non-blank. +% +%Another complication we allow is that the |\Fields| command can +%appear several times in our file. The interpretation is that +%the last occurrence of |\Fields| before we encounter the |\Merge| +%command will indicate the fields to be read for every record. Any +%occurrences of |\Fields| within the merged text indicate a new list +%of fields to be read when that command is encountered. This lets us +%do some conditional processing, such as\footnote{It is assumed that +%{\tt\string\Mrs} expands to {\tt Mrs}.} +%\begin{verbatim} +% \ifx\Title\Mrs +% \Fields{\MaidenName} +% \fi +%\end{verbatim} +%and also gives us some flexibility about the field order later on. +% +%It should also be stressed that the undefined control sequences +%appearing in the template need not +%correspond exactly to the fields in the subsidiary file. +%An example might be that the subsidiary file contains the text +%\begin{verbatim} +%Spriggs, Mr Abraham L +%\end{verbatim} +%and one field read is |\FullName|. +%\TeX\ would then have to pre-process this +%name to generate its several components as used in the template. +%The command |\PreProcess| could be included at the start of the template. +%\begin{verbatim} +%\def\parse#1, #2 #3\endparse{% +% \def\Surname{#1}\def\Title{#2}% +% \def\Forenames{#3}} +%\def\PreProcess{\expandafter +% \parse\FullName\endparse} +%\end{verbatim} +% +%An alternative and simpler looking approach to reading fields from a file +%|\fil| might be to define each such field as +%follows. +%\begin{verbatim} +%\def\Field#1{\def#1{\read\fil to#1#1}} +%\Field\Name \Field\Address \Field\Mark +%\end{verbatim} +%The first time |\Name| is encountered, it reads its own expansion +%from |\fil| and then expands itself. +%Henceforth, it has acquired its new expansion. +%The disadvantage is that |\Name| must appear in the +%text before any subsidiary field such as |\Surname| +%can be used. +% +%Finally we should consider the possibility that the second parameter of +%|\Merge| might be too large to fit into memory. We can clearly handle +%this problem by allowing the second parameter merely to consist of the text +%|\input template|, so that the root file handles two subsidiary +%files, one containing the template and the other containing the fields. +% +% +%\section{A complicated example} +% +%We will next look at an example in which the template contains a table +%of indeterminate length, albeit fixed width. So far our macros work +%in either plain \TeX\ or in \LaTeX, but the way in which these +%two packages handle +%tables is slightly different. However, the only difference that need +%concern us is that \LaTeX\ uses |\\| where plain \TeX\ uses |\cr|. +% +%\DescribeMacro{\MultiRead} +%The example given here is in \LaTeX, but our style will work equally well +%in plain \TeX. In our student letter we wish to insert a table of course +%codes and marks. Since each student did a different number of courses, we +%need some way of recognizing the end of the course list in the merge file. +%The default will be to insert a blank line at the end of such a sub-list. +%Thus, the following text appears before the close of the letter template. +%\begin{verbatim} +%Here are your marks on individual papers. +%\begin{center} +% \begin{tabular}{|lr|}\hline +% Code&Mark\\\hline +% \MultiRead{2}\\\hline +% \end{tabular} +%\end{center} +%\end{verbatim} +%The merge file now has the following structure. +%\begin{verbatim} +%Title +%... +%Grade +%Code +%Mark +%... +%Code +%Mark +%\end{verbatim} +%$\langle${\it blank\/}$\rangle$ +%\begin{verbatim} +%Title +%... +%\end{verbatim} +% +%\DescribeMacro{\MarkEnd} +%In other applications some of the fields in the table might possibly be blank. +%We then let the user change the $\langle${\it blank\/}$\rangle$ +%line marking the end of a list to some other string of his own choosing. +%\begin{verbatim} +%\MarkEnd{***} +%\end{verbatim} +% +%There might be multiple tables in the same template, +%with their data intermingled in the merge file with main fields. +%The generalized |\Fields| command allows us +%to order the merge file however we want. Thus we could have main fields, then +%a table, followed by more main fields, and so on. +% +%\DescribeMacro{\Process} +%A final complication is that the fields appearing in a table are essentially +%anonymous. By this I mean that they are transferred into the table as +%they are, without any pre-processing possible through appearing +%in the template as control sequences. If we wish what appears in +%the table to be different from what appears in the file, a mechanism is needed +%to tell \TeX\ that a certain column has to be treated in a certain way. +%The command +%\begin{verbatim} +%\Process{n}{\foo} +%\end{verbatim} +%will replace every field $\langle f\rangle$ read into column $n$ +%by |\foo{|$\langle f\rangle$|}|. +%It is even possible to do some numerical calculations by this method. +% +%Here is a \LaTeX\ example to illustrate the table processing +%features of |textmerg.sty|. +% \begin{macrocode} +%<*example> +\documentclass[12pt]{article} +\usepackage{textmerg} +\MarkEnd{***} +\Process{2}{\Advance} +\def\Advance#1{#1\addtocounter{page}{#1}} +\Fields{+\Name\Verb} +\begin{document} +\Merge{silly.dat}{% + Dear \Name,\par + Here is a table to \Verb\ at: + \Fields{\Width}% + \begin{tabular}{*{\Width}c} + \MultiRead\Width + \end{tabular}.\par + \Fields{\Adj}% + That was \Adj! + \clearpage} +\end{document} +% +% \end{macrocode} +%The effect of this file is not apparent until we see |silly.dat|. +%It is listed here. +% \begin{macrocode} +%<*silly> +Mike +look +3 +1 +2 +3 +11 +12 +13 +*** +good +Shelagh +gaze +2 +21 +22 +23 +24 +*** +horrid +% +% \end{macrocode} +% +% The same can be done in plain \TeX. +% \begin{macrocode} +%<*plainexample> +\input textmerg +\MarkEnd{***} +\Process{2}{\Advance} +\def\Advance#1{#1\global\advance\count0by#1} +\Fields{+\Name\Verb} +\Merge{silly.dat}{% + Dear \Name,\par + Here is a table to \Verb\ at: + \Fields{\Width}% + \vbox{\halign{\hfil{} ## {}\hfil&&\hfil{} ## {}\hfil\cr + \MultiRead\Width\cr + }}.\par + \Fields{\Adj}% + That was \Adj! + \vfill\eject} +\end + +% +% \end{macrocode} +% +% +%\StopEventually{ +%\begin{thebibliography}{GHWW84} +%\bibitem[{Bel}87]{Bell:TB8-1-54} +%Edwin~V. {Bell, II}. +%\newblock {{AutoLetter: A \TeX\ form letter procedure}}. +%\newblock {\em TUGBoat}, 8(1):54, April 1987. +% +%\bibitem[Gar87]{Garavelli:TB8-1-53} +%John~S. Garavelli. +%\newblock {{Form letter macros}}. +%\newblock {\em TUGBoat}, 8(1):53, April 1987. +% +%\bibitem[Lee86]{Lee:TB7-3-187} +%John Lee. +%\newblock {{Form letters}}. +%\newblock {\em TUGBoat}, 7(3):187, October 1986. +% +%\bibitem[McK87]{McKinstry:TB8-1-60} +%Graeme McKinstry. +%\newblock {{Form letters}}. +%\newblock {\em TUGBoat}, 8(1):60, April 1987. +%\end{thebibliography} +%} +% +% \section{Identification} +% +% This package can only be used with \LaTeXe, so +% an appropriate message is displayed when another +% format is used\footnote{However, some code is inserted +% to allow its use with plain \protect\TeX}. +% \begin{macrocode} +%<*textmerg> +\NeedsTeXFormat{LaTeX2e}[1994/01/01] +% \end{macrocode} +% +% Announce the package name and its version: +% \begin{macrocode} +\ProvidesPackage{textmerg}[\filedate] +% \end{macrocode} +% +% And display it on the terminal (and the log file): +% \begin{macrocode} +\typeout{Package `textmerg' <\filedate>.} +\typeout{\Copyright} +% +% \end{macrocode} +% +% The plain \TeX\ version will simply |\input| this package file. Thus +% we need to know that it will understand everything in the file. +% \begin{macrocode} +%<*plain> +\def\NeedsTeXFormat#1[#2]{} +\def\ProvidesPackage#1[#2]{} +\def\typeout#1{\immediate\write0{#1}} +\input textmerg.sty +% +% \end{macrocode} +% +% +%\section{Implementation of the simple case} +% +% \begin{macro}{\glet} +%For convenience we define a frequently used combination here. +% \begin{macrocode} +%<*textmerg> +\def\glet{\global\let} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\MergeFile} +% \begin{macro}{\InputFile} +%The subsidiary merge file is defined next. A macro is then defined that +%attempts to open it for reading. If that is unsuccessful, the file is +%closed and an error message is issued. +% \begin{macrocode} +\newread\MergeFile +\def\InputFile#1{% + \openin\MergeFile=#1 + \ifeof\MergeFile + \errmessage{Empty merge file}% + \closein\MergeFile + \long\def\MakeTemplate##1{% + \def\Template{}}% + \else\GetInput\fi} +% \end{macrocode} +% \end{macro} +% \end{macro} +%The command |\MakeTemplate| will be used later to generate the body +%of the form into which fields are inserted. We redefine it if the file +%is empty so that it produces no text. +% +% \begin{macro}{\GetInput} +%Because the conditional |\ifeof| does not return true until after an +%unsuccessful read operation, a mechanism of looking ahead is used which is +%similar to that found in Pascal. +% \begin{macrocode} +\def\GetInput{{\endlinechar=-1 + \global\read\MergeFile to\InputBuffer}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\SeeIfEof} +% \begin{macro}{\LookAgain} +%We set up a mechanism for deciding whether or not we have +%exhausted the merge file. It forces |\ifeof| to return true +%by skipping over blank lines. +% \begin{macrocode} +\def\SeeIfEof{% + \let\NextLook\relax + \ifeof\MergeFile + \else + \ifx\InputBuffer\empty + \LookAgain + \fi + \fi + \NextLook} +\def\LookAgain{\GetInput + \let\NextLook\SeeIfEof} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\ifNonBlank} +% \begin{macro}{\AllowBlank} +% \begin{macro}{\DontAllowBlank} +%We can now prepare to read actual fields from the merge file. A conditional +%is used to indicate whether or not the field we are about to read is +%allowed to be blank. We also set up a mechanism for changing its value. +% \begin{macrocode} +\newif\ifNonBlank \NonBlankfalse +\def\AllowBlank{\global\NonBlankfalse} +\def\DontAllowBlank{\global\NonBlanktrue} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\ReadIn} +% \begin{macro}{\MissingField} +%Fields are actually read by means of the following command. Its only +%parameter is the name of the control sequence into which the field is +%read. +% \begin{macrocode} +\def\ReadIn#1{% + \ifNonBlank\SeeIfEof\fi + \ifeof\MergeFile + \gdef#1{??}\MissingField + \else + \glet#1\InputBuffer + \GetInput + \fi} +\def\MissingField{% + \message{Missing field in file}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\GlobalFields} +% \begin{macro}{\Fields} +%The |\Fields| command places its parameter into a token +%register called |\GlobalFields|. +%This command will be redefined by the |\Merge| command. +% \begin{macrocode} +\newtoks\GlobalFields +\def\Fields#1{\GlobalFields{#1}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\ParseFields} +% \begin{macro}{\EndParseFields} +%When a field token list is read, +%each individual token within it must be either +%read as a field or interpreted as a blank/nonblank switch. +%The next token is then read by tail recursion. +%It is assumed that the final token in the list is |\EndParseFields|. +%This must be defined to expand to something unlikely to be read as a +%value of one of the fields, and so we |\let| it to |\ParseFields|. +% \begin{macrocode} +\def\ParseFields#1{% + \ifx#1\EndParseFields + \let\NextParse\relax + \else + \let\NextParse\ParseFields + \ifx#1+\DontAllowBlank + \else + \ifx#1-\AllowBlank + \else\ReadIn#1 + \fi + \fi + \fi\NextParse} +\let\EndParseFields\ParseFields +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\ReadFields} +%We apply this command to our token register after expanding it. +% \begin{macrocode} +\def\ReadFields#1{\expandafter\ParseFields + \the#1\EndParseFields + \AllowBlank} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\Merge} +% \begin{macro}{\MakeTemplate} +%At long last we are ready to define the |\Merge| command itself. +%The first parameter is the filename of the subsidiary file and the second +%is the template or form into which fields are inserted. +%Since a |\Fields| command within the |\Merge| text is meant +%to act immediately on the token list that follows it, we redefine it +%to operate in a different way. +% \begin{macrocode} +\long\def\Merge#1#2{\begingroup% + \InputFile{#1}% + \def\Fields##1{% + \ParseFields##1\EndParseFields}% + \MakeTemplate{#2}\Iterate} +\long\def\MakeTemplate#1{\def\Template{#1}} +% \end{macrocode} +% \end{macro} +% \end{macro} +%The grouping keeps any changes to the definition of |\MakeTemplate| +%local to this merge. +%Thus several consecutive merges can be handled +%within one document. +%The |\endgroup| is supplied by the macro |\Iterate| +%when the merge file has been exhausted. +% +% \begin{macro}{\Iteratecounter} +% \begin{macro}{\Iterate} +%|\Iterate| must read the fields which were declared before it was entered, +%substitute them into its template and repeat itself using tail recursion +%if the end of the merge file has not been encountered. +% \begin{macrocode} +\countdef\Iteratecounter=2 +\Iteratecounter=0 +\def\Iterate{% + \global\advance\Iteratecounter by1 + \ReadFields\GlobalFields + \Template + \SeeIfEof + \ifeof\MergeFile + \def\NextIteration{% + \endgroup\closein\MergeFile}% + \else + \let\NextIteration\Iterate + \fi + \NextIteration} +% \end{macrocode} +% \end{macro} +% \end{macro} +%The point of the use of counter 2 in the above is that it is accessible to +%the print driver for page selection. +%Anyone who has started printing 150 letters, all with page number~1, +%only to run out of paper half way, will appreciate the use of this artifice! +% +%\section{Implementation of merged tables} +% +% \begin{macro}{\MultiCount} +% \begin{macro}{\MaxCount} +% \begin{macro}{\ifStartOfList} +%We set up two counters, one for the column we are reading and the +%other for the total number of columns in the table. +%We also need a conditional to mark the start of the table, so that +%we terminate each row correctly with |\\| or |\cr|, or nothing at all +%at the beginning of the first row. +% \begin{macrocode} +\newcount\MultiCount \newcount\MaxCount +\newif\ifStartOfList +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\MultiRead} +%The parameter to |\MultiRead| is the number of columns to read at a +%time. This command passes control to |\NextRead| after initializing +%certain parameters. +% \begin{macrocode} +\def\MultiRead#1{% + \ifnum#1>0 + \SelectCR + \MakeEmpty{#1}% + \global\StartOfListtrue + \glet\NextRead\MRead + \AllowBlank + \global\MaxCount=#1 + \NextRead + \fi} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\Emptyctr} +% \begin{macro}{\MakeEmpty} +%The command |\MakeEmpty| is required by the pre-pro\-cess\-ing +%of each field. +%The idea is that the command |\csname pr|$nn$|\endcsname|, +%which we will loosely call |\pr|$nn$, +%is executed on each field in column $nn$. However, most of these commands +%will be undefined, and so we equate each of those that has not been +%defined to |\empty|. +% \begin{macrocode} +\newcount\Emptyctr +\def\MakeEmpty#1{\Emptyctr=0 + \loop + \advance\Emptyctr by1 + \expandafter\ifx\csname + pr\the\Emptyctr\endcsname\relax + \expandafter\glet\csname + pr\the\Emptyctr\endcsname\empty + \fi + \ifnum\Emptyctr<#1 + \repeat} +% \end{macrocode} +% \end{macro} +% \end{macro} +%Note that, because of the way we are accessing it via |\csname|, +%the first time |\pr|$nn$ is encountered it equates to |\relax|. +% +% \begin{macro}{\Process} +%The command |\Process#1#2| defines |\pr#1| to mean |#2|. +% \begin{macrocode} +\def\Process#1#2{% + \expandafter\def\csname + pr#1\endcsname##1{#2{##1}}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\MarkEnd} +%We need to know how the last row is to be recognized. The default is an +%empty line in the merge file. +% \begin{macrocode} +\def\MarkEnd#1{\gdef\EndMarker{#1}} +\MarkEnd{} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\NextLine} +% \begin{macro}{\NextField} +%We collect each row in a token register. The full row is assembled +%in |\NextLine| before being passed back to \TeX. Each field is +%read in |\TempField| and then placed temporarily into +%|\NextField|. +% \begin{macrocode} +\newtoks\NextLine \newtoks\NextField +% \end{macrocode} +% \end{macro} +% \end{macro} +%It is not necessary to do things this way; |\edef| can be used +%instead, but that approach might expand tokens prematurely. +% +% \begin{macro}{\AppendNextField} +%After the next field has been read, it is appended to |\NextLine|. +% \begin{macrocode} +\def\AppendNextField{% + \global\advance\MultiCount1 + \NextField=\expandafter{\TempField}% + \edef\Append{\NextLine= + {\the\NextLine&\csname + pr\the\MultiCount\endcsname + {\the\NextField}}}% + \Append} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\EndLine} +% \begin{macro}{\FinishLine} +%We need to insert the correct end marker after each row of the table. +%The token |\cr| must be disguised a little before it is acceptable +%in a \LaTeX\ document. +% \begin{macrocode} +\def\SelectCR{\glet\EndLine\\}% +% +%\def\SelectCR{\gdef\EndLine{\cr}}% +%<*textmerg> +\def\FinishLine{% + \ifStartOfList + \global\StartOfListfalse + \else\EndLine\fi} +% \end{macrocode} +% \end{macro} +% \end{macro} +%This makes the assumption that if |\array| is defined then we must be +%in \LaTeX. +% +% \begin{macro}{\StopProcessing} +%We need a command to finish off a table. This should reset |\NextRead| +%to |\AllowBlank| to terminate the tail recursion, +%and also do some +%error recovery in case the file ends prematurely in the middle of a row. +% \begin{macrocode} +\def\StopProcessing{% + \global\MultiCount\MaxCount + \glet\NextRead\AllowBlank} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\MRead} +%The command |\MRead| prepares to read a row of a table. It reads a +%field from the merge file and checks to see whether the table has been +%exhausted. +% \begin{macrocode} +\def\MRead{% + \global\MultiCount=1 + \ReadIn\TempField + \ifx\TempField\EndMarker + \StopProcessing + \else + \FinishLine + \NextField=\expandafter{\TempField}% + \edef\StartLine{\NextLine={\csname + pr1\endcsname{\the\NextField}}}% + \StartLine + \ConstructNextRow + \fi + \NextRead} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\ConstructNextRow} +%Command |\ConstructNextRow| does most of the work of assembling a row of +%the table. +%It assembles |\MaxCount| fields +%at a time into |\NextLine| unless an error is encountered. +% \begin{macrocode} +\def\ConstructNextRow{% + \ifnum\MultiCount<\MaxCount + \loop + \ReadIn\TempField + \ifx\TempField\EndMarker + \glet\TempField\empty + \StopProcessing + \MissingField + \else + \ifeof\MergeFile + \glet\TempField\empty + \StopProcessing + \MissingField + \fi + \fi + \AppendNextField + \ifnum\MultiCount<\MaxCount + \repeat + \fi + \the\NextLine} +% +% \end{macrocode} +% \end{macro} +% +% +% \section{The documentation driver file} +% +% This is the driver file that produces this documentation. +% We use the document class provided by the \LaTeXe\ distribution +% for producing the documentation. +% \begin{macrocode} +%<*driver> +\documentclass{ltxdoc} +\RecordChanges +\begin{document} + \DocInput{textmerg.dtx} + \PrintIndex + \PrintChanges +\end{document} +% +% \end{macrocode} +% +% +% +%\Finale +% +%\endinput diff --git a/Master/texmf-dist/source/generic/textmerg/textmerg.ins b/Master/texmf-dist/source/generic/textmerg/textmerg.ins new file mode 100644 index 00000000000..4f53580fd0a --- /dev/null +++ b/Master/texmf-dist/source/generic/textmerg/textmerg.ins @@ -0,0 +1,69 @@ +%% +%% This file will generate fast loadable files and documentation +%% driver files from the doc files in this package when run through +%% LaTeX or TeX. +%% +%% +%% IMPORTANT NOTICE: +%% +%% No other permissions to copy or distribute this file in any form +%% are granted and in particular no permission to modify its contents. +%% +%% --------------- start of docstrip commands ------------------ +%% +\def\batchfile{textmerg.ins} +\input docstrip.tex +\preamble + +Copyright (C) 1992,1994 Mike Piff, University of Sheffield, England + +This file is now placed in the public domain. You are encouraged to +distribute it together with the sources from which it was generated. + +\endpreamble + +\keepsilent + +\Msg{*** Generating the package file ***} + +\generateFile{textmerg.sty}{f}{\from{textmerg.dtx}{textmerg}} + +\Msg{*** Generating the plain TeX file ***} + +\generateFile{textmerg.tex}{f}{\from{textmerg.dtx}{plain}} + +\preamble +\endpreamble + +\Msg{*** Generating the documentation driver ***} + +\generateFile{textmerg.drv}{f}{\from{textmerg.dtx}{driver}} + +\Msg{*** Generating example files ***} + +\generateFile{tmexamp1.tex}{f}{\from{textmerg.dtx}{examp}} +\generateFile{tmexamp2.tex}{f}{\from{textmerg.dtx}{example}} +\generateFile{tmexampp.tex}{f}{\from{textmerg.dtx}{plainexample}} + +\Msg{*** Generating data files ***} +%%These must be verbatim copies, so... +\makeatletter +\let\WritePreamble\@gobble +\let\WritePostamble\@gobble + +\generateFile{results.dat}{f}{\from{textmerg.dtx}{results}} +\generateFile{silly.dat}{f}{\from{textmerg.dtx}{silly}} + + +\ifToplevel{% +\Msg{***********************************************************} +\Msg{*} +\Msg{* To finish the installation you have to move the files} +\Msg{* textmerg.sty and textmerg.tex into a directory searched by TeX.} +\Msg{* To produce the documentation, run the file textmerg.drv through LaTeX.} +\Msg{* To see examples, run the files tmexamp1.tex and tmexamp2.tex LaTeX,} +\Msg{* or tmexampp.tex through plain TeX.} +\Msg{***********************************************************} +} + +\endinput diff --git a/Master/texmf-dist/source/generic/wsuipa/README.wsuipa b/Master/texmf-dist/source/generic/wsuipa/README.wsuipa new file mode 100644 index 00000000000..825e71a3ba1 --- /dev/null +++ b/Master/texmf-dist/source/generic/wsuipa/README.wsuipa @@ -0,0 +1,8 @@ +There are three documents which are used with the IPA. The IPAMAN.TEX document +is written using the TEXT1 macros. The file LIPAMAN.TEX uses LaTeX. Both of +these files imbed IPAMACS.TEX. Another set has been added: IPALMAN.TEX and +IPALMACS.STY which are also typeset with LaTeX. + +For all of these documents, you will need the TFM files in this directory to +format the documents, and the *PK files to print the files. There are also some +DVI files supplied to make things a little easier. diff --git a/Master/texmf-dist/source/generic/wsuipa/changes.dec93 b/Master/texmf-dist/source/generic/wsuipa/changes.dec93 new file mode 100644 index 00000000000..e871c7cb91d --- /dev/null +++ b/Master/texmf-dist/source/generic/wsuipa/changes.dec93 @@ -0,0 +1,11 @@ +This is a list of changes to the basic TeXT1 sources made in December 1993. + +There is 1 new files in the WSUIPA directory: + [.wsuipa]compilefonts. + +0 files removed: + +2 files were changed: + [.wsuipa]lipaman.dvi + [.wsuipa]lipaman.tex + diff --git a/Master/texmf-dist/source/generic/wsuipa/changes.jun91 b/Master/texmf-dist/source/generic/wsuipa/changes.jun91 new file mode 100644 index 00000000000..d3cd18e4ec5 --- /dev/null +++ b/Master/texmf-dist/source/generic/wsuipa/changes.jun91 @@ -0,0 +1,11 @@ +This is a list of changes to the basic TeXT1 sources made in June 1991. + +There are 0 new files: + +0 files were removed: + +The following files have been changed: + [.wsuipa]ipaman.tex % minor correction + [.wsuipa]lipaman.tex % minor correction + [.models]thesis.texinput % conforms to new WSU standards + [.models]thesis.texmodel % conforms to new WSU standards diff --git a/Master/texmf-dist/source/generic/wsuipa/changes.mar91 b/Master/texmf-dist/source/generic/wsuipa/changes.mar91 new file mode 100644 index 00000000000..fa9e21936d7 --- /dev/null +++ b/Master/texmf-dist/source/generic/wsuipa/changes.mar91 @@ -0,0 +1,10 @@ +This is a list of changes to the basic TeXT1 sources made in March 1991. + +There is 1 new file: + [.wsuipa]lipaman.tex % LaTeX version of the manual + +0 files were removed: + +The following files have been changed: + [.fonts]cm*.300pk % most were corrupted, so I FTPd them all again + [.wsuipa]*.300pk % ditto diff --git a/Master/texmf-dist/source/generic/wsuipa/changes.may92 b/Master/texmf-dist/source/generic/wsuipa/changes.may92 new file mode 100644 index 00000000000..02ef23463cc --- /dev/null +++ b/Master/texmf-dist/source/generic/wsuipa/changes.may92 @@ -0,0 +1,28 @@ +This is a list of changes to the basic TeXT1 sources made in May 1992. + +There are 5 new files: + [.macros]txt1v406.tex + [.wsuipa]lipaman.dvi + [.wsuipa]readme.wsuipa + [.wsuipa]ipalman.tex + [.wsuipa]ipalmacs.sty + +1 file was removed: + [.macros]txt1v405.tex + +14 files were changed: + [.macros]text1.tex + [.wsuipa]iromanu.mf + [.wsuipa]wslipa8.tfm + [.wsuipa]wslipa9.tfm + [.wsuipa]wslipa10.tfm + [.wsuipa]wslipa11.tfm + [.wsuipa]wslipa12.tfm + [.wsuipa]wslipa17.tfm + [.wsuipa]wslipa8.300pk + [.wsuipa]wslipa9.300pk + [.wsuipa]wslipa10.300pk + [.wsuipa]wslipa11.300pk + [.wsuipa]wslipa12.300pk + [.wsuipa]wslipa17.300pk + diff --git a/Master/texmf-dist/source/generic/wsuipa/changes.nov90 b/Master/texmf-dist/source/generic/wsuipa/changes.nov90 new file mode 100644 index 00000000000..cc5a9bff2a0 --- /dev/null +++ b/Master/texmf-dist/source/generic/wsuipa/changes.nov90 @@ -0,0 +1,17 @@ +This is a list of changes to the basic TeXT1 sources made in November 1990. + +There are 2 new files: + [.macros]txt1v402.tex + [.macros]txt1m402.tex + +2 files were removed: + [.macros]txt1v401.tex + [.macros]txt1m401.tex + +The following files have been changed: + [.fonts]cmbxti14.300pk + [.fonts]cmbxti14.mf + [.fonts]cmbxti14.tfm + [.wsuipa]ipaman.tex + [.macros]flexcol.tex + [.models]thesis.texinput diff --git a/Master/texmf-dist/source/generic/xypic/CATALOG.doc b/Master/texmf-dist/source/generic/xypic/CATALOG.doc new file mode 100644 index 00000000000..53e9d44b89b --- /dev/null +++ b/Master/texmf-dist/source/generic/xypic/CATALOG.doc @@ -0,0 +1,54 @@ +%% $Id: CATALOG.doc,v 3.6 1998/03/06 04:29:05 krisrose Exp $ +%% +%% Xy-pic ``CTAN CATALOG description'' generation file. +%% Copyright (c) 1994-1996 Kristoffer H. Rose +%% +%% This file is part of the Xy-pic package for graphs and diagrams in TeX. +%% See the companion README and INSTALL files for further information. +%% Copyright (c) 1991-1996 Kristoffer H. Rose +%% +%% The Xy-pic package is free software; you can redistribute it and/or modify +%% it under the terms of the GNU General Public License as published by the +%% Free Software Foundation; either version 2 of the License, or (at your +%% option) any later version. +%% +%% The Xy-pic package is distributed in the hope that it will be useful, but +%% WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +%% or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +%% for more details. +%% +%% You should have received a copy of the GNU General Public License along +%% with this package; if not, write to the Free Software Foundation, Inc., +%% 675 Mass Ave, Cambridge, MA 02139, USA. +%% +\documentstyle{article} +\input{xy} +\begin{document} + +\newwrite\Wout +\def\W#1{\immediate\write\Wout{#1}} + +\immediate\openout\Wout=CATALOG.out +\W{Name: xypic} +\W{Version: \xyversion\space <\xydate>} +\W{} +\W{Description: Xy-pic is a package for typesetting graphs and diagrams.} +\W{ It is structured as several modules, each defining a custom notation for} +\W{ a particular kind of graphical object or structure. Example objects are} +\W{ arrows, curves, frames, and colouring/rotation on drivers that support} +\W{ it; these can be organised in matrix, directed graph, path, polygon, knot,} +\W{ and 2-cell structure. Xy-pic works with most formats, including LaTeX,} +\W{ AMS-LaTeX, AMS-TeX, and plain TeX, and has been used to typeset} +\W{ complicated diagrams from many application areas including category} +\W{ theory, automata theory, algebra, neural networks, and database theory.} +\W{} +\W{Keywords: diagram, picture, graph, arrow, curve, commutative diagram.} +\W{} +\W{Author: Kristoffer H. Rose} +\W{Problems-To: Kristoffer.Rose@ens-lyon.fr} +\W{Address: LIP/ENS-Lyon; 46, Allee d'Italie; 69364 Lyon 7; FRANCE} +\W{} +\W{} +\immediate\closeout\Wout + +\end{document} diff --git a/Master/texmf-dist/source/generic/xypic/COPYING b/Master/texmf-dist/source/generic/xypic/COPYING new file mode 100644 index 00000000000..a43ea2126fb --- /dev/null +++ b/Master/texmf-dist/source/generic/xypic/COPYING @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 675 Mass Ave, Cambridge, MA 02139, USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "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 PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + Appendix: How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) 19yy + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) 19yy name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/Master/texmf-dist/source/generic/xypic/ChangeLog b/Master/texmf-dist/source/generic/xypic/ChangeLog new file mode 100644 index 00000000000..9c017d33009 --- /dev/null +++ b/Master/texmf-dist/source/generic/xypic/ChangeLog @@ -0,0 +1,788 @@ +1998-10-05 Kristoffer Rose + + * Address of FSF changed (*). MINOR.....?? + +1998-10-03 Kristoffer Rose + + * xyframe.doc (\useCurveFrames): Curve, not circle [fix by George + C. Necula]. MINOR. + + * xycurves.doc (\crvs@): \crv@defaultshape fixed [fix by George + C. Necula]. MINOR. + + * Makefile, xynecula.doc, xysmart.doc: New options, extracted from + mail [by George C. Necula], added. NEW. + + * xy.doc (\OBJECT@shapei): Change to implement *stylechar + correctly. Originally, *stylechar was behaving like shape + [...]. Now *stylechar is expanded immediately and is not added to + tokens, while shape[...] does both [fix by George C. Necula]. + MAJOR. + + * xy.doc (\checkZeroEdge@): Avoid expanding \Edge@c [fix by George + C. Necula]. MINOR. + +1998-03-18 Kristoffer Rose + + * Makefile: New creation of fixes... NEW. + + * install-tds: local variables eliminated in functions. MINOR + [Pieter Donche]. + +1998-03-06 Kristoffer Rose + + * Revision 3.6 released. + + * xyframe.doc: \dotcorner@ and \dashedcorner@ defined even when + curves not loaded. MINOR. + +Wed Oct 22 18:53:12 1997 Kristoffer Rose + + * xygraph.doc: Only warn user about redefining graph escapes when + this is indeed the case. MINOR. + +Mon Oct 13 12:55:36 1997 Kristoffer Rose + + * Makefile, xyps-ps.doc, xydocps.doc: Version of the dictionary is + now controlled by the Makefile. MINOR. + + * xy.doc, xyguide.man, xyrefer.man: Changed Kristoffer's address + to ENS-Lyon. MINOR. + + * xycurve.doc, xyline.doc: line thickness now works for curves + (from Ross). MINOR. + +Thu Oct 9 02:26:45 1997 Kristoffer Rose + + * Makefile (macros): LATEXINPUTDIR eliminated; PSHEADERDIR changed + to conform to TDS. Release targets updated for author's new + location @ens-lyon.fr. MINOR. + +Wed May 28 00:49:07 1997 Kristoffer H. Rose + + * Releasing version 3.5. + +Tue May 27 10:42:58 1997 Kristoffer H. Rose + + * Makefile, INSTALL: Removed HTML which can't be generated + presently. MINOR. + + * xy.doc: Fixed "missing rules bug" properly: avoid premature + expansion of \Clast@@. Wrong "missing rules" fix undone to fix + new "missing breaks" bug. MAJOR. + +Mon May 19 17:51:03 1997 Kristoffer H. Rose + + * Released version 3.4. + +Sun May 18 03:49:01 1997 Kristoffer H. Rose + + * xymovie.doc, movie.cls, xyrefer.man: New extension...added to + reference manual. MINOR. + +Wed May 14 11:29:57 1997 Kristoffer H. Rose + + * xy.doc (\xy): zero \mathsurround. MINOR. + +Sun May 4 14:53:59 1997 Kristoffer H. Rose + + * xy.doc (\preconnect): methods should not inherit temporary + invisibility (fixes missing rules problem). MINOR. + +Tue Mar 11 21:48:50 1997 Kristoffer H. Rose + + * Makefile (GFTOPK): Updated to allow using texk-7.0. MINOR: + - Rename filenames such as `xyrefer.doc.dvi' to `xyrefer.dvi'. + - Don't use (now-redundant) -v option to gftopk + +Tue Feb 11 19:17:50 1997 Ross Moore + + * xycurve.doc (*crvconn@): Centers \connect@ object. MINOR. + +Sun Feb 9 21:04:19 1997 Kristoffer H. Rose + + * xyline.doc (?): BUG: should set default line width dynamically... + +Thu Jan 23 22:27:06 1997 Kristoffer H. Rose + + * xycurve.doc, xyps-pro.doc, xypsdict.doc, xyidioms.doc, + xyps-ps.doc, xypspatt.doc: Revert to Ross' naming of DVI-time + hooks. MINOR. + +Mon Jan 6 22:08:25 1997 Kristoffer H Rose + + * xy.doc (\txt): Don't attempt recognising vmode. MINOR [Liam Healy]. + + * Makefile (install): Don't make install.www. MINOR [Liam Healy]. + +Thu Dec 19 05:39:27 1996 Kristoffer H. Rose + + * Release 3.3. + +Thu Dec 12 17:18:57 1996 Kristoffer H Rose + + * xy.doc (\ellipseInner@, \ellipsecentredInner@): Edge-finding + typos fixed. MINOR. + +Mon Dec 2 11:07:20 1996 Kristoffer H Rose + + * xygraph.doc (\newgraphescape): never use \renewcommand. MINOR. + + * xy.doc (\straightC{break,last}@@): straight connection + subsegments connect properly to non-rectangle objects. MAJOR. + * NOTE: same bug needs to be fixed for curves! + +Thu Nov 28 18:45:00 1996 Kristoffer H Rose + + * xyv2.doc (\morphism): updated to use new style s. MINOR. + +Wed Nov 27 22:36:51 1996 Kristoffer H Rose + + * xy.doc (\dir): redef'd dir3{<} naively to make center line + segment work. MINOR. + +Mon Nov 25 06:08:38 1996 Kristoffer H Rose + + * xygraph.doc (\newgraphescape): Allow [n] for argument count. NEW! + + * xy.doc (\cmerge@): keep edge with new breaking principle. MINOR. + +Wed Nov 20 06:01:40 1996 Kristoffer H Rose + + * xymatrix.doc (\xymatrix@at): @E generalised to @M/@W/@H. MINOR. + + * xy.doc (\line@): downward @3{>} rotates \line@ wrong. BUG! + +Mon Oct 21 16:49:59 1996 Kristoffer H Rose + + * xy.doc (shapes): [r] [l] / [u] [d] behave when entry very + tall / wide [Michel Goossens]. MINOR. + +Fri Oct 11 03:58:11 1996 Kristoffer H Rose + + * xyarrow.doc (\PATHlabelalias@): save breaks properly. MINOR. + +Wed Oct 9 18:37:06 1996 Ross Moore + + * xy.doc (\solid@): fixed `missing rules' bug. MAJOR. + +Wed Oct 9 18:37:06 1996 Kristoffer Høgsbro Rose + + * xy.doc (\dottedSpread@): fixed `spurious dot' bug. MAJOR. + +Fri Sep 20 03:33:32 1996 Kristoffer Høgsbro Rose + + * xyguide.man: Several exercises added and some love poured in. + +Thu Sep 5 19:57:22 1996 Kristoffer Høgsbro Rose + + * xy.doc, xyarrow.doc, xymatrix.doc: All redefinitions of \oxy@ + now via \change@oxy@ for safety reasons. MINOR. + + * xy.doc (\solidhrule@, \solidvrule@, \straight@): added + \straighttypeset@@ hook for line typesetting primitive. MINOR. + + * xymatrix.doc: Added @M and @L spacing adjustments. MINOR. + +Thu Aug 15 00:03:46 1996 Kristoffer H Rose + + * xy.doc: dottedSpread bails out when no filling requested. HACK. + + * xycurve.doc: Avoid redefinition warning. MINOR. + + * xyguide.man: Worked through; documented that line intersection + of curves works. MINOR. + +Mon Aug 13 00:00:00 EST 1996 Ross Moore + + * xycurve.doc, xyline.doc, ?: Thorough recoding to respect + styles. MAJOR. + +Thu Aug 15 00:03:46 1996 Kristoffer H Rose + + * xy.doc: dottedSpread bails out when no filling requested. HACK. + + * xycurve.doc: Avoid redefinition warning. MINOR. + + * xyguide.man: Worked through; documented that line intersection + of curves works. MINOR. + +Mon Aug 13 00:00:00 EST 1996 Ross Moore + + * xycurve.doc, xyline.doc, ?: Thorough recoding to respect + styles. MAJOR. + +Sun Jun 30 21:12:35 1996 Kristoffer H|gsbro Rose + + * xyarrow.doc: Hide tips. MINOR. + +Tue Jun 11 01:23:46 1996 Kristoffer H|gsbro Rose + + * xyarrow.doc: use \PATHcontinue@@ correctly. MAJOR. + + * xy.doc: \checkXyStyle@ was never defined, now prints `?'. + +Fri May 24 04:27:32 1996 Kristoffer H Rose + + * xyarrow.doc (*): fixed use of new kernel connect methods! MAJOR. + +Thu May 23 20:30:53 1996 Kristoffer H Rose + + * xy.doc: SUMMARY of (functionality) KERNEL CHANGES since v3.2: + - (PREAMBLE) \xy*@ definitions made global. + - (\zz@) new almost-zero test (uses dimension register). + - (\xyinputorelse@) split into conditional (not loading if + \*loaded already defined) and unconditional (with @@). + - (\xymath@) use fontdimen22 to vertically adjust. + - (\vfromabsolute@@, \AddOp@) add 1sp ?? + - (\preconnect, ...) setup but don't do \connect. + - (\OBJECT@@, \Drop@@) default is to use \styledbox@. + - (\OBJECT@@, \object) define \pre/postXY@style@. + - (\checkZeroEdge@) uses \zz@-checker. + - (\OBJECT@shapei) fix expandafter trickery. + - (\styledbox@) new wrapper for \pre/post-styles. + - (\checkXyStyle@, \styleDrop@, \styleConnect@) removed. + - (\xynamestyle@) removed warning when not redefining. + - (\xycompileto@) attempt to recover when compiled file truncated. + - (\MakeOutlines) Allow compilation of outlines only. + - (\no@, \line@, \solid@, \tip@) don't reset i/h flags ?? + - (\line@, \pointlike@, \squiggle@, \[Tt]ip@, \cir@*) use \styledbox@. + - (\solid[vh]rule@) respect i/h flags, setup break-methods. + - (\xyoption) truncate right. + - (\xydriversselected) default to empty! + - (CONNECTIONS) recoded (too many changes to summarise)! + +Tue Jan 2 14:18:04 1996 Kristoffer H. Rose + + * xy.doc (\xyinputorelse@): Stop gobbling csnames like mad: use a + shaved version to input non-doc files. MINOR. + + * xy.doc (\xydef@,...): made private definitions global. MINOR. + + * xygraph.doc: do not save node ids with explicit ="...". NEW. + +Wed Dec 13 03:16:04 1995 Kristoffer H. Rose + + * xy.doc (methods): Changed style principle such that the style is + always used, and such that it is reestablished. MAJOR. + +Mon Nov 20 23:06:26 1995 Kristoffer H. Rose + + * xy.doc (shapes): Now [=...] is the same as [|=...]. MINOR. + +Thu Nov 16 03:12:01 1995 Kristoffer H. Rose + + * xyarrow.doc (\ar): update variant more often but only when not + already set. MINOR. + From: Stefano Guerrini + +Wed Nov 15 20:36:10 1995 Kristoffer H. Rose + + * xy.doc (\straight@): added Cbreak@@ and Clast@@ methods! NEW. + +Mon Nov 13 16:14:11 1995 Kristoffer H. Rose + + * xymatrix.doc (\xymatrix@fix): Fixed @! to make row and + column spacing the same; added @![RC]0 and @![RC]= to set + override entry size for spacing computation. MINOR, NEW.. + +Thu Oct 26 16:09:10 1995 Kristoffer H. Rose + + * xy.doc (\xycompile): add \OnlyOutlines and friends. NEW. + +Wed Oct 18 03:13:45 1995 Kristoffer H Rose + + * xyps-pro.doc (PS Prolog): eliminate obsolete \currentxydriver@ + such that conditionals are right. MINOR. + + * xyidioms.doc (\xysetup@@): avoid problems when Babel loaded with + plain TeX. MINOR. + +Tue Oct 17 21:38:03 1995 Kristoffer H. Rose + + * xymatrix.doc (\xymatrix@at): @1 adds math strut. NEW. + + * xy.doc (\xymath@): Use axis_height (fontdimen22 of textfont2) to + adjust the reference point of in-math Xy-pictures. MAJOR. + +Mon Oct 16 20:04:25 EST 1995 Ross Moore + + * xycurve.doc: improved the edge-finding capabilities. MINOR + + * xyarrow.doc: removed \cmergethecz@ from path sub-segments. MINOR + +Wed Oct 11 08:16:27 1995 Kristoffer H. Rose + + * xy*.doc: \xyinputorelse@ now skips files files that have set + \FILEloaded = \empty. MINOR. + +Tue Oct 10 20:30:16 1995 Kristoffer H. Rose + + * xy.doc (\xycompileto): attempt to recover from truncated + .xyc-file. MINOR. + + * xyv2.doc (\diagramcompileto): avoid competing compilation. MINOR. + (\XXtoY@, \toXY@): avoid @-names in literate code. MINOR. + From: Joerg Eich + +Mon Oct 9 20:58:13 1995 Kristoffer H. Rose + + * xymatrix.doc (entry spacing): added forms @*[shape] and + @* to set defaults for **... equivalents; also made + these constructions cumulative (bug: still backwards). MINOR, NEW. + +Thu Oct 5 16:44:09 1995 Kristoffer H. Rose + + * xymatrix.doc: changed row/column names to the user-accessible + \Row and \Col. MINOR. + +Tue Oct 3 16:33:41 1995 Kristoffer H. Rose + + * xygraph.doc (\MOVE@place): Lookahead properly after of + the form ...!. MINOR. + +Mon Oct 2 16:40:29 1995 Kristoffer H. Rose + + * xy.doc (\vfromabsolute@@, \Addop@), xyframe.doc, xycurve.doc: + add new \zz@ almost-zero-test and add tiny amount to absolute + dimensions to make more robust and in particular circumvent bug in + some PostScript interpreters (!). MINOR; should also be fixed in + PS backends... + +Sat Sep 23 19:48:38 EST 1995 Ross R. Moore + + * xyps-ps.doc, xyps.doc: fixed undefined \UnloadPS@@ MAJOR. + * xyframe.doc, xycurve.doc: problem with \L@ and \R@ MAJOR. + * documentation fixes; undefined references, etc. MINOR. + + * altered example diagrams, due to bug in PS interpreters. + A better fix may be possible within xyps-ps.doc. + + * Released version 3.2 on ftp.mpce.mq.edu.au + with above fixes and corrected manuals. + +Tue Sep 19 17:42:24 1995 Kristoffer H. Rose + + * Release 3.2. + + * xyframe.doc (Circles): several instances of \L@ and \R@ should + be \L@c and \R@c... MAJOR. + From: Clemens Beckstein + +Fri Sep 15 95 19:03:37 EST 1995 Ross R. Moore + + * xyarrow.doc (\droplabel@): labels as objects now + flawless! MAJOR. + +Wed Sep 13 18:29:25 EST 1995 Ross R. Moore + + * xyarc.doc, xytpic.doc: fixed version numbers. MINOR. + + * xytile.doc: changed example code...to avoid weird Level 1 + PostScript error. MINOR. + + * xypspatt.doc: documentation now prints with GhostScript (added + hack to side-step bad Level 2 patterns). MAJOR. + +Wed Sep 13 01:54:55 1995 Kristoffer H. Rose + + * xyarrow.doc: Fixed size and modifiers of labels on all + segments. MAJOR. From: Jürgen Koslowski + +Tue Sep 12 01:59:34 1995 Kristoffer H. Rose + + * xyarrow.doc: added [shape]* prefix to . NEW! + +Mon Sep 11 21:22:37 EST 1995 Ross R. Moore + + * xypspatt.doc, xypsdict.doc: fixed pattern frequencies and + angles. MINOR. + + * xyps.doc, xyps-ps.doc, + files: isolated font/ps + interface. MAJOR. + +Fri Sep 8 18:15:33 EST 1995 Ross R. Moore + + * xycurve.doc: fixed \resetbreaks undefined w/o arrow. MINOR. + Fixed wrong circle-frames w/o PS. MAJOR. + From: Fred T. Krogh + +Wed Sep 6 20:48:01 1995 Kristoffer H. Rose + + * xydvidrv.doc: Changed wrong \withoption to \xywithoption. MAJOR. + From: Young U. Ryu + +Tue Sep 5 22:38:55 1995 Kristoffer H. Rose + + * Release 3.1! + + * xyframe.doc: added : modifier to [F...] shapes. MINOR. + From: Marc Gemis + + * xyarrow.doc: fixed *{x} labels to use default object + style. MINOR. + +Tue Sep 5 18:49:57 EST 1995 Ross R. Moore + + * xyweb.doc, xyguide.man: fixed an example. MINOR. + + * xy.doc: added method \circleProp@ for labels. MAJOR. + + * xyemtex.doc, xydvidrv.doc, xydvips.doc: + Support for em-\TeX \special commands. NEW. + +Fri Sep 1 16:11:02 1995 Kristoffer H. Rose + + * xyarrow.doc: added @?
to swap the meaning of ^ and _ for + an arrow. NEW! + +Fri Sep 1 18:46:39 EST 1995 Ross R. Moore + + * xy.doc, xyframe.doc, xyarrow.doc: frames around arrow-labels now + positioned better...MAJOR. + +Thu Aug 31 18:46:39 EST 1995 Ross R. Moore + + * xytp-f.doc: filled frames now all work. MAJOR. + +Tue Aug 29 15:34:25 1995 Kristoffer H. Rose + + * xy.doc (\OBJECT@change): - object modifier now works. MINOR. + +Tue Aug 29 20:21:59 EST 1995 Ross R. Moore + + * xyframe.doc, xy.doc, xycurve.doc, xyps.doc, xytp-f.doc, xytpic.doc + implemented some curved and oval frames using splines and/or tpic. + fixed some bugs in frames. MAJOR. + +Thu Aug 24 21:59:53 1995 Kristoffer H. Rose + + * xycolor.doc, xyline.doc, xyrotate.doc, xytile.doc: removed need + for obsolete style option. MINOR. + + * xy.doc (define ): xystyle.doc annihilated and its + functionality inserted with the syntax [=...] in the + kernel. MINOR. + + * xy.doc, xytile.doc, xyrotate.doc, xyline.doc, xycolor.doc, + xyps-t.doc, xyps-ps.doc, xyps-c.doc: Changed \*shape@@ to + merely \shape [] and \*shapechar@@ to \shape + [...]. MAJOR. + + * xy.doc (\xyadddriversupport@): support control sequence + no longer cleared upon every addition to it. MAJOR. + +Wed Aug 23 22:42:24 EST 1995 Ross R. Moore + + * xytp-f.doc, xytpic.doc: implements frames for TPIC NEW! + * xytp-f.doc: (incomplete) rectangles, not circles/ellispes. MINOR. + +Wed Aug 23 11:32:25 EST 1995 Ross R. Moore + + * xyframe.doc, xyps-f.doc, xyps-pro.doc: added \frm{**} for + stroked fills. NEW! + + * xy.doc: shortened the loading of drivers and removed the initial + ``unload''. MINOR. + + * xycurve.doc: lack of invisibility, fixed. MINOR. + +Tue Aug 22 20:24:03 EST 1995 Ross R. Moore + + * xytpic.doc: all bugs fixed (!). MAJOR. + * xytpic.doc: dotted/dashed lines now work. NEW! + * xytpic.doc: implements \xycircle and \qspline. NEW! + * xyxdvi.doc: new driver. NEW! + * xy.doc: edits to reflect the TPIC support. MINOR. + * xydoc.sty: macros for driver names. MINOR. + +Tue Aug 22 01:09:46 1995 Kristoffer H. Rose + + * xyguide.man, man2html.gawk: Several changes to make the .html + version of the User's Guide prettier. MINOR. + +Mon Aug 21 20:24:03 EST 1995 Ross R. Moore + + * xycurve.doc: Quadratic splines added: \qspline NEW! + * xyps-?.doc: minor edits to documentation MINOR. + * xyrefer.doc: moved the xyps-?.doc to Part IV MINOR. + * xytpic.doc: removed tracing and fixed a bug. MINOR. + +Fri Aug 18 17:13:01 EST 1995 Ross R. Moore + + * xyframe.doc: fixed several bugs: `missing' frames now are found; + zero-sized frames handled properly; default `blacked' frames + placed correctly; frame -modifiers placed BEFORE object, + not AFTER. MAJOR. + + * xyps-f.doc, xyps-c.doc, xyps-t.doc, xyps-r.doc, xyps-l.doc: + ability to turn PSframes, PScolor, ... on/off. MINOR. + + * xyline.doc, xy.doc: renaming of cs's for consistency. + MINOR. + + * xy.doc: fixed bug affecting ADDOP@minus. MAJOR. + +Tue Aug 15 16:38:22 EST 1995 Ross R. Moore + + * xyidioms.doc, xy*.doc: xysetup@ is now xysetup@@ (in other files + also). + + * xyps-pro.doc: fixed error in PostScript for oval frames. + +Mon Aug 14 15:19:56 EST 1995 Ross R. Moore + + * xy.doc: removed the \global s, which were unnecessary. + MINOR. + + * xydvitops.doc: new driver --- untested. MINOR. + + * xyrotate.doc, xyps-r.doc: rationalised control sequence names. + MINOR. + +Fri Aug 11 18:25:31 EST 1995 Ross R. Moore + + * xy updated the Macintosh driver files. MAJOR. + + * xycmactex.doc, xyemtex.doc: dummy drivers that simply + \xyrequire{dvips} (should be independent). NEW! + +Thu Aug 10 19:36:49 EST 1995 Ross R. Moore + + * xy.doc, xydvips.doc, xytile.doc: attempted correct + driver-loading sequencing for non-delayed loading. MAJOR. + + * xyps-ps.doc: forgot to let \xyUnloadPS@@=\xyUnloadPS@. MINOR. + +Wed Aug 9 19:50:11 EST 1995 Ross R. Moore + + xycmtip.doc: with PS-backend, now work again. MAJOR + + * xyps-ps.doc, xyps.doc, xydvips.doc: reorganised the unloading of + PS to simplify code in the driver-files. MINOR. + + * xy.doc: reinstated \xysetup@ for single drivers. (Simply delayed + the action: \xydef@\selectdriver@single#1{\xysetup@{...}}. Now + \xyReloadDrivers happens when it should --- everything loads at + once, without all those repetitions as new extensions are added. + The remaining problem (?) is that extra requests for a new (or the + same) driver seem to generate an increasing number of calls to + \xyReloadDrivers; e.g. 1 driver ==> 1 call , 2 drivers ==> 1+2=3 + calls , 3 drivers ==> 1+2+3=6 calls , ....). MAJOR. + +Mon Aug 7 16:08:06 EST 1995 Ross R. Moore + + * xy.doc, xyrecat.doc: fixed catcode loading. MAJOR. + + * xycmtip.doc: do not work in the reference manual, with PS. MAJOR + looking at the -table --- great hacking, Kris :-) + it seems that cmtips needs a . Why ? + Could this explain its failure to load ? + Or is it the \xysetup@ problem again ? + i.e. it needs a trigger for the activation. + +Fri Aug 4 13:11:12 EST 1995 Ross R. Moore + + * xydvips.doc, xytextures.doc: hooks now end in @@, for + consistency. MINOR. + + * xyframe.doc: fixed up fills, allowing non-default + implementations. MAJOR. + + * xydvips.doc xycolor.doc: fixed colours. Problem in the + redefinition of unloading, etc. Fix: make unloading a hook + also. Drivers may redefine the hook to unload. MAJOR. + +Wed Jul 26 15:24:17 1995 Kristoffer H. Rose + + * xyidioms.doc, *.doc: Defined \xyclosedown@@ to make it easy to + add important warnings to the end of the run. Renamed \xysetup@ + to \xysetup@ with global replace in all files. MINOR. + +Tue Jul 25 14:52:36 1995 Kristoffer H. Rose + + * xyguide.man: Index entries inserted; still needs sexy examples + last. MINOR. + + * xyrefer.man: Inserted Preface with overview and license. MINOR. + + * xy.doc (\xyoption): Do not execute \xyoption{o} until *after* o + has been loaded (delay definition of \xy