From 1bac51c9be71358b55925783e16f3d8bc03d630b Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Sat, 9 Dec 2023 03:03:37 +0000 Subject: CTAN sync 202312090303 --- macros/latex/contrib/hvextern/Changes | 1 + macros/latex/contrib/hvextern/README | 4 +- macros/latex/contrib/hvextern/doc/hvextern.pdf | Bin 1483008 -> 1498836 bytes macros/latex/contrib/hvextern/latex/hvextern.sty | 20 +- .../contrib/hvextern/script/hvextern-checkfile.lua | 0 macros/latex/contrib/l3experimental/CHANGELOG.md | 16 +- macros/latex/contrib/l3experimental/README.md | 11 +- .../latex/contrib/l3experimental/l3benchmark.dtx | 4 +- .../latex/contrib/l3experimental/l3benchmark.pdf | Bin 308534 -> 308820 bytes macros/latex/contrib/l3experimental/l3bitset.dtx | 592 -------------------- macros/latex/contrib/l3experimental/l3bitset.ins | 62 --- macros/latex/contrib/l3experimental/l3bitset.pdf | Bin 404410 -> 0 bytes .../latex/contrib/l3experimental/l3draw-boxes.dtx | 42 +- .../latex/contrib/l3experimental/l3draw-code.pdf | Bin 681452 -> 682740 bytes .../latex/contrib/l3experimental/l3draw-layers.dtx | 2 +- .../latex/contrib/l3experimental/l3draw-paths.dtx | 2 +- .../latex/contrib/l3experimental/l3draw-points.dtx | 2 +- .../latex/contrib/l3experimental/l3draw-scopes.dtx | 2 +- .../contrib/l3experimental/l3draw-softpath.dtx | 2 +- .../latex/contrib/l3experimental/l3draw-state.dtx | 2 +- .../contrib/l3experimental/l3draw-transforms.dtx | 2 +- macros/latex/contrib/l3experimental/l3draw.dtx | 17 +- macros/latex/contrib/l3experimental/l3draw.pdf | Bin 517829 -> 518932 bytes macros/latex/contrib/l3experimental/l3galley.dtx | 4 +- macros/latex/contrib/l3experimental/l3galley.pdf | Bin 408914 -> 409197 bytes macros/latex/contrib/l3experimental/l3graphics.dtx | 4 +- macros/latex/contrib/l3experimental/l3graphics.pdf | Bin 383641 -> 383921 bytes macros/latex/contrib/l3experimental/l3opacity.dtx | 4 +- macros/latex/contrib/l3experimental/l3opacity.pdf | Bin 313597 -> 313872 bytes .../latex/contrib/l3experimental/l3str-format.dtx | 4 +- .../latex/contrib/l3experimental/l3str-format.pdf | Bin 368029 -> 368314 bytes .../latex/contrib/l3experimental/l3sys-shell.dtx | 4 +- .../latex/contrib/l3experimental/l3sys-shell.pdf | Bin 348053 -> 348328 bytes macros/latex/contrib/l3experimental/xcoffins.dtx | 4 +- macros/latex/contrib/l3experimental/xcoffins.pdf | Bin 394481 -> 394766 bytes macros/latex/contrib/l3experimental/xgalley.dtx | 4 +- macros/latex/contrib/l3experimental/xgalley.pdf | Bin 299636 -> 299916 bytes macros/latex/contrib/l3kernel/CHANGELOG.md | 40 +- macros/latex/contrib/l3kernel/README.md | 2 +- macros/latex/contrib/l3kernel/expl3.dtx | 16 +- macros/latex/contrib/l3kernel/expl3.pdf | Bin 623311 -> 623407 bytes macros/latex/contrib/l3kernel/interface3.pdf | Bin 1766729 -> 1772521 bytes macros/latex/contrib/l3kernel/interface3.tex | 2 +- macros/latex/contrib/l3kernel/l3.ins | 1 + macros/latex/contrib/l3kernel/l3basics.dtx | 6 +- macros/latex/contrib/l3kernel/l3bitset.dtx | 604 +++++++++++++++++++++ macros/latex/contrib/l3kernel/l3bootstrap.dtx | 2 +- macros/latex/contrib/l3kernel/l3box.dtx | 2 +- macros/latex/contrib/l3kernel/l3candidates.dtx | 2 +- macros/latex/contrib/l3kernel/l3cctab.dtx | 2 +- macros/latex/contrib/l3kernel/l3clist.dtx | 4 +- macros/latex/contrib/l3kernel/l3coffins.dtx | 4 +- macros/latex/contrib/l3kernel/l3color.dtx | 2 +- macros/latex/contrib/l3kernel/l3debug.dtx | 13 +- macros/latex/contrib/l3kernel/l3deprecation.dtx | 149 +++-- macros/latex/contrib/l3kernel/l3doc.dtx | 195 +++---- macros/latex/contrib/l3kernel/l3doc.pdf | Bin 558186 -> 558435 bytes macros/latex/contrib/l3kernel/l3docstrip.dtx | 2 +- macros/latex/contrib/l3kernel/l3docstrip.pdf | Bin 151991 -> 152023 bytes macros/latex/contrib/l3kernel/l3expan.dtx | 34 +- macros/latex/contrib/l3kernel/l3file.dtx | 34 +- macros/latex/contrib/l3kernel/l3flag.dtx | 4 +- macros/latex/contrib/l3kernel/l3fp-assign.dtx | 2 +- macros/latex/contrib/l3kernel/l3fp-aux.dtx | 2 +- macros/latex/contrib/l3kernel/l3fp-basics.dtx | 2 +- macros/latex/contrib/l3kernel/l3fp-convert.dtx | 2 +- macros/latex/contrib/l3kernel/l3fp-expo.dtx | 2 +- macros/latex/contrib/l3kernel/l3fp-extended.dtx | 2 +- macros/latex/contrib/l3kernel/l3fp-functions.dtx | 2 +- macros/latex/contrib/l3kernel/l3fp-logic.dtx | 2 +- macros/latex/contrib/l3kernel/l3fp-parse.dtx | 2 +- macros/latex/contrib/l3kernel/l3fp-random.dtx | 2 +- macros/latex/contrib/l3kernel/l3fp-round.dtx | 2 +- macros/latex/contrib/l3kernel/l3fp-symbolic.dtx | 2 +- macros/latex/contrib/l3kernel/l3fp-traps.dtx | 2 +- macros/latex/contrib/l3kernel/l3fp-trig.dtx | 2 +- macros/latex/contrib/l3kernel/l3fp-types.dtx | 2 +- macros/latex/contrib/l3kernel/l3fp.dtx | 2 +- macros/latex/contrib/l3kernel/l3fparray.dtx | 2 +- macros/latex/contrib/l3kernel/l3int.dtx | 2 +- macros/latex/contrib/l3kernel/l3intarray.dtx | 2 +- .../latex/contrib/l3kernel/l3kernel-functions.dtx | 9 +- macros/latex/contrib/l3kernel/l3keys.dtx | 56 +- macros/latex/contrib/l3kernel/l3legacy.dtx | 2 +- macros/latex/contrib/l3kernel/l3luatex.dtx | 8 +- macros/latex/contrib/l3kernel/l3msg.dtx | 2 +- macros/latex/contrib/l3kernel/l3names.dtx | 14 +- macros/latex/contrib/l3kernel/l3news.pdf | Bin 396222 -> 396222 bytes macros/latex/contrib/l3kernel/l3news01.pdf | Bin 122959 -> 122959 bytes macros/latex/contrib/l3kernel/l3news02.pdf | Bin 150919 -> 150919 bytes macros/latex/contrib/l3kernel/l3news03.pdf | Bin 148747 -> 148747 bytes macros/latex/contrib/l3kernel/l3news04.pdf | Bin 114754 -> 114754 bytes macros/latex/contrib/l3kernel/l3news05.pdf | Bin 112524 -> 112524 bytes macros/latex/contrib/l3kernel/l3news06.pdf | Bin 151591 -> 151591 bytes macros/latex/contrib/l3kernel/l3news07.pdf | Bin 128344 -> 128344 bytes macros/latex/contrib/l3kernel/l3news08.pdf | Bin 163484 -> 163484 bytes macros/latex/contrib/l3kernel/l3news09.pdf | Bin 250159 -> 250159 bytes macros/latex/contrib/l3kernel/l3news10.pdf | Bin 150302 -> 150302 bytes macros/latex/contrib/l3kernel/l3news11.pdf | Bin 170102 -> 170102 bytes macros/latex/contrib/l3kernel/l3news12.pdf | Bin 205020 -> 205020 bytes macros/latex/contrib/l3kernel/l3pdf.dtx | 31 +- macros/latex/contrib/l3kernel/l3prefixes.csv | 9 +- macros/latex/contrib/l3kernel/l3prefixes.pdf | Bin 82683 -> 82696 bytes macros/latex/contrib/l3kernel/l3prg.dtx | 21 +- macros/latex/contrib/l3kernel/l3prop.dtx | 2 +- macros/latex/contrib/l3kernel/l3quark.dtx | 2 +- macros/latex/contrib/l3kernel/l3regex.dtx | 6 +- macros/latex/contrib/l3kernel/l3seq.dtx | 6 +- macros/latex/contrib/l3kernel/l3skip.dtx | 2 +- macros/latex/contrib/l3kernel/l3sort.dtx | 2 +- macros/latex/contrib/l3kernel/l3str-convert.dtx | 194 +++---- macros/latex/contrib/l3kernel/l3str.dtx | 101 ++-- macros/latex/contrib/l3kernel/l3styleguide.pdf | Bin 296454 -> 296516 bytes macros/latex/contrib/l3kernel/l3styleguide.tex | 2 +- macros/latex/contrib/l3kernel/l3syntax-changes.pdf | Bin 243093 -> 243162 bytes macros/latex/contrib/l3kernel/l3syntax-changes.tex | 2 +- macros/latex/contrib/l3kernel/l3sys.dtx | 13 +- macros/latex/contrib/l3kernel/l3term-glossary.pdf | Bin 218244 -> 218315 bytes macros/latex/contrib/l3kernel/l3term-glossary.tex | 2 +- macros/latex/contrib/l3kernel/l3text-case.dtx | 4 +- macros/latex/contrib/l3kernel/l3text-map.dtx | 4 +- macros/latex/contrib/l3kernel/l3text-purify.dtx | 2 +- macros/latex/contrib/l3kernel/l3text.dtx | 4 +- macros/latex/contrib/l3kernel/l3tl-analysis.dtx | 2 +- macros/latex/contrib/l3kernel/l3tl-build.dtx | 2 +- macros/latex/contrib/l3kernel/l3tl.dtx | 88 ++- macros/latex/contrib/l3kernel/l3token.dtx | 182 +------ macros/latex/contrib/l3kernel/l3unicode.dtx | 6 +- macros/latex/contrib/l3kernel/source3.pdf | Bin 7492256 -> 7508388 bytes macros/latex/contrib/l3kernel/source3.tex | 2 +- macros/latex/contrib/l3kernel/source3body.tex | 15 +- macros/latex/contrib/onedown/Examples/Bidding.tex | 244 +++++++++ .../latex/contrib/onedown/Examples/CardSymbols.tex | 44 ++ macros/latex/contrib/onedown/Examples/Compass.tex | 151 ++++++ .../latex/contrib/onedown/Examples/ExpertQuiz.tex | 77 +++ .../latex/contrib/onedown/Examples/FancyColors.tex | 49 ++ .../latex/contrib/onedown/Examples/Fontsizes.tex | 33 ++ macros/latex/contrib/onedown/Examples/Hands.tex | 41 ++ .../latex/contrib/onedown/Examples/Languages.tex | 46 ++ macros/latex/contrib/onedown/Examples/Legends.tex | 84 +++ macros/latex/contrib/onedown/Examples/Play.tex | 80 +++ .../contrib/onedown/Examples/Select-Hands.tex | 56 ++ macros/latex/contrib/onedown/Examples/Suits.tex | 65 +++ macros/latex/contrib/onedown/Examples/Wrapping.tex | 98 ++++ macros/latex/contrib/onedown/Examples/bidAll.tex | 69 +++ macros/latex/contrib/onedown/Examples/bidEW.tex | 51 ++ macros/latex/contrib/onedown/Examples/bidNE.tex | 45 ++ macros/latex/contrib/onedown/Examples/bidNS.tex | 95 ++++ macros/latex/contrib/onedown/Examples/bidNW.tex | 39 ++ .../contrib/onedown/Examples/onedown-examples.pdf | Bin 0 -> 903899 bytes .../contrib/onedown/Examples/onedown-examples.tex | 217 ++++++++ .../latex/contrib/onedown/Examples/onedown-ref.pdf | Bin 0 -> 397989 bytes .../latex/contrib/onedown/Examples/onedown-ref.tex | 536 ++++++++++++++++++ macros/latex/contrib/onedown/Examples/showAll.tex | 140 +++++ .../contrib/onedown/Examples/showNS-align.tex | 39 ++ .../contrib/onedown/Examples/showNS-warn-I.tex | 29 + .../contrib/onedown/Examples/showNS-warn-II.tex | 59 ++ macros/latex/contrib/onedown/ODw-French.dict | 2 +- macros/latex/contrib/onedown/ODw-Italian.dict | 174 ++++++ macros/latex/contrib/onedown/README | 6 +- macros/latex/contrib/onedown/examples/Bidding.tex | 244 --------- .../latex/contrib/onedown/examples/CardSymbols.tex | 44 -- macros/latex/contrib/onedown/examples/Compass.pdf | Bin 415404 -> 0 bytes macros/latex/contrib/onedown/examples/Compass.tex | 151 ------ .../latex/contrib/onedown/examples/ExpertQuiz.tex | 77 --- .../latex/contrib/onedown/examples/Fontsizes.pdf | Bin 245668 -> 0 bytes .../latex/contrib/onedown/examples/Fontsizes.tex | 33 -- macros/latex/contrib/onedown/examples/Hands.tex | 41 -- .../latex/contrib/onedown/examples/Languages.tex | 46 -- macros/latex/contrib/onedown/examples/Legends.tex | 84 --- macros/latex/contrib/onedown/examples/Play.tex | 80 --- .../contrib/onedown/examples/Select-Hands.tex | 56 -- macros/latex/contrib/onedown/examples/Suits.tex | 65 --- macros/latex/contrib/onedown/examples/Wrapping.tex | 98 ---- macros/latex/contrib/onedown/examples/bidAll.tex | 69 --- macros/latex/contrib/onedown/examples/bidEW.tex | 51 -- macros/latex/contrib/onedown/examples/bidNE.tex | 45 -- macros/latex/contrib/onedown/examples/bidNS.tex | 95 ---- macros/latex/contrib/onedown/examples/bidNW.tex | 39 -- .../contrib/onedown/examples/onedown-examples.pdf | Bin 874153 -> 0 bytes .../contrib/onedown/examples/onedown-examples.tex | 195 ------- .../latex/contrib/onedown/examples/onedown-ref.pdf | Bin 227662 -> 0 bytes .../latex/contrib/onedown/examples/onedown-ref.tex | 517 ------------------ macros/latex/contrib/onedown/examples/showAll.tex | 140 ----- .../contrib/onedown/examples/showNS-align.tex | 39 -- .../contrib/onedown/examples/showNS-warn-I.tex | 29 - .../contrib/onedown/examples/showNS-warn-II.tex | 59 -- macros/latex/contrib/onedown/onedown.dtx | 33 +- macros/latex/contrib/onedown/onedown.pdf | Bin 1026845 -> 1106351 bytes macros/latex/contrib/tkz/tkz-elements/README.md | 28 +- .../doc/latex/TKZdoc-elements-classes-line.tex | 116 ++-- .../TKZdoc-elements-classes-quadrilateral.tex | 6 +- .../latex/TKZdoc-elements-classes-rectangle.tex | 40 +- .../doc/latex/TKZdoc-elements-convention.tex | 2 +- .../doc/latex/TKZdoc-elements-examples.tex | 71 +-- .../doc/latex/TKZdoc-elements-main.pdf | Bin 0 -> 537824 bytes .../doc/latex/TKZdoc-elements-main.tex | 8 +- .../tkz-elements/doc/latex/TKZdoc-elements-why.tex | 6 +- .../contrib/tkz/tkz-elements/doc/tkz-elements.pdf | Bin 532726 -> 537824 bytes .../tkz/tkz-elements/latex/tkz-elements.sty | 4 +- .../tkz/tkz-elements/latex/tkz_elements_circle.lua | 9 +- .../tkz/tkz-elements/latex/tkz_elements_class.lua | 4 +- .../tkz-elements/latex/tkz_elements_ellipse.lua | 4 +- .../latex/tkz_elements_functions_circles.lua | 4 +- .../latex/tkz_elements_functions_intersections.lua | 4 +- .../latex/tkz_elements_functions_lines.lua | 4 +- .../latex/tkz_elements_functions_maths.lua | 11 +- .../latex/tkz_elements_functions_points.lua | 4 +- .../latex/tkz_elements_functions_regular.lua | 4 +- .../latex/tkz_elements_functions_triangles.lua | 32 +- .../tkz/tkz-elements/latex/tkz_elements_line.lua | 67 ++- .../tkz/tkz-elements/latex/tkz_elements_main.lua | 7 +- .../tkz/tkz-elements/latex/tkz_elements_misc.lua | 4 +- .../latex/tkz_elements_parallelogram.lua | 4 +- .../tkz/tkz-elements/latex/tkz_elements_point.lua | 4 +- .../latex/tkz_elements_quadrilateral.lua | 6 +- .../tkz-elements/latex/tkz_elements_rectangle.lua | 67 ++- .../tkz-elements/latex/tkz_elements_regular.lua | 4 +- .../tkz/tkz-elements/latex/tkz_elements_square.lua | 19 +- .../tkz-elements/latex/tkz_elements_triangle.lua | 13 +- .../tkz/tkz-elements/latex/tkz_elements_vector.lua | 21 +- 221 files changed, 4293 insertions(+), 3949 deletions(-) mode change 100755 => 100644 macros/latex/contrib/hvextern/script/hvextern-checkfile.lua delete mode 100644 macros/latex/contrib/l3experimental/l3bitset.dtx delete mode 100644 macros/latex/contrib/l3experimental/l3bitset.ins delete mode 100644 macros/latex/contrib/l3experimental/l3bitset.pdf create mode 100644 macros/latex/contrib/l3kernel/l3bitset.dtx create mode 100644 macros/latex/contrib/onedown/Examples/Bidding.tex create mode 100644 macros/latex/contrib/onedown/Examples/CardSymbols.tex create mode 100644 macros/latex/contrib/onedown/Examples/Compass.tex create mode 100644 macros/latex/contrib/onedown/Examples/ExpertQuiz.tex create mode 100644 macros/latex/contrib/onedown/Examples/FancyColors.tex create mode 100644 macros/latex/contrib/onedown/Examples/Fontsizes.tex create mode 100644 macros/latex/contrib/onedown/Examples/Hands.tex create mode 100644 macros/latex/contrib/onedown/Examples/Languages.tex create mode 100644 macros/latex/contrib/onedown/Examples/Legends.tex create mode 100644 macros/latex/contrib/onedown/Examples/Play.tex create mode 100644 macros/latex/contrib/onedown/Examples/Select-Hands.tex create mode 100644 macros/latex/contrib/onedown/Examples/Suits.tex create mode 100644 macros/latex/contrib/onedown/Examples/Wrapping.tex create mode 100644 macros/latex/contrib/onedown/Examples/bidAll.tex create mode 100644 macros/latex/contrib/onedown/Examples/bidEW.tex create mode 100644 macros/latex/contrib/onedown/Examples/bidNE.tex create mode 100644 macros/latex/contrib/onedown/Examples/bidNS.tex create mode 100644 macros/latex/contrib/onedown/Examples/bidNW.tex create mode 100644 macros/latex/contrib/onedown/Examples/onedown-examples.pdf create mode 100644 macros/latex/contrib/onedown/Examples/onedown-examples.tex create mode 100644 macros/latex/contrib/onedown/Examples/onedown-ref.pdf create mode 100644 macros/latex/contrib/onedown/Examples/onedown-ref.tex create mode 100644 macros/latex/contrib/onedown/Examples/showAll.tex create mode 100644 macros/latex/contrib/onedown/Examples/showNS-align.tex create mode 100644 macros/latex/contrib/onedown/Examples/showNS-warn-I.tex create mode 100644 macros/latex/contrib/onedown/Examples/showNS-warn-II.tex create mode 100644 macros/latex/contrib/onedown/ODw-Italian.dict delete mode 100644 macros/latex/contrib/onedown/examples/Bidding.tex delete mode 100644 macros/latex/contrib/onedown/examples/CardSymbols.tex delete mode 100644 macros/latex/contrib/onedown/examples/Compass.pdf delete mode 100644 macros/latex/contrib/onedown/examples/Compass.tex delete mode 100644 macros/latex/contrib/onedown/examples/ExpertQuiz.tex delete mode 100644 macros/latex/contrib/onedown/examples/Fontsizes.pdf delete mode 100644 macros/latex/contrib/onedown/examples/Fontsizes.tex delete mode 100644 macros/latex/contrib/onedown/examples/Hands.tex delete mode 100644 macros/latex/contrib/onedown/examples/Languages.tex delete mode 100644 macros/latex/contrib/onedown/examples/Legends.tex delete mode 100644 macros/latex/contrib/onedown/examples/Play.tex delete mode 100644 macros/latex/contrib/onedown/examples/Select-Hands.tex delete mode 100644 macros/latex/contrib/onedown/examples/Suits.tex delete mode 100644 macros/latex/contrib/onedown/examples/Wrapping.tex delete mode 100644 macros/latex/contrib/onedown/examples/bidAll.tex delete mode 100644 macros/latex/contrib/onedown/examples/bidEW.tex delete mode 100644 macros/latex/contrib/onedown/examples/bidNE.tex delete mode 100644 macros/latex/contrib/onedown/examples/bidNS.tex delete mode 100644 macros/latex/contrib/onedown/examples/bidNW.tex delete mode 100644 macros/latex/contrib/onedown/examples/onedown-examples.pdf delete mode 100644 macros/latex/contrib/onedown/examples/onedown-examples.tex delete mode 100644 macros/latex/contrib/onedown/examples/onedown-ref.pdf delete mode 100644 macros/latex/contrib/onedown/examples/onedown-ref.tex delete mode 100644 macros/latex/contrib/onedown/examples/showAll.tex delete mode 100644 macros/latex/contrib/onedown/examples/showNS-align.tex delete mode 100644 macros/latex/contrib/onedown/examples/showNS-warn-I.tex delete mode 100644 macros/latex/contrib/onedown/examples/showNS-warn-II.tex mode change 100644 => 100755 macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-examples.tex create mode 100644 macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-main.pdf (limited to 'macros/latex/contrib') diff --git a/macros/latex/contrib/hvextern/Changes b/macros/latex/contrib/hvextern/Changes index a68cd3d68f..3f870a713e 100644 --- a/macros/latex/contrib/hvextern/Changes +++ b/macros/latex/contrib/hvextern/Changes @@ -1,5 +1,6 @@ hvextern.sty ---------------- +v 0.38 2023-12-08 - change internal macroname \Write@Ex to \hv@Write@EX v 0.37b 2023-11-22 - fix typo in documentation v 0.37a 2023-11-20 - fix bug in documentation v 0.37 2023-08-29 - do not write files without --shell-escape diff --git a/macros/latex/contrib/hvextern/README b/macros/latex/contrib/hvextern/README index adbd87ba71..c79f2266ee 100644 --- a/macros/latex/contrib/hvextern/README +++ b/macros/latex/contrib/hvextern/README @@ -6,11 +6,11 @@ The main LaTeX document must be run with the option --shell-escape %% It may be distributed and/or modified under the -%% conditions of the LaTeX Project Public License, either version 1.3c +%% 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.3c or later is part of all distributions of LaTeX +%% and version 1.3 or later is part of all distributions of LaTeX %% version 2005/12/01 or later. diff --git a/macros/latex/contrib/hvextern/doc/hvextern.pdf b/macros/latex/contrib/hvextern/doc/hvextern.pdf index 43c19c90f5..d78c943a84 100644 Binary files a/macros/latex/contrib/hvextern/doc/hvextern.pdf and b/macros/latex/contrib/hvextern/doc/hvextern.pdf differ diff --git a/macros/latex/contrib/hvextern/latex/hvextern.sty b/macros/latex/contrib/hvextern/latex/hvextern.sty index 0883697e79..cfdd56053d 100644 --- a/macros/latex/contrib/hvextern/latex/hvextern.sty +++ b/macros/latex/contrib/hvextern/latex/hvextern.sty @@ -1,4 +1,4 @@ -%% $Id: hvextern.sty 824 2023-11-22 12:26:34Z herbert $ +%% $Id: hvextern.sty 833 2023-12-08 19:31:08Z herbert $ %% This is file `hvextern.sty', %% %% Copyright (C) 2016-23 @@ -12,8 +12,8 @@ %% and version 1.3c or later is part of all distributions of LaTeX %% version 2005/12/01 or later. -\def\hvexternFileversion{0.37b} -\ProvidesFile{hvextern}[2023/11/22 v\hvexternFileversion: package for running external documents (HV)] +\def\hvexternFileversion{0.38} +\ProvidesFile{hvextern}[2023/12/08 v\hvexternFileversion: package for running external documents (HV)] \newif\ifhv@extern@checkCode \hv@extern@checkCodefalse @@ -842,14 +842,14 @@ \Write@Postamble \immediate\closeout\FV@OutFile\endgroup\@esphack} -\newcommand\Write@Ex[1]{% +\newcommand\hv@Write@EX[1]{% \begingroup \let\protect\@unexpandable@protect \edef\reserved@a{\immediate\write\FV@OutFile{#1}}% \reserved@a \endgroup} -\newcommand\Write@ExOne[1]{{% +\newcommand\hv@Write@EXOne[1]{{% \@temptokena\expandafter{#1}% \immediate\write\FV@OutFile{\the\@temptokena}}} @@ -869,17 +869,17 @@ % \newcommand\Write@Preamble@PST{% - \Write@Ex{\string\documentclass[pstricks]{standalone}}% - \Write@Ex{\string\pagestyle{empty}}% + \hv@Write@EX{\string\documentclass[pstricks]{standalone}}% + \hv@Write@EX{\string\pagestyle{empty}}% \ifx\Preamble@Commands\@empty\else - \Write@Ex{\Preamble@Commands}% + \hv@Write@EX{\Preamble@Commands}% \fi - \Write@Ex{\string\begin{document}}% + \hv@Write@EX{\string\begin{document}}% } % %\hv@extern@ExampleType{ltx} % {\Write@Preamble@LaTeX} -% {\Write@Ex{\string\end{document}}} +% {\hv@Write@EX{\string\end{document}}} % {\string\begin{document}} % {\string\end{document}} % {\perCent StartShownPreambleCommands} diff --git a/macros/latex/contrib/hvextern/script/hvextern-checkfile.lua b/macros/latex/contrib/hvextern/script/hvextern-checkfile.lua old mode 100755 new mode 100644 diff --git a/macros/latex/contrib/l3experimental/CHANGELOG.md b/macros/latex/contrib/l3experimental/CHANGELOG.md index 7d3becf388..d6e3645c59 100644 --- a/macros/latex/contrib/l3experimental/CHANGELOG.md +++ b/macros/latex/contrib/l3experimental/CHANGELOG.md @@ -7,6 +7,15 @@ this project uses date-based 'snapshot' version identifiers. ## [Unreleased] +## [2023-12-08] + +### Added +- `\draw_box_use:Nn` and `\draw_coffin_use:Nnnn` to allow + placement of boxed material at an offset (issue \#1357) + +### Removed +- `l3bitset`: moved to `l3kernel` + ## [2023-11-01] ### Changed @@ -151,7 +160,6 @@ this project uses date-based 'snapshot' version identifiers. - Support for multiple color models (see #739) ### Removed - - `l3cctab`: moved to `l3kernel` ## [2020-06-18] @@ -226,8 +234,7 @@ this project uses date-based 'snapshot' version identifiers. ## [2019-05-03] -## Fixed - +### Fixed - Clipping of paths by `l3draw` ## [2019-03-05] @@ -286,7 +293,8 @@ this project uses date-based 'snapshot' version identifiers. - New `l3color` module using `xcolor`-like expression syntax - New `l3draw` module, based on `pgf` layer of the TikZ system -[Unreleased]: https://github.com/latex3/latex3/compare/2023-11-01...HEAD +[Unreleased]: https://github.com/latex3/latex3/compare/2023-12-08...HEAD +[2023-12-08]: https://github.com/latex3/latex3/compare/2023-11-01...2023-12-08 [2023-11-01]: https://github.com/latex3/latex3/compare/2023-10-10...2023-11-01 [2023-10-10]: https://github.com/latex3/latex3/compare/2023-05-11...2023-10-10 [2023-05-11]: https://github.com/latex3/latex3/compare/2023-04-19...2023-05-11 diff --git a/macros/latex/contrib/l3experimental/README.md b/macros/latex/contrib/l3experimental/README.md index 138d797530..52c7d97926 100644 --- a/macros/latex/contrib/l3experimental/README.md +++ b/macros/latex/contrib/l3experimental/README.md @@ -1,7 +1,7 @@ Experimental LaTeX3 Concepts ============================ -Release 2023-11-01 +Release 2023-12-08 Overview -------- @@ -22,7 +22,6 @@ is updated at the same time. Currently included in the CTAN release of l3experimental are the following bundles: * `l3benchmark` -* `l3bitset` * `l3draw` * `l3graphics` * `l3opacity` @@ -36,14 +35,6 @@ bundles: This module provides support for benchmarking the performance of code. -`l3bitset` -------------- - -This module provides a `bitset` data type, a vector of bits, which can be set -and unset using their individual index in the vector, or using names assigned to -each position in the vector. The bitset can be returned as a string of bits or -as a decimal integer. - `l3draw` -------- diff --git a/macros/latex/contrib/l3experimental/l3benchmark.dtx b/macros/latex/contrib/l3experimental/l3benchmark.dtx index 26feb420ab..bc21191d4b 100644 --- a/macros/latex/contrib/l3experimental/l3benchmark.dtx +++ b/macros/latex/contrib/l3experimental/l3benchmark.dtx @@ -46,7 +46,7 @@ % }^^A % } % -% \date{Released 2023-11-01} +% \date{Released 2023-12-08} % % \maketitle % @@ -122,7 +122,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{l3benchmark}{2023-11-01}{} +\ProvidesExplPackage{l3benchmark}{2023-12-08}{} {L3 Experimental benchmarking} % \end{macrocode} % diff --git a/macros/latex/contrib/l3experimental/l3benchmark.pdf b/macros/latex/contrib/l3experimental/l3benchmark.pdf index 382968cbf2..83471b67fd 100644 Binary files a/macros/latex/contrib/l3experimental/l3benchmark.pdf and b/macros/latex/contrib/l3experimental/l3benchmark.pdf differ diff --git a/macros/latex/contrib/l3experimental/l3bitset.dtx b/macros/latex/contrib/l3experimental/l3bitset.dtx deleted file mode 100644 index 4783bd7786..0000000000 --- a/macros/latex/contrib/l3experimental/l3bitset.dtx +++ /dev/null @@ -1,592 +0,0 @@ -% \iffalse meta-comment -% -%% File: l3bitset.dtx -% -% Copyright (C) 2020-2023 The LaTeX Project -% -% It may be distributed and/or modified under the conditions of the -% LaTeX Project Public License (LPPL), either version 1.3c of this -% license or (at your option) any later version. The latest version -% of this license is in the file -% -% http://www.latex-project.org/lppl.txt -% -% This file is part of the "l3bitset bundle" (The Work in LPPL) -% and all files in that bundle must be distributed together. -% -% ----------------------------------------------------------------------- -% -% The development version of the bundle can be found at -% -% https://github.com/latex3/latex3 -% -% for those people who are interested. -% -%<*driver> -\documentclass[full]{l3doc} -\begin{document} - \DocInput{\jobname.dtx} -\end{document} -% -% \fi -% \title{^^A -% The \pkg{l3bitset} package \\ Experimental bitsets ^^A -% } -% -% \author{^^A -% The \LaTeX{} Project\thanks -% {^^A -% E-mail: -% \href{mailto:latex-team@latex-project.org} -% {latex-team@latex-project.org}^^A -% }^^A -% } -% -% \date{Released 2023-11-01} -% -% \maketitle -% \begin{documentation} -% -% This package defines and implements the data type \texttt{bitset}, a vector of -% bits. The size of the vector may grow dynamically. -% Individual bits can be set and unset by names pointing to an index position. -% The names |1|, |2|, |3|, \ldots\ are predeclared and point to the -% index positions $1$, $2$, $3$,\ldots. More names can be added and existing names can -% be changed. -% The index is like all other indices in \pkg{expl3} modules \emph{1-based}. -% A \texttt{bitset} can be output as binary number or---as needed e.g. in a -% PDF dictionary---as decimal (arabic) number. -% Currently only a small subset of the functions provided by the \pkg{bitset} -% package are implemented here, mainly the functions needed to use bitsets in -% PDF dictionaries. -% -% The bitset is stored as a string (but one shouldn't rely on the internal -% representation) and so the vector size is theoretically -% unlimited, only restricted by \TeX-memory. But the functions to set and clear -% bits uses integer functions for the index so bitsets can't be longer -% than $2^{31} - 1$. -% The export function -% \cs{bitset_to_arabic:N} can use functions from the \texttt{int} module only if -% the largest index used for this bitset is smaller then $32$, for longer -% bitsets \texttt{fp} is used and this is slower. -% -% \section{Creating bitsets} -% \begin{function}[added = 2021-01-26,updated=2020-12-29] -% {\bitset_new:N,\bitset_new:c,\bitset_new:Nn, \bitset_new:cn} -% \begin{syntax} -% \cs{bitset_new:N} \meta{bitset var} \\ -% \cs{bitset_new:Nn} \meta{bitset var} -% \{ -% \meta{name1} |=| \meta{index1} |,| -% \meta{name2} |=| \meta{index2} |,| \ldots{} -% \} -% \end{syntax} -% Creates a new \meta{bitset var} or raises an error if the name is already taken. -% The declaration is global. The \meta{bitset var} is initially $0$. -% -% Bitsets are implemented as string variables consisting of -% \texttt{1}'s and \texttt{0}'s. -% The rightmost number is the index position $1$, so -% the string variable can be viewed directly as the binary number. -% But one shouldn't rely on the internal representation, but use the -% dedicated \cs{bitset_to_bin:N} instead to get the binary number. -% -% The name--index pairs given in the second -% argument of \cs{bitset_new:Nn} declares names for some indices, -% which can be used to set and unset bits. -% The names |1|, |2|, |3|, \ldots\ are predeclared and point to the -% index positions $1$, $2$, $3$, \ldots. -% -% \meta{index\ldots} should be a positive number or an -% \meta{integer expression} which evaluates to a positive number. -% The expression is evaluated when the index is used, not a declaration time. -% The names \meta{name\ldots} -% should be unique. Using a number as name, e.g.~|10=1|, is allowed, it -% then overwrites the predeclared name |10|, -% but the index position $10$ can then only be reached if some other -% name for it exists, e.g. |ten=10|. -% It is not necessary to give every index -% a name, and an index can have more than one name. The named index -% can be extended or changed with the next function. -% -% \end{function} -% \begin{function}[added = 2021-01-26] -% {\bitset_addto_named_index:Nn} -% \begin{syntax} -% \cs{bitset_addto_named_index:Nn} \meta{bitset var} -% \{ -% \meta{name1} |=| \meta{index1} |,| -% \meta{name2} |=| \meta{index2} |,| \ldots{} -% \} -% \end{syntax} -% This extends or changes the name--index pairs for \meta{bitset var} -% globally as described for \cs{bitset_new:Nn}. -% -% For example after these settings -% -% \begin{verbatim} -% \bitset_new:Nn \l_pdfannot_F_bitset -% { -% Invisible = 1, -% Hidden = 2, -% Print = 3, -% NoZoom = 4, -% NoRotate = 5, -% NoView = 6, -% ReadOnly = 7, -% Locked = 8, -% ToggleNoView = 9, -% LockedContents = 10 -% } -% \bitset_addto_named_index:Nn \l_pdfannot_F_bitset -% { -% print = 3 -% } -% \end{verbatim} -% it is possible to set bit $3$ by using any of this alternatives: -% \begin{verbatim} -% \bitset_set_true:Nn \l_pdfannot_F_bitset {Print} -% \bitset_set_true:Nn \l_pdfannot_F_bitset {print} -% \bitset_set_true:Nn \l_pdfannot_F_bitset {3} -% \end{verbatim} -% \end{function} -% -% \begin{function}[EXP, pTF,added = 2021-01-26] -% { \bitset_if_exist:N, \bitset_if_exist:c } -% \begin{syntax} -% \cs{bitset_if_exist_p:N} \meta{bitset var} -% \cs{bitset_if_exist:NTF} \meta{bitset var} \Arg{true code} \Arg{false code}% -% \end{syntax} -% Tests whether the \meta{bitset var} exist. -% \end{function} -% -% \section{Setting and unsetting bits} -% -% \begin{function}[added = 2021-01-26] -% { \bitset_set_true:Nn, \bitset_set_true:cn, \bitset_gset_true:Nn, \bitset_gset_true:cn } -% \begin{syntax} -% \cs{bitset_set_true:Nn} \meta{bitset var} \Arg{name}\\ -% \cs{bitset_gset_true:Nn} \meta{bitset var} \Arg{name} -% \end{syntax} -% This sets the bit of the index position represented by \Arg{name} to $1$. -% \Arg{name} should be either one of the predeclared names -% |1|, |2|, |3|, \ldots, or one of the names added manually. -% Index position are 1-based. -% If needed the length of the bit vector is enlarged. -% \end{function} -% -% \begin{function}[added = 2021-01-26] -% { \bitset_set_false:Nn, \bitset_set_false:cn, \bitset_gset_false:Nn, \bitset_set_false:cn } -% \begin{syntax} -% \cs{bitset_set_false:Nn} \meta{bitset var} \Arg{name}\\ -% \cs{bitset_gset_false:Nn} \meta{bitset var} \Arg{name} -% \end{syntax} -% This unsets the bit of the index position represented by \Arg{name} (sets -% it to $0$). -% \Arg{name} should be either one of the predeclared names -% |1|, |2|, |3|, \ldots, or one of the names added manually. -% The index is $1$-based. If the index position is larger -% than the current length of the bit vector -% nothing happens. If the leading (left most) bit is unset, -% zeros are not trimmed but stay in the bit vector and are still shown -% by \cs{bitset_show:N}. -% \end{function} -% -% \begin{function}[added = 2021-01-26] -% {\bitset_clear:N,\bitset_clear:c,\bitset_gclear:N,\bitset_gclear:c} -% \begin{syntax} -% \cs{bitset_clear:N} \meta{bitset var} \\ -% \cs{bitset_gclear:N} \meta{bitset var} -% \end{syntax} -% This resets the bitset to the initial state. The declared names are not changed. -% \end{function} -% -% \section{Using bitsets} -% -% \begin{function}[EXP,added = 2021-01-26] -% { \bitset_item:Nn, \bitset_item:cn } -% \begin{syntax} -% \cs{bitset_item:Nn} \meta{bitset var} \Arg{name} -% \end{syntax} -% \cs{bitset_item:Nn} outputs \texttt{1} if the bit with -% the index number represented by \Arg{name} is set and \texttt{0} otherwise. -% \Arg{name} is either one of the predeclared names -% |1|, |2|, |3|, \ldots, or one of the names added manually. -% \end{function} -% -% \begin{function}[EXP,added = 2021-01-26] -% {\bitset_to_bin:N, \bitset_to_bin:c} -% \begin{syntax} -% \cs{bitset_to_bin:N} \meta{bitset var} -% \end{syntax} -% This leaves the current value of the bitset expressed as -% a binary (string) number in the input stream. -% If no bit has been set yet, the output is zero. -% \end{function} -% \begin{function}[EXP,added = 2021-01-26] -% {\bitset_to_arabic:N, \bitset_to_arabic:c} -% \begin{syntax} -% \cs{bitset_to_arabic:N} \meta{bitset var} -% \end{syntax} -% This leaves the current value of the bitset expressed as -% a decimal number in the input stream. If no bit has been set yet, -% the output is zero. The function uses \cs{int_from_bin:n} if the largest -% index that have been set or unset is smaller then $32$, and a slower implementation -% based on \cs{fp_eval:n} otherwise. -% \end{function} -% -% \begin{function}[added = 2021-01-26] -% {\bitset_show:N, \bitset_show:c} -% \begin{syntax} -% \cs{bitset_show:N} \meta{bitset var} -% \end{syntax} -% Displays the binary and decimal value of the \meta{bitset var} on the terminal, -% \end{function} -% -% \begin{function}[added = 2021-01-26] -% {\bitset_log:N, \bitset_log:c} -% \begin{syntax} -% \cs{bitset_log:N} \meta{bitset var} -% \end{syntax} -% Writes the value of the \meta{bitset var} in the log file. -% \end{function} -% -% \end{documentation} -% -% \begin{implementation} -% \section{\pkg{l3bitset} implementation} -% \TestFiles{m3bitset001,m3bitset002} -% \begin{macrocode} -%<*package> -% \end{macrocode} -% -% \begin{macrocode} -%<@@=bitset> -% \end{macrocode} -% \begin{macrocode} -\ProvidesExplPackage{l3bitset}{2023-11-01}{} - {L3 Experimental bitset support} -% \end{macrocode} -% A bitset is a string variable. -% \begin{macro} -% { -% \bitset_new:N, \bitset_new:c -% } -% \begin{macrocode} -\cs_new_protected:Npn \bitset_new:N #1 - { - \__kernel_chk_if_free_cs:N #1 - \cs_gset_eq:NN #1 \c_zero_str - \prop_new:c { g__bitset_ \cs_to_str:N #1 _name_prop } - } - -\cs_new_protected:Npn \bitset_new:Nn #1 #2 - { - \__kernel_chk_if_free_cs:N #1 - \cs_gset_eq:NN #1 \c_zero_str - \prop_new:c { g__bitset_ \cs_to_str:N #1 _name_prop } - \prop_gset_from_keyval:cn - { g__bitset_ \cs_to_str:N #1 _name_prop } - {#2} - } -\cs_generate_variant:Nn \bitset_new:N { c } -% \end{macrocode} -% \end{macro} -% \begin{variable}{\l_@@_tmpa_prop} -% A scratch prop to be able to extend the names properties. -% \begin{macrocode} -\prop_new:N \l_@@_tmpa_prop -% \end{macrocode} -% \end{variable} -% \begin{macro} -% { -% \bitset_addto_named_index:Nn -% } -% \begin{macrocode} -\cs_new_protected:Npn \bitset_addto_named_index:Nn #1#2 - { - \prop_set_from_keyval:Nn \l_@@_tmpa_prop {#2} - \prop_map_inline:Nn \l_@@_tmpa_prop - { - \prop_gput:cnn - { g_@@_ \cs_to_str:N #1 _name_prop } - {##1} - {##2} - } - } -% \end{macrocode} -% \end{macro} -% \begin{macro}[EXP,pTF] -% { -% \bitset_if_exist:N, \bitset_if_exist:c -% } -% Existence tests. -% \begin{macrocode} -\prg_new_eq_conditional:NNn - \bitset_if_exist:N \str_if_exist:N { p , T , F , TF } -\prg_new_eq_conditional:NNn - \bitset_if_exist:c \str_if_exist:c - { p , T , F , TF } -% \end{macrocode} -% \end{macro} -% \begin{macro}{\@@_set_true:Nn, \@@_gset_true:Nn, \@@_set_false:Nn, \@@_gset_false:Nn} -% \begin{macro}{\@@_set:NNnN} -% The internal command uses only numbers (integer expressions) for the -% position. -% A bit is set by either extending the string or by splitting it and -% then inserting an $1$. It is not checked if the value was already $1$. -% \begin{macrocode} -\cs_new_protected:Npn \@@_set_true:Nn #1#2 - { \@@_set:NNnN \str_set:Ne #1 {#2} 1 } -\cs_new_protected:Npn \@@_gset_true:Nn #1#2 - { \@@_set:NNnN \str_gset:Ne #1 {#2} 1 } -\cs_new_protected:Npn \@@_set_false:Nn #1#2 - { \@@_set:NNnN \str_set:Ne #1 {#2} 0 } -\cs_new_protected:Npn \@@_gset_false:Nn #1#2 - { \@@_set:NNnN \str_gset:Ne #1 {#2} 0 } -\cs_new_protected:Npn \@@_set:NNnN #1#2#3#4 - { - \int_compare:nNnT {#3} > { 0 } - { - \int_compare:nNnTF { \str_count:N #2 } < {#3} - { - #1 #2 - { - #4 - \prg_replicate:nn { #3 - \str_count:N #2 - 1 } { 0 } - #2 - } - } - { - #1 #2 - { - \str_range:Nnn #2 { 1 } { -1 - (#3) } - #4 - \str_range:Nnn #2 { 1 - (#3) } { -1 } - } - } - } - } -% \end{macrocode} -% \end{macro} -% \end{macro} -% -% \begin{variable}{\l_@@_internal_int} -% \begin{macrocode} -\int_new:N \l_@@_internal_int -% \end{macrocode} -% \end{variable} -% -% \begin{macro}[TF]{\@@_test_digits:n} -% \begin{macro}{\@@_test_digits_end:n} -% \begin{macro}{\@@_test_digits:wn} -% \url{https://chat.stackexchange.com/transcript/message/56878159#56878159} -% \begin{macrocode} -\prg_new_protected_conditional:Npnn \@@_test_digits:n #1 { TF } - { - \tex_afterassignment:D \@@_test_digits:w - \l_@@_internal_int = 0 \tl_trim_spaces_apply:nN {#1} \tl_to_str:n - \@@_test_digits_end: - \use_i:nnn \if_false: - \@@_test_digits_end: - \if_int_compare:w \c_zero_int < \l_@@_internal_int - \prg_return_true: - \else: - \prg_return_false: - \fi: - } -\cs_new_eq:NN \@@_test_digits_end: \exp_stop_f: -\cs_new_protected:Npn \@@_test_digits:w #1 \@@_test_digits_end: { } -% \end{macrocode} -% \end{macro} -% \end{macro} -% \end{macro} -% -% \begin{macro} -% { -% \bitset_set_true:Nn, \bitset_set_true:cn, -% \bitset_gset_true:Nn, \bitset_gset_true:cn, -% } -% \begin{macro}{\@@_set_aux:NNn} -% The user commands must first translate the argument to an index number. -% \begin{macrocode} -\cs_new_protected:Npn \bitset_set_true:Nn #1#2 - { \@@_set:NNn \@@_set_true:Nn #1 {#2} } -\cs_new_protected:Npn \bitset_gset_true:Nn #1#2 - { \@@_set:NNn \@@_gset_true:Nn #1 {#2} } -\cs_new_protected:Npn \bitset_set_false:Nn #1#2 - { \@@_set:NNn \@@_set_false:Nn #1 {#2} } -\cs_new_protected:Npn \bitset_gset_false:Nn #1#2 - { \@@_set:NNn \@@_gset_false:Nn #1 {#2} } -\cs_new_protected:Npn \@@_set:NNn #1#2#3 - { - \prop_if_in:cnTF { g_@@_ \cs_to_str:N #2 _name_prop } {#3} - { - #1 #2 - { - \prop_item:cn { g_@@_ \cs_to_str:N #2 _name_prop } {#3} - } - } - { - \@@_test_digits:nTF {#3} - { - #1 #2 {#3} - \prop_gput:cnn { g_@@_ \cs_to_str:N #2 _name_prop } {#3} {#3} - } - { - \msg_warning:nnee { bitset } { unknown-name } - { \token_to_str:N #2 } - { \tl_to_str:n {#3} } - } - } - } -\cs_generate_variant:Nn \bitset_set_true:Nn { c } -\cs_generate_variant:Nn \bitset_gset_true:Nn { c } -\cs_generate_variant:Nn \bitset_set_false:Nn { c } -\cs_generate_variant:Nn \bitset_gset_false:Nn { c } -% \end{macrocode} -% \end{macro} -% \end{macro} -% -% \begin{macro} -% { -% \bitset_clear:N, \bitset_clear:c, -% \bitset_gclear:N, \bitset_gclear:c -% } -% \begin{macrocode} -\cs_new_protected:Npn \bitset_clear:N #1 - { - \str_set_eq:NN #1 \c_zero_str - } -\cs_new_protected:Npn \bitset_gclear:N #1 - { - \str_gset_eq:NN #1 \c_zero_str - } -\cs_generate_variant:Nn \bitset_clear:N { c } -\cs_generate_variant:Nn \bitset_gclear:N { c } -% \end{macrocode} -% \end{macro} -% \begin{macro} -% { -% \bitset_to_arabic:N, \bitset_to_arabic:c, -% \bitset_to_bin:N, \bitset_to_bin:c, -% } -% The naming of the commands follow the names in the \texttt{int} module. -% \cs{bitset_to_arabic:N} uses \cs{int_from_bin:n} if the string is shorter -% then $32$ and the slower \cs{fp_eval} for larger bitsets. -% \begin{macrocode} -\cs_new:Npn \bitset_to_arabic:N #1 - { - \int_compare:nNnTF { \str_count:N #1 } < { 32 } - { \exp_args:No \int_from_bin:n {#1} } - { - \exp_after:wN \@@_to_int:nN \exp_after:wN 0 - #1 \q_recursion_tail \q_recursion_stop - } - } - -\cs_new:Npn \@@_to_int:nN #1#2 - { - \quark_if_recursion_tail_stop_do:Nn #2 {#1} - \exp_args:Nf \@@_to_int:nN { \fp_eval:n { #1 * 2 + #2 } } - } - -\cs_new:Npn \bitset_to_bin:N #1 - { - #1 - } -\cs_generate_variant:Nn \bitset_to_arabic:N { c } -\cs_generate_variant:Nn \bitset_to_bin:N { c } -% \end{macrocode} -% \end{macro} -% \begin{macro} -% { -% \bitset_item:Nn, \bitset_item:cn -% } -% All bits that have been set at anytime have an entry in the prop, -% so we can take everything else as $0$. -% \begin{macrocode} -\cs_new:Npn \bitset_item:Nn #1#2 - { - \prop_if_in:cnTF { g_@@_ \cs_to_str:N #1 _name_prop } {#2} - { - \int_eval:n - { - \str_item:Nn #1 - { 0 - ( \prop_item:cn { g_@@_ \cs_to_str:N #1 _name_prop } {#2} ) } - +0 - } - } - { - 0 - } - } -\cs_generate_variant:Nn \bitset_item:Nn { c } -% \end{macrocode} -% \end{macro} - -% \begin{macro} -% { -% \bitset_show:N, \bitset_show:c, -% \bitset_log:N, \bitset_log:c -% } -% \begin{macrocode} -\cs_new_protected:Npn \bitset_show:N { \@@_show:NN \msg_show:nneeee } -\cs_generate_variant:Nn \bitset_show:N { c } -\cs_new_protected:Npn \bitset_log:N { \@@_show:NN \msg_log:nneeee } -\cs_generate_variant:Nn \bitset_log:N { c } -\cs_new_protected:Npn \bitset_show_named_index:N { \@@_show_named_index:NN \msg_show:nneeee } -\cs_generate_variant:Nn \bitset_show_named_index:N { c } -\cs_new_protected:Npn \@@_show:NN #1#2 - { - \__kernel_chk_defined:NT #2 - { - #1 { bitset } { show } - { \token_to_str:N #2 } - { \bitset_to_bin:N #2 } - { \bitset_to_arabic:N #2 } - { } - } - } -\cs_new_protected:Npn \@@_show_named_index:NN #1#2 - { - \__kernel_chk_defined:NT #2 - { - #1 { bitset } { show-names } - { \token_to_str:N #2 } - { \prop_map_function:cN { g_@@_ \cs_to_str:N #2 _name_prop } \msg_show_item:nn } - { } - { } - } - } -% \end{macrocode} -% \end{macro} -% -% \subsection{Messages} -% \begin{macrocode} - \msg_new:nnn { bitset } { show } - { - The~bitset~#1~has~the~representation: \\ - >~binary:~#2 \\ - >~arabic:~#3 . - } -\msg_new:nnn { bitset } { show-names } - { - The~bitset~#1~ - \tl_if_empty:nTF {#2} - { knows~no~names~yet \\>~ . } - { knows~the~name/index~pairs~(without~outer~braces): #2 . } - } -\msg_new:nnn { bitset } { unknown-name } - { The~name~'#2'~is~unknown~for~bitset~\tl_to_str:n {#1} } -\prop_gput:Nnn \g_msg_module_name_prop { bitset } { LaTeX } -\prop_gput:Nnn \g_msg_module_type_prop { bitset } { } -% \end{macrocode} -% \begin{macrocode} -% -% \end{macrocode} -% \end{macro} -% -% \end{implementation} -% -% \PrintIndex diff --git a/macros/latex/contrib/l3experimental/l3bitset.ins b/macros/latex/contrib/l3experimental/l3bitset.ins deleted file mode 100644 index 1d91118d90..0000000000 --- a/macros/latex/contrib/l3experimental/l3bitset.ins +++ /dev/null @@ -1,62 +0,0 @@ -\iffalse meta-comment - -File: l3bitset.ins - -Copyright (C) 2020,2021 The LaTeX3 Project - -It may be distributed and/or modified under the conditions of the -LaTeX Project Public License (LPPL), either version 1.3c of this -license or (at your option) any later version. The latest version -of this license is in the file - - http://www.latex-project.org/lppl.txt - -This file is part of the "l3experimental bundle" (The Work in LPPL) -and all files in that bundle must be distributed together. - ------------------------------------------------------------------------ - -The development version of the bundle can be found at - - https://github.com/latex3/latex3 - -for those people who are interested. - ------------------------------------------------------------------------ - -Any modification of this file should ensure that the copyright and -license information is placed in the derived files. - -\fi - -\input docstrip % -\askforoverwritefalse - -\preamble - -Copyright (C) 2020 The LaTeX3 Project - -It may be distributed and/or modified under the conditions of -the LaTeX Project Public License (LPPL), either version 1.3c of -this license or (at your option) any later version. The latest -version of this license is in the file: - - http://www.latex-project.org/lppl.txt - -This file is part of the "l3experimental bundle" (The Work in LPPL) -and all files in that bundle must be distributed together. - -\endpreamble -% stop docstrip adding \endinput -\postamble -\endpostamble - -\keepsilent - -\generate{\file{l3bitset.sty} - { - \from{l3bitset.dtx} {package} - } -} - -\endbatchfile diff --git a/macros/latex/contrib/l3experimental/l3bitset.pdf b/macros/latex/contrib/l3experimental/l3bitset.pdf deleted file mode 100644 index 17b59d8a2b..0000000000 Binary files a/macros/latex/contrib/l3experimental/l3bitset.pdf and /dev/null differ diff --git a/macros/latex/contrib/l3experimental/l3draw-boxes.dtx b/macros/latex/contrib/l3experimental/l3draw-boxes.dtx index 44989999a5..b8f68e90a8 100644 --- a/macros/latex/contrib/l3experimental/l3draw-boxes.dtx +++ b/macros/latex/contrib/l3experimental/l3draw-boxes.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2023-11-01} +% \date{Released 2023-12-08} % % \maketitle % @@ -71,6 +71,8 @@ % \end{variable} % % \begin{macro}{\draw_box_use:N} +% \begin{macro}{\draw_box_use:Nn} +% \begin{macro}{\@@_box_use:nNnnnnn} % \begin{macro}{\@@_box_use:Nnnnn} % Before inserting a box, we need to make sure that the bounding box is being % updated correctly. As drawings track transformations as a whole, rather @@ -79,10 +81,22 @@ % \begin{macrocode} \cs_new_protected:Npn \draw_box_use:N #1 { - \@@_box_use:Nnnnn #1 + \@@_box_use:Nnnnnnn #1 { 0pt } { -\box_dp:N #1 } { \box_wd:N #1 } { \box_ht:N #1 } } -\cs_new_protected:Npn \@@_box_use:Nnnnn #1#2#3#4#5 +\cs_new_protected:Npn \draw_box_use:Nn #1#2 + { + \@@_box_use:nNnnnn {#2} #1 + { 0pt } { -\box_dp:N #1 } { \box_wd:N #1 } { \box_ht:N #1 } + } +\cs_new_protected:Npn \@@_box_use:nNnnnn #1#2#3#4#5#6 + { + \draw_scope_begin: + \draw_transform_shift:n {#1} + \@@_box_use:Nnnnnnn #2 {#3} {#4} {#5} {#6} + \draw_scope_end: + } +\cs_new_protected:Npn \@@_box_use:Nnnnnnn #1#2#3#4#5 { \bool_if:NT \l_draw_bb_update_bool { @@ -126,18 +140,32 @@ % \end{macrocode} % \end{macro} % \end{macro} +% \end{macro} +% \end{macro} % % \begin{macro}{\draw_coffin_use:Nnn} +% \begin{macro}{\draw_coffin_use:Nnnn} +% \begin{macro}{\@@_coffin_use:nNnn} % Slightly more than a shortcut: we have to allow for the fact that coffins % have no apparent width before the reference point. % \begin{macrocode} \cs_new_protected:Npn \draw_coffin_use:Nnn #1#2#3 + { + \@@_coffin_use:nNnn { \@@_box_use:Nnnnnnn } + #1 {#2} {#3} + } +\cs_new_protected:Npn \draw_coffin_use:Nnnn #1#2#3#4 + { + \@@_coffin_use:nNnn { \@@_box_use:nNnnnn {#4} } + #1 {#2} {#3} + } +\cs_new_protected:Npn \@@_coffin_use:nNnn #1#2#3#4 { \group_begin: \hbox_set:Nn \l_@@_tmp_box - { \coffin_typeset:Nnnnn #1 {#2} {#3} { 0pt } { 0pt } } - \@@_box_use:Nnnnn \l_@@_tmp_box - { \box_wd:N \l_@@_tmp_box - \coffin_wd:N #1 } + { \coffin_typeset:Nnnnn #2 {#3} {#4} { 0pt } { 0pt } } + #1 \l_@@_tmp_box + { \box_wd:N \l_@@_tmp_box - \coffin_wd:N #2 } { -\box_dp:N \l_@@_tmp_box } { \box_wd:N \l_@@_tmp_box } { \box_ht:N \l_@@_tmp_box } @@ -145,6 +173,8 @@ } % \end{macrocode} % \end{macro} +% \end{macro} +% \end{macro} % % \begin{macrocode} % diff --git a/macros/latex/contrib/l3experimental/l3draw-code.pdf b/macros/latex/contrib/l3experimental/l3draw-code.pdf index 8c79d0a1b7..c2e80fc340 100644 Binary files a/macros/latex/contrib/l3experimental/l3draw-code.pdf and b/macros/latex/contrib/l3experimental/l3draw-code.pdf differ diff --git a/macros/latex/contrib/l3experimental/l3draw-layers.dtx b/macros/latex/contrib/l3experimental/l3draw-layers.dtx index 1337427dc2..cf2c2091cb 100644 --- a/macros/latex/contrib/l3experimental/l3draw-layers.dtx +++ b/macros/latex/contrib/l3experimental/l3draw-layers.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2023-11-01} +% \date{Released 2023-12-08} % % \maketitle % diff --git a/macros/latex/contrib/l3experimental/l3draw-paths.dtx b/macros/latex/contrib/l3experimental/l3draw-paths.dtx index 5d8b63247f..53032f4d61 100644 --- a/macros/latex/contrib/l3experimental/l3draw-paths.dtx +++ b/macros/latex/contrib/l3experimental/l3draw-paths.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2023-11-01} +% \date{Released 2023-12-08} % % \maketitle % diff --git a/macros/latex/contrib/l3experimental/l3draw-points.dtx b/macros/latex/contrib/l3experimental/l3draw-points.dtx index ba47cddd4c..f722873237 100644 --- a/macros/latex/contrib/l3experimental/l3draw-points.dtx +++ b/macros/latex/contrib/l3experimental/l3draw-points.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2023-11-01} +% \date{Released 2023-12-08} % % \maketitle % diff --git a/macros/latex/contrib/l3experimental/l3draw-scopes.dtx b/macros/latex/contrib/l3experimental/l3draw-scopes.dtx index 5917a0c6bc..ae8869d6b7 100644 --- a/macros/latex/contrib/l3experimental/l3draw-scopes.dtx +++ b/macros/latex/contrib/l3experimental/l3draw-scopes.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2023-11-01} +% \date{Released 2023-12-08} % % \maketitle % diff --git a/macros/latex/contrib/l3experimental/l3draw-softpath.dtx b/macros/latex/contrib/l3experimental/l3draw-softpath.dtx index 9419015a91..56a7c78d9d 100644 --- a/macros/latex/contrib/l3experimental/l3draw-softpath.dtx +++ b/macros/latex/contrib/l3experimental/l3draw-softpath.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2023-11-01} +% \date{Released 2023-12-08} % % \maketitle % diff --git a/macros/latex/contrib/l3experimental/l3draw-state.dtx b/macros/latex/contrib/l3experimental/l3draw-state.dtx index 36b30cdecc..c288fe0c58 100644 --- a/macros/latex/contrib/l3experimental/l3draw-state.dtx +++ b/macros/latex/contrib/l3experimental/l3draw-state.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2023-11-01} +% \date{Released 2023-12-08} % % \maketitle % diff --git a/macros/latex/contrib/l3experimental/l3draw-transforms.dtx b/macros/latex/contrib/l3experimental/l3draw-transforms.dtx index 31d8b95ea2..8115e1c4fc 100644 --- a/macros/latex/contrib/l3experimental/l3draw-transforms.dtx +++ b/macros/latex/contrib/l3experimental/l3draw-transforms.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2023-11-01} +% \date{Released 2023-12-08} % % \maketitle % diff --git a/macros/latex/contrib/l3experimental/l3draw.dtx b/macros/latex/contrib/l3experimental/l3draw.dtx index 8f0467519c..e0cbdff3d4 100644 --- a/macros/latex/contrib/l3experimental/l3draw.dtx +++ b/macros/latex/contrib/l3experimental/l3draw.dtx @@ -110,7 +110,7 @@ % }^^A % } % -% \date{Released 2023-11-01} +% \date{Released 2023-12-08} % % \maketitle % @@ -961,9 +961,10 @@ % % \subsection{Boxes and coffins} % -% \begin{function}{\draw_box_use:N} +% \begin{function}{\draw_box_use:N, \draw_box_use:Nn} % \begin{syntax} % \cs{draw_box_use:N} \meta{box} +% \cs{draw_box_use:Nn} \meta{box} \Arg{point} % \end{syntax} % Inserts the \meta{box} into a drawing, taking account of the current % transformation matrix and shift, and adjusting the drawing bounding @@ -990,11 +991,14 @@ % \draw_box_use:N \l_tmpa_box % \draw_end: % \end{demo} +% If the \meta{point} is given, the reference point of the box is placed there: +% otherwise it is positioned at the origin of the drawing. % \end{function} % -% \begin{function}{\draw_coffin_use:Nnn} +% \begin{function}{\draw_coffin_use:Nnn, \draw_coffin_use:Nnnn} % \begin{syntax} -% \cs{draw_coffin_use:N} \meta{coffin} \Arg{hpole} \Arg{vpole} +% \cs{draw_coffin_use:Nnn} \meta{coffin} \Arg{hpole} \Arg{vpole} +% \cs{draw_coffin_use:Nnnn} \meta{coffin} \Arg{hpole} \Arg{vpole} \Arg{point} % \end{syntax} % Inserts the \meta{coffin} into a drawing, taking account of the current % transformation matrix and shift, and adjusting the drawing bounding @@ -1012,6 +1016,9 @@ % \draw_coffin_use:Nnn \l_tmpa_coffin { hc } { vc } % \draw_end: % \end{demo} +% If the \meta{point} is given, the pole intersection of the coffine is +% placed there: otherwise it is positioned at the origin of the drawing. + % \end{function} % % \subsection{Transformations} @@ -1173,7 +1180,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{l3draw}{2023-11-01}{} +\ProvidesExplPackage{l3draw}{2023-12-08}{} {L3 Experimental core drawing support} % \end{macrocode} % diff --git a/macros/latex/contrib/l3experimental/l3draw.pdf b/macros/latex/contrib/l3experimental/l3draw.pdf index 583e37966b..6b8a5e9a92 100644 Binary files a/macros/latex/contrib/l3experimental/l3draw.pdf and b/macros/latex/contrib/l3experimental/l3draw.pdf differ diff --git a/macros/latex/contrib/l3experimental/l3galley.dtx b/macros/latex/contrib/l3experimental/l3galley.dtx index 7aaf367785..7b150d5dc5 100644 --- a/macros/latex/contrib/l3experimental/l3galley.dtx +++ b/macros/latex/contrib/l3experimental/l3galley.dtx @@ -61,7 +61,7 @@ % }^^A % } % -% \date{Released 2023-11-01} +% \date{Released 2023-12-08} % % \maketitle % @@ -686,7 +686,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{l3galley}{2023-11-01}{} +\ProvidesExplPackage{l3galley}{2023-12-08}{} {L3 Experimental galley code} % \end{macrocode} % diff --git a/macros/latex/contrib/l3experimental/l3galley.pdf b/macros/latex/contrib/l3experimental/l3galley.pdf index f4f6d46e8c..bd9bf88c83 100644 Binary files a/macros/latex/contrib/l3experimental/l3galley.pdf and b/macros/latex/contrib/l3experimental/l3galley.pdf differ diff --git a/macros/latex/contrib/l3experimental/l3graphics.dtx b/macros/latex/contrib/l3experimental/l3graphics.dtx index ebb4f86a2c..5a45b88d9c 100644 --- a/macros/latex/contrib/l3experimental/l3graphics.dtx +++ b/macros/latex/contrib/l3experimental/l3graphics.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-11-01} +% \date{Released 2023-12-08} % % \maketitle % @@ -184,7 +184,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{l3graphics}{2023-11-01}{} +\ProvidesExplPackage{l3graphics}{2023-12-08}{} {L3 Experimental graphics inclusion support} % \end{macrocode} % diff --git a/macros/latex/contrib/l3experimental/l3graphics.pdf b/macros/latex/contrib/l3experimental/l3graphics.pdf index 52daaf7cb6..66ce45d710 100644 Binary files a/macros/latex/contrib/l3experimental/l3graphics.pdf and b/macros/latex/contrib/l3experimental/l3graphics.pdf differ diff --git a/macros/latex/contrib/l3experimental/l3opacity.dtx b/macros/latex/contrib/l3experimental/l3opacity.dtx index 1bb27e2ca3..9ed6f5e6a4 100644 --- a/macros/latex/contrib/l3experimental/l3opacity.dtx +++ b/macros/latex/contrib/l3experimental/l3opacity.dtx @@ -46,7 +46,7 @@ % }^^A % } % -% \date{Released 2023-11-01} +% \date{Released 2023-12-08} % % \maketitle % @@ -96,7 +96,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{l3opacity}{2023-11-01}{} +\ProvidesExplPackage{l3opacity}{2023-12-08}{} {L3 Experimental opacity support} % \end{macrocode} % diff --git a/macros/latex/contrib/l3experimental/l3opacity.pdf b/macros/latex/contrib/l3experimental/l3opacity.pdf index 4f871a2bcb..096288c14a 100644 Binary files a/macros/latex/contrib/l3experimental/l3opacity.pdf and b/macros/latex/contrib/l3experimental/l3opacity.pdf differ diff --git a/macros/latex/contrib/l3experimental/l3str-format.dtx b/macros/latex/contrib/l3experimental/l3str-format.dtx index 57aebd6296..03a6145239 100644 --- a/macros/latex/contrib/l3experimental/l3str-format.dtx +++ b/macros/latex/contrib/l3experimental/l3str-format.dtx @@ -48,7 +48,7 @@ % }^^A % } % -% \date{Released 2023-11-01} +% \date{Released 2023-12-08} % % \maketitle % @@ -166,7 +166,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{l3str-format}{2023-11-01}{} +\ProvidesExplPackage{l3str-format}{2023-12-08}{} {L3 Experimental string formatting} % \end{macrocode} % diff --git a/macros/latex/contrib/l3experimental/l3str-format.pdf b/macros/latex/contrib/l3experimental/l3str-format.pdf index 9a8715c64f..83b57b975b 100644 Binary files a/macros/latex/contrib/l3experimental/l3str-format.pdf and b/macros/latex/contrib/l3experimental/l3str-format.pdf differ diff --git a/macros/latex/contrib/l3experimental/l3sys-shell.dtx b/macros/latex/contrib/l3experimental/l3sys-shell.dtx index c17d9a97b1..4c05998e37 100644 --- a/macros/latex/contrib/l3experimental/l3sys-shell.dtx +++ b/macros/latex/contrib/l3experimental/l3sys-shell.dtx @@ -46,7 +46,7 @@ % }^^A % } % -% \date{Released 2023-11-01} +% \date{Released 2023-12-08} % % \maketitle % @@ -151,7 +151,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{l3sys-shell}{2023-11-01}{} +\ProvidesExplPackage{l3sys-shell}{2023-12-08}{} {L3 Experimental system shell functions} % \end{macrocode} % diff --git a/macros/latex/contrib/l3experimental/l3sys-shell.pdf b/macros/latex/contrib/l3experimental/l3sys-shell.pdf index 201397cbd6..3152e29a00 100644 Binary files a/macros/latex/contrib/l3experimental/l3sys-shell.pdf and b/macros/latex/contrib/l3experimental/l3sys-shell.pdf differ diff --git a/macros/latex/contrib/l3experimental/xcoffins.dtx b/macros/latex/contrib/l3experimental/xcoffins.dtx index 2dc6cffa6a..9ca534e86c 100644 --- a/macros/latex/contrib/l3experimental/xcoffins.dtx +++ b/macros/latex/contrib/l3experimental/xcoffins.dtx @@ -53,7 +53,7 @@ % }^^A % } % -% \date{Released 2023-11-01} +% \date{Released 2023-12-08} % % \maketitle % @@ -672,7 +672,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{xcoffins}{2023-11-01}{} +\ProvidesExplPackage{xcoffins}{2023-12-08}{} {L3 Experimental design level coffins} % \end{macrocode} % diff --git a/macros/latex/contrib/l3experimental/xcoffins.pdf b/macros/latex/contrib/l3experimental/xcoffins.pdf index b10dcf8453..98b321ae28 100644 Binary files a/macros/latex/contrib/l3experimental/xcoffins.pdf and b/macros/latex/contrib/l3experimental/xcoffins.pdf differ diff --git a/macros/latex/contrib/l3experimental/xgalley.dtx b/macros/latex/contrib/l3experimental/xgalley.dtx index 3dd89b46e8..eb704906db 100644 --- a/macros/latex/contrib/l3experimental/xgalley.dtx +++ b/macros/latex/contrib/l3experimental/xgalley.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2023-11-01} +% \date{Released 2023-12-08} % % \maketitle % @@ -731,7 +731,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{xgalley}{2023-11-01}{} +\ProvidesExplPackage{xgalley}{2023-12-08}{} {L3 Experimental galley} \RequirePackage{xtemplate,l3galley} % \end{macrocode} diff --git a/macros/latex/contrib/l3experimental/xgalley.pdf b/macros/latex/contrib/l3experimental/xgalley.pdf index 9aeb6d4e19..e1964e85ee 100644 Binary files a/macros/latex/contrib/l3experimental/xgalley.pdf and b/macros/latex/contrib/l3experimental/xgalley.pdf differ diff --git a/macros/latex/contrib/l3kernel/CHANGELOG.md b/macros/latex/contrib/l3kernel/CHANGELOG.md index e4d9a3d9e5..104535d2b0 100644 --- a/macros/latex/contrib/l3kernel/CHANGELOG.md +++ b/macros/latex/contrib/l3kernel/CHANGELOG.md @@ -7,12 +7,27 @@ this project uses date-based 'snapshot' version identifiers. ## [Unreleased] +## [2023-12-08] + +### Added +- `\c_empty_str` (issue \#1361) +- `l3bitset`: moved from `l3experimental` + +### Fixed +- Return `str` (not `tl`) in `\bool_to_str:N` and `\bool_to_str:n` (issue \#1331) +- Catcode of space from `\str_set_convert:Nnnn` (issue \#1344) +- Tidy up various documentation issues (issue \#1345) + ## [2023-11-09] ### Added - Documentation for `\c_nan_fp` - `\str_case_e:en(TF)` +### Changes +- Speed up `\str_(g)set:Nn`, `\str_const:Nn`, `\str_(g)put_left:Nn`, + and `\str_(g)put_right:Nn` + ### Fixed - Normalisation of `.inherit:n` key data (issue \#1314) @@ -98,7 +113,7 @@ this project uses date-based 'snapshot' version identifiers. ## [2023-08-11] ### Changed -- Wrap long lists of variants in `l3doc` display of functions (issue \#1258) +- Wrap long lists of variants in `l3doc` display of functions (issue \#1258) ### Fixed - Revert 'Allow for implicit chars when case changing' (issue \#1260) @@ -151,7 +166,7 @@ this project uses date-based 'snapshot' version identifiers. - `\prg_gset_eq_conditional:NNn` (issue \#1212) - `\iow_shell_open:Nn` (issue \#1122) -## Deprecated +### Deprecated - `\tl_case:Nn(TF)` - `expl3` package option `enable-debug` (no longer required) @@ -168,8 +183,8 @@ this project uses date-based 'snapshot' version identifiers. - Rounded out the `\use_i:nn...` functions to cover all cases taking one argument from up to nine arguments - `\coffin_(g)reset_poles:N` -- `\dim_to_decimal_in_:n`, for `` types - `cc`, `cm`, `dd`, `in`, `mm` and `pc` +- `\dim_to_decimal_in_:n`, for `` types + `cc`, `cm`, `dd`, `in`, `mm` and `pc` - `\file_input_raw:n` - `\int_if_zero:n(TF)` - `\str_mdfive_hash:n` @@ -376,13 +391,13 @@ this project uses date-based 'snapshot' version identifiers. [\#1109](https://github.com/latex3/latex3/issues/1109)), for many expandable tokens (issue [\#1110](https://github.com/latex3/latex3/issues/1110)), and an esoteric case (issue [\#1113](https://github.com/latex3/latex3/issues/1113)) -- Creation of a message with some engines (issue +- Creation of a message with some engines (issue [\#1139](https://github.com/latex3/latex3/issues/1139)) ### Deprecated - `\char_to_nfd:N`, `\char_to_nfd:n` -- `\char_foldcase:N`, `\char_lowercase:N`, `\char_uppercase:N` - and `str` variants +- `\char_foldcase:N`, `\char_lowercase:N`, `\char_titlecase:N`, + `\char_uppercase:N` and `str` variants - `\char_to_utfviii_bytes:n` - `\str_foldcase:n` @@ -500,7 +515,7 @@ this project uses date-based 'snapshot' version identifiers. - Language settings `hy` and `hy-x-yiwn` for handling of ech-yiwn ligature uppercasing -## Changed +### Changed - Support BCP 47 properly in case changer language argument ### Fixed @@ -809,7 +824,7 @@ this project uses date-based 'snapshot' version identifiers. ## [2020-10-27] ### Added -- `\token_if_font_selection:N(TF)` (see \#806) +- `\token_if_font_selection:N(TF)` (see \#806) ### Fixed - Avoid relying on braced `\input` primitive syntax @@ -1112,7 +1127,7 @@ this project uses date-based 'snapshot' version identifiers. ### Changed - Standard backend for (u)pTeX is now `dvips` - Minimum LuaTeX version now v0.95 -- Moved `\debug_on:`, `\debug_off:`, `\debug_suspend:` and `\debug_resume:` +- Moved `\debug_on:n`, `\debug_off:n`, `\debug_suspend:` and `\debug_resume:` to stable - Accept 'traditional' class options for backend (`dvipdfmx`, `dvips`, etc.) - Performance enhancements when loading `expl3` @@ -1527,7 +1542,7 @@ this project uses date-based 'snapshot' version identifiers. - Implement `\intarray_gset_rand:Nnn` - Implement candidate `l3fparray` module -## Changed +### Changed - Update minimal required versions of XeTeX and LuaTeX - Deprecate named integer constants `\c_zero`. etc. - Move all primitives to `\tex_...:D namespace`, @@ -1591,7 +1606,8 @@ this project uses date-based 'snapshot' version identifiers. - Step functions have been added for dim variables, e.g. `\dim_step_inline:nnnn` -[Unreleased]: https://github.com/latex3/latex3/compare/2023-11-09...HEAD +[Unreleased]: https://github.com/latex3/latex3/compare/2023-12-08...HEAD +[2023-12-08]: https://github.com/latex3/latex3/compare/2023-11-09...2023-12-08 [2023-11-09]: https://github.com/latex3/latex3/compare/2023-11-01...2023-11-09 [2023-11-01]: https://github.com/latex3/latex3/compare/2023-10-23...2023-11-01 [2023-10-23]: https://github.com/latex3/latex3/compare/2023-10-10...2023-10-23 diff --git a/macros/latex/contrib/l3kernel/README.md b/macros/latex/contrib/l3kernel/README.md index 24d65cc239..89ceea4ab4 100644 --- a/macros/latex/contrib/l3kernel/README.md +++ b/macros/latex/contrib/l3kernel/README.md @@ -1,7 +1,7 @@ LaTeX3 Programming Conventions ============================== -Release 2023-11-09 +Release 2023-12-08 Overview -------- diff --git a/macros/latex/contrib/l3kernel/expl3.dtx b/macros/latex/contrib/l3kernel/expl3.dtx index 02779c2b2d..835b29d525 100644 --- a/macros/latex/contrib/l3kernel/expl3.dtx +++ b/macros/latex/contrib/l3kernel/expl3.dtx @@ -24,7 +24,7 @@ % %<*driver|generic|package|2ekernel> % -\def\ExplFileDate{2023-11-09}% +\def\ExplFileDate{2023-12-08}% %<*driver> \documentclass[full]{l3doc} \usepackage{graphicx} @@ -51,7 +51,7 @@ % }^^A % } % -% \date{Released 2023-11-09} +% \date{Released 2023-12-08} % % \maketitle % @@ -414,6 +414,8 @@ % % The data types in \LaTeX3 are: % \begin{description} +% \item[bitset] a string of bits (\texttt{0} and \texttt{1} tokens) that are +% accessed by position or by name; % \item[bool] either true or false (the \LaTeX3 implementation does % not use \tn{iftrue} or \tn{iffalse}); % \item[box] box register; @@ -900,7 +902,7 @@ % \texttt{check-declarations} option enables checking for all variable % assignments, issuing an error if any variables are assigned without being % initialised. See also \cs{debug_on:n} \texttt{\{check-declarations\}} -% in \pkg{l3candidates} for finer control. +% in \pkg{interface3} for finer control. % % \DescribeOption{log-functions} % The \texttt{log-functions} option is used to enable recording of every new @@ -908,7 +910,7 @@ % purposes, as it means that there is a complete list of all functions % created by each module loaded (with the exceptions of a very small number % required by the bootstrap code). See also \cs{debug_on:n} -% \texttt{\{log-functions\}} in \pkg{l3candidates} for finer control. +% \texttt{\{log-functions\}} in \pkg{interface3} for finer control. % % \DescribeOption{backend} % Selects the backend to be used for color, graphics and related operations that @@ -1510,10 +1512,10 @@ \tex_everyjob:D \exp_after:wN { \tex_the:D \tex_everyjob:D - \sys_everyjob: + \__kernel_sys_everyjob: } } - { \sys_everyjob: } + { \__kernel_sys_everyjob: } % \end{macrocode} % % \begin{variable}{\s_@@_stop} @@ -1759,7 +1761,7 @@ % \begin{macro}{\g__kernel_backend_header_bool} % Load the dynamic code and standard back-end. % \begin{macrocode} -\sys_everyjob: +\__kernel_sys_everyjob: \bool_new:N \g__kernel_backend_header_bool \bool_gset_true:N \g__kernel_backend_header_bool \sys_load_backend:n { } diff --git a/macros/latex/contrib/l3kernel/expl3.pdf b/macros/latex/contrib/l3kernel/expl3.pdf index f5081dca75..37608a09f7 100644 Binary files a/macros/latex/contrib/l3kernel/expl3.pdf and b/macros/latex/contrib/l3kernel/expl3.pdf differ diff --git a/macros/latex/contrib/l3kernel/interface3.pdf b/macros/latex/contrib/l3kernel/interface3.pdf index 9ccc9f1669..b015376448 100644 Binary files a/macros/latex/contrib/l3kernel/interface3.pdf and b/macros/latex/contrib/l3kernel/interface3.pdf differ diff --git a/macros/latex/contrib/l3kernel/interface3.tex b/macros/latex/contrib/l3kernel/interface3.tex index d8ce1db90e..f9f461a288 100644 --- a/macros/latex/contrib/l3kernel/interface3.tex +++ b/macros/latex/contrib/l3kernel/interface3.tex @@ -64,7 +64,7 @@ for those people who are interested. {latex-team@latex-project.org}% }% } -\date{Released 2023-11-09} +\date{Released 2023-12-08} \pagenumbering{roman} \maketitle diff --git a/macros/latex/contrib/l3kernel/l3.ins b/macros/latex/contrib/l3kernel/l3.ins index 0018a81d70..248017ba2f 100644 --- a/macros/latex/contrib/l3kernel/l3.ins +++ b/macros/latex/contrib/l3kernel/l3.ins @@ -97,6 +97,7 @@ and all files in that bundle must be distributed together. \from{l3fp-symbolic.dtx}{package} \from{l3fp-functions.dtx}{package} \from{l3fparray.dtx} {package} + \from{l3bitset.dtx} {package} \from{l3cctab.dtx} {package} \from{l3sort.dtx} {package} \from{l3str-convert.dtx}{package} diff --git a/macros/latex/contrib/l3kernel/l3basics.dtx b/macros/latex/contrib/l3kernel/l3basics.dtx index 576f3c5365..d4f447287b 100644 --- a/macros/latex/contrib/l3kernel/l3basics.dtx +++ b/macros/latex/contrib/l3kernel/l3basics.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-11-09} +% \date{Released 2023-12-08} % % \maketitle % @@ -1631,7 +1631,7 @@ % \end{macrocode} % \end{macro} % -% \begin{macro}{\use:x} +% \begin{macro}[deprecated]{\use:x} % Fully expands its argument and passes it to the input stream. Uses % the reserved \cs{l_@@_internal_tl} which we've set up above. % \begin{macrocode} @@ -2587,7 +2587,7 @@ % us to generate error messages. The next few definitions here are % only temporary, they will be redefined later on. % -% \begin{macro} +% \begin{macro}[documented-as = \msg_error:nnnn] % {\msg_error:nnee, \msg_error:nne, \msg_error:nn} % If an internal error occurs before \LaTeX3 has loaded \pkg{l3msg} then % the code should issue a usable if terse error message and halt. This diff --git a/macros/latex/contrib/l3kernel/l3bitset.dtx b/macros/latex/contrib/l3kernel/l3bitset.dtx new file mode 100644 index 0000000000..101a2aa414 --- /dev/null +++ b/macros/latex/contrib/l3kernel/l3bitset.dtx @@ -0,0 +1,604 @@ +% \iffalse meta-comment +% +%% File: l3bitset.dtx +% +% Copyright (C) 2020-2023 The LaTeX Project +% +% It may be distributed and/or modified under the conditions of the +% LaTeX Project Public License (LPPL), either version 1.3c of this +% license or (at your option) any later version. The latest version +% of this license is in the file +% +% http://www.latex-project.org/lppl.txt +% +% This file is part of the "l3kernel bundle" (The Work in LPPL) +% and all files in that bundle must be distributed together. +% +% ----------------------------------------------------------------------- +% +% The development version of the bundle can be found at +% +% https://github.com/latex3/latex3 +% +% for those people who are interested. +% +%<*driver> +\documentclass[full,kernel]{l3doc} +\begin{document} + \DocInput{\jobname.dtx} +\end{document} +% +% \fi +% \title{^^A +% The \pkg{l3bitset} package \\ Bitsets ^^A +% } +% +% \author{^^A +% The \LaTeX{} Project\thanks +% {^^A +% E-mail: +% \href{mailto:latex-team@latex-project.org} +% {latex-team@latex-project.org}^^A +% }^^A +% } +% +% \date{Released 2023-12-08} +% +% \maketitle +% +% \begin{documentation} +% +% This package defines and implements the data type \texttt{bitset}, a vector of +% bits. The size of the vector may grow dynamically. +% Individual bits can be set and unset by names pointing to an index position. +% The names |1|, |2|, |3|, \ldots\ are predeclared and point to the +% index positions $1$, $2$, $3$,\ldots. More names can be added and existing names can +% be changed. +% The index is like all other indices in \pkg{expl3} modules \emph{1-based}. +% A \texttt{bitset} can be output as binary number or---as needed e.g. in a +% PDF dictionary---as decimal (arabic) number. +% Currently only a small subset of the functions provided by the \pkg{bitset} +% package are implemented here, mainly the functions needed to use bitsets in +% PDF dictionaries. +% +% The bitset is stored as a string (but one shouldn't rely on the internal +% representation) and so the vector size is theoretically +% unlimited, only restricted by \TeX-memory. But the functions to set and clear +% bits uses integer functions for the index so bitsets can't be longer +% than $2^{31} - 1$. +% The export function +% \cs{bitset_to_arabic:N} can use functions from the \texttt{int} module only if +% the largest index used for this bitset is smaller then $32$, for longer +% bitsets \texttt{fp} is used and this is slower. +% +% \section{Creating bitsets} +% +% \begin{function}[added = 2021-01-26,updated=2020-12-29] +% {\bitset_new:N,\bitset_new:c,\bitset_new:Nn, \bitset_new:cn} +% \begin{syntax} +% \cs{bitset_new:N} \meta{bitset var} \\ +% \cs{bitset_new:Nn} \meta{bitset var} +% \{ +% \meta{name1} |=| \meta{index1} |,| +% \meta{name2} |=| \meta{index2} |,| \ldots{} +% \} +% \end{syntax} +% Creates a new \meta{bitset var} or raises an error if the name is already taken. +% The declaration is global. The \meta{bitset var} is initially $0$. +% +% Bitsets are implemented as string variables consisting of +% \texttt{1}'s and \texttt{0}'s. +% The rightmost number is the index position $1$, so +% the string variable can be viewed directly as the binary number. +% But one shouldn't rely on the internal representation, but use the +% dedicated \cs{bitset_to_bin:N} instead to get the binary number. +% +% The name--index pairs given in the second +% argument of \cs{bitset_new:Nn} declares names for some indices, +% which can be used to set and unset bits. +% The names |1|, |2|, |3|, \ldots\ are predeclared and point to the +% index positions $1$, $2$, $3$, \ldots. +% +% \meta{index\ldots} should be a positive number or an +% \meta{integer expression} which evaluates to a positive number. +% The expression is evaluated when the index is used, not a declaration time. +% The names \meta{name\ldots} +% should be unique. Using a number as name, e.g.~|10=1|, is allowed, it +% then overwrites the predeclared name |10|, +% but the index position $10$ can then only be reached if some other +% name for it exists, e.g. |ten=10|. +% It is not necessary to give every index +% a name, and an index can have more than one name. The named index +% can be extended or changed with the next function. +% \end{function} +% +% \begin{function}[added = 2021-01-26] +% {\bitset_addto_named_index:Nn} +% \begin{syntax} +% \cs{bitset_addto_named_index:Nn} \meta{bitset var} +% \{ +% \meta{name1} |=| \meta{index1} |,| +% \meta{name2} |=| \meta{index2} |,| \ldots{} +% \} +% \end{syntax} +% This extends or changes the name--index pairs for \meta{bitset var} +% globally as described for \cs{bitset_new:Nn}. +% \end{function} +% +% For example after these settings +% \begin{verbatim} +% \bitset_new:Nn \l_pdfannot_F_bitset +% { +% Invisible = 1, +% Hidden = 2, +% Print = 3, +% NoZoom = 4, +% NoRotate = 5, +% NoView = 6, +% ReadOnly = 7, +% Locked = 8, +% ToggleNoView = 9, +% LockedContents = 10 +% } +% \bitset_addto_named_index:Nn \l_pdfannot_F_bitset +% { +% print = 3 +% } +% \end{verbatim} +% it is possible to set bit $3$ by using any of this alternatives: +% \begin{verbatim} +% \bitset_set_true:Nn \l_pdfannot_F_bitset {Print} +% \bitset_set_true:Nn \l_pdfannot_F_bitset {print} +% \bitset_set_true:Nn \l_pdfannot_F_bitset {3} +% \end{verbatim} +% +% \begin{function}[EXP, pTF,added = 2021-01-26] +% {\bitset_if_exist:N, \bitset_if_exist:c} +% \begin{syntax} +% \cs{bitset_if_exist_p:N} \meta{bitset var} +% \cs{bitset_if_exist:NTF} \meta{bitset var} \Arg{true code} \Arg{false code}% +% \end{syntax} +% Tests whether the \meta{bitset var} exist. +% \end{function} +% +% \section{Setting and unsetting bits} +% +% \begin{function}[added = 2021-01-26] +% { +% \bitset_set_true:Nn, \bitset_set_true:cn, +% \bitset_gset_true:Nn, \bitset_gset_true:cn +% } +% \begin{syntax} +% \cs{bitset_set_true:Nn} \meta{bitset var} \Arg{name}\\ +% \cs{bitset_gset_true:Nn} \meta{bitset var} \Arg{name} +% \end{syntax} +% This sets the bit of the index position represented by \Arg{name} to $1$. +% \Arg{name} should be either one of the predeclared names +% |1|, |2|, |3|, \ldots, or one of the names added manually. +% Index position are 1-based. +% If needed the length of the bit vector is enlarged. +% \end{function} +% +% \begin{function}[added = 2021-01-26] +% { +% \bitset_set_false:Nn, \bitset_set_false:cn, +% \bitset_gset_false:Nn, \bitset_set_false:cn +% } +% \begin{syntax} +% \cs{bitset_set_false:Nn} \meta{bitset var} \Arg{name}\\ +% \cs{bitset_gset_false:Nn} \meta{bitset var} \Arg{name} +% \end{syntax} +% This unsets the bit of the index position represented by \Arg{name} (sets +% it to $0$). +% \Arg{name} should be either one of the predeclared names +% |1|, |2|, |3|, \ldots, or one of the names added manually. +% The index is $1$-based. If the index position is larger +% than the current length of the bit vector +% nothing happens. If the leading (left most) bit is unset, +% zeros are not trimmed but stay in the bit vector and are still shown +% by \cs{bitset_show:N}. +% \end{function} +% +% \begin{function}[added = 2021-01-26] +% {\bitset_clear:N,\bitset_clear:c,\bitset_gclear:N,\bitset_gclear:c} +% \begin{syntax} +% \cs{bitset_clear:N} \meta{bitset var} \\ +% \cs{bitset_gclear:N} \meta{bitset var} +% \end{syntax} +% This resets the bitset to the initial state. The declared names are not changed. +% \end{function} +% +% \section{Using bitsets} +% +% \begin{function}[EXP,added = 2021-01-26] +% {\bitset_item:Nn, \bitset_item:cn} +% \begin{syntax} +% \cs{bitset_item:Nn} \meta{bitset var} \Arg{name} +% \end{syntax} +% \cs{bitset_item:Nn} outputs \texttt{1} if the bit with +% the index number represented by \Arg{name} is set and \texttt{0} otherwise. +% \Arg{name} is either one of the predeclared names +% |1|, |2|, |3|, \ldots, or one of the names added manually. +% \end{function} +% +% \begin{function}[EXP,added = 2021-01-26] +% {\bitset_to_bin:N, \bitset_to_bin:c} +% \begin{syntax} +% \cs{bitset_to_bin:N} \meta{bitset var} +% \end{syntax} +% This leaves the current value of the bitset expressed as +% a binary (string) number in the input stream. +% If no bit has been set yet, the output is zero. +% \end{function} +% \begin{function}[EXP,added = 2021-01-26] +% {\bitset_to_arabic:N, \bitset_to_arabic:c} +% \begin{syntax} +% \cs{bitset_to_arabic:N} \meta{bitset var} +% \end{syntax} +% This leaves the current value of the bitset expressed as +% a decimal number in the input stream. If no bit has been set yet, +% the output is zero. The function uses \cs{int_from_bin:n} if the largest +% index that have been set or unset is smaller then $32$, and a slower implementation +% based on \cs{fp_eval:n} otherwise. +% \end{function} +% +% \begin{function}[added = 2021-01-26] +% {\bitset_show:N, \bitset_show:c} +% \begin{syntax} +% \cs{bitset_show:N} \meta{bitset var} +% \end{syntax} +% Displays the binary and decimal value of the \meta{bitset var} on the terminal, +% \end{function} +% +% \begin{function}[added = 2021-01-26] +% {\bitset_log:N, \bitset_log:c} +% \begin{syntax} +% \cs{bitset_log:N} \meta{bitset var} +% \end{syntax} +% Writes the value of the \meta{bitset var} in the log file. +% \end{function} +% +% \end{documentation} +% +% \begin{implementation} +% +% \section{\pkg{l3bitset} implementation} +% +% \begin{macrocode} +%<*package> +% \end{macrocode} +% +% \begin{macrocode} +%<@@=bitset> +% \end{macrocode} +% +% Transitional support. +% \begin{macrocode} +\cs_if_exist:NT \@expl@finalise@setup@@@@ + { + \tl_gput_right:Nn \@expl@finalise@setup@@@@ + { \disable@package@load { l3bitset } { } } + } +% \end{macrocode} +% +% A bitset is a string variable. +% \begin{macro}{\bitset_new:N, \bitset_new:c} +% \begin{macro}{\bitset_new:Nn, \bitset_new:cn} +% \begin{macrocode} +\cs_new_protected:Npn \bitset_new:N #1 + { + \__kernel_chk_if_free_cs:N #1 + \cs_gset_eq:NN #1 \c_zero_str + \prop_new:c { g__bitset_ \cs_to_str:N #1 _name_prop } + } + +\cs_new_protected:Npn \bitset_new:Nn #1 #2 + { + \__kernel_chk_if_free_cs:N #1 + \cs_gset_eq:NN #1 \c_zero_str + \prop_new:c { g__bitset_ \cs_to_str:N #1 _name_prop } + \prop_gset_from_keyval:cn + { g__bitset_ \cs_to_str:N #1 _name_prop } + {#2} + } +\cs_generate_variant:Nn \bitset_new:N { c } +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{variable}{\l_@@_tmp_prop} +% A scratch prop to be able to extend the names properties. +% \begin{macrocode} +\prop_new:N \l_@@_tmp_prop +% \end{macrocode} +% \end{variable} +% +% \begin{macro}{\bitset_addto_named_index:Nn} +% \begin{macrocode} +\cs_new_protected:Npn \bitset_addto_named_index:Nn #1#2 + { + \prop_set_from_keyval:Nn \l_@@_tmp_prop {#2} + \prop_map_inline:Nn \l_@@_tmp_prop + { + \prop_gput:cnn + { g_@@_ \cs_to_str:N #1 _name_prop } + {##1} + {##2} + } + } +% \end{macrocode} +% \end{macro} +% \begin{macro}[EXP,pTF] +% { +% \bitset_if_exist:N, \bitset_if_exist:c +% } +% Existence tests. +% \begin{macrocode} +\prg_new_eq_conditional:NNn + \bitset_if_exist:N \str_if_exist:N { p , T , F , TF } +\prg_new_eq_conditional:NNn + \bitset_if_exist:c \str_if_exist:c + { p , T , F , TF } +% \end{macrocode} +% \end{macro} +% \begin{macro}{\@@_set_true:Nn, \@@_gset_true:Nn, \@@_set_false:Nn, \@@_gset_false:Nn} +% \begin{macro}{\@@_set:NNnN} +% The internal command uses only numbers (integer expressions) for the +% position. +% A bit is set by either extending the string or by splitting it and +% then inserting an $1$. It is not checked if the value was already $1$. +% \begin{macrocode} +\cs_new_protected:Npn \@@_set_true:Nn #1#2 + { \@@_set:NNnN \str_set:Ne #1 {#2} 1 } +\cs_new_protected:Npn \@@_gset_true:Nn #1#2 + { \@@_set:NNnN \str_gset:Ne #1 {#2} 1 } +\cs_new_protected:Npn \@@_set_false:Nn #1#2 + { \@@_set:NNnN \str_set:Ne #1 {#2} 0 } +\cs_new_protected:Npn \@@_gset_false:Nn #1#2 + { \@@_set:NNnN \str_gset:Ne #1 {#2} 0 } +\cs_new_protected:Npn \@@_set:NNnN #1#2#3#4 + { + \int_compare:nNnT {#3} > { 0 } + { + \int_compare:nNnTF { \str_count:N #2 } < {#3} + { + #1 #2 + { + #4 + \prg_replicate:nn { #3 - \str_count:N #2 - 1 } { 0 } + #2 + } + } + { + #1 #2 + { + \str_range:Nnn #2 { 1 } { -1 - (#3) } + #4 + \str_range:Nnn #2 { 1 - (#3) } { -1 } + } + } + } + } +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{variable}{\l_@@_internal_int} +% \begin{macrocode} +\int_new:N \l_@@_internal_int +% \end{macrocode} +% \end{variable} +% +% \begin{macro}[TF]{\@@_test_digits:n} +% \begin{macro}{\@@_test_digits_end:n} +% \begin{macro}{\@@_test_digits:wn} +% \url{https://chat.stackexchange.com/transcript/message/56878159#56878159} +% \begin{macrocode} +\prg_new_protected_conditional:Npnn \@@_test_digits:n #1 { TF } + { + \tex_afterassignment:D \@@_test_digits:w + \l_@@_internal_int = 0 \tl_trim_spaces_apply:nN {#1} \tl_to_str:n + \@@_test_digits_end: + \use_i:nnn \if_false: + \@@_test_digits_end: + \if_int_compare:w \c_zero_int < \l_@@_internal_int + \prg_return_true: + \else: + \prg_return_false: + \fi: + } +\cs_new_eq:NN \@@_test_digits_end: \exp_stop_f: +\cs_new_protected:Npn \@@_test_digits:w #1 \@@_test_digits_end: { } +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro} +% { +% \bitset_set_true:Nn, \bitset_set_true:cn, +% \bitset_gset_true:Nn, \bitset_gset_true:cn, +% } +% \begin{macro}{\@@_set_aux:NNn} +% The user commands must first translate the argument to an index number. +% \begin{macrocode} +\cs_new_protected:Npn \bitset_set_true:Nn #1#2 + { \@@_set:NNn \@@_set_true:Nn #1 {#2} } +\cs_new_protected:Npn \bitset_gset_true:Nn #1#2 + { \@@_set:NNn \@@_gset_true:Nn #1 {#2} } +\cs_new_protected:Npn \bitset_set_false:Nn #1#2 + { \@@_set:NNn \@@_set_false:Nn #1 {#2} } +\cs_new_protected:Npn \bitset_gset_false:Nn #1#2 + { \@@_set:NNn \@@_gset_false:Nn #1 {#2} } +\cs_new_protected:Npn \@@_set:NNn #1#2#3 + { + \prop_if_in:cnTF { g_@@_ \cs_to_str:N #2 _name_prop } {#3} + { + #1 #2 + { + \prop_item:cn { g_@@_ \cs_to_str:N #2 _name_prop } {#3} + } + } + { + \@@_test_digits:nTF {#3} + { + #1 #2 {#3} + \prop_gput:cnn { g_@@_ \cs_to_str:N #2 _name_prop } {#3} {#3} + } + { + \msg_warning:nnee { bitset } { unknown-name } + { \token_to_str:N #2 } + { \tl_to_str:n {#3} } + } + } + } +\cs_generate_variant:Nn \bitset_set_true:Nn { c } +\cs_generate_variant:Nn \bitset_gset_true:Nn { c } +\cs_generate_variant:Nn \bitset_set_false:Nn { c } +\cs_generate_variant:Nn \bitset_gset_false:Nn { c } +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro} +% { +% \bitset_clear:N, \bitset_clear:c, +% \bitset_gclear:N, \bitset_gclear:c +% } +% \begin{macrocode} +\cs_new_protected:Npn \bitset_clear:N #1 + { + \str_set_eq:NN #1 \c_zero_str + } +\cs_new_protected:Npn \bitset_gclear:N #1 + { + \str_gset_eq:NN #1 \c_zero_str + } +\cs_generate_variant:Nn \bitset_clear:N { c } +\cs_generate_variant:Nn \bitset_gclear:N { c } +% \end{macrocode} +% \end{macro} +% \begin{macro} +% { +% \bitset_to_arabic:N, \bitset_to_arabic:c, +% \bitset_to_bin:N, \bitset_to_bin:c, +% } +% The naming of the commands follow the names in the \texttt{int} module. +% \cs{bitset_to_arabic:N} uses \cs{int_from_bin:n} if the string is shorter +% then $32$ and the slower \cs{fp_eval} for larger bitsets. +% \begin{macrocode} +\cs_new:Npn \bitset_to_arabic:N #1 + { + \int_compare:nNnTF { \str_count:N #1 } < { 32 } + { \exp_args:No \int_from_bin:n {#1} } + { + \exp_after:wN \@@_to_int:nN \exp_after:wN 0 + #1 \q_recursion_tail \q_recursion_stop + } + } + +\cs_new:Npn \@@_to_int:nN #1#2 + { + \quark_if_recursion_tail_stop_do:Nn #2 {#1} + \exp_args:Nf \@@_to_int:nN { \fp_eval:n { #1 * 2 + #2 } } + } + +\cs_new:Npn \bitset_to_bin:N #1 + { + #1 + } +\cs_generate_variant:Nn \bitset_to_arabic:N { c } +\cs_generate_variant:Nn \bitset_to_bin:N { c } +% \end{macrocode} +% \end{macro} +% \begin{macro} +% { +% \bitset_item:Nn, \bitset_item:cn +% } +% All bits that have been set at anytime have an entry in the prop, +% so we can take everything else as $0$. +% \begin{macrocode} +\cs_new:Npn \bitset_item:Nn #1#2 + { + \prop_if_in:cnTF { g_@@_ \cs_to_str:N #1 _name_prop } {#2} + { + \int_eval:n + { + \str_item:Nn #1 + { 0 - ( \prop_item:cn { g_@@_ \cs_to_str:N #1 _name_prop } {#2} ) } + +0 + } + } + { + 0 + } + } +\cs_generate_variant:Nn \bitset_item:Nn { c } +% \end{macrocode} +% \end{macro} +% +% \begin{macro} +% { +% \bitset_show:N, \bitset_show:c, +% \bitset_log:N, \bitset_log:c +% } +% \begin{macrocode} +\cs_new_protected:Npn \bitset_show:N { \@@_show:NN \msg_show:nneeee } +\cs_generate_variant:Nn \bitset_show:N { c } +\cs_new_protected:Npn \bitset_log:N { \@@_show:NN \msg_log:nneeee } +\cs_generate_variant:Nn \bitset_log:N { c } +\cs_new_protected:Npn \bitset_show_named_index:N { \@@_show_named_index:NN \msg_show:nneeee } +\cs_generate_variant:Nn \bitset_show_named_index:N { c } +\cs_new_protected:Npn \@@_show:NN #1#2 + { + \__kernel_chk_defined:NT #2 + { + #1 { bitset } { show } + { \token_to_str:N #2 } + { \bitset_to_bin:N #2 } + { \bitset_to_arabic:N #2 } + { } + } + } +\cs_new_protected:Npn \@@_show_named_index:NN #1#2 + { + \__kernel_chk_defined:NT #2 + { + #1 { bitset } { show-names } + { \token_to_str:N #2 } + { \prop_map_function:cN { g_@@_ \cs_to_str:N #2 _name_prop } \msg_show_item:nn } + { } + { } + } + } +% \end{macrocode} +% \end{macro} +% +% \subsection{Messages} +% \begin{macrocode} + \msg_new:nnn { bitset } { show } + { + The~bitset~#1~has~the~representation: \\ + >~binary:~#2 \\ + >~arabic:~#3 . + } +\msg_new:nnn { bitset } { show-names } + { + The~bitset~#1~ + \tl_if_empty:nTF {#2} + { knows~no~names~yet \\>~ . } + { knows~the~name/index~pairs~(without~outer~braces): #2 . } + } +\msg_new:nnn { bitset } { unknown-name } + { The~name~'#2'~is~unknown~for~bitset~\tl_to_str:n {#1} } +\prop_gput:Nnn \g_msg_module_name_prop { bitset } { LaTeX } +\prop_gput:Nnn \g_msg_module_type_prop { bitset } { } +% \end{macrocode} +% +% \begin{macrocode} +% +% \end{macrocode} +% +% \end{implementation} +% +% \PrintIndex diff --git a/macros/latex/contrib/l3kernel/l3bootstrap.dtx b/macros/latex/contrib/l3kernel/l3bootstrap.dtx index aae051cfff..169279638c 100644 --- a/macros/latex/contrib/l3kernel/l3bootstrap.dtx +++ b/macros/latex/contrib/l3kernel/l3bootstrap.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-11-09} +% \date{Released 2023-12-08} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3box.dtx b/macros/latex/contrib/l3kernel/l3box.dtx index 56e374ac13..62c6ea7379 100644 --- a/macros/latex/contrib/l3kernel/l3box.dtx +++ b/macros/latex/contrib/l3kernel/l3box.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-11-09} +% \date{Released 2023-12-08} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3candidates.dtx b/macros/latex/contrib/l3kernel/l3candidates.dtx index 75dfcb1f60..2ebb8a9344 100644 --- a/macros/latex/contrib/l3kernel/l3candidates.dtx +++ b/macros/latex/contrib/l3kernel/l3candidates.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2023-11-09} +% \date{Released 2023-12-08} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3cctab.dtx b/macros/latex/contrib/l3kernel/l3cctab.dtx index 788258863b..3806feffa1 100644 --- a/macros/latex/contrib/l3kernel/l3cctab.dtx +++ b/macros/latex/contrib/l3kernel/l3cctab.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-11-09} +% \date{Released 2023-12-08} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3clist.dtx b/macros/latex/contrib/l3kernel/l3clist.dtx index 67132003e0..966de0333e 100644 --- a/macros/latex/contrib/l3kernel/l3clist.dtx +++ b/macros/latex/contrib/l3kernel/l3clist.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2023-11-09} +% \date{Released 2023-12-08} % % \maketitle % @@ -1435,7 +1435,7 @@ % \begin{macro} % { % \clist_gremove_all:Nn, \clist_gremove_all:cn, -% \clist_gremove_all:NV, \clist_remove_all:cV +% \clist_gremove_all:NV, \clist_gremove_all:cV % } % \UnitTested % \begin{macro}{\@@_remove_all:NNNn} diff --git a/macros/latex/contrib/l3kernel/l3coffins.dtx b/macros/latex/contrib/l3kernel/l3coffins.dtx index 0689ba3649..576a11d47b 100644 --- a/macros/latex/contrib/l3kernel/l3coffins.dtx +++ b/macros/latex/contrib/l3kernel/l3coffins.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-11-09} +% \date{Released 2023-12-08} % % \maketitle % @@ -1766,7 +1766,7 @@ % \coffin_scale:Nnn, \coffin_scale:cnn, % \coffin_gscale:Nnn, \coffin_gscale:cnn % } -% \begin{macro}{\coffin_scale:NnnNN} +% \begin{macro}{\@@_scale:NnnNN} % For scaling, the opposite calculation is done to find the new % dimensions for the coffin. Only the total height is needed, as this % is the shift required for corners and poles. The scaling is done diff --git a/macros/latex/contrib/l3kernel/l3color.dtx b/macros/latex/contrib/l3kernel/l3color.dtx index 815ece4553..fa8508262a 100644 --- a/macros/latex/contrib/l3kernel/l3color.dtx +++ b/macros/latex/contrib/l3kernel/l3color.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-11-09} +% \date{Released 2023-12-08} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3debug.dtx b/macros/latex/contrib/l3kernel/l3debug.dtx index 6b182058ed..ad908c22fa 100644 --- a/macros/latex/contrib/l3kernel/l3debug.dtx +++ b/macros/latex/contrib/l3kernel/l3debug.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-11-09} +% \date{Released 2023-12-08} % % \maketitle % @@ -128,7 +128,7 @@ % % Standard file identification. % \begin{macrocode} -\ProvidesExplFile{l3debug.def}{2019-04-06}{}{L3 Debugging support} +\ProvidesExplFile{l3debug.def}{2023-12-08}{}{L3 Debugging support} % \end{macrocode} % % \begin{variable}{\s_@@_stop} @@ -838,6 +838,10 @@ \skip_set_eq:NN \skip_add:Nn \skip_sub:Nn + \str_clear:N + \str_set_eq:NN + \str_put_left:Nn + \str_put_right:Nn \__kernel_tl_set:Ne \tl_clear:N \tl_set_eq:NN @@ -903,6 +907,10 @@ \skip_gset_eq:NN \skip_gadd:Nn \skip_gsub:Nn + \str_gclear:N + \str_gset_eq:NN + \str_gput_left:Nn + \str_gput_right:Nn \__kernel_tl_gset:Ne \tl_gclear:N \tl_gset_eq:NN @@ -941,6 +949,7 @@ \intarray_const_from_clist:Nn \muskip_const:Nn \skip_const:Nn + \str_const:Nn \tl_const:Nn } % \end{macrocode} diff --git a/macros/latex/contrib/l3kernel/l3deprecation.dtx b/macros/latex/contrib/l3kernel/l3deprecation.dtx index 0caac652d9..0338019900 100644 --- a/macros/latex/contrib/l3kernel/l3deprecation.dtx +++ b/macros/latex/contrib/l3kernel/l3deprecation.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-11-09} +% \date{Released 2023-12-08} % % \maketitle % @@ -396,9 +396,9 @@ \@@_old_protected:Nnn \tl_show_analysis:n { \tl_analysis_show:n } { 2020-01-01 } \@@_old:Nnn \tl_case:cnn - { \tl_case:cnF } { 2015-07-14 } + { \exp_args:Nc \token_case_meaning:NnF } { 2015-07-14 } \@@_old:Nnn \tl_case:Nnn - { \tl_case:NnF } { 2015-07-14 } + { \token_case_meaning:NnF } { 2015-07-14 } \@@_old_protected:Nnn \tl_gset_from_file:Nnn { \file_get:nnN } { 2021-07-01 } \@@_old_protected:Nnn \tl_gset_from_file_x:Nnn @@ -438,7 +438,7 @@ %<@@=cs> % \end{macrocode} % -% \begin{macro}[EXP]{\cs_argument_spec:N} +% \begin{macro}[EXP, deprecated]{\cs_argument_spec:N} % For the present, do not deprecate fully as \LaTeXe{} will need to catch % up: one for Fall 2022. % \begin{macrocode} @@ -447,21 +447,102 @@ % \end{macrocode} % \end{macro} % +% \subsection{Deprecated \pkg{l3file} functions} +% +% \begin{macro}[deprecated] +% { +% \iow_shipout_x:Nn, \iow_shipout_x:Nx, +% \iow_shipout_x:cn, \iow_shipout_x:cx +% } +% Previously described as \texttt{x}-type, but the hash behaviour is really +% \texttt{e}-type. Currently not \enquote{live} as we need to have a transition. +% \begin{macrocode} +% \__kernel_patch_deprecation:nnNNpn { 2023-10-10 } { \iow_shipout_e:Nn } +\cs_new_protected:Npn \iow_shipout_x:Nn { \iow_shipout_e:Nn } +\cs_generate_variant:Nn \iow_shipout_x:Nn { Nx , c, cx } +% \end{macrocode} +% \end{macro} +% +% \subsection{Deprecated \pkg{l3keys} functions} +% +% \begin{macrocode} +%<@@=keys> +% \end{macrocode} +% +% \begin{macro}[deprecated]{.str_set_x:N, .str_set_x:c} +% \begin{macro}[deprecated]{.str_gset_x:N, .str_gset_x:c} +% \begin{macrocode} +\cs_new_protected:cpn { \c_@@_props_root_str .str_set_x:N } #1 + { \@@_variable_set:NnnN #1 { str } { } x } +\cs_new_protected:cpn { \c_@@_props_root_str .str_set_x:c } #1 + { \@@_variable_set:cnnN {#1} { str } { } x } +\cs_new_protected:cpn { \c_@@_props_root_str .str_gset_x:N } #1 + { \@@_variable_set:NnnN #1 { str } { g } x } +\cs_new_protected:cpn { \c_@@_props_root_str .str_gset_x:c } #1 + { \@@_variable_set:cnnN {#1} { str } { g } x } +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}[deprecated]{.tl_set_x:N, .tl_set_x:c} +% \begin{macro}[deprecated]{.tl_gset_x:N, .tl_gset_x:c} +% \begin{macrocode} +\cs_new_protected:cpn { \c_@@_props_root_str .tl_set_x:N } #1 + { \@@_variable_set:NnnN #1 { tl } { } x } +\cs_new_protected:cpn { \c_@@_props_root_str .tl_set_x:c } #1 + { \@@_variable_set:cnnN {#1} { tl } { } x } +\cs_new_protected:cpn { \c_@@_props_root_str .tl_gset_x:N } #1 + { \@@_variable_set:NnnN #1 { tl } { g } x } +\cs_new_protected:cpn { \c_@@_props_root_str .tl_gset_x:c } #1 + { \@@_variable_set:cnnN {#1} { tl } { g } x } +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \subsection{Deprecated \pkg{l3pdf} functions} +% +% \begin{variable}[deprecated]{\g_@@_object_prop} +% For tracking objects. +% \begin{macrocode} +\prop_new:N \g_@@_object_prop +% \end{macrocode} +% \end{variable} +% +% \begin{macro}[deprecated] +% {\pdf_object_new:nn, \pdf_object_write:nn, \pdf_object_write:nx} +% \begin{macrocode} +\__kernel_patch_deprecation:nnNNpn { 2022-08-30 } { [\pdf_object_new:n] } +\cs_new_protected:Npn \pdf_object_new:nn #1#2 + { + \prop_gput:Nnn \g_@@_object_prop {#1} {#2} + \@@_backend_object_new:n {#1} + } +\__kernel_patch_deprecation:nnNNpn { 2022-08-30 } { [\pdf_object_write:n] } +\cs_new_protected:Npn \pdf_object_write:nn #1#2 + { + \exp_args:Nne \@@_backend_object_write:nnn + {#1} { \prop_item:Nn \g_@@_object_prop {#1} } {#2} + \bool_gset_true:N \g_@@_init_bool + } +\cs_generate_variant:Nn \pdf_object_write:nn { nx } +% \end{macrocode} +% \end{macro} +% % \subsection{Deprecated \pkg{l3prg} functions} % % \begin{macrocode} %<@@=cs> % \end{macrocode} % -% \begin{macro}[EXP, noTF]{\bool_case_true:n} +% \begin{macro}[EXP, noTF, deprecated]{\bool_case_true:n} % \begin{macrocode} -\__kernel_patch_deprecation:nnNNpn { 2023-05-03 } { \bool_case_true:n } +\__kernel_patch_deprecation:nnNNpn { 2023-05-03 } { \bool_case:n } \cs_gset:Npn \bool_case_true:n { \bool_case:n } -\__kernel_patch_deprecation:nnNNpn { 2023-05-03 } { \bool_case_true:nT } +\__kernel_patch_deprecation:nnNNpn { 2023-05-03 } { \bool_case:nT } \cs_gset:Npn \bool_case_true:nT { \bool_case:nT } -\__kernel_patch_deprecation:nnNNpn { 2023-05-03 } { \bool_case_true:nF } +\__kernel_patch_deprecation:nnNNpn { 2023-05-03 } { \bool_case:nF } \cs_gset:Npn \bool_case_true:nF { \bool_case:nF } -\__kernel_patch_deprecation:nnNNpn { 2023-05-03 } { \bool_case_true:nTF } +\__kernel_patch_deprecation:nnNNpn { 2023-05-03 } { \bool_case:nTF } \cs_gset:Npn \bool_case_true:nTF { \bool_case:nTF } % \end{macrocode} % \end{macro} @@ -472,7 +553,7 @@ %<@@=str> % \end{macrocode} % -% \begin{macro}[EXP] +% \begin{macro}[EXP, deprecated] % { % \str_lower_case:n, \str_lower_case:f, % \str_upper_case:n, \str_upper_case:f, @@ -494,7 +575,7 @@ % \end{macrocode} % \end{macro} % -% \begin{macro}[EXP] +% \begin{macro}[EXP, deprecated] % {\str_foldcase:n, \str_foldcase:V} % \begin{macrocode} \__kernel_patch_deprecation:nnNNpn { 2020-10-17 } { \str_casefold:n } @@ -504,7 +585,7 @@ % \end{macrocode} % \end{macro} % -% \begin{macro}[EXP] +% \begin{macro}[EXP, deprecated] % {\str_declare_eight_bit_encoding:nnn} % This command was made internal, with one more argument. There is no % easy way to compute a reasonable value for that extra argument so we @@ -518,8 +599,8 @@ % % \subsection{Deprecated \pkg{l3seq} functions} % -% \begin{macro}{\seq_indexed_map_inline:Nn} -% \begin{macro}[EXP]{ \seq_indexed_map_function:NN} +% \begin{macro}[deprecated]{\seq_indexed_map_inline:Nn} +% \begin{macro}[EXP, deprecated]{ \seq_indexed_map_function:NN} % \begin{macrocode} \__kernel_patch_deprecation:nnNNpn { 2020-06-18 } { \seq_map_indexed_inline:Nn } \cs_gset_protected:Npn \seq_indexed_map_inline:Nn { \seq_map_indexed_inline:Nn } @@ -529,14 +610,14 @@ % \end{macro} % \end{macro} % -% \begin{macro}{\seq_mapthread_function:NNN} +% \begin{macro}[deprecated]{\seq_mapthread_function:NNN} % \begin{macrocode} -\__kernel_patch_deprecation:nnNNpn { 2023-05-10 } { \seq_mapthread_function:NNN } +\__kernel_patch_deprecation:nnNNpn { 2023-05-10 } { \seq_map_pairwise_function:NNN } \cs_gset:Npn \seq_mapthread_function:NNN { \seq_map_pairwise_function:NNN } % \end{macrocode} % \end{macro} % -% \begin{macro}{\seq_set_map_x:NNn, \seq_gset_map_x:NNn} +% \begin{macro}[deprecated]{\seq_set_map_x:NNn, \seq_gset_map_x:NNn} % \begin{macrocode} \__kernel_patch_deprecation:nnNNpn { 2023-10-26 } { \seq_set_map_e:NNn } \cs_gset_protected:Npn \seq_set_map_x:NNn { \seq_set_map_e:NNn } @@ -551,7 +632,7 @@ %<@@=sys> % \end{macrocode} % -% \begin{macro}{\sys_load_deprecation:} +% \begin{macro}[deprecated]{\sys_load_deprecation:} % \begin{macrocode} \__kernel_patch_deprecation:nnNNpn { 2021-01-11 } { (no~longer~required) } \cs_gset_protected:Npn \sys_load_deprecation: { } @@ -560,8 +641,8 @@ % % \subsection{Deprecated \pkg{l3text} functions} % -% \begin{macro}[EXP]{\text_titlecase:n} -% \begin{macro}[EXP]{\text_titlecase:nn} +% \begin{macro}[EXP, deprecated]{\text_titlecase:n} +% \begin{macro}[EXP, deprecated]{\text_titlecase:nn} % \begin{macrocode} \__kernel_patch_deprecation:nnNNpn { 2023-07-08 } { \text_titlecase_first:n } \cs_gset:Npn \text_titlecase:n #1 @@ -579,7 +660,7 @@ %<@@=tl> % \end{macrocode} % -% \begin{macro} +% \begin{macro}[deprecated] % { % \tl_lower_case:n, \tl_lower_case:nn, % \tl_upper_case:n, \tl_upper_case:nn, @@ -607,7 +688,7 @@ % \end{macrocode} % \end{macro} % -% \begin{macro}[noTF]{\tl_case:Nn, \tl_case:cn} +% \begin{macro}[noTF, deprecated]{\tl_case:Nn, \tl_case:cn} % \begin{macrocode} \__kernel_patch_deprecation:nnNNpn { 2022-05-23 } { \token_case_meaning:Nn } \cs_gset:Npn \tl_case:Nn { \token_case_meaning:Nn } @@ -623,7 +704,7 @@ % \end{macrocode} % \end{macro} % -% \begin{macro}{\tl_build_clear:N, \tl_build_gclear:N} +% \begin{macro}[deprecated]{\tl_build_clear:N, \tl_build_gclear:N} % \begin{macrocode} \__kernel_patch_deprecation:nnNNpn { 2023-10-18 } { \tl_build_begin:N } \cs_new_protected:Npn \tl_build_clear:N { \tl_build_begin:N } @@ -634,14 +715,14 @@ % % \subsection{Deprecated \pkg{l3token} functions} % -% \begin{macro}[EXP]{\char_to_utfviii_bytes:n} +% \begin{macro}[EXP, deprecated]{\char_to_utfviii_bytes:n} % \begin{macrocode} -\__kernel_patch_deprecation:nnNNpn { 2022-10-09 } { [ \codepoint_generate:n ] } +\__kernel_patch_deprecation:nnNNpn { 2022-10-09 } { [ \codepoint_generate:nn ] } \cs_gset:Npn \char_to_utfviii_bytes:n { \__kernel_codepoint_to_bytes:n } % \end{macrocode} % \end{macro} % -% \begin{macro}[EXP]{\char_to_nfd:N, \char_to_nfd:n} +% \begin{macro}[EXP, deprecated]{\char_to_nfd:N, \char_to_nfd:n} % \begin{macrocode} \__kernel_patch_deprecation:nnNNpn { 2022-10-09 } { \codepoint_to_nfd:n } \cs_gset:Npn \char_to_nfd:N #1 { \codepoint_to_nfd:n {`#1} } @@ -650,7 +731,7 @@ % \end{macrocode} % \end{macro} % -% \begin{macro}[EXP] +% \begin{macro}[EXP, deprecated] % { % \char_lower_case:N, \char_upper_case:N, % \char_mixed_case:Nn, \char_fold_case:N, @@ -677,11 +758,11 @@ % \end{macrocode} % \end{macro} % -% \begin{macro}[EXP] +% \begin{macro}[EXP, deprecated] % { -% \char_lowercase:N, \char_uppercase:N, +% \char_lowercase:N, \char_titlecase:N, \char_uppercase:N, % \char_foldcase:N, -% \char_str_lowercase:N, \char_str_uppercase:N, +% \char_str_lowercase:N, \char_str_titlecase:N, \char_str_uppercase:N, % \char_str_foldcase:N, % } % \begin{macrocode} @@ -689,10 +770,16 @@ \cs_gset:Npn \char_lowercase:N { \text_lowercase:n } \__kernel_patch_deprecation:nnNNpn { 2022-10-17 } { \text_uppercase:n } \cs_gset:Npn \char_uppercase:N { \text_uppercase:n } +\__kernel_patch_deprecation:nnNNpn { 2022-10-17 } { \text_titlecase_first:n } +\cs_gset:Npn \char_titlecase:N { \text_titlecase_first:n } \__kernel_patch_deprecation:nnNNpn { 2022-10-17 } { \str_casefold:n } \cs_gset:Npn \char_foldcase:N { \str_casefold:n } \__kernel_patch_deprecation:nnNNpn { 2022-10-17 } { \str_lowercase:n } \cs_gset:Npn \char_str_lowercase:N { \str_lowercase:n } +\__kernel_patch_deprecation:nnNNpn { 2022-10-17 } + { \tl_to_str:e { \text_titlecase_first:n } } +\cs_gset:Npn \char_str_titlecase:N #1 + { \tl_to_str:e { \text_titlecase_first:n {#1} } } \__kernel_patch_deprecation:nnNNpn { 2022-10-17 } { \str_uppercase:n } \cs_gset:Npn \char_str_uppercase:N { \str_uppercase:n } \__kernel_patch_deprecation:nnNNpn { 2022-10-17 } { \str_casefold:n } @@ -700,7 +787,7 @@ % \end{macrocode} % \end{macro} % -% \begin{macro}[TF] +% \begin{macro}[TF, deprecated] % { % \peek_catcode_ignore_spaces:N, \peek_catcode_remove_ignore_spaces:N, % \peek_charcode_ignore_spaces:N, \peek_charcode_remove_ignore_spaces:N, diff --git a/macros/latex/contrib/l3kernel/l3doc.dtx b/macros/latex/contrib/l3kernel/l3doc.dtx index 731748faf4..b6f98aa366 100644 --- a/macros/latex/contrib/l3kernel/l3doc.dtx +++ b/macros/latex/contrib/l3kernel/l3doc.dtx @@ -85,7 +85,7 @@ and all files in that bundle must be distributed together. % require you to do updates, if the class changes.}} % % \author{\Team} -% \date{Released 2023-11-09} +% \date{Released 2023-12-08} % \maketitle % \tableofcontents % @@ -469,6 +469,10 @@ and all files in that bundle must be distributed together. % |T| nor |F|, to document functions such as \cs[no-index]{prop_get:NN} % which also have conditional forms (\cs[no-index]{prop_get:NNTF}). % +% In a very small number of cases, there is no user documentation for +% a \enquote{public} function. In these rare cases, the option +% |no-user-doc| may be added to suppress the undefined reference that +% would otherwise then arises. % % \DescribeMacro{\TestFiles} % \cs{TestFiles}\marg{list of files} is used to indicate which test @@ -695,8 +699,9 @@ and all files in that bundle must be distributed together. % % \begin{variable} % { -% \l_@@_macro_internal_set_bool, +% \l_@@_macro_deprecated_bool , % \l_@@_macro_internal_bool, +% \l_@@_macro_nodoc_bool , % \l_@@_macro_TF_bool, % \l_@@_macro_pTF_bool, % \l_@@_macro_noTF_bool, @@ -710,8 +715,9 @@ and all files in that bundle must be distributed together. % environments. We initialize \cs{l_@@_override_module_tl} to avoid % overriding module names by an empty name (meaning no module). % \begin{macrocode} -\bool_new:N \l_@@_macro_internal_set_bool +\bool_new:N \l_@@_macro_deprecated_bool \bool_new:N \l_@@_macro_internal_bool +\bool_new:N \l_@@_macro_nodoc_bool \bool_new:N \l_@@_macro_TF_bool \bool_new:N \l_@@_macro_pTF_bool \bool_new:N \l_@@_macro_noTF_bool @@ -955,56 +961,19 @@ and all files in that bundle must be distributed together. % \begin{macro} % { % \seq_set_split:NoV, -% \str_case:fn, -% \tl_count:f, -% \tl_greplace_all:Nen, -% \tl_greplace_all:Nno, -% \tl_if_head_eq_charcode:oNTF, -% \tl_if_head_eq_charcode:oNT, -% \tl_if_head_eq_charcode:oNF, -% \tl_if_head_eq_meaning:VNF, -% \tl_if_in:noTF, -% \tl_if_in:ooTF, -% \tl_if_in:NoTF, -% \tl_if_in:NoT, -% \tl_if_in:NoF, -% \tl_remove_all:Ne, -% \tl_replace_all:Nen, -% \tl_replace_all:Nne, -% \tl_replace_all:Non, -% \tl_replace_all:Nno, -% \tl_replace_once:Noo, -% \tl_to_str:f, -% \tl_to_str:o, +% \tl_to_str:f % } % A few missing variants. % \begin{macrocode} \cs_generate_variant:Nn \seq_set_split:Nnn { NoV } -\cs_generate_variant:Nn \seq_gput_right:Nn { Nf } -\cs_generate_variant:Nn \str_case:nn { fn } -\cs_generate_variant:Nn \tl_count:n { f } -\cs_generate_variant:Nn \tl_greplace_all:Nnn { Nx , Nno } -\cs_generate_variant:Nn \tl_if_empty:nTF { f } -\cs_generate_variant:Nn \tl_if_head_eq_charcode:nNTF { o } -\cs_generate_variant:Nn \tl_if_head_eq_charcode:nNT { o } -\cs_generate_variant:Nn \tl_if_head_eq_charcode:nNF { o } -\cs_generate_variant:Nn \tl_if_head_eq_meaning:nNF { V } -\cs_generate_variant:Nn \tl_if_in:nnTF { no , oo } -\cs_generate_variant:Nn \tl_if_in:NnTF { No } -\cs_generate_variant:Nn \tl_if_in:NnT { No } -\cs_generate_variant:Nn \tl_if_in:NnF { No } -\cs_generate_variant:Nn \tl_remove_all:Nn { Nx } -\cs_generate_variant:Nn \tl_replace_all:Nnn { Nx , Nnx, No , Nno } -\cs_generate_variant:Nn \tl_replace_once:Nnn { Noo } -\cs_generate_variant:Nn \tl_set_rescan:Nnn { NnV } -\cs_generate_variant:Nn \tl_to_str:n { f , o } +\cs_generate_variant:Nn \tl_to_str:n { f } % \end{macrocode} % \end{macro} % % \begin{macro}[TF]{\@@_if_almost_str:n} % Used to test if the argument of |\cmd| or other macros to be indexed % is almost a string or not: for instance this is \texttt{false} if |#1| -% contains |\meta{...}|. The surprising |f|-expansion are there to +% contains |\meta{...}|. The surprising |f|-expansion is there to % cope with the case of |#1| starting with \cs{c_backslash_str} % which should be expanded and considered to be \enquote{normal}. % \begin{macrocode} @@ -1012,11 +981,11 @@ and all files in that bundle must be distributed together. { \int_compare:nNnTF { \tl_count:n {#1} } - < { \tl_count:f { \tl_to_str:f {#1} } } + < { \tl_count:e { \tl_to_str:f {#1} } } { \prg_return_false: } { \prg_return_true: } } -\cs_generate_variant:Nn \@@_if_almost_str:nT { V } +\prg_generate_conditional_variant:Nnn \@@_if_almost_str:n { V } { T } % \end{macrocode} % \end{macro} % @@ -1110,7 +1079,7 @@ and all files in that bundle must be distributed together. \cs_new_protected:Npn \@@_detect_internals_aux:N #1 { \tl_set_eq:NN \l_@@_detect_internals_tl #1 - \tl_replace_all:Non \l_@@_detect_internals_tl { \token_to_str:N _ } { _ } + \tl_replace_all:NVn \l_@@_detect_internals_tl \c_underscore_str { _ } \seq_set_split:NnV \l_@@_tmpa_seq { _ _ } \l_@@_detect_internals_tl \seq_pop_left:NN \l_@@_tmpa_seq \l_@@_detect_internals_tl \seq_map_variable:NNn \l_@@_tmpa_seq \l_@@_detect_internals_tl @@ -1993,9 +1962,9 @@ and all files in that bundle must be distributed together. \bool_if:NT \l_@@_cmd_replace_bool { \tl_set_rescan:Nnn \l_@@_tmpb_tl { } { _ } - \tl_replace_all:Non \l_@@_cmd_tl \l_@@_tmpb_tl { _ } + \tl_replace_all:NVn \l_@@_cmd_tl \l_@@_tmpb_tl { _ } \@@_replace_at_at:N \l_@@_cmd_tl - \tl_replace_all:Nno \l_@@_cmd_tl { _ } \l_@@_tmpb_tl + \tl_replace_all:NnV \l_@@_cmd_tl { _ } \l_@@_tmpb_tl } % \end{macrocode} % Typesetting. @@ -2075,7 +2044,7 @@ and all files in that bundle must be distributed together. { \tl_set_rescan:Nnn \l_@@_tmpb_tl { \char_set_catcode:nn { `_ } {##1} } { _ } - \tl_replace_all:Non \l_@@_tmpa_tl \l_@@_tmpb_tl + \tl_replace_all:NVn \l_@@_tmpa_tl \l_@@_tmpb_tl { \@@_ensuremath_sb:n } } \exp_args:NV \@@_meta_original:n \l_@@_tmpa_tl @@ -2155,8 +2124,8 @@ and all files in that bundle must be distributed together. \cs_new_protected:Npn \@@_get_hyper_target:nN #1#2 { \__kernel_tl_set:Ne #2 { \tl_to_str:n {#1} } - \tl_replace_all:Nen #2 { \c_underscore_str } { / } - \tl_remove_all:Ne #2 { \c_backslash_str } + \tl_replace_all:NVn #2 \c_underscore_str { / } + \tl_remove_all:NV #2 \c_backslash_str \tl_put_left:Nn #2 { doc/function// } } \cs_generate_variant:Nn \@@_get_hyper_target:nN { o , e } @@ -2282,8 +2251,8 @@ and all files in that bundle must be distributed together. { \seq_pop:NN #1 \l_@@_tmpa_tl \tl_gset_eq:NN \g_@@_base_name_tl \l_@@_tmpa_tl - \tl_greplace_all:Nno \g_@@_base_name_tl - { ~ } { \c_catcode_other_space_tl } + \tl_greplace_all:NnV \g_@@_base_name_tl + { ~ } \c_catcode_other_space_tl \seq_get:NN #1 \l_@@_tmpa_tl \str_if_eq:VnTF \l_@@_tmpa_tl { \scan_stop: } { @@ -2350,13 +2319,10 @@ and all files in that bundle must be distributed together. % \begin{macrocode} \prg_new_conditional:Npnn \@@_if_macro_internal:n #1 { p , T , F , TF } { - \bool_if:NTF \l_@@_macro_internal_set_bool - { - \bool_if:NTF \l_@@_macro_internal_bool - { \prg_return_true: } { \prg_return_false: } - } + \bool_if:NTF \l_@@_macro_internal_bool + { \prg_return_true: } { - \tl_if_empty:fTF + \tl_if_empty:eTF { \exp_after:wN \@@_if_macro_internal_aux:w \tl_to_str:n { #1 ~ __ } @@ -2437,7 +2403,8 @@ and all files in that bundle must be distributed together. } , added .code:n = { \@@_date_set_past:Nn \l_@@_date_added_tl {#1} }, updated .code:n = { \@@_date_set_past:Nn \l_@@_date_updated_tl {#1} } , - deprecated .code:n = {} , % A stub + deprecated .bool_set:N = \l_@@_macro_deprecated_bool , + no-user-doc .bool_set:N = \l_@@_macro_nodoc_bool , tested .code:n = { } , label .code:n = { @@ -2884,18 +2851,14 @@ and all files in that bundle must be distributed together. \msg_warning:nnnn { l3doc } { deprecated-option } { aux } { function/macro } } , + deprecated .bool_set:N = \l_@@_macro_deprecated_bool , internal .value_forbidden:n = true , internal .code:n = - { - \bool_set_true:N \l_@@_macro_internal_bool - \bool_set_true:N \l_@@_macro_internal_set_bool - } , + { \bool_set_true:N \l_@@_macro_internal_bool } , int .value_forbidden:n = true , int .code:n = - { - \bool_set_true:N \l_@@_macro_internal_bool - \bool_set_true:N \l_@@_macro_internal_set_bool - } , + { \bool_set_true:N \l_@@_macro_internal_bool } , + no-user-doc .bool_set:N = \l_@@_macro_nodoc_bool , var .value_forbidden:n = true , var .code:n = { \bool_set_true:N \l_@@_macro_var_bool } , @@ -2934,7 +2897,6 @@ and all files in that bundle must be distributed together. } , added .code:n = {} , % TODO updated .code:n = {} , % TODO - deprecated .code:n = {} , % A stub verb .bool_set:N = \l_@@_names_verb_bool , module .tl_set:N = \l_@@_override_module_tl , documented-as .tl_set:N = \l_@@_macro_documented_tl , @@ -2977,8 +2939,8 @@ and all files in that bundle must be distributed together. \cs_new_protected:Npn \@@_macro_init: { \int_incr:N \l_@@_nested_macro_int + \bool_set_false:N \l_@@_macro_deprecated_bool \bool_set_false:N \l_@@_macro_internal_bool - \bool_set_false:N \l_@@_macro_internal_set_bool \bool_set_false:N \l_@@_macro_TF_bool \bool_set_false:N \l_@@_macro_pTF_bool \bool_set_false:N \l_@@_macro_noTF_bool @@ -3026,8 +2988,8 @@ and all files in that bundle must be distributed together. \tl_if_empty:NTF \l_@@_macro_documented_tl { \@@_names_block_base_map:N \@@_macro_save_names_aux:n } { - \seq_gput_right:Nf \g_@@_nested_names_seq - { \exp_after:wN \token_to_str:N \l_@@_macro_documented_tl } + \seq_gput_right:Ne \g_@@_nested_names_seq + { \tl_to_str:N \l_@@_macro_documented_tl } } } \cs_new_protected:Npn \@@_macro_save_names_aux:n #1 @@ -3103,7 +3065,6 @@ and all files in that bundle must be distributed together. { \@@_get_function_name:n {#1} } #2 } } -\cs_generate_variant:Nn \@@_macro_typeset_block:nN { x } \cs_new_protected:Npn \@@_macro_typeset_variant_list:nN #1#2 { \seq_map_inline:Nn \g_@@_variants_seq @@ -3140,7 +3101,12 @@ and all files in that bundle must be distributed together. \DoNotIndex {#1} \bool_if:NT #2 { - \@@_if_macro_internal:nF {#1} + \bool_lazy_any:nF + { + { \@@_if_macro_internal_p:n {#1} } + { \l_@@_macro_deprecated_bool } + { \l_@@_macro_nodoc_bool } + } { \seq_gput_right:Nn \g_doc_macros_seq {#1} } \hbox_set:Nw \l_@@_macro_index_box \hbox_unpack_drop:N \l_@@_macro_index_box @@ -3198,8 +3164,8 @@ and all files in that bundle must be distributed together. \int_compare:nTF { \str_count:n {#1} <= 28 } { \MacroFont } { \MacroLongFont } \tl_set:Nn \l_@@_tmpa_tl {#1} - \tl_replace_all:Nno \l_@@_tmpa_tl - { ~ } { \c_catcode_other_space_tl } + \tl_replace_all:NnV \l_@@_tmpa_tl + { ~ } \c_catcode_other_space_tl \@@_macroname_prefix:o \l_@@_tmpa_tl \@@_macroname_suffix:N #2 } @@ -3377,8 +3343,8 @@ and all files in that bundle must be distributed together. \cs_new_protected:Npn \@@_macro_end_wrap_item:n #1 { \tl_set:Nn \l_@@_tmpa_tl {#1} - \tl_replace_all:Non \l_@@_tmpa_tl - { \token_to_str:N _ } { \_ } + \tl_replace_all:NVn \l_@@_tmpa_tl + \c_underscore_str { \_ } \texttt { \l_@@_tmpa_tl } } \cs_new_protected:Npn \@@_print_end_definition: @@ -3400,7 +3366,14 @@ and all files in that bundle must be distributed together. { \seq_gset_filter:NNn \g_@@_nested_names_seq \g_@@_nested_names_seq - { ! \@@_if_macro_internal_p:n {##1} } + { + ! \bool_lazy_any_p:n + { + { \@@_if_macro_internal_p:n {##1} } + { \l_@@_macro_deprecated_bool } + { \l_@@_macro_nodoc_bool } + } + } \seq_if_empty:NF \g_@@_nested_names_seq { \int_set:Nn \l_@@_tmpa_int @@ -3963,18 +3936,18 @@ and all files in that bundle must be distributed together. \tl_clear:N \l_@@_doc_def_tl \tl_clear:N \l_@@_doc_undef_tl \tl_clear:N \l_@@_undoc_def_tl + \seq_gremove_duplicates:N \g_doc_functions_seq + \seq_gremove_duplicates:N \g_doc_macros_seq \seq_map_inline:Nn \g_doc_functions_seq { \seq_if_in:NnTF \g_doc_macros_seq {##1} { \tl_put_right:Ne \l_@@_doc_def_tl - { ##1 \iow_newline: } - \iow_now:Nn \g_@@_func_iow { > ~ ##1 } + { \iow_newline: > ~ ##1 } } { \tl_put_right:Ne \l_@@_doc_undef_tl - { ##1 \iow_newline: } - \iow_now:Nn \g_@@_func_iow { ! ~ ##1 } + { \iow_newline: ! ~ ##1 } } } \seq_map_inline:Nn \g_doc_macros_seq @@ -3982,8 +3955,7 @@ and all files in that bundle must be distributed together. \seq_if_in:NnF \g_doc_functions_seq {##1} { \tl_put_right:Ne \l_@@_undoc_def_tl - { ##1 \iow_newline: } - \iow_now:Nn \g_@@_func_iow { ? ~ ##1 } + { \iow_newline: ? ~ ##1 } } } \@@_functions_typeout:nN @@ -4012,11 +3984,11 @@ and all files in that bundle must be distributed together. { \tl_if_empty:NF #2 { - \typeout + \iow_now:Ne \g_@@_func_iow { \c_@@_iow_midrule_tl \iow_newline: #1 \iow_newline: - \c_@@_iow_midrule_tl \iow_newline: + \c_@@_iow_midrule_tl #2 } \tl_clear:N #2 @@ -4367,7 +4339,7 @@ and all files in that bundle must be distributed together. \__kernel_tl_set:Ne #1 { \tl_to_str:n {#2} } \@@_if_almost_str:nTF {#2} { - \tl_replace_all:Non #1 { \tl_to_str:n { __ } } + \tl_replace_all:Nen #1 { \tl_to_str:n { __ } } { \verbatimchar \token_to_str:N \_ \token_to_str:N \_ @@ -4390,8 +4362,8 @@ and all files in that bundle must be distributed together. } { \tl_set:Nn #1 {#2} - \tl_replace_all:Non #1 - { \c_backslash_str } + \tl_replace_all:NVn #1 + \c_backslash_str { \token_to_str:N \bslash \c_space_tl } } \@@_quote_special_char:N #1 @@ -4430,27 +4402,26 @@ and all files in that bundle must be distributed together. % module name, while for \TeX{}/\LaTeXe{} commands the module name is % |TeX|, and others have an empty module name. % \begin{macrocode} -\cs_new_protected:Npn \@@_key_get:n #1 - { - \@@_key_get_base:nN {#1} \l_@@_index_macro_tl - \__kernel_tl_set:Ne \l_@@_index_key_tl - { \tl_to_str:N \l_@@_index_macro_tl } - \tl_clear:N \l_@@_index_module_tl - \tl_if_in:NoTF \l_@@_index_key_tl { \tl_to_str:n { __ } } - { \bool_set_true:N \l_@@_index_internal_bool } - { \bool_set_false:N \l_@@_index_internal_bool } - \exp_last_unbraced:NNo - \tl_if_head_eq_charcode:oNT - { \l_@@_index_key_tl } \c_backslash_str - { \@@_key_pop: } - \tl_if_in:NoTF \l_@@_index_key_tl { \token_to_str:N : } - { \@@_key_func: } +\cs_new_protected:Npe \@@_key_get:n #1 + { + \exp_not:N \@@_key_get_base:nN {#1} \exp_not:N \l_@@_index_macro_tl + \__kernel_tl_set:Ne \exp_not:N \l_@@_index_key_tl + { \exp_not:N \tl_to_str:N \exp_not:N \l_@@_index_macro_tl } + \tl_clear:N \exp_not:N \l_@@_index_module_tl + \tl_if_in:NnTF \exp_not:N \l_@@_index_key_tl { \tl_to_str:n { __ } } + { \bool_set_true:N \exp_not:N \l_@@_index_internal_bool } + { \bool_set_false:N \exp_not:N \l_@@_index_internal_bool } + \exp_not:N \tl_if_head_eq_charcode:VNT + \exp_not:N \l_@@_index_key_tl \c_backslash_str + { \exp_not:N \@@_key_pop: } + \tl_if_in:NnTF \exp_not:N \l_@@_index_key_tl { \token_to_str:N : } + { \exp_not:N \@@_key_func: } { - \tl_if_in:NoTF \l_@@_index_key_tl { \token_to_str:N _ } - { \@@_key_var: } + \tl_if_in:NnTF \exp_not:N \l_@@_index_key_tl { \token_to_str:N _ } + { \exp_not:N \@@_key_var: } { - \tl_if_in:NoT \l_@@_index_key_tl { \token_to_str:N @ } - { \tl_set:Nn \l_@@_index_module_tl { TeX } } + \tl_if_in:NnT \exp_not:N \l_@@_index_key_tl { \token_to_str:N @ } + { \tl_set:Nn \exp_not:N \l_@@_index_module_tl { TeX } } } } } @@ -4476,7 +4447,7 @@ and all files in that bundle must be distributed together. } \cs_new_protected:Npn \@@_key_drop_underscores: { - \tl_if_head_eq_charcode:oNT { \l_@@_index_key_tl } _ + \tl_if_head_eq_charcode:VNT \l_@@_index_key_tl _ { \@@_key_pop: \@@_key_drop_underscores: } } % \end{macrocode} @@ -4491,7 +4462,7 @@ and all files in that bundle must be distributed together. % \begin{macrocode} \cs_new_protected:Npn \@@_key_func: { - \tl_if_head_eq_charcode:oNT { \l_@@_index_key_tl } . + \tl_if_head_eq_charcode:VNT \l_@@_index_key_tl . { \@@_key_pop: } \@@_key_drop_underscores: \tl_set_eq:NN \l_@@_index_module_tl \l_@@_index_key_tl @@ -4527,7 +4498,7 @@ and all files in that bundle must be distributed together. \exp_args:Ne \tl_if_head_eq_charcode:nNTF { \exp_args:No \str_tail:n \l_@@_index_key_tl } _ { - \str_case:fn { \str_head:N \l_@@_index_key_tl } + \str_case:en { \str_head:N \l_@@_index_key_tl } { { q } { \tl_set:Nn \l_@@_index_module_tl { quark } } { s } { \tl_set:Nn \l_@@_index_module_tl { scan } } diff --git a/macros/latex/contrib/l3kernel/l3doc.pdf b/macros/latex/contrib/l3kernel/l3doc.pdf index 1e5b09743b..f292e02ce2 100644 Binary files a/macros/latex/contrib/l3kernel/l3doc.pdf and b/macros/latex/contrib/l3kernel/l3doc.pdf differ diff --git a/macros/latex/contrib/l3kernel/l3docstrip.dtx b/macros/latex/contrib/l3kernel/l3docstrip.dtx index e6c46d3965..ebf9af795f 100644 --- a/macros/latex/contrib/l3kernel/l3docstrip.dtx +++ b/macros/latex/contrib/l3kernel/l3docstrip.dtx @@ -63,7 +63,7 @@ % }^^A % } % -% \date{Released 2023-11-09} +% \date{Released 2023-12-08} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3docstrip.pdf b/macros/latex/contrib/l3kernel/l3docstrip.pdf index 108442ee65..f5a61766e1 100644 Binary files a/macros/latex/contrib/l3kernel/l3docstrip.pdf and b/macros/latex/contrib/l3kernel/l3docstrip.pdf differ diff --git a/macros/latex/contrib/l3kernel/l3expan.dtx b/macros/latex/contrib/l3kernel/l3expan.dtx index 613af946f9..36fb87f2ac 100644 --- a/macros/latex/contrib/l3kernel/l3expan.dtx +++ b/macros/latex/contrib/l3kernel/l3expan.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-11-09} +% \date{Released 2023-12-08} % % \maketitle % @@ -310,23 +310,16 @@ % % When speed is essential (for functions that do very little work and % whose variants are used numerous times in a document) the following -% considerations apply because internal functions for argument expansion -% come in two flavours, some faster than others. +% considerations apply because the speed of internal functions that +% expand the arguments of a base function depend on what needs doing +% with each argument and where this happens in the list of arguments: % \begin{itemize} -% \item -% Arguments that might need expansion should come first in the list -% of arguments. -% \item -% Arguments that should consist of single tokens |N|, |c|, |V|, or -% |v| should come first among these. -% \item -% Arguments that appear after the first multi-token argument |n|, -% |f|, |e|, or |o| require slightly slower special processing to be -% expanded. Therefore it is best to use the optimized functions, -% namely those that contain only |N|, |c|, |V|, and |v|, and, in the -% last position, |o|, |f|, |e|, with possible trailing |N| or |n| or -% |T| or |F|, which are not expanded. Any |x|-type argument causes -% slightly slower processing. +% \item for fastest processing any |c|-type arguments should come first +% followed by all other modified arguments; +% \item unchanged |N|-type args that appear before modified ones have +% a small performance hit; +% \item unchanged |n|-type args that appear before modified ones have +% a relative larger performance hit. % \end{itemize} % % \section{Manipulating the first argument} @@ -471,7 +464,6 @@ % third as detailed by their argument specifier. The first argument % of the function is then the next item on the input stream, followed % by the expansion of the second and third arguments. -% These functions need slower processing. % \end{function} % % \begin{function} @@ -542,7 +534,6 @@ % and fourth as detailed by their argument specifier. The first % argument of the function is then the next item on the input stream, % followed by the expansion of the second argument, \emph{etc}. -% These functions need slower processing. % \end{function} % % \begin{function}[added = 2015-08-12] @@ -2384,8 +2375,9 @@ % % \subsection{Held-over variant generation} % -% \begin{macro}{\cs_generate_from_arg_count:NNno} -% \begin{macro}{\cs_replacement_spec:c} +% \begin{macro}[documented-as = \cs_generate_from_arg_count:NNnn] +% {\cs_generate_from_arg_count:NNno} +% \begin{macro}[documented-as = \cs_replacement_spec:N]{\cs_replacement_spec:c} % A couple of variants that are from early functions. % \begin{macrocode} \cs_generate_variant:Nn \cs_generate_from_arg_count:NNnn { NNno } diff --git a/macros/latex/contrib/l3kernel/l3file.dtx b/macros/latex/contrib/l3kernel/l3file.dtx index 6af1bc4c00..8545a83947 100644 --- a/macros/latex/contrib/l3kernel/l3file.dtx +++ b/macros/latex/contrib/l3kernel/l3file.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2023-11-09} +% \date{Released 2023-12-08} % % \maketitle % @@ -716,7 +716,8 @@ % \cs{file_if_exist_p:n} \Arg{file name} % \cs{file_if_exist:nTF} \Arg{file name} \Arg{true code} \Arg{false code} % \end{syntax} -% Searches for \meta{file name} using the current \TeX{} search +% Expands the argument of the \cs{file name} to give a string, then +% searches for this string using the current \TeX{} search % path and the additional paths controlled by % \cs{l_file_search_path_seq}. % \end{function} @@ -724,10 +725,10 @@ % \begin{function}[noTF, added = 2019-01-16, updated = 2019-02-16] % {\file_get:nnN, \file_get:VnN} % \begin{syntax} -% \cs{file_get:nnN} \Arg{filename} \Arg{setup} \meta{tl} -% \cs{file_get:nnNTF} \Arg{filename} \Arg{setup} \meta{tl} \Arg{true code} \Arg{false code} +% \cs{file_get:nnN} \Arg{file name} \Arg{setup} \meta{tl} +% \cs{file_get:nnNTF} \Arg{file name} \Arg{setup} \meta{tl} \Arg{true code} \Arg{false code} % \end{syntax} -% Defines \meta{tl} to the contents of \meta{filename}. +% Defines \meta{tl} to the contents of \meta{file name}. % Category codes may need to be set appropriately via the \meta{setup} % argument. % The non-branching version sets the \meta{tl} to \cs{q_no_value} if the file is @@ -2546,21 +2547,6 @@ % \end{macrocode} % \end{macro} % -% \subsection{Deprecated functions} -% -% \begin{macro} -% { -% \iow_shipout_x:Nn, \iow_shipout_x:Nx, -% \iow_shipout_x:cn, \iow_shipout_x:cx -% } -% Previously described as \texttt{x}-type, but the hash behaviour is really -% \texttt{e}-type. -% \begin{macrocode} -\cs_new_eq:NN \iow_shipout_x:Nn \iow_shipout_e:Nn -\cs_generate_variant:Nn \iow_shipout_x:Nn { Nx , c, cx } -% \end{macrocode} -% \end{macro} -% % \begin{macrocode} %<@@=file> % \end{macrocode} @@ -3359,7 +3345,7 @@ % { % \file_compare_timestamp:nNn, % \file_compare_timestamp:nNV, -% \file_compare_timestamp:VNn +% \file_compare_timestamp:VNn, % \file_compare_timestamp:VNV % } % \begin{macro}[EXP]{\@@_compare_timestamp:nnN} @@ -3415,7 +3401,7 @@ % \end{macro} % \end{macro} % -% \begin{macro}[TF]{\file_if_exist:n, \file_if_exist:V} +% \begin{macro}[pTF]{\file_if_exist:n, \file_if_exist:V} % The test for the existence of a file is a wrapper around the function to % add a path to a file. If the file was found, the path contains % something, whereas if the file was not located then the return value @@ -3569,8 +3555,8 @@ % \end{macrocode} % \end{macro} % -% \begin{macro}{\file_parse_full_name:n, \file_parse_full_name:nV} -% \begin{macro}{\file_parse_full_name_apply:nN \file_parse_full_name_apply:VN} +% \begin{macro}{\file_parse_full_name:n, \file_parse_full_name:V} +% \begin{macro}{\file_parse_full_name_apply:nN, \file_parse_full_name_apply:VN} % The main parsing macro \cs{file_parse_full_name_apply:nN} passes the % file name |#1| through \cs{__kernel_file_name_sanitize:n} so that we % have a single normalised way to treat files internally. diff --git a/macros/latex/contrib/l3kernel/l3flag.dtx b/macros/latex/contrib/l3kernel/l3flag.dtx index cecc72ceea..d94897f87d 100644 --- a/macros/latex/contrib/l3kernel/l3flag.dtx +++ b/macros/latex/contrib/l3kernel/l3flag.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-11-09} +% \date{Released 2023-12-08} % % \maketitle % @@ -61,7 +61,7 @@ % to zero requires non-expandable assignments. % % Flag variables are always local. They are referenced by a \meta{flag -% name} such as \texttt{str_missing}. The \meta{flag name} is used as +% name} such as \texttt{@@_missing}. The \meta{flag name} is used as % part of \cs{use:c} constructions hence is expanded at point of use. % It must expand to character tokens only, with no spaces. % diff --git a/macros/latex/contrib/l3kernel/l3fp-assign.dtx b/macros/latex/contrib/l3kernel/l3fp-assign.dtx index 08a7d80880..42f915af33 100644 --- a/macros/latex/contrib/l3kernel/l3fp-assign.dtx +++ b/macros/latex/contrib/l3kernel/l3fp-assign.dtx @@ -40,7 +40,7 @@ % {latex-team@latex-project.org}^^A % }^^A % } -% \date{Released 2023-11-09} +% \date{Released 2023-12-08} % \maketitle % % \begin{documentation} diff --git a/macros/latex/contrib/l3kernel/l3fp-aux.dtx b/macros/latex/contrib/l3kernel/l3fp-aux.dtx index dad8ef3c31..53ce603de0 100644 --- a/macros/latex/contrib/l3kernel/l3fp-aux.dtx +++ b/macros/latex/contrib/l3kernel/l3fp-aux.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-11-09} +% \date{Released 2023-12-08} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp-basics.dtx b/macros/latex/contrib/l3kernel/l3fp-basics.dtx index e29d08f317..e0e8965aea 100644 --- a/macros/latex/contrib/l3kernel/l3fp-basics.dtx +++ b/macros/latex/contrib/l3kernel/l3fp-basics.dtx @@ -40,7 +40,7 @@ % {latex-team@latex-project.org}^^A % }^^A % } -% \date{Released 2023-11-09} +% \date{Released 2023-12-08} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp-convert.dtx b/macros/latex/contrib/l3kernel/l3fp-convert.dtx index 879d9bed5a..0a8252da36 100644 --- a/macros/latex/contrib/l3kernel/l3fp-convert.dtx +++ b/macros/latex/contrib/l3kernel/l3fp-convert.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-11-09} +% \date{Released 2023-12-08} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp-expo.dtx b/macros/latex/contrib/l3kernel/l3fp-expo.dtx index 7bf48968b9..7f29ebf992 100644 --- a/macros/latex/contrib/l3kernel/l3fp-expo.dtx +++ b/macros/latex/contrib/l3kernel/l3fp-expo.dtx @@ -40,7 +40,7 @@ % {latex-team@latex-project.org}^^A % }^^A % } -% \date{Released 2023-11-09} +% \date{Released 2023-12-08} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp-extended.dtx b/macros/latex/contrib/l3kernel/l3fp-extended.dtx index a6f1b1fcaa..7103a8d4ea 100644 --- a/macros/latex/contrib/l3kernel/l3fp-extended.dtx +++ b/macros/latex/contrib/l3kernel/l3fp-extended.dtx @@ -40,7 +40,7 @@ % {latex-team@latex-project.org}^^A % }^^A % } -% \date{Released 2023-11-09} +% \date{Released 2023-12-08} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp-functions.dtx b/macros/latex/contrib/l3kernel/l3fp-functions.dtx index 917f0bf330..5b5a29395f 100644 --- a/macros/latex/contrib/l3kernel/l3fp-functions.dtx +++ b/macros/latex/contrib/l3kernel/l3fp-functions.dtx @@ -42,7 +42,7 @@ % }^^A % } % -% \date{Released 2023-11-09} +% \date{Released 2023-12-08} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp-logic.dtx b/macros/latex/contrib/l3kernel/l3fp-logic.dtx index ed5fe892b3..692b2839a3 100644 --- a/macros/latex/contrib/l3kernel/l3fp-logic.dtx +++ b/macros/latex/contrib/l3kernel/l3fp-logic.dtx @@ -40,7 +40,7 @@ % {latex-team@latex-project.org}^^A % }^^A % } -% \date{Released 2023-11-09} +% \date{Released 2023-12-08} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp-parse.dtx b/macros/latex/contrib/l3kernel/l3fp-parse.dtx index 17fef94923..025bd5b7e3 100644 --- a/macros/latex/contrib/l3kernel/l3fp-parse.dtx +++ b/macros/latex/contrib/l3kernel/l3fp-parse.dtx @@ -40,7 +40,7 @@ % {latex-team@latex-project.org}^^A % }^^A % } -% \date{Released 2023-11-09} +% \date{Released 2023-12-08} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp-random.dtx b/macros/latex/contrib/l3kernel/l3fp-random.dtx index e2654aae99..09097cc68e 100644 --- a/macros/latex/contrib/l3kernel/l3fp-random.dtx +++ b/macros/latex/contrib/l3kernel/l3fp-random.dtx @@ -40,7 +40,7 @@ % {latex-team@latex-project.org}^^A % }^^A % } -% \date{Released 2023-11-09} +% \date{Released 2023-12-08} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp-round.dtx b/macros/latex/contrib/l3kernel/l3fp-round.dtx index afbff6f769..961c60363f 100644 --- a/macros/latex/contrib/l3kernel/l3fp-round.dtx +++ b/macros/latex/contrib/l3kernel/l3fp-round.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-11-09} +% \date{Released 2023-12-08} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp-symbolic.dtx b/macros/latex/contrib/l3kernel/l3fp-symbolic.dtx index 201bec9270..7b25907b77 100644 --- a/macros/latex/contrib/l3kernel/l3fp-symbolic.dtx +++ b/macros/latex/contrib/l3kernel/l3fp-symbolic.dtx @@ -42,7 +42,7 @@ % }^^A % } % -% \date{Released 2023-11-09} +% \date{Released 2023-12-08} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp-traps.dtx b/macros/latex/contrib/l3kernel/l3fp-traps.dtx index 2b152c5ca6..0371eddb5d 100644 --- a/macros/latex/contrib/l3kernel/l3fp-traps.dtx +++ b/macros/latex/contrib/l3kernel/l3fp-traps.dtx @@ -40,7 +40,7 @@ % {latex-team@latex-project.org}^^A % }^^A % } -% \date{Released 2023-11-09} +% \date{Released 2023-12-08} % \maketitle % % \begin{documentation} diff --git a/macros/latex/contrib/l3kernel/l3fp-trig.dtx b/macros/latex/contrib/l3kernel/l3fp-trig.dtx index 4421bda0a4..2c62fd572b 100644 --- a/macros/latex/contrib/l3kernel/l3fp-trig.dtx +++ b/macros/latex/contrib/l3kernel/l3fp-trig.dtx @@ -40,7 +40,7 @@ % {latex-team@latex-project.org}^^A % }^^A % } -% \date{Released 2023-11-09} +% \date{Released 2023-12-08} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp-types.dtx b/macros/latex/contrib/l3kernel/l3fp-types.dtx index 2c1f66ff71..100e3f00f4 100644 --- a/macros/latex/contrib/l3kernel/l3fp-types.dtx +++ b/macros/latex/contrib/l3kernel/l3fp-types.dtx @@ -42,7 +42,7 @@ % }^^A % } % -% \date{Released 2023-11-09} +% \date{Released 2023-12-08} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fp.dtx b/macros/latex/contrib/l3kernel/l3fp.dtx index 77c7bc625c..526a2a81bc 100644 --- a/macros/latex/contrib/l3kernel/l3fp.dtx +++ b/macros/latex/contrib/l3kernel/l3fp.dtx @@ -49,7 +49,7 @@ % }^^A % } % -% \date{Released 2023-11-09} +% \date{Released 2023-12-08} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3fparray.dtx b/macros/latex/contrib/l3kernel/l3fparray.dtx index 180b11fdaa..9e9acd795d 100644 --- a/macros/latex/contrib/l3kernel/l3fparray.dtx +++ b/macros/latex/contrib/l3kernel/l3fparray.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2023-11-09} +% \date{Released 2023-12-08} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3int.dtx b/macros/latex/contrib/l3kernel/l3int.dtx index 417e3cc08d..f50b3e0add 100644 --- a/macros/latex/contrib/l3kernel/l3int.dtx +++ b/macros/latex/contrib/l3kernel/l3int.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-11-09} +% \date{Released 2023-12-08} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3intarray.dtx b/macros/latex/contrib/l3kernel/l3intarray.dtx index 806b10c6c9..b566791654 100644 --- a/macros/latex/contrib/l3kernel/l3intarray.dtx +++ b/macros/latex/contrib/l3kernel/l3intarray.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2023-11-09} +% \date{Released 2023-12-08} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3kernel-functions.dtx b/macros/latex/contrib/l3kernel/l3kernel-functions.dtx index a07c55d7f5..72ea6c7480 100644 --- a/macros/latex/contrib/l3kernel/l3kernel-functions.dtx +++ b/macros/latex/contrib/l3kernel/l3kernel-functions.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-11-09} +% \date{Released 2023-12-08} % % \maketitle % @@ -415,6 +415,13 @@ % are errors, and in such case the definition is aborted. % \end{function} % +% \begin{function}{\__kernel_sys_everyjob:} +% \begin{syntax} +% \cs{__kernel_sys_everyjob:} +% \end{syntax} +% Inserts the internal token list required at the start of every run (job). +% \end{function} +% % \begin{variable}{\c__kernel_randint_max_int} % Maximal allowed argument to \cs{__kernel_randint:n}. Equal to % $2^{17}-1$. diff --git a/macros/latex/contrib/l3kernel/l3keys.dtx b/macros/latex/contrib/l3kernel/l3keys.dtx index 7dc05afee0..75c4c34f22 100644 --- a/macros/latex/contrib/l3kernel/l3keys.dtx +++ b/macros/latex/contrib/l3kernel/l3keys.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-11-09} +% \date{Released 2023-12-08} % % \maketitle % @@ -1585,11 +1585,16 @@ % \end{macrocode} % \end{variable} % -% \begin{variable}{\l_keys_key_str, \l_keys_key_tl} -% The name of a key itself: needed when setting keys. The |tl| version -% is deprecated but has to be handled manually. +% \begin{variable}{\l_keys_key_str} +% The name of a key itself: needed when setting keys. % \begin{macrocode} \str_new:N \l_keys_key_str +% \end{macrocode} +% \end{variable} +% +% \begin{variable}[deprecated]{\l_keys_key_tl} +% The |tl| version is deprecated but has to be handled manually. +% \begin{macrocode} \tl_new:N \l_keys_key_tl % \end{macrocode} % \end{variable} @@ -1616,12 +1621,17 @@ % \end{macrocode} % \end{variable} % -% \begin{variable}{\l_keys_path_str, \l_keys_path_tl} +% \begin{variable}{\l_keys_path_str} % The \enquote{path} of the current key is stored here: this is -% available to the programmer and so is public. The older version is -% deprecated but has to be handled manually. +% available to the programmer and so is public. % \begin{macrocode} \str_new:N \l_keys_path_str +% \end{macrocode} +% \end{variable} +% +% \begin{variable}[deprecated]{\l_keys_path_tl} +% The older version is deprecated but has to be handled manually. +% \begin{macrocode} \tl_new:N \l_keys_path_tl % \end{macrocode} % \end{variable} @@ -3593,38 +3603,6 @@ \prop_gput:Nnn \g_msg_module_type_prop { keys } { } % \end{macrocode} % -% \subsection{Deprecated functions} -% -% \begin{macro}{.str_set_x:N, .str_set_x:c} -% \begin{macro}{.str_gset_x:N, .str_gset_x:c} -% \begin{macrocode} -\cs_new_protected:cpn { \c_@@_props_root_str .str_set_x:N } #1 - { \@@_variable_set:NnnN #1 { str } { } x } -\cs_new_protected:cpn { \c_@@_props_root_str .str_set_x:c } #1 - { \@@_variable_set:cnnN {#1} { str } { } x } -\cs_new_protected:cpn { \c_@@_props_root_str .str_gset_x:N } #1 - { \@@_variable_set:NnnN #1 { str } { g } x } -\cs_new_protected:cpn { \c_@@_props_root_str .str_gset_x:c } #1 - { \@@_variable_set:cnnN {#1} { str } { g } x } -% \end{macrocode} -% \end{macro} -% \end{macro} -% -% \begin{macro}{.tl_set_x:N, .tl_set_x:c} -% \begin{macro}{.tl_gset_x:N, .tl_gset_x:c} -% \begin{macrocode} -\cs_new_protected:cpn { \c_@@_props_root_str .tl_set_x:N } #1 - { \@@_variable_set:NnnN #1 { tl } { } x } -\cs_new_protected:cpn { \c_@@_props_root_str .tl_set_x:c } #1 - { \@@_variable_set:cnnN {#1} { tl } { } x } -\cs_new_protected:cpn { \c_@@_props_root_str .tl_gset_x:N } #1 - { \@@_variable_set:NnnN #1 { tl } { g } x } -\cs_new_protected:cpn { \c_@@_props_root_str .tl_gset_x:c } #1 - { \@@_variable_set:cnnN {#1} { tl } { g } x } -% \end{macrocode} -% \end{macro} -% \end{macro} -% % \begin{macrocode} % % \end{macrocode} diff --git a/macros/latex/contrib/l3kernel/l3legacy.dtx b/macros/latex/contrib/l3kernel/l3legacy.dtx index 091da9a2cf..915ae07bb8 100644 --- a/macros/latex/contrib/l3kernel/l3legacy.dtx +++ b/macros/latex/contrib/l3kernel/l3legacy.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-11-09} +% \date{Released 2023-12-08} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3luatex.dtx b/macros/latex/contrib/l3kernel/l3luatex.dtx index ef582049e2..d94a2c6ad6 100644 --- a/macros/latex/contrib/l3kernel/l3luatex.dtx +++ b/macros/latex/contrib/l3kernel/l3luatex.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-11-09} +% \date{Released 2023-12-08} % % \maketitle % @@ -450,7 +450,7 @@ ltxutils.filedump = filedump % \end{macrocode} % \end{macro} % -% \begin{macro}{md5.HEX} +% \begin{macro}[int]{md5.HEX} % Hash a string and return the hash in uppercase hexadecimal format. % In some engines, this is build-in. For traditional \LuaTeX{}, the conversion % to hexadecimal has to be done by us. @@ -681,7 +681,7 @@ if luatexbase then if status.ini_version then % \end{macrocode} % -% \begin{macro}{register_luadata} +% \begin{macro}[int]{register_luadata} % \texttt{register_luadata} is only available during format generation. % It accept a string which uniquely identifies the data object and has to be % provided to retrieve it later. Additionally it accepts a function which is @@ -716,7 +716,7 @@ if luatexbase then else % \end{macrocode} % -% \begin{macro}{get_luadata} +% \begin{macro}[int]{get_luadata} % \texttt{get_luadata} is only available if data should be restored. % It accept the identifier which was used when the data object was registered and % returns the associated object. Every object can only be retrieved once. diff --git a/macros/latex/contrib/l3kernel/l3msg.dtx b/macros/latex/contrib/l3kernel/l3msg.dtx index 54c25fd3c3..b12cdab55c 100644 --- a/macros/latex/contrib/l3kernel/l3msg.dtx +++ b/macros/latex/contrib/l3kernel/l3msg.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-11-09} +% \date{Released 2023-12-08} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3names.dtx b/macros/latex/contrib/l3kernel/l3names.dtx index 479a4b5dfc..1441e889c3 100644 --- a/macros/latex/contrib/l3kernel/l3names.dtx +++ b/macros/latex/contrib/l3kernel/l3names.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-11-09} +% \date{Released 2023-12-08} % % \maketitle % @@ -1461,7 +1461,7 @@ %<*lua> % \end{macrocode} % -% \begin{macro}{\tex_strcmp:D} +% \begin{macro}[no-user-doc]{\tex_strcmp:D} % Compare two strings, expanding to |0| if they are equal, % |-1| if the first one is smaller and |1| if the second one is smaller. % Here \enquote{smaller} refers to codepoint order which does not correspond to @@ -1482,7 +1482,7 @@ end, 'global') % \end{macrocode} % \end{macro} % -% \begin{macro}{\tex_Ucharcat:D} +% \begin{macro}[no-user-doc]{\tex_Ucharcat:D} % Creating arbitrary chars using |tex.cprint|. % The alternative approach using |token.new(...)| is about 10\% slower % but needed to create arbitrary space tokens. @@ -1501,7 +1501,7 @@ end, 'global') % \end{macrocode} % \end{macro} % -% \begin{macro}{\tex_filesize:D} +% \begin{macro}[no-user-doc]{\tex_filesize:D} % Wrap the function from |ltxutils|. % \begin{macrocode} luacmd('tex_filesize:D', function() @@ -1511,7 +1511,7 @@ end, 'global') % \end{macrocode} % \end{macro} % -% \begin{macro}{\tex_mdfivesum:D} +% \begin{macro}[no-user-doc]{\tex_mdfivesum:D} % There are two cases: Either hash a file or a string. % Both are already implemented in l3luatex or built-in. % \begin{macrocode} @@ -1527,7 +1527,7 @@ end, 'global') % \end{macrocode} % \end{macro} % -% \begin{macro}{\tex_filemoddate:D} +% \begin{macro}[no-user-doc]{\tex_filemoddate:D} % A primitive for getting the modification date of a file. % \begin{macrocode} luacmd('tex_filemoddate:D', function() @@ -1537,7 +1537,7 @@ end, 'global') % \end{macrocode} % \end{macro} % -% \begin{macro}{\tex_filedump:D} +% \begin{macro}[no-user-doc]{\tex_filedump:D} % An emulated primitive for getting a hexdump from a (partial) file. % The length has a default of |0|. This is consistent with % \pdfTeX, but it effectivly makes the primitive useless without an diff --git a/macros/latex/contrib/l3kernel/l3news.pdf b/macros/latex/contrib/l3kernel/l3news.pdf index 617f4f2771..31847b224c 100644 Binary files a/macros/latex/contrib/l3kernel/l3news.pdf and b/macros/latex/contrib/l3kernel/l3news.pdf differ diff --git a/macros/latex/contrib/l3kernel/l3news01.pdf b/macros/latex/contrib/l3kernel/l3news01.pdf index ad795f754b..6d13ba9cac 100644 Binary files a/macros/latex/contrib/l3kernel/l3news01.pdf and b/macros/latex/contrib/l3kernel/l3news01.pdf differ diff --git a/macros/latex/contrib/l3kernel/l3news02.pdf b/macros/latex/contrib/l3kernel/l3news02.pdf index 21da08322a..4580c998e7 100644 Binary files a/macros/latex/contrib/l3kernel/l3news02.pdf and b/macros/latex/contrib/l3kernel/l3news02.pdf differ diff --git a/macros/latex/contrib/l3kernel/l3news03.pdf b/macros/latex/contrib/l3kernel/l3news03.pdf index 047e2cb06b..b839d9cce4 100644 Binary files a/macros/latex/contrib/l3kernel/l3news03.pdf and b/macros/latex/contrib/l3kernel/l3news03.pdf differ diff --git a/macros/latex/contrib/l3kernel/l3news04.pdf b/macros/latex/contrib/l3kernel/l3news04.pdf index 3827034689..c0c15503c2 100644 Binary files a/macros/latex/contrib/l3kernel/l3news04.pdf and b/macros/latex/contrib/l3kernel/l3news04.pdf differ diff --git a/macros/latex/contrib/l3kernel/l3news05.pdf b/macros/latex/contrib/l3kernel/l3news05.pdf index 76744232d5..82d7bb879a 100644 Binary files a/macros/latex/contrib/l3kernel/l3news05.pdf and b/macros/latex/contrib/l3kernel/l3news05.pdf differ diff --git a/macros/latex/contrib/l3kernel/l3news06.pdf b/macros/latex/contrib/l3kernel/l3news06.pdf index 7b22e68de8..e701e98aeb 100644 Binary files a/macros/latex/contrib/l3kernel/l3news06.pdf and b/macros/latex/contrib/l3kernel/l3news06.pdf differ diff --git a/macros/latex/contrib/l3kernel/l3news07.pdf b/macros/latex/contrib/l3kernel/l3news07.pdf index b8560d4ff9..399c31714d 100644 Binary files a/macros/latex/contrib/l3kernel/l3news07.pdf and b/macros/latex/contrib/l3kernel/l3news07.pdf differ diff --git a/macros/latex/contrib/l3kernel/l3news08.pdf b/macros/latex/contrib/l3kernel/l3news08.pdf index e287a71c6e..b031c0de15 100644 Binary files a/macros/latex/contrib/l3kernel/l3news08.pdf and b/macros/latex/contrib/l3kernel/l3news08.pdf differ diff --git a/macros/latex/contrib/l3kernel/l3news09.pdf b/macros/latex/contrib/l3kernel/l3news09.pdf index 35de7bf84e..a52cdd0900 100644 Binary files a/macros/latex/contrib/l3kernel/l3news09.pdf and b/macros/latex/contrib/l3kernel/l3news09.pdf differ diff --git a/macros/latex/contrib/l3kernel/l3news10.pdf b/macros/latex/contrib/l3kernel/l3news10.pdf index 1cfd090ab9..cd866e817e 100644 Binary files a/macros/latex/contrib/l3kernel/l3news10.pdf and b/macros/latex/contrib/l3kernel/l3news10.pdf differ diff --git a/macros/latex/contrib/l3kernel/l3news11.pdf b/macros/latex/contrib/l3kernel/l3news11.pdf index 42af25018d..63f715833f 100644 Binary files a/macros/latex/contrib/l3kernel/l3news11.pdf and b/macros/latex/contrib/l3kernel/l3news11.pdf differ diff --git a/macros/latex/contrib/l3kernel/l3news12.pdf b/macros/latex/contrib/l3kernel/l3news12.pdf index 992658599c..7e25add880 100644 Binary files a/macros/latex/contrib/l3kernel/l3news12.pdf and b/macros/latex/contrib/l3kernel/l3news12.pdf differ diff --git a/macros/latex/contrib/l3kernel/l3pdf.dtx b/macros/latex/contrib/l3kernel/l3pdf.dtx index 1ac0468ac6..ae07ef82a6 100644 --- a/macros/latex/contrib/l3kernel/l3pdf.dtx +++ b/macros/latex/contrib/l3kernel/l3pdf.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-11-09} +% \date{Released 2023-12-08} % % \maketitle % @@ -369,7 +369,7 @@ % % \subsection{Version} % -% \begin{macro}{\pdf_version_compare:Nn} +% \begin{macro}[pTF,EXP]{\pdf_version_compare:Nn} % \begin{macro} % { % @@_version_compare_=:w , @@ -522,33 +522,6 @@ } % \end{macrocode} % -% \subsection{Deprecated functions} -% -% \begin{variable}{\g_@@_object_prop} -% For tracking objects. -% \begin{macrocode} -\prop_new:N \g_@@_object_prop -% \end{macrocode} -% \end{variable} -% -% \begin{macro}{\pdf_object_new:nn, \pdf_object_write:nn, \pdf_object_write:nx} -% Wrap up the type data in a prop. -% \begin{macrocode} -\cs_new_protected:Npn \pdf_object_new:nn #1#2 - { - \prop_gput:Nnn \g_@@_object_prop {#1} {#2} - \@@_backend_object_new:n {#1} - } -\cs_new_protected:Npn \pdf_object_write:nn #1#2 - { - \exp_args:Nne \@@_backend_object_write:nnn - {#1} { \prop_item:Nn \g_@@_object_prop {#1} } {#2} - \bool_gset_true:N \g_@@_init_bool - } -\cs_generate_variant:Nn \pdf_object_write:nn { nx } -% \end{macrocode} -% \end{macro} -% % \begin{macrocode} % % \end{macrocode} diff --git a/macros/latex/contrib/l3kernel/l3prefixes.csv b/macros/latex/contrib/l3kernel/l3prefixes.csv index b6f56360ca..1baf489209 100644 --- a/macros/latex/contrib/l3kernel/l3prefixes.csv +++ b/macros/latex/contrib/l3kernel/l3prefixes.csv @@ -196,7 +196,7 @@ piton,piton,François Pantigny,,,,29/09/2022,29/09/2022, pkgploader,pkgploader,Michiel Helvensteijn,,,,2014-02-05,2014-02-05, platex,platex,Japanese TeX Development Community,https://github.com/texjporg/platex,https://github.com/texjporg/platex.git,https://github.com/texjporg/platex/issues,2020-09-30,2020-09-30, polyglossia,polyglossia,Arthur Reutenauer,https://www.polyglossia.org/,https://github.com/reutenauer/polyglossia,https://github.com/reutenauer/polyglossia/issues,2019-09-03,, -postnotes,postnotes,Gustavo Barros,https://github.com/gusbrs/postnotes,https://github.com/gusbrs/postnotes.git,https://github.com/gusbrs/postnotes/issues,2022-04-23,2022-04-23, +postnotes,postnotes,gusbrs,https://github.com/gusbrs/postnotes,https://github.com/gusbrs/postnotes.git,https://github.com/gusbrs/postnotes/issues,2022-04-23,2022-04-23, prelim,prelim2e,Marei Peischl,https://github.com/TeXhackse/prelim2e,https://github.com/TeXhackse/prelim2e.git,https://github.com/TeXhackse/prelim2e/issues,2020-11-24,2020-11-24, prg,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27, primargs,morewrites,Bruno Le Floch,https://github.com/blefloch/latex-morewrites,https://github.com/blefloch/latex-morewrites.git,https://github.com/blefloch/latex-morewrites/issues,2013-03-16,2015-09-22, @@ -271,6 +271,7 @@ use,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https:/ utex,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2015-07-28,2015-07-28, vbox,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27, vcoffin,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-28,2012-09-28, +wheelchart,wheelchart,Matthias Floré,,,,2023-12-07,2023-12-07, withargs,withargs,Michiel Helvensteijn,,,,2014-02-05,2014-02-05, witharrows,witharrows,François Pantigny,,,,2019-12-19,2019-12-19, xeCJK,xecjk,Qing Lee,https://github.com/CTeX-org/ctex-kit,https://github.com/CTeX-org/ctex-kit.git,https://github.com/CTeX-org/ctex-kit/issues,2013-05-26,2013-05-26, @@ -288,7 +289,7 @@ yoin,yoin,Tom Hejda,https://github.com/tohecz/yoin,https://github.com/tohecz/yoi zero,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12, zhlipsum,zhlipsum,Xiangdong Zeng,https://github.com/stone-zeng/zhlipsum,https://github.com/stone-zeng/zhlipsum.git,https://github.com/stone-zeng/zhlipsum/issues,2018-06-14,2018-06-14, zhnum,zhnumber,Qing Lee,https://github.com/CTeX-org/ctex-kit,https://github.com/CTeX-org/ctex-kit.git,https://github.com/CTeX-org/ctex-kit/issues,2013-03-16,2013-05-26, -zrefcheck,zref-check,Gustavo Barros,https://github.com/gusbrs/zref-check,https://github.com/gusbrs/zref-check,https://github.com/gusbrs/zref-check/issues,2021-08-05,2021-08-05, -zrefclever,zref-clever,Gustavo Barros,https://github.com/gusbrs/zref-clever,https://github.com/gusbrs/zref-clever,https://github.com/gusbrs/zref-clever/issues,2021-11-29,2021-11-29, -zrefvario,zref-vario,Gustavo Barros,https://github.com/gusbrs/zref-vario,https://github.com/gusbrs/zref-vario,https://github.com/gusbrs/zref-vario/issues,2022-02-02,2022-02-02, +zrefcheck,zref-check,gusbrs,https://github.com/gusbrs/zref-check,https://github.com/gusbrs/zref-check,https://github.com/gusbrs/zref-check/issues,2021-08-05,2021-08-05, +zrefclever,zref-clever,gusbrs,https://github.com/gusbrs/zref-clever,https://github.com/gusbrs/zref-clever,https://github.com/gusbrs/zref-clever/issues,2021-11-29,2021-11-29, +zrefvario,zref-vario,gusbrs,https://github.com/gusbrs/zref-vario,https://github.com/gusbrs/zref-vario,https://github.com/gusbrs/zref-vario/issues,2022-02-02,2022-02-02, zxjt,zxjatype,Takayuki Yato,,,,2013-03-16,2013-03-16, diff --git a/macros/latex/contrib/l3kernel/l3prefixes.pdf b/macros/latex/contrib/l3kernel/l3prefixes.pdf index 8e95710ed5..896c9f448e 100644 Binary files a/macros/latex/contrib/l3kernel/l3prefixes.pdf and b/macros/latex/contrib/l3kernel/l3prefixes.pdf differ diff --git a/macros/latex/contrib/l3kernel/l3prg.dtx b/macros/latex/contrib/l3kernel/l3prg.dtx index b5cd8bc3a4..201d7bde90 100644 --- a/macros/latex/contrib/l3kernel/l3prg.dtx +++ b/macros/latex/contrib/l3kernel/l3prg.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-11-09} +% \date{Released 2023-12-08} % % \maketitle % @@ -330,12 +330,13 @@ % based on this result. % \end{function} % -% \begin{function}[EXP, added = 2021-11-01]{\bool_to_str:N, \bool_to_str:c, \bool_to_str:n} +% \begin{function}[EXP, added = 2021-11-01, updated = 2023-11-14] +% {\bool_to_str:N, \bool_to_str:c, \bool_to_str:n} % \begin{syntax} % \cs{bool_to_str:N} \meta{boolean} % \cs{bool_to_str:n} \meta{boolean expression} % \end{syntax} -% Expands to the letters \texttt{true} or \texttt{false} depending on +% Expands to the string \texttt{true} or \texttt{false} depending on % the logical truth of the \meta{boolean} or \meta{boolean % expression}. % \end{function} @@ -1048,11 +1049,19 @@ % \end{macro} % % \begin{macro}[EXP]{\bool_to_str:N, \bool_to_str:c, \bool_to_str:n} -% Expands to \texttt{true} or \texttt{false} with category code letter. +% Expands to string literal \texttt{true} or \texttt{false}. % \begin{macrocode} -\cs_new:Npn \bool_to_str:N #1 { \bool_if:NTF #1 { true } { false } } +\cs_new:Npe \bool_to_str:N #1 + { + \exp_not:N \bool_if:NTF #1 + { \tl_to_str:n { true } } { \tl_to_str:n { false } } + } \cs_generate_variant:Nn \bool_to_str:N { c } -\cs_new:Npn \bool_to_str:n #1 { \bool_if:nTF {#1} { true } { false } } +\cs_new:Npe \bool_to_str:n #1 + { + \exp_not:N \bool_if:nTF {#1} + { \tl_to_str:n { true } } { \tl_to_str:n { false } } + } % \end{macrocode} % \end{macro} % diff --git a/macros/latex/contrib/l3kernel/l3prop.dtx b/macros/latex/contrib/l3kernel/l3prop.dtx index c6dc4afc99..bf1a1a0c33 100644 --- a/macros/latex/contrib/l3kernel/l3prop.dtx +++ b/macros/latex/contrib/l3kernel/l3prop.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-11-09} +% \date{Released 2023-12-08} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3quark.dtx b/macros/latex/contrib/l3kernel/l3quark.dtx index 252cf67aef..21d6dbc9d7 100644 --- a/macros/latex/contrib/l3kernel/l3quark.dtx +++ b/macros/latex/contrib/l3kernel/l3quark.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-11-09} +% \date{Released 2023-12-08} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3regex.dtx b/macros/latex/contrib/l3kernel/l3regex.dtx index aa6cf69c8a..f9e2663cc3 100644 --- a/macros/latex/contrib/l3kernel/l3regex.dtx +++ b/macros/latex/contrib/l3kernel/l3regex.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-11-09} +% \date{Released 2023-12-08} % % \maketitle % @@ -667,7 +667,7 @@ % \begin{function}[noTF, added = 2017-05-26] % { % \regex_extract_once:nnN, \regex_extract_once:nVN, -% \regex_extract_once:NVN, \regex_extract_once:NVN +% \regex_extract_once:NnN, \regex_extract_once:NVN % } % \begin{syntax} % \cs{regex_extract_once:nnN} \Arg{regex} \Arg{token list} \meta{seq~var} @@ -6683,7 +6683,7 @@ % \end{macrocode} % \end{macro} % -% \begin{macro}[noTF]{\regex_case_replace_all:nN} +% \begin{macro}[noTF]{\regex_replace_case_all:nN} % If the input is bad (odd number of items) then take the false % branch. Otherwise, use the same auxiliary as % \cs{regex_replace_all:nnN}, but with more complicated code to build diff --git a/macros/latex/contrib/l3kernel/l3seq.dtx b/macros/latex/contrib/l3kernel/l3seq.dtx index 64ab9771a9..5021a70077 100644 --- a/macros/latex/contrib/l3kernel/l3seq.dtx +++ b/macros/latex/contrib/l3kernel/l3seq.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-11-09} +% \date{Released 2023-12-08} % % \maketitle % @@ -1413,7 +1413,7 @@ % \seq_gput_left:Nn, \seq_gput_left:NV, \seq_gput_left:Nv, \seq_gput_left:Ne, % \seq_gput_left:No, \seq_gput_left:Nx, % \seq_gput_left:cn, \seq_gput_left:cV, \seq_gput_left:cv, \seq_gput_left:ce, -% \seq_gput_left:co, \seq_put_left:cx +% \seq_gput_left:co, \seq_gput_left:cx % } % \begin{macro}[EXP]{\@@_put_left_aux:w} % When adding to the left of a sequence, remove \cs{s_@@}. This is @@ -1525,7 +1525,7 @@ % { % \seq_remove_all:Nn, \seq_remove_all:NV, \seq_remove_all:Ne, % \seq_remove_all:Nx, -% \seq_remove_all:cn, \seq_remove_all:cV, \seq_remove_all:ce +% \seq_remove_all:cn, \seq_remove_all:cV, \seq_remove_all:ce, % \seq_remove_all:cx, % } % \UnitTested diff --git a/macros/latex/contrib/l3kernel/l3skip.dtx b/macros/latex/contrib/l3kernel/l3skip.dtx index eba5656f82..750c0995f3 100644 --- a/macros/latex/contrib/l3kernel/l3skip.dtx +++ b/macros/latex/contrib/l3kernel/l3skip.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2023-11-09} +% \date{Released 2023-12-08} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3sort.dtx b/macros/latex/contrib/l3kernel/l3sort.dtx index e296421b04..c152564304 100644 --- a/macros/latex/contrib/l3kernel/l3sort.dtx +++ b/macros/latex/contrib/l3kernel/l3sort.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-11-09} +% \date{Released 2023-12-08} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3str-convert.dtx b/macros/latex/contrib/l3kernel/l3str-convert.dtx index 51419bd87e..0da2e88de8 100644 --- a/macros/latex/contrib/l3kernel/l3str-convert.dtx +++ b/macros/latex/contrib/l3kernel/l3str-convert.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2023-11-09} +% \date{Released 2023-12-08} % % \maketitle % @@ -343,13 +343,13 @@ % \end{macrocode} % \end{variable} % -% \begin{variable}{str_byte, str_error} +% \begin{variable}{@@_byte, @@_error} % Conversions from one \meta{encoding}/\meta{escaping} pair to another % are done within \texttt{e}-expanding assignments. Errors are % signalled by raising the relevant flag. % \begin{macrocode} -\flag_new:n { str_byte } -\flag_new:n { str_error } +\flag_new:n { @@_byte } +\flag_new:n { @@_error } % \end{macrocode} % \end{variable} % @@ -714,6 +714,8 @@ { encode } { escape } \use_ii_i:nn \@@_convert_encode_: + \__kernel_tl_gset:Ne \g_@@_result_tl + { \tl_to_str:V \g_@@_result_tl } \group_end: #2 #3 \g_@@_result_tl } @@ -891,7 +893,7 @@ % \begin{macro}[rEXP]{\@@_filter_bytes_aux:N} % In the case of 8-bit engines, every character is a byte. For % Unicode-aware engines, test the character code; non-bytes cause us -% to raise the flag \texttt{str_byte}. Spaces have already been given +% to raise the flag \texttt{@@_byte}. Spaces have already been given % the correct category code when this function is called. % \begin{macrocode} \bool_lazy_any:nTF @@ -912,7 +914,7 @@ \if_int_compare:w `#1 < 256 \exp_stop_f: #1 \else: - \flag_raise:n { str_byte } + \flag_raise:n { @@_byte } \fi: \@@_filter_bytes_aux:N } @@ -935,10 +937,10 @@ { \cs_new_protected:Npn \@@_convert_unescape_: { - \flag_clear:n { str_byte } + \flag_clear:n { @@_byte } \__kernel_tl_gset:Ne \g_@@_result_tl { \exp_args:No \@@_filter_bytes:n \g_@@_result_tl } - \@@_if_flag_error:nne { str_byte } { non-byte } { bytes } + \@@_if_flag_error:nne { @@_byte } { non-byte } { bytes } } } { \cs_new_protected:Npn \@@_convert_unescape_: { } } @@ -995,15 +997,15 @@ { \cs_new_protected:Npn \@@_convert_encode_: { - \flag_clear:n { str_error } + \flag_clear:n { @@_error } \@@_convert_gmap_internal:N \@@_encode_native_char:n - \@@_if_flag_error:nne { str_error } + \@@_if_flag_error:nne { @@_error } { native-overflow } { } } \cs_new:Npn \@@_encode_native_char:n #1 { \if_int_compare:w #1 > \c_@@_max_byte_int - \flag_raise:n { str_error } + \flag_raise:n { @@_error } ? \else: \char_generate:nn {#1} {12} @@ -1184,9 +1186,9 @@ \exp_not:N \@@_decode_eight_bit_aux:Nn \exp_not:c { g_@@_decode_#1_intarray } } - \flag_clear:n { str_error } + \flag_clear:n { @@_error } \@@_convert_gmap:N \@@_tmp:w - \@@_if_flag_error:nne { str_error } { decode-8-bit } {#1} + \@@_if_flag_error:nne { @@_error } { decode-8-bit } {#1} } \cs_new:Npn \@@_decode_eight_bit_aux:Nn #1#2 { @@ -1198,7 +1200,7 @@ \cs_new:Npn \@@_decode_eight_bit_aux:n #1 { \if_int_compare:w #1 < \c_zero_int - \flag_raise:n { str_error } + \flag_raise:n { @@_error } \int_value:w \c_@@_replacement_char_int \else: #1 @@ -1228,9 +1230,9 @@ \exp_not:c { g_@@_encode_#1_intarray } \exp_not:c { g_@@_decode_#1_intarray } } - \flag_clear:n { str_error } + \flag_clear:n { @@_error } \@@_convert_gmap_internal:N \@@_tmp:w - \@@_if_flag_error:nne { str_error } { encode-8-bit } {#1} + \@@_if_flag_error:nne { @@_error } { encode-8-bit } {#1} } \cs_new:Npn \@@_encode_eight_bit_aux:NNn #1#2#3 { @@ -1246,7 +1248,7 @@ { \int_compare:nNnTF { \intarray_item:Nn #3 { 1 + #1 } } = {#2} { \@@_output_byte:n {#1} } - { \flag_raise:n { str_error } } + { \flag_raise:n { @@_error } } } % \end{macrocode} % \end{macro} @@ -1266,7 +1268,7 @@ { Since~native~strings~do~not~consist~in~bytes,~ none~of~the~escaping~methods~make~sense.~ - The~specified~escaping,~'#1',~will be ignored. + The~specified~escaping,~'#1',~will~be~ignored. } \msg_new:nnn { str } { file-not-found } { File~'l3str-#1.def'~not~found. } @@ -1347,7 +1349,7 @@ \cs_new_protected:Npn \@@_convert_unescape_hex: { \group_begin: - \flag_clear:n { str_error } + \flag_clear:n { @@_error } \int_set:Nn \tex_escapechar:D { 92 } \__kernel_tl_gset:Ne \g_@@_result_tl { @@ -1358,7 +1360,7 @@ \prg_break_point: \@@_output_end: } - \@@_if_flag_error:nne { str_error } { unescape-hex } { } + \@@_if_flag_error:nne { @@_error } { unescape-hex } { } \group_end: } \cs_new:Npn \@@_unescape_hex_auxi:N #1 @@ -1367,7 +1369,7 @@ \@@_hexadecimal_use:NTF #1 { \@@_unescape_hex_auxii:N } { - \flag_raise:n { str_error } + \flag_raise:n { @@_error } \@@_unescape_hex_auxi:N } } @@ -1380,7 +1382,7 @@ \@@_output_byte:w " \@@_unescape_hex_auxi:N } { - \flag_raise:n { str_error } + \flag_raise:n { @@_error } \@@_unescape_hex_auxii:N } } @@ -1425,8 +1427,8 @@ \cs_new_protected:cpn { @@_convert_unescape_#2: } { \group_begin: - \flag_clear:n { str_byte } - \flag_clear:n { str_error } + \flag_clear:n { @@_byte } + \flag_clear:n { @@_error } \int_set:Nn \tex_escapechar:D { 92 } \__kernel_tl_gset:Ne \g_@@_result_tl { @@ -1434,8 +1436,8 @@ #1 ? { ? \prg_break: } \prg_break_point: } - \@@_if_flag_error:nne { str_byte } { non-byte } { #2 } - \@@_if_flag_error:nne { str_error } { unescape-#2 } { } + \@@_if_flag_error:nne { @@_byte } { non-byte } { #2 } + \@@_if_flag_error:nne { @@_error } { unescape-#2 } { } \group_end: } \cs_new:Npn #3 ##1#1##2##3 @@ -1448,12 +1450,12 @@ \@@_hexadecimal_use:NTF ##3 { } { - \flag_raise:n { str_error } + \flag_raise:n { @@_error } * 0 + `#1 \use_i:nn } } { - \flag_raise:n { str_error } + \flag_raise:n { @@_error } 0 + `#1 \use_i:nn } \@@_output_end: @@ -1511,8 +1513,8 @@ \cs_new_protected:Npn \@@_convert_unescape_string: { \group_begin: - \flag_clear:n { str_byte } - \flag_clear:n { str_error } + \flag_clear:n { @@_byte } + \flag_clear:n { @@_error } \int_set:Nn \tex_escapechar:D { 92 } \__kernel_tl_gset:Ne \g_@@_result_tl { @@ -1526,8 +1528,8 @@ \g_@@_result_tl #1 ?? { ? \prg_break: } \prg_break_point: } - \@@_if_flag_error:nne { str_byte } { non-byte } { string } - \@@_if_flag_error:nne { str_error } { unescape-string } { } + \@@_if_flag_error:nne { @@_byte } { non-byte } { string } + \@@_if_flag_error:nne { @@_error } { unescape-string } { } \group_end: } } @@ -1567,7 +1569,7 @@ { ^^J } { 0 - 1 } } { - \flag_raise:n { str_error } + \flag_raise:n { @@_error } 0 - 1 \use_i:nn } } @@ -1844,19 +1846,19 @@ % first remind the user what a correct \textsc{utf-8} string should % look like, then add error-specific information. % \begin{macrocode} -\flag_clear_new:n { str_missing } -\flag_clear_new:n { str_extra } -\flag_clear_new:n { str_overlong } -\flag_clear_new:n { str_overflow } +\flag_clear_new:n { @@_missing } +\flag_clear_new:n { @@_extra } +\flag_clear_new:n { @@_overlong } +\flag_clear_new:n { @@_overflow } \msg_new:nnnn { str } { utf8-decode } { Invalid~UTF-8~string: \exp_last_unbraced:Nf \use_none:n { - \@@_if_flag_times:nT { str_missing } { ,~missing~continuation~byte } - \@@_if_flag_times:nT { str_extra } { ,~extra~continuation~byte } - \@@_if_flag_times:nT { str_overlong } { ,~overlong~form } - \@@_if_flag_times:nT { str_overflow } { ,~code~point~too~large } + \@@_if_flag_times:nT { @@_missing } { ,~missing~continuation~byte } + \@@_if_flag_times:nT { @@_extra } { ,~extra~continuation~byte } + \@@_if_flag_times:nT { @@_overlong } { ,~overlong~form } + \@@_if_flag_times:nT { @@_overflow } { ,~code~point~too~large } } . } @@ -1871,25 +1873,25 @@ Code~point~ <~1114112:~11110xxx~10xxxxxx~10xxxxxx~10xxxxxx \\ } Bytes~of~the~form~10xxxxxx~are~called~continuation~bytes. - \flag_if_raised:nT { str_missing } + \flag_if_raised:nT { @@_missing } { \\\\ A~leading~byte~(in~the~range~[192,255])~was~not~followed~by~ the~appropriate~number~of~continuation~bytes. } - \flag_if_raised:nT { str_extra } + \flag_if_raised:nT { @@_extra } { \\\\ LaTeX~came~across~a~continuation~byte~when~it~was~not~expected. } - \flag_if_raised:nT { str_overlong } + \flag_if_raised:nT { @@_overlong } { \\\\ Every~Unicode~code~point~must~be~expressed~in~the~shortest~ possible~form.~For~instance,~'0xC0'~'0x83'~is~not~a~valid~ representation~for~the~code~point~3. } - \flag_if_raised:nT { str_overflow } + \flag_if_raised:nT { @@_overflow } { \\\\ Unicode~limits~code~points~to~the~range~[0,1114111]. @@ -1968,18 +1970,18 @@ % \begin{macrocode} \cs_new_protected:cpn { @@_convert_decode_utf8: } { - \flag_clear:n { str_error } - \flag_clear:n { str_missing } - \flag_clear:n { str_extra } - \flag_clear:n { str_overlong } - \flag_clear:n { str_overflow } + \flag_clear:n { @@_error } + \flag_clear:n { @@_missing } + \flag_clear:n { @@_extra } + \flag_clear:n { @@_overlong } + \flag_clear:n { @@_overflow } \__kernel_tl_gset:Ne \g_@@_result_tl { \exp_after:wN \@@_decode_utf_viii_start:N \g_@@_result_tl { \prg_break: \@@_decode_utf_viii_end: } \prg_break_point: } - \@@_if_flag_error:nne { str_error } { utf8-decode } { } + \@@_if_flag_error:nne { @@_error } { utf8-decode } { } } \cs_new:Npn \@@_decode_utf_viii_start:N #1 { @@ -1989,8 +1991,8 @@ \if_int_compare:w `#1 < "80 \exp_stop_f: \int_value:w `#1 \else: - \flag_raise:n { str_extra } - \flag_raise:n { str_error } + \flag_raise:n { @@_extra } + \flag_raise:n { @@_error } \int_use:N \c_@@_replacement_char_int \fi: \else: @@ -2013,8 +2015,8 @@ \int_value:w \int_eval:n { #1 * "40 + `#3 - "80 } \exp_after:wN \else: \s_@@ - \flag_raise:n { str_missing } - \flag_raise:n { str_error } + \flag_raise:n { @@_missing } + \flag_raise:n { @@_error } \int_use:N \c_@@_replacement_char_int \fi: \s_@@ @@ -2027,8 +2029,8 @@ \if_int_compare:w #1 < #4 \exp_stop_f: \s_@@ \if_int_compare:w #1 < #3 \exp_stop_f: - \flag_raise:n { str_overlong } - \flag_raise:n { str_error } + \flag_raise:n { @@_overlong } + \flag_raise:n { @@_error } \int_use:N \c_@@_replacement_char_int \else: #1 @@ -2047,15 +2049,15 @@ \cs_new:Npn \@@_decode_utf_viii_overflow:w #1 \fi: #2 \fi: { \fi: \fi: - \flag_raise:n { str_overflow } - \flag_raise:n { str_error } + \flag_raise:n { @@_overflow } + \flag_raise:n { @@_error } \int_use:N \c_@@_replacement_char_int } \cs_new:Npn \@@_decode_utf_viii_end: { \s_@@ - \flag_raise:n { str_missing } - \flag_raise:n { str_error } + \flag_raise:n { @@_missing } + \flag_raise:n { @@_error } \int_use:N \c_@@_replacement_char_int \s_@@ \prg_break: } @@ -2117,10 +2119,10 @@ { \@@_encode_utf_xvi_aux:N \@@_output_byte_pair_le:n } \cs_new_protected:Npn \@@_encode_utf_xvi_aux:N #1 { - \flag_clear:n { str_error } + \flag_clear:n { @@_error } \cs_set_eq:NN \@@_tmp:w #1 \@@_convert_gmap_internal:N \@@_encode_utf_xvi_char:n - \@@_if_flag_error:nne { str_error } { utf16-encode } { } + \@@_if_flag_error:nne { @@_error } { utf16-encode } { } } \cs_new:Npn \@@_encode_utf_xvi_char:n #1 { @@ -2129,7 +2131,7 @@ \else: \if_int_compare:w #1 < "10000 \exp_stop_f: \if_int_compare:w #1 < "E000 \exp_stop_f: - \flag_raise:n { str_error } + \flag_raise:n { @@_error } \@@_tmp:w { \c_@@_replacement_char_int } \else: \@@_tmp:w {#1} @@ -2160,9 +2162,9 @@ % an unexpected trail surrogate, and a string containing an odd number % of bytes. % \begin{macrocode} - \flag_clear_new:n { str_missing } - \flag_clear_new:n { str_extra } - \flag_clear_new:n { str_end } + \flag_clear_new:n { @@_missing } + \flag_clear_new:n { @@_extra } + \flag_clear_new:n { @@_end } \msg_new:nnnn { str } { utf16-encode } { Unicode~string~cannot~be~expressed~in~UTF-16:~surrogate. } { @@ -2175,9 +2177,9 @@ Invalid~UTF-16~string: \exp_last_unbraced:Nf \use_none:n { - \@@_if_flag_times:nT { str_missing } { ,~missing~trail~surrogate } - \@@_if_flag_times:nT { str_extra } { ,~extra~trail~surrogate } - \@@_if_flag_times:nT { str_end } { ,~odd~number~of~bytes } + \@@_if_flag_times:nT { @@_missing } { ,~missing~trail~surrogate } + \@@_if_flag_times:nT { @@_extra } { ,~extra~trail~surrogate } + \@@_if_flag_times:nT { @@_end } { ,~odd~number~of~bytes } } . } @@ -2194,17 +2196,17 @@ } Lead~surrogates~are~pairs~of~bytes~in~the~range~[0xD800,~0xDBFF],~ and~trail~surrogates~are~in~the~range~[0xDC00,~0xDFFF]. - \flag_if_raised:nT { str_missing } + \flag_if_raised:nT { @@_missing } { \\\\ A~lead~surrogate~was~not~followed~by~a~trail~surrogate. } - \flag_if_raised:nT { str_extra } + \flag_if_raised:nT { @@_extra } { \\\\ LaTeX~came~across~a~trail~surrogate~when~it~was~not~expected. } - \flag_if_raised:nT { str_end } + \flag_if_raised:nT { @@_end } { \\\\ The~string~contained~an~odd~number~of~bytes.~This~is~invalid:~ @@ -2258,10 +2260,10 @@ } \cs_new_protected:Npn \@@_decode_utf_xvi:Nw #1#2 \s_@@_stop { - \flag_clear:n { str_error } - \flag_clear:n { str_missing } - \flag_clear:n { str_extra } - \flag_clear:n { str_end } + \flag_clear:n { @@_error } + \flag_clear:n { @@_missing } + \flag_clear:n { @@_extra } + \flag_clear:n { @@_end } \cs_set:Npn \@@_tmp:w ##1 ##2 { ` ## #1 } \__kernel_tl_gset:Ne \g_@@_result_tl { @@ -2269,7 +2271,7 @@ #2 \q_@@_nil \q_@@_nil \prg_break_point: } - \@@_if_flag_error:nne { str_error } { utf16-decode } { } + \@@_if_flag_error:nne { @@_error } { utf16-decode } { } } % \end{macrocode} % \end{macro} @@ -2375,7 +2377,7 @@ { \@@_decode_utf_xvi_error:nNN { extra } #1#2 } \cs_new:Npn \@@_decode_utf_xvi_error:nNN #1#2#3 { - \flag_raise:n { str_error } + \flag_raise:n { @@_error } \flag_raise:n { str_#1 } #2 #3 \s_@@ \int_use:N \c_@@_replacement_char_int \s_@@ @@ -2454,36 +2456,36 @@ % \end{macro} % \end{macro} % -% \begin{variable}{str_overflow, str_end} +% \begin{variable}{@@_overflow, @@_end} % There can be no error when encoding in \textsc{utf-32}. When % decoding, the string may not have length $4n$, or it may contain % code points larger than \hexnum{10FFFF}. The latter case often % happens if the encoding was in fact not \textsc{utf-32}, because % most arbitrary strings are not valid in \textsc{utf-32}. % \begin{macrocode} - \flag_clear_new:n { str_overflow } - \flag_clear_new:n { str_end } + \flag_clear_new:n { @@_overflow } + \flag_clear_new:n { @@_end } \msg_new:nnnn { str } { utf32-decode } { Invalid~UTF-32~string: \exp_last_unbraced:Nf \use_none:n { - \@@_if_flag_times:nT { str_overflow } { ,~code~point~too~large } - \@@_if_flag_times:nT { str_end } { ,~truncated~string } + \@@_if_flag_times:nT { @@_overflow } { ,~code~point~too~large } + \@@_if_flag_times:nT { @@_end } { ,~truncated~string } } . } { In~the~UTF-32~encoding,~every~Unicode~character~ (in~the~range~[U+0000,~U+10FFFF])~is~encoded~as~4~bytes. - \flag_if_raised:nT { str_overflow } + \flag_if_raised:nT { @@_overflow } { \\\\ LaTeX~came~across~a~code~point~larger~than~1114111,~ the~maximum~code~point~defined~by~Unicode.~ Perhaps~the~string~was~not~encoded~in~the~UTF-32~encoding? } - \flag_if_raised:nT { str_end } + \flag_if_raised:nT { @@_end } { \\\\ The~length~of~the~string~is~not~a~multiple~of~4.~ @@ -2547,9 +2549,9 @@ } \cs_new_protected:Npn \@@_decode_utf_xxxii:Nw #1#2 \s_@@_stop { - \flag_clear:n { str_overflow } - \flag_clear:n { str_end } - \flag_clear:n { str_error } + \flag_clear:n { @@_overflow } + \flag_clear:n { @@_end } + \flag_clear:n { @@_error } \cs_set:Npn \@@_tmp:w ##1 ##2 { ` ## #1 } \__kernel_tl_gset:Ne \g_@@_result_tl { @@ -2557,7 +2559,7 @@ #2 \s_@@_stop \s_@@_stop \s_@@_stop \s_@@_stop \prg_break_point: } - \@@_if_flag_error:nne { str_error } { utf32-decode } { } + \@@_if_flag_error:nne { @@_error } { utf32-decode } { } } \cs_new:Npn \@@_decode_utf_xxxii_loop:NNNN #1#2#3#4 { @@ -2566,13 +2568,13 @@ \fi: #1#2#3#4 \s_@@ \if_int_compare:w \@@_tmp:w #1#4 > \c_zero_int - \flag_raise:n { str_overflow } - \flag_raise:n { str_error } + \flag_raise:n { @@_overflow } + \flag_raise:n { @@_error } \int_use:N \c_@@_replacement_char_int \else: \if_int_compare:w \@@_tmp:w #2#3 > 16 \exp_stop_f: - \flag_raise:n { str_overflow } - \flag_raise:n { str_error } + \flag_raise:n { @@_overflow } + \flag_raise:n { @@_error } \int_use:N \c_@@_replacement_char_int \else: \int_eval:n @@ -2586,8 +2588,8 @@ { \tl_if_empty:nF {#1} { - \flag_raise:n { str_end } - \flag_raise:n { str_error } + \flag_raise:n { @@_end } + \flag_raise:n { @@_error } #1 \s_@@ \int_use:N \c_@@_replacement_char_int \s_@@ } diff --git a/macros/latex/contrib/l3kernel/l3str.dtx b/macros/latex/contrib/l3kernel/l3str.dtx index 4ebc1af703..fc8594bf0b 100644 --- a/macros/latex/contrib/l3kernel/l3str.dtx +++ b/macros/latex/contrib/l3kernel/l3str.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-11-09} +% \date{Released 2023-12-08} % % \maketitle % @@ -127,7 +127,11 @@ % Clears the content of the \meta{str~var}. % \end{function} % -% \begin{function}[added = 2015-09-18]{\str_clear_new:N, \str_clear_new:c} +% \begin{function}[added = 2015-09-18] +% { +% \str_clear_new:N, \str_clear_new:c, +% \str_gclear_new:N, \str_gclear_new:c +% } % \begin{syntax} % \cs{str_clear_new:N} \meta{str~var} % \end{syntax} @@ -839,6 +843,10 @@ % code $12$. % \end{variable} % +% \begin{variable}[added = 2023-12-07]{\c_empty_str} +% Constant that is always empty. +% \end{variable} +% % \section{Scratch strings} % % \begin{variable}{\l_tmpa_str, \l_tmpb_str} @@ -855,16 +863,6 @@ % code and so should only be used for short-term storage. % \end{variable} % -% \section{Deprecated functions} -% -% \begin{function}[EXP, added = 2019-11-26] -% {\str_foldcase:n, \str_foldcase:V} -% \begin{syntax} -% \cs{str_foldcase:n} \Arg{tokens} -% \end{syntax} -% A previous name for the functionally-identical \cs{str_casefold:n}. -% \end{function} -% % \end{documentation} % % \begin{implementation} @@ -989,33 +987,53 @@ % \str_gput_right:Nn, \str_gput_right:NV, \str_gput_right:Ne, \str_gput_right:Nx, % \str_gput_right:cn, \str_gput_right:cV, \str_gput_right:ce, \str_gput_right:cx % } -% Simply convert the token list inputs to \meta{strings}. +% Similar to corresponding \pkg{l3tl} base functions, except that +% \cs{__kernel_exp_not:w} is replaced with \cs{__kernel_tl_to_str:w}. +% Just like token list, string constants use \cs{cs_gset_nopar:Npe} +% instead of \cs{__kernel_tl_gset:Ne} so that the scope checking for +% |c| is applied when \pkg{l3debug} is used. +% To maintain backward compatibility, in +% \cs[index=str_put_left:Nn]{str_(g)put_left:Nn} and +% \cs[index=str_put_right:Nn]{str_(g)put_right:Nn}, +% contents of string variables are wrapped in \cs{__kernel_exp_not:w} +% to prevent further expansion. % \begin{macrocode} -\group_begin: - \cs_set_protected:Npn \@@_tmp:n #1 - { - \tl_if_blank:nF {#1} - { - \cs_new_protected:cpe { str_ #1 :Nn } ##1##2 - { - \exp_not:c { tl_ #1 :Ne } ##1 - { \exp_not:N \tl_to_str:n {##2} } - } - \cs_generate_variant:cn { str_ #1 :Nn } - { NV , Ne , Nx , cn , cV , ce , cx } - \@@_tmp:n - } - } - \@@_tmp:n - { set } - { gset } - { const } - { put_left } - { gput_left } - { put_right } - { gput_right } - { } -\group_end: +\cs_new_protected:Npn \str_set:Nn #1#2 + { \__kernel_tl_set:Ne #1 { \__kernel_tl_to_str:w {#2} } } +\cs_gset_protected:Npn \str_gset:Nn #1#2 + { \__kernel_tl_gset:Ne #1 { \__kernel_tl_to_str:w {#2} } } +\cs_new_protected:Npn \str_const:Nn #1#2 + { + \__kernel_chk_if_free_cs:N #1 + \cs_gset_nopar:Npe #1 { \__kernel_tl_to_str:w {#2} } + } +\cs_new_protected:Npn \str_put_left:Nn #1#2 + { + \__kernel_tl_set:Ne #1 + { \__kernel_tl_to_str:w {#2} \__kernel_exp_not:w \exp_after:wN {#1} } + } +\cs_new_protected:Npn \str_gput_left:Nn #1#2 + { + \__kernel_tl_gset:Ne #1 + { \__kernel_tl_to_str:w {#2} \__kernel_exp_not:w \exp_after:wN {#1} } + } +\cs_new_protected:Npn \str_put_right:Nn #1#2 + { + \__kernel_tl_set:Ne #1 + { \__kernel_exp_not:w \exp_after:wN {#1} \__kernel_tl_to_str:w {#2} } + } +\cs_new_protected:Npn \str_gput_right:Nn #1#2 + { + \__kernel_tl_gset:Ne #1 + { \__kernel_exp_not:w \exp_after:wN {#1} \__kernel_tl_to_str:w {#2} } + } +\cs_generate_variant:Nn \str_set:Nn { NV , Ne , Nx , c , cV , ce , cx } +\cs_generate_variant:Nn \str_gset:Nn { NV , Ne , Nx , c , cV , ce , cx } +\cs_generate_variant:Nn \str_const:Nn { NV , Ne , Nx , c , cV , ce , cx } +\cs_generate_variant:Nn \str_put_left:Nn { NV , Ne , Nx , c , cV , ce , cx } +\cs_generate_variant:Nn \str_gput_left:Nn { NV , Ne , Nx , c , cV , ce , cx } +\cs_generate_variant:Nn \str_put_right:Nn { NV , Ne , Nx , c , cV , ce , cx } +\cs_generate_variant:Nn \str_gput_right:Nn { NV , Ne , Nx , c , cV , ce , cx } % \end{macrocode} % \end{macro} % @@ -2158,6 +2176,13 @@ % \end{macrocode} % \end{variable} % +% \begin{variable}{\c_empty_str} +% An empty string is simply an empty token list. +% \begin{macrocode} +\cs_new_eq:NN \c_empty_str \c_empty_tl +% \end{macrocode} +% \end{variable} +% % \begin{variable}{\l_tmpa_str, \l_tmpb_str, \g_tmpa_str, \g_tmpb_str} % Scratch strings. % \begin{macrocode} diff --git a/macros/latex/contrib/l3kernel/l3styleguide.pdf b/macros/latex/contrib/l3kernel/l3styleguide.pdf index a2ea8f0347..4d360a1d9c 100644 Binary files a/macros/latex/contrib/l3kernel/l3styleguide.pdf and b/macros/latex/contrib/l3kernel/l3styleguide.pdf differ diff --git a/macros/latex/contrib/l3kernel/l3styleguide.tex b/macros/latex/contrib/l3kernel/l3styleguide.tex index cf9ac905a5..9f8d8733c8 100644 --- a/macros/latex/contrib/l3kernel/l3styleguide.tex +++ b/macros/latex/contrib/l3kernel/l3styleguide.tex @@ -32,7 +32,7 @@ The released version of this bundle is available from CTAN. {latex-team@latex-project.org}% }% } -\date{Released 2023-11-09} +\date{Released 2023-12-08} \begin{document} diff --git a/macros/latex/contrib/l3kernel/l3syntax-changes.pdf b/macros/latex/contrib/l3kernel/l3syntax-changes.pdf index 878424e3c5..9997a20d32 100644 Binary files a/macros/latex/contrib/l3kernel/l3syntax-changes.pdf and b/macros/latex/contrib/l3kernel/l3syntax-changes.pdf differ diff --git a/macros/latex/contrib/l3kernel/l3syntax-changes.tex b/macros/latex/contrib/l3kernel/l3syntax-changes.tex index 06ffe161f3..db3fab7f7b 100644 --- a/macros/latex/contrib/l3kernel/l3syntax-changes.tex +++ b/macros/latex/contrib/l3kernel/l3syntax-changes.tex @@ -32,7 +32,7 @@ The released version of this bundle is available from CTAN. {latex-team@latex-project.org}% }% } -\date{Released 2023-11-09} +\date{Released 2023-12-08} \newcommand{\TF}{\textit{(TF)}} diff --git a/macros/latex/contrib/l3kernel/l3sys.dtx b/macros/latex/contrib/l3kernel/l3sys.dtx index fc041a25d8..a268294772 100644 --- a/macros/latex/contrib/l3kernel/l3sys.dtx +++ b/macros/latex/contrib/l3kernel/l3sys.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-11-09} +% \date{Released 2023-12-08} % % \maketitle % @@ -260,6 +260,11 @@ % \meta{shell command}. The \cs{sys_get_shell:nnNTF} conditional % inserts the \meta{true code} if the shell is available and no quote is % detected, and the \meta{false code} otherwise. +% +% \emph{Note}: It is not possible to tell from \TeX{} if a command is allowed +% in restricted shell escape. If restricted escape is enabled, the +% \texttt{true} branch is taken: if the command is forbidden at this stage, a +% low-level \TeX{} error will arise. % \end{function} % % \begin{variable}[added = 2017-05-27]{\c_sys_shell_escape_int} @@ -861,11 +866,11 @@ end % % \subsection{Dynamic (every job) code} % -% \begin{macro}{\sys_everyjob:} +% \begin{macro}{\__kernel_sys_everyjob:} % \begin{macro}{\@@_everyjob:n} % \begin{variable}{\g_@@_everyjob_tl} % \begin{macrocode} -\cs_new_protected:Npn \sys_everyjob: +\cs_new_protected:Npn \__kernel_sys_everyjob: { \tl_use:N \g_@@_everyjob_tl \tl_gclear:N \g_@@_everyjob_tl @@ -1088,7 +1093,7 @@ end % \begin{macrocode} \cs_new_protected:Npn \sys_finalise: { - \sys_everyjob: + \__kernel_sys_everyjob: \tl_use:N \g_@@_finalise_tl \tl_gclear:N \g_@@_finalise_tl } diff --git a/macros/latex/contrib/l3kernel/l3term-glossary.pdf b/macros/latex/contrib/l3kernel/l3term-glossary.pdf index cf6e798b2e..3e672dc8d9 100644 Binary files a/macros/latex/contrib/l3kernel/l3term-glossary.pdf and b/macros/latex/contrib/l3kernel/l3term-glossary.pdf differ diff --git a/macros/latex/contrib/l3kernel/l3term-glossary.tex b/macros/latex/contrib/l3kernel/l3term-glossary.tex index 810de29978..e3277b964e 100644 --- a/macros/latex/contrib/l3kernel/l3term-glossary.tex +++ b/macros/latex/contrib/l3kernel/l3term-glossary.tex @@ -32,7 +32,7 @@ The released version of this bundle is available from CTAN. {latex-team@latex-project.org}% }% } -\date{Released 2023-11-09} +\date{Released 2023-12-08} \newcommand{\TF}{\textit{(TF)}} diff --git a/macros/latex/contrib/l3kernel/l3text-case.dtx b/macros/latex/contrib/l3kernel/l3text-case.dtx index 9f4c672993..5651243cd9 100644 --- a/macros/latex/contrib/l3kernel/l3text-case.dtx +++ b/macros/latex/contrib/l3kernel/l3text-case.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-11-09} +% \date{Released 2023-12-08} % % \maketitle % @@ -1634,7 +1634,7 @@ % \begin{macro}[EXP]{\@@_change_case_boundary_upper_el:nnnN} % \begin{macro}[EXP]{\@@_change_case_boundary_upper_el:nnnn} % \begin{macro}[EXP]{\@@_change_case_boundary_upper_el:nnnnw} -% There is one things that need special treatment at start start of +% There is one things that need special treatment at the start of % words in Greek. For an isolated accent \emph{eta}, % which is handled by seeing if we have exactly one of the affected % codepoints followed by a space or brace group. diff --git a/macros/latex/contrib/l3kernel/l3text-map.dtx b/macros/latex/contrib/l3kernel/l3text-map.dtx index ea2559748e..f728915387 100644 --- a/macros/latex/contrib/l3kernel/l3text-map.dtx +++ b/macros/latex/contrib/l3kernel/l3text-map.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-11-09} +% \date{Released 2023-12-08} % % \maketitle % @@ -368,7 +368,7 @@ % \end{macrocode} % Hangul needs additional treatment. First we have to deal with % the start-of-Hangul position: output what we had up to now, then -% move the the specialist handler. The idea here is to pick off the +% move the specialist handler. The idea here is to pick off the % different codepoint types one at a time, tracking what else can be % considered at each stage until we hit the end of the viable types. % Other than that, we just keep building up the Hangul codepoints diff --git a/macros/latex/contrib/l3kernel/l3text-purify.dtx b/macros/latex/contrib/l3kernel/l3text-purify.dtx index 5d7bb6ef51..8c955419ce 100644 --- a/macros/latex/contrib/l3kernel/l3text-purify.dtx +++ b/macros/latex/contrib/l3kernel/l3text-purify.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-11-09} +% \date{Released 2023-12-08} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3text.dtx b/macros/latex/contrib/l3kernel/l3text.dtx index abf85a7ac2..85eedfab13 100644 --- a/macros/latex/contrib/l3kernel/l3text.dtx +++ b/macros/latex/contrib/l3kernel/l3text.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-11-09} +% \date{Released 2023-12-08} % % \maketitle % @@ -794,7 +794,7 @@ % % \subsection{Configuration variables} % -% \begin{variable}{\l_text_accents_tl, \l_text_letterlike_tl} +% \begin{variable}[deprecated]{\l_text_accents_tl, \l_text_letterlike_tl} % Used to be used for excluding these ideas from expansion: now deprecated. % \begin{macrocode} \tl_new:N \l_text_accents_tl diff --git a/macros/latex/contrib/l3kernel/l3tl-analysis.dtx b/macros/latex/contrib/l3kernel/l3tl-analysis.dtx index ca3b2a1ff1..746b68c2f0 100644 --- a/macros/latex/contrib/l3kernel/l3tl-analysis.dtx +++ b/macros/latex/contrib/l3kernel/l3tl-analysis.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2023-11-09} +% \date{Released 2023-12-08} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3tl-build.dtx b/macros/latex/contrib/l3kernel/l3tl-build.dtx index 65b9566d6a..43b08d902d 100644 --- a/macros/latex/contrib/l3kernel/l3tl-build.dtx +++ b/macros/latex/contrib/l3kernel/l3tl-build.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-11-09} +% \date{Released 2023-12-08} % % \maketitle % diff --git a/macros/latex/contrib/l3kernel/l3tl.dtx b/macros/latex/contrib/l3kernel/l3tl.dtx index cf506b9fec..0f38c95aa7 100644 --- a/macros/latex/contrib/l3kernel/l3tl.dtx +++ b/macros/latex/contrib/l3kernel/l3tl.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-11-09} +% \date{Released 2023-12-08} % % \maketitle % @@ -295,7 +295,11 @@ % or \cs{str_if_eq:nnTF} if category codes are not important. % \end{function} % -% \begin{function}[TF]{\tl_if_in:Nn, \tl_if_in:NV, \tl_if_in:cn, \tl_if_in:cV} +% \begin{function}[TF] +% { +% \tl_if_in:Nn, \tl_if_in:NV, \tl_if_in:No, +% \tl_if_in:cn, \tl_if_in:cV, \tl_if_in:co +% } % \begin{syntax} % \cs{tl_if_in:NnTF} \meta{tl~var} \Arg{token list} \Arg{true code} \Arg{false code} % \end{syntax} @@ -307,7 +311,10 @@ % \end{function} % % \begin{function}[TF] -% {\tl_if_in:nn, \tl_if_in:Vn, \tl_if_in:nV, \tl_if_in:on, \tl_if_in:no} +% { +% \tl_if_in:nn, \tl_if_in:Vn, \tl_if_in:VV, \tl_if_in:on, \tl_if_in:oo, +% \tl_if_in:nV, \tl_if_in:no +% } % \begin{syntax} % \cs{tl_if_in:nnTF} \Arg{token list_1} \Arg{token list_2} \Arg{true code} \Arg{false code} % \end{syntax} @@ -367,7 +374,10 @@ % \subsection{Testing the first token} % % \begin{function}[updated = 2012-07-09, EXP, pTF] -% {\tl_if_head_eq_catcode:nN, \tl_if_head_eq_catcode:oN} +% { +% \tl_if_head_eq_catcode:nN, \tl_if_head_eq_catcode:VN, +% \tl_if_head_eq_catcode:eN, \tl_if_head_eq_catcode:oN +% } % \begin{syntax} % \cs{tl_if_head_eq_catcode_p:nN} \Arg{token list} \meta{test token} % \cs{tl_if_head_eq_catcode:nNTF} \Arg{token list} \meta{test token} @@ -379,7 +389,10 @@ % \end{function} % % \begin{function}[updated = 2012-07-09, EXP, pTF] -% {\tl_if_head_eq_charcode:nN, \tl_if_head_eq_charcode:fN} +% { +% \tl_if_head_eq_charcode:nN, \tl_if_head_eq_charcode:VN, +% \tl_if_head_eq_charcode:eN, \tl_if_head_eq_charcode:fN +% } % \begin{syntax} % \cs{tl_if_head_eq_charcode_p:nN} \Arg{token list} \meta{test token} % \cs{tl_if_head_eq_charcode:nNTF} \Arg{token list} \meta{test token} @@ -390,7 +403,11 @@ % \meta{token list} is empty, the test is always \texttt{false}. % \end{function} % -% \begin{function}[updated = 2012-07-09, EXP, pTF]{\tl_if_head_eq_meaning:nN} +% \begin{function}[updated = 2012-07-09, EXP, pTF] +% { +% \tl_if_head_eq_meaning:nN, \tl_if_head_eq_meaning:VN, +% \tl_if_head_eq_meaning:eN +% } % \begin{syntax} % \cs{tl_if_head_eq_meaning_p:nN} \Arg{token list} \meta{test token} % \cs{tl_if_head_eq_meaning:nNTF} \Arg{token list} \meta{test token} @@ -516,7 +533,7 @@ % \subsection{Counting and reversing token lists} % % \begin{function}[added = 2012-05-13, EXP] -% {\tl_count:n, \tl_count:V, \tl_count:o} +% {\tl_count:n, \tl_count:V, \tl_count:v, \tl_count:e, \tl_count:o} % \begin{syntax} % \cs{tl_count:n} \Arg{tokens} % \end{syntax} @@ -1352,8 +1369,11 @@ % \tl_const:cn, \tl_const:ce, \tl_const:cx % } % Constants are also easy to generate. They use \cs{cs_gset_nopar:Npe} instead -% of \cs{__kernel_tl_gset:Ne} so that the correct scope checking is applied if -% \pkg{l3debug} is used. +% of \cs{__kernel_tl_gset:Ne} so that the correct scope checking for |c|, +% instead of for |g|, is applied when +% \cs{debug_on:n} |{ check-declarations }| is used. +% Constant assignment functions are patched specially in \pkg{l3debug} to +% apply such checks. % \begin{macrocode} \cs_new_protected:Npn \tl_const:Nn #1#2 { @@ -2429,12 +2449,16 @@ \fi: } \prg_generate_conditional_variant:Nnn \tl_if_eq:nn - { nV , ne , nx , e , ee , x , xx } + { nV , ne , nx , V, e , ee , x , xx } { TF , T , F } % \end{macrocode} % \end{macro} % -% \begin{macro}[TF]{\tl_if_in:Nn, \tl_if_in:NV, \tl_if_in:cn, \tl_if_in:cV} +% \begin{macro}[TF] +% { +% \tl_if_in:Nn, \tl_if_in:NV, \tl_if_in:No, +% \tl_if_in:cn, \tl_if_in:cV, \tl_if_in:co +% } % See \cs{tl_if_in:nnTF} for further comments. Here we simply % expand the token list variable and pass it to \cs{tl_if_in:nnTF}. % \begin{macrocode} @@ -2442,11 +2466,15 @@ \cs_new_protected:Npn \tl_if_in:NnF { \exp_args:No \tl_if_in:nnF } \cs_new_protected:Npn \tl_if_in:NnTF { \exp_args:No \tl_if_in:nnTF } \prg_generate_conditional_variant:Nnn \tl_if_in:Nn - { NV , c , cV } { T , F , TF } + { NV , No , c , cV , co } { T , F , TF } % \end{macrocode} % \end{macro} % -% \begin{macro}[TF]{\tl_if_in:nn, \tl_if_in:Vn, \tl_if_in:on, \tl_if_in:nV, \tl_if_in:no} +% \begin{macro}[TF] +% { +% \tl_if_in:nn, \tl_if_in:Vn, \tl_if_in:VV, \tl_if_in:on, \tl_if_in:oo, +% \tl_if_in:nV, \tl_if_in:no +% } % Once more, the test relies on the emptiness test for robustness. % The function \cs{@@_tmp:w} removes tokens until the first occurrence % of |#2|. If this does not appear in |#1|, then the final |#2| is removed, @@ -2476,7 +2504,7 @@ \if_false: } \fi: } \prg_generate_conditional_variant:Nnn \tl_if_in:nn - { V , o , nV , no } { T , F , TF } + { V , VV , o , oo , nV , no } { T , F , TF } % \end{macrocode} % \end{macro} % @@ -2756,7 +2784,7 @@ % % \subsection{Working with the contents of token lists} % -% \begin{macro}{\tl_count:n, \tl_count:V, \tl_count:o} +% \begin{macro}{\tl_count:n, \tl_count:V, \tl_count:v, \tl_count:e, \tl_count:o} % \begin{macro}{\tl_count:N, \tl_count:c} % \begin{macro}{\@@_count:n} % Count number of elements within a token list or token list @@ -2776,7 +2804,7 @@ { 0 \tl_map_function:NN #1 \@@_count:n } } \cs_new:Npn \@@_count:n #1 { + 1 } -\cs_generate_variant:Nn \tl_count:n { V , o } +\cs_generate_variant:Nn \tl_count:n { V , v , e , o } \cs_generate_variant:Nn \tl_count:N { c } % \end{macrocode} % \end{macro} @@ -3014,11 +3042,21 @@ % \end{macro} % \end{macro} % -% \begin{macro}[pTF]{\tl_if_head_eq_meaning:nN} -% \begin{macro}[pTF]{\tl_if_head_eq_charcode:nN} -% \begin{macro}[pTF]{\tl_if_head_eq_charcode:fN} -% \begin{macro}[pTF]{\tl_if_head_eq_catcode:nN} -% \begin{macro}[pTF]{\tl_if_head_eq_catcode:oN} +% \begin{macro}[pTF] +% { +% \tl_if_head_eq_meaning:nN, \tl_if_head_eq_meaning:VN, +% \tl_if_head_eq_meaning:eN +% } +% \begin{macro}[pTF] +% { +% \tl_if_head_eq_charcode:nN, \tl_if_head_eq_charcode:VN, +% \tl_if_head_eq_charcode:eN, \tl_if_head_eq_charcode:fN +% } +% \begin{macro}[pTF] +% { +% \tl_if_head_eq_catcode:nN, \tl_if_head_eq_catcode:VN, +% \tl_if_head_eq_catcode:eN, \tl_if_head_eq_catcode:oN +% } % \begin{macro}[EXP]{\@@_head_exp_not:w} % \begin{macro}[EXP]{\@@_if_head_eq_empty_arg:w} % Accessing the first token of a token list is tricky in three cases: @@ -3057,7 +3095,7 @@ \fi: } \prg_generate_conditional_variant:Nnn \tl_if_head_eq_charcode:nN - { f } { p , TF , T , F } + { V , e , f } { p , TF , T , F } % \end{macrocode} % For \cs{tl_if_head_eq_catcode:nN}, again we detect special cases % with a \cs{tl_if_head_is_N_type:n}. Then we need to test if the @@ -3084,7 +3122,7 @@ \fi: } \prg_generate_conditional_variant:Nnn \tl_if_head_eq_catcode:nN - { o } { p , TF , T , F } + { V , e , o } { p , TF , T , F } % \end{macrocode} % For \cs{tl_if_head_eq_meaning:nN}, again, detect special cases. In % the normal case, use \cs{tl_head:w}, with no \cs{exp_not:N} this @@ -3105,6 +3143,8 @@ \@@_if_head_eq_meaning_special:nN {#1} #2 } +\prg_generate_conditional_variant:Nnn \tl_if_head_eq_meaning:nN + { V , e } { p , TF , T , F } \cs_new:Npn \@@_if_head_eq_meaning_normal:nN #1 #2 { \exp_after:wN \if_meaning:w @@ -3158,8 +3198,6 @@ % \end{macro} % \end{macro} % \end{macro} -% \end{macro} -% \end{macro} % % \begin{macro}[pTF]{\tl_if_head_is_N_type:n} % \begin{macro}[EXP] diff --git a/macros/latex/contrib/l3kernel/l3token.dtx b/macros/latex/contrib/l3kernel/l3token.dtx index 4e7e1c4745..bf882c57e4 100644 --- a/macros/latex/contrib/l3kernel/l3token.dtx +++ b/macros/latex/contrib/l3kernel/l3token.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-11-09} +% \date{Released 2023-12-08} % % \maketitle % @@ -1132,9 +1132,9 @@ % \item Some frozen tokens can only be accessed in interactive % sessions: |\cr|, |\right|, |\endgroup|, |\fi|, |\inaccessible|. % \item In \LuaTeX{}, there is also the strange case of \enquote{bytes} -% |^^^^^^1100|$x$$y$ where $x,y$ are any two lowercase hexadecimal +% |^^^^^^1100|$xy$ where $x,y$ are any two lowercase hexadecimal % digits, so that the hexadecimal number ranges from -% $"\text{110000}=1114112$ to~$"\text{1100ff}=1114367$. These are +% |"|$11\,0000=1\,114\,112$ to~|"|$110\,0\mathrm{ff}=1\,114\,367$. These are % used to output individual bytes to files, rather than UTF-8. For % the purposes of token comparisons they behave like non-expandable % primitive control sequences (\emph{not characters}) whose @@ -1219,28 +1219,6 @@ % characters at the start of the argument are \emph{not} ignored in this % case (and they prevent brace-stripping). % -% \section{Deprecated functions} -% -% \begin{function}[added = 2020-01-09, EXP] -% { -% \char_lowercase:N, \char_uppercase:N, -% \char_titlecase:N, \char_foldcase:N, -% \char_str_lowercase:N, \char_str_uppercase:N, -% \char_str_titlecase:N, \char_str_foldcase:N -% } -% \begin{syntax} -% \cs{char_lowercase:N} \meta{char} -% \end{syntax} -% Converts the \meta{char} to the equivalent case-changed character -% as detailed by the function name (see \cs{str_foldcase:n} -% and \cs{text_titlecase_all:n} for details of these terms). The case mapping -% is carried out with no context-dependence (\emph{cf.}~\cs{text_uppercase:n}, -% \emph{etc.}) The \texttt{str} versions always generate \enquote{other} -% (category code $12$) characters, whilst the standard versions generate -% characters with the category code of the \meta{char} (i.e.~only -% the character code changes). -% \end{function} -% % \end{documentation} % % \begin{implementation} @@ -1688,160 +1666,6 @@ % \end{macro} % \end{macro} % -% \begin{macro}[EXP] -% { -% \char_lowercase:N, \char_uppercase:N, -% \char_titlecase:N, \char_foldcase:N -% } -% \begin{macro}[EXP]{\@@_change_case:nN} -% \begin{macro}[EXP]{\@@_change_case:nnnN} -% \begin{macro}[EXP]{\@@_change_case_auxi:nN, \@@_change_case_auxii:nN} -% \begin{macro}[EXP]{\@@_change_case_catcode:N} -% \begin{macro}[EXP] -% { -% \char_str_lowercase:N, \char_str_uppercase:N, -% \char_str_titlecase:N, \char_str_foldcase:N -% } -% \begin{macro}[EXP]{\@@_str_change_case:nN, \@@_str_change_case_aux:nN} -% \begin{macro}[EXP]{\@@_str_change_case:nnnN} -% \begin{macro}[EXP]{\@@_str_change_case:n} -% To ensure that the category codes produced are predictable, every character -% is re-generated even if it is otherwise unchanged. -% \begin{macrocode} -\cs_new:Npn \char_lowercase:N - { \@@_change_case:nN { lowercase } } -\cs_new:Npn \char_uppercase:N - { \@@_change_case:nN { uppercase } } -\cs_new:Npn \char_titlecase:N - { \@@_change_case:nN { titlecase } } -\cs_new:Npn \char_foldcase:N - { \@@_change_case:nN { casefold } } -\cs_new:Npn \@@_change_case:nN #1#2 - { - \int_compare:nNnTF {`#2} = { `\ } - { ~ } - { - \exp_args:Ne \@@_change_case_auxi:nN - { \__kernel_codepoint_case:nn {#1} {`#2} } #2 - } - } -\cs_new:Npn \@@_change_case_auxi:nN #1#2 - { \use:e { \@@_change_case:nnnN #1 #2 } } -\cs_new:Npn \@@_change_case:nnnN #1#2#3#4 - { - \int_compare:nNnTF {#1} = {`#4} - { \exp_not:n {#4} } - { - \@@_change_case_auxii:nN {#1} {#4} - \tl_if_blank:nF {#2} - { - \@@_change_case_auxii:nN {#2} {#4} - \tl_if_blank:nF {#3} - { \@@_change_case_auxii:nN {#3} {#4} } - } - } - } -\cs_new:Npn \@@_change_case_auxii:nN #1#2 - { - \char_generate:nn {#1} - { \@@_change_case_catcode:N #2 } - } -\bool_lazy_or:nnF - { \sys_if_engine_luatex_p: } - { \sys_if_engine_xetex_p: } - { - \cs_gset:Npn \@@_change_case_auxii:nN #1#2 - { - \int_compare:nNnTF {#1} < { "80 } - { - \char_generate:nn {#1} - { \@@_change_case_catcode:N #2 } - } - { \exp_not:n {#2} } - } - } -\cs_new:Npn \@@_change_case_catcode:N #1 - { - \if_catcode:w \exp_not:N #1 \c_math_toggle_token - 3 - \else: - \if_catcode:w \exp_not:N #1 \c_alignment_token - 4 - \else: - \if_catcode:w \exp_not:N #1 \c_math_superscript_token - 7 - \else: - \if_catcode:w \exp_not:N #1 \c_math_subscript_token - 8 - \else: - \if_catcode:w \exp_not:N #1 \c_space_token - 10 - \else: - \if_catcode:w \exp_not:N #1 \c_catcode_letter_token - 11 - \else: - \if_catcode:w \exp_not:N #1 \c_catcode_other_token - 12 - \else: - 13 - \fi: - \fi: - \fi: - \fi: - \fi: - \fi: - \fi: - } -% \end{macrocode} -% Same story for the string version, except category code is easier -% to follow. This of course makes this version faster. -% \begin{macrocode} -\cs_new:Npn \char_str_lowercase:N - { \@@_str_change_case:nN { lowercase } } -\cs_new:Npn \char_str_uppercase:N - { \@@_str_change_case:nN { uppercase } } -\cs_new:Npn \char_str_titlecase:N - { \@@_str_change_case:nN { titlecase } } -\cs_new:Npn \char_str_foldcase:N - { \@@_str_change_case:nN { casefold } } -\cs_new:Npn \@@_str_change_case:nN #1#2 - { - \int_compare:nNnTF {`#2} = { `\ } - { ~ } - { - \exp_args:Ne \@@_str_change_case_aux:nN - { \__kernel_codepoint_case:nn {#1} {`#2} } #2 - } - } -\cs_new:Npn \@@_str_change_case_aux:nN #1#2 - { \use:e { \@@_str_change_case:nnnN #1 #2 } } -\cs_new:Npn \@@_str_change_case:nnnN #1#2#3#4 - { - \int_compare:nNnTF {#1} = {`#4} - { \tl_to_str:n {#4} } - { - \@@_str_change_case:n {#1} - \tl_if_blank:nF {#2} - { - \@@_str_change_case:n {#2} - \tl_if_blank:nF {#3} - { \@@_str_change_case:n {#3} } - } - } - } -\cs_new:Npn \@@_str_change_case:n #1 - { \char_generate:nn {#1} { 12 } } -% \end{macrocode} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% % \begin{variable}{\c_catcode_active_space_tl} % While \cs{char_generate:nn} can produce active characters in some % engines it cannot in general. It would be possible to simply change diff --git a/macros/latex/contrib/l3kernel/l3unicode.dtx b/macros/latex/contrib/l3kernel/l3unicode.dtx index 1cbc34267d..adab2aa934 100644 --- a/macros/latex/contrib/l3kernel/l3unicode.dtx +++ b/macros/latex/contrib/l3kernel/l3unicode.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-11-09} +% \date{Released 2023-12-08} % % \maketitle % @@ -857,7 +857,7 @@ \fi: } % \end{macrocode} -% Here, |#4| can have have a trailing space, so we tidy up a bit at the cost of +% Here, |#4| can have a trailing space, so we tidy up a bit at the cost of % speed for these small number of cases it applies to. % \begin{macrocode} \cs_set_protected:Npn \@@_data_auxii:w #1 ~ #2 ~ #3 ~ #4 \q_stop @@ -922,7 +922,7 @@ % \begin{macro}[EXP]{\@@_case:nnn} % \begin{macro}[EXP] % {\@@_uppercase:n, \@@_lowercase:n, \@@_titlecase:n, \@@_casefold:n} -% \begin{macro}[EXP]{\@_case:nn} +% \begin{macro}[EXP]{\@@_case:nn} % With the core data files loaded, there is now a need to provide access to % this information for other modules. That is done here such that case % folding can also be covered. At this level, all that needs to be returned diff --git a/macros/latex/contrib/l3kernel/source3.pdf b/macros/latex/contrib/l3kernel/source3.pdf index 735e30fedd..f46549de13 100644 Binary files a/macros/latex/contrib/l3kernel/source3.pdf and b/macros/latex/contrib/l3kernel/source3.pdf differ diff --git a/macros/latex/contrib/l3kernel/source3.tex b/macros/latex/contrib/l3kernel/source3.tex index 40881aaf9c..0df48640b4 100644 --- a/macros/latex/contrib/l3kernel/source3.tex +++ b/macros/latex/contrib/l3kernel/source3.tex @@ -57,7 +57,7 @@ for those people who are interested. {latex-team@latex-project.org}% }% } -\date{Released 2023-11-09} +\date{Released 2023-12-08} \pagenumbering{roman} \maketitle diff --git a/macros/latex/contrib/l3kernel/source3body.tex b/macros/latex/contrib/l3kernel/source3body.tex index b469621d95..8066b02fda 100644 --- a/macros/latex/contrib/l3kernel/source3body.tex +++ b/macros/latex/contrib/l3kernel/source3body.tex @@ -272,15 +272,7 @@ following argument specifiers: dependent and their name can change without warning, thus their use is \emph{strongly discouraged} in package code: programmers should instead use the interfaces documented in - \href{interface3.pdf}{interface3.pdf}%^^A - \footnote{If a primitive offers a functionality not yet in the - kernel, programmers and users are encouraged to write to the - \texttt{LaTeX-L} mailing list - (\url{mailto:LATEX-L@listserv.uni-heidelberg.de}) describing - their use-case and intended behaviour, so that a possible - interface can be discussed. Temporarily, while an interface is - not provided, programmers may use the procedure described in the - \href{l3styleguide.pdf}{l3styleguide.pdf}.}. + \href{interface3.pdf}{interface3.pdf}. \end{description} Notice that the argument specifier describes how the argument is processed prior to being passed to the underlying function. For example, @@ -306,7 +298,9 @@ function, typically starting with the module\footnote{The module names are \texttt{\string\l_int_tmpa_int} would be very unreadable.} name and then a descriptive part. Variables end with a short identifier to show the variable type: -\begin{description} +\begin{description}% + \item[\texttt{bitset}] a set of bits (a string made up of a series of \texttt{0} + and \texttt{1} tokens that are accessed by position). \item[\texttt{clist}] Comma separated list. \item[\texttt{dim}] \enquote{Rigid} lengths. \item[\texttt{fp}] Floating-point values; @@ -590,6 +584,7 @@ used on top of \LaTeXe{} if \tn{outer} tokens are used in the arguments. \ExplSyntaxOff \DocInput{l3fparray.dtx} +\DocInput{l3bitset.dtx} \DocInput{l3cctab.dtx} \part{Text manipulation} diff --git a/macros/latex/contrib/onedown/Examples/Bidding.tex b/macros/latex/contrib/onedown/Examples/Bidding.tex new file mode 100644 index 0000000000..18ca0f7c3c --- /dev/null +++ b/macros/latex/contrib/onedown/Examples/Bidding.tex @@ -0,0 +1,244 @@ +\documentclass[onedown-examples]{subfiles} + +\begin{document} +% +The first diagram reflects the default: the first column is for \west, +full names are shown, the alignment is \textbf{c} and the long form is +used: The lowercase |p| yields \Xfer{p} and an uppercase |P| yields +\Xfer{P}. |X| yields \Xfer{X} and |R| yields \Xfer{R}. One can use +'mixed-mode' for the entries in the table: both the abreviation |C| or the +command |\Cl| for clubs are possible. \OneDown takes care of the spacing +between the rank and the nomination, so you do not have to fiddle around +with |\thinspace|, |\,| or the like. + +In the second diagram we use the short form of the non-bid calls, by +calling |\setdefaults{bidlong=off}|. +The alignment is \textbf{t} and we have put \north in the first column. +Please observe that the change to |bidfirst=N| is made local by the +surrounding |{...}| + +In the third diagram we also use the short form for the table header by +calling the bidding table with the token |!|. The alignment is \textbf{b}. + +In the first example we also added an |\alert| and an |\announce|, just to +show their layout. +\vfill +% +\begin{HBox}{{bidding, alignment and long/short forms}\hfill File: \FileName} +%\gamefont{\smaller\smaller} +A +\begin{bidding}% default= [c] +1\Cl\announce & 1D & 1H & 1S\alert \\ +1N & X & p & p \\ +R & P \\ +\end{bidding} +B +\\[2\baselineskip] +A +{ +\setdefaults{bidlong=off,bidfirst=N} +\begin{bidding}[t] +1C & 1D & 1H & 1S \\ +1N & X & p & p \\ +R & P \\ +\end{bidding} +}B +\\[2\baselineskip] +A +%\setdefaults{bidlong=off} +\begin{bidding}![b] +1C & 1D & 1H & 1S \\ +1N & X & p & p \\ +R & p & p & p \\ +\end{bidding} +B +\end{HBox} +\vfill +\needspace{8\baselineskip} +We now show bidding diagrams with the real names of the players. In every +of the four diagrams we have a different first column. Please observe that +the association of the individuals with the \north, \east etc.\ +direction is preserved. +\vfill +\begin{HBox}{{bidding, names and first column}\hfill File: \FileName} +\namesNS{Jan}{Joris} +\namesEW{Piet}{Corneel} +\setdefaults{bidfirst=N} +\begin{bidding} +1S & p & 3C & p\\ +3D & p & 3H & p\\ +3S & p & p & p\\ +\end{bidding} +\par\hrulefill\par +\setdefaults{bidfirst=E} +\begin{bidding} +1S & p & 3C & p\\ +3D & p & 3H & p\\ +3S & p & p & p\\ +\end{bidding} +\par\hrulefill\par +\setdefaults{bidfirst=S} +\begin{bidding} +1S & p & 3C & p\\ +3D & p & 3H & p\\ +3S & p & p & p\\ +\end{bidding} +\par\hrulefill\par +\setdefaults{bidfirst=W} +\begin{bidding} +1S & p & 3C & p\\ +3D & p & 3H & p\\ +3S & p & p & p\\ +\end{bidding} +\end{HBox} +\vfill +\needspace{8\baselineskip} +Here we show the bidding diagram for only 2 bidders, with 4 different first +columns. Observe that also here the real names stay in connection with +their directions. +\vfill +\begin{HBox}{{biddingpairs, names and first column}\hfill File: \FileName} +\namesNS{Jan}{Piet} +\namesEW{Joris}{Corneel} +\setdefaults{bidfirst=N} +\begin{biddingpair} +1S & 3C \\ +3D & 3H \\ +3S & p \\ +\end{biddingpair} +\par\hrulefill\par +\setdefaults{bidfirst=E} +\begin{biddingpair} +1S & 3C \\ +3D & 3H \\ +3S & p \\ +\end{biddingpair} +\par\hrulefill\par +\setdefaults{bidfirst=S} +\begin{biddingpair} +1S & 3C \\ +3D & 3H \\ +3S & p \\ +\end{biddingpair} +\par\hrulefill\par +\setdefaults{bidfirst=W} +\begin{biddingpair} +1S & 3C \\ +3D & 3H \\ +3S & p \\ +\end{biddingpair} +\end{HBox} +% +\vfill +\needspace{8\baselineskip} +The next example shows how one can put a marker to a call with |\markit| +and refer to it with by calling |\explainit|. +These explanations must appear in the +optional argument of the bidding table. You yourself are responsible that +the order in which they appear corresponds with the order of the markers. +The explanations are typeset like a footnote mechanism below the table and +they will never extend beyond the right edge of the table, as you can see +in the 2nd diagram. The width in a biddingpair table is even more limited, +that's the reason why we use raggedright to obtain a result that is +typographically acceptable. The last diagram shows that we can get an +annotation without the need for |\markit| or |\explainit|. + +\vfill +\begin{HBox}{bidding with (very long) annotation\hfill File: \FileName} +\begin{bidding}(% + \explainit{Bergen} + \explainit{How strong?} + \explainit{Minimum hand}) +1\Sp & p & 3C\markit & p\\ +3D\markit & p & 3H\markit & p\\ +3S & p & p & p\\ +\end{bidding} +\par\vspace{2\baselineskip}\noindent +\begin{bidding}(% + \explainit{Here we have a very very + long annotation that does + not fit on one line}) +1\Sp & p & 3C\markit & p\\ +\end{bidding} +\par\vspace{2\baselineskip}\noindent +\begin{biddingpair}(% + \explainit{Here we have a very very + long annotation that does + not fit on one line}) +1S & 3C\markit \\ +\end{biddingpair} +\qquad +\begin{biddingpair}(% + no explain/markit here but still an annotation) +1S & 3C \\ +\end{biddingpair} + +\end{HBox} +\vfill +\needspace{8\baselineskip} +In this examples we'll change some fonts to see what it accomplishes.\\ +By default the bidderfont is |\mdseries\sffamily| and the namefont is +|\mdseries\slshape|, as you can clearly see in the header of the bidding +diagram. +\begin{itemize}[itemsep=0em] +\item |\gamefont{...\Large}| enlarges everything, also where other fonts are +active, e.g.\ in the header. (1st diagram) +\item |\scalefont| scales all fonts, not only the |\gamefont| +controlled stuff. (2nd diagram) +\item If you change only the \emph{size} of e.g.\ the |\namefont|, +without giving a font description, you 'lose the font' and the current font +will be used instead of |namefont|. In diagrams most of the time this will +be the |gamefont|. (3rd diagram) +\end{itemize} +We also used |\setdefaults{bidline=1}| to separate the header of the +bidding table from the bidding sequence with a |\hline|. +% +\vfill +\begin{HBox}{Same but with changed font\hfill File: \FileName} +\gamefont{\sffamily\bfseries\Large} +\setdefaults{bidline=1} +\begin{bidding}[c](\explainit{Bergen}) +1S & p & 3C\markit & p\\ +3D & p & 3H & p\\ +3S & p & p & p\\ +\end{bidding} + +\gamefont{\sffamily\bfseries\normalsize} +\gamefont{\sffamily\scalefont{2}} +\begin{biddingpair}[c]% + (\explainit{Bergen}) +1S & 3C\markit \\ +3D & 3H \\ +3S & p \\ +\end{biddingpair} + +\gamefont{\sffamily\bfseries\normalsize} +\namefont{\smaller} +\begin{bidding}(\explainit{Bergen}) +1S & p & 3C\markit & p\\ +3D & p & 3H & p\\ +3S & p & p & p\\ +\end{bidding} +\setdefaults{bidline=off} +\end{HBox} +\vfill +Normally one uses shorthands in bidding tables. We already showed that one +can use macros calls like |\Cl|. If a macro uses tokens, or if a shorthand +appears as argument of another macro, one has to be careful. Note that the +first entry (|\frame{2H}|) of row 2 does not produce the correct result, +but |{\frame{2\He}}| does: We have to enclose these specials in braces +(|{...}|) and not use the shorthand notation. +\vfill +\begin{HBox}{Special effects\hfill File: \FileName} +\namesNS{}{}\namesEW{}{} +\begin{bidding} +p & X & R & P \\ +{\frame{2H}} & {\frame{2\He}} & +{\textit{R}} & {\textit{\redouble}} \\ +{\Pass*!} & {\Redouble*!} & \Allpass\\ +\end{bidding} +\end{HBox} +\vfill +\end{document} +\endinput + diff --git a/macros/latex/contrib/onedown/Examples/CardSymbols.tex b/macros/latex/contrib/onedown/Examples/CardSymbols.tex new file mode 100644 index 0000000000..5ecca8a55d --- /dev/null +++ b/macros/latex/contrib/onedown/Examples/CardSymbols.tex @@ -0,0 +1,44 @@ +\documentclass[onedown-examples]{subfiles} + +\begin{document} +\noindent +\begin{tcolorbox}[colback=red!5!white,colframe=red!75!black, + title={Use card symbols like {\setdefaults{colors=b+w}♣,♢,♡,♠} directly as input}] +%\begin{HBox}{Use card symbols like {\setdefaults{colors=b+w}♣,♢,♡,♠} directly as input} +If you want to use the card symbols {\setdefaults{colors=b+w}♣,♢,♡,♠} within your \LaTeX-document, +then put these lines in your preamble. That's all. +\\[0.3em] +\verb|\DeclareUnicodeCharacter{2660}{\Sp}| +\verb|\DeclareUnicodeCharacter{2661}{\He}| \\ +\verb|\DeclareUnicodeCharacter{2662}{\Di}| +\verb|\DeclareUnicodeCharacter{2663}{\Cl}| \\ +\verb|\DeclareUnicodeCharacter{2664}{\Sp}| +\verb|\DeclareUnicodeCharacter{2665}{\He}| \\ +\verb|\DeclareUnicodeCharacter{2666}{\Di}| +\verb|\DeclareUnicodeCharacter{2667}{\Cl}| \\[0.3em] + +%\vspace{0.3em} +%\\[0.3em] +If you put them in a file \textbf{\emph{onedown.symbols}}, somewhere where +\LaTeX{} can find it, then the \OneDown package will take care of loading it. An +apropriate place would be in your .texmf directory. +\end{tcolorbox} +%\end{HBox} +\begin{tcolorbox}[colback=red!5!white,colframe=red!75!black, + title={To enter these card symbols on your keyboard, use this with Linux}] +Add following lines to your \emph{.Xmodmap} and run \textbf{xmodmap .Xmodmap} +\\[0.3em] +{\ttfamily +keycode 38 = 0x0061 0x0041 0x0061 0x0041 0x1002663 0x1002667 0x00e6 \\ +keycode 39 = 0x0073 0x0053 0x0073 0x0053 0x1002662 0x1002666 0x100017f \\ +keycode 40 = 0x0064 0x0044 0x0064 0x0044 0x1002661 0x1002665 0x00f0 \\ +keycode 41 = 0x0066 0x0046 0x0066 0x0046 0x1002660 0x1002664 0x01f0 \\ +keycode 65 = space nobreakspace space nobreakspace nobreakspace NoSymbol \\ +} +\tcblower +Now you can enter {\setdefaults{colors=b+w}♣,♢,♡,♠} with \emph{Shift+AltGr} a,s,d,f +\end{tcolorbox} + + +\end{document} +\endinput diff --git a/macros/latex/contrib/onedown/Examples/Compass.tex b/macros/latex/contrib/onedown/Examples/Compass.tex new file mode 100644 index 0000000000..cbb19739b5 --- /dev/null +++ b/macros/latex/contrib/onedown/Examples/Compass.tex @@ -0,0 +1,151 @@ +\documentclass[onedown-examples]{subfiles} +%\usepackage{forloop} + +\gamefont{\larger\larger} +\makeatletter + \def\CP{\ODw@Compass} +\makeatother + +\begin{document} +\noindent +Here we show the 16 possible combinations of dealership and vulnerability. +We use the default |colors=2| (|black & red|) and so the vulners appear in +red. The command |\CP| is to be defined in every V- or HBox. +\par\vspace{1em}\noindent +% + +\begin{VBox}{The 16 combinations of dealer/vulner\hfill File: \FileName} +\newcounter{Nr} +\newcounter{Tmp} +\makeatletter + \def\CP{\ODw@Compass} +\makeatother +\centering +\setdefaults{compsize=1.3,compmid=\boardtext} +\begin{tabular}{ll|ll} +\forloop{Nr}{1}{\value{Nr} < 9}{% + \boardnr{\theNr} \theNr: \dealertext\vulnertext & \CP &% + \setcounter{Tmp}{8 + \theNr}% + \boardnr{\theTmp} \theTmp: \dealertext\vulnertext & \CP \\ +} +\end{tabular} +\end{VBox} +\vfill +\needspace{15\baselineskip} +\vfill +With |\setdefaults| we can influence the look of the compass in detail. The +keys that control this are |compline| to set the thickness of the frame, +|compshow| to hide/show the compass, |compsize| to multiply the compass +size with a factor and |compturn| with which the letter 'E' and 'W' can be +rotated over 90°. With the key |compass| one can set the font that is used +for the letters in the compass. + +First we enlarge the compass 1.5$\times$. Note that this does influence +neither the fontsize nor the frame thickness. Then we enlarge the fonsize. +As you see, this does influence the size of the compass too. Finally +we set the size factor back to 1. Notice the difference with the first +compass. +\vfill +\begin{HBox}{controlling the compass I\hfill File: \FileName} +\makeatletter + \def\CP{\ODw@Compass} +\makeatother +\CP +\setdefaults{compsize=1.5}\CP +\setdefaults*{compass=\Large}\CP +\setdefaults{compsize=1}\CP +\end{HBox} +\vfill +As you see, we can make the frame very thick, very thin or let it +disappear completely when we use factor 0. +\vfill +\begin{HBox}{controlling the compass II\hfill File: \FileName} +\makeatletter + \def\CP{\ODw@Compass} +\makeatother +\setdefaults{compsize=1.5}\CP +\setdefaults{compline=3}\CP +\setdefaults{compline=0.1}\CP +\setdefaults{compline=0}\CP +\end{HBox} +\vfill +If you watch the first compass carefully, you'll notice (maybe you must +enlarge it to see what is meant) that the small |x| is exactly in the +middle of the compass. Nevertheless the impressesion is that the |x| is +closer to the '|W|'. This is because a '|W|' is wider than an '|E|'. +It simply looks unbalanced. We can diminish this by enlarging the compass. +Another trick is to rotate the |W| and |E| 90°, as shown in the third +compass. In the second line we see a diagram with compass, but its +frame is supressed. Finally we see a diagram where the total compass is +suppressed. For clarity's sake we have added the \east and \west hand. +\vfill +\begin{HBox}{controlling the compass III\hfill File: \FileName} +\makeatletter + \def\CP{\ODw@Compass} +\makeatother +\boardnr{0} +\setdefaults{compsize=1,compmid=x}\CP +\setdefaults{compsize=1.5}\CP +\setdefaults{compsize=1,compturn=on}\CP +\setdefaults{compturn=off,compline=0} +\gamefont{\footnotesize} +\easthand{JT6}{764}{K43}{JT32} +\westhand{Q952}{K92}{762}{AQ7} +\showEW\hfill +\setdefaults{compshow=off} +\showEW +\end{HBox} +\vfill +On the next page we show the compass for all available sizes. In order to +get all diagrams in one color box, we combined the smallest with the +largest etc. The first line gets out of the frame, but you'll get the idea +all the same. Using |\scalefont| you can get even bigger diagrams. +\vfill +\begin{HBox}{onesuitAll for all sizes\hfill File: \FileName} +\setdefaults{compshow=on} +\gamefont{\sffamily\bfseries\tiny} +\setdefaults{compmid=~t} +\onesuitAll!{JT62}{AK53}{87}{Q94} +\gamefont{\sffamily\bfseries\HUGE} +\setdefaults{compmid=U} +\onesuitAll!{JT62}{AK53}{87}{Q94} +% +\gamefont{\sffamily\bfseries\ssmall} +\setdefaults{compmid=~s} +\onesuitAll!{JT62}{AK53}{87}{Q94} +\gamefont{\sffamily\bfseries\Huge} +\setdefaults{compmid=H} +\onesuitAll!{JT62}{AK53}{87}{Q94} +% +\gamefont{\sffamily\bfseries\scriptsize} +\setdefaults{compmid=c} +\onesuitAll!{JT62}{AK53}{87}{Q94} +\gamefont{\sffamily\bfseries\huge} +\setdefaults{compmid=h} +\onesuitAll!{JT62}{AK53}{87}{Q94} +% +\gamefont{\sffamily\bfseries\footnotesize} +\setdefaults{compmid=f} +\onesuitAll!{JT62}{AK53}{87}{Q94} +\gamefont{\sffamily\bfseries\LARGE} +\setdefaults{compmid=A} +\onesuitAll!{JT62}{AK53}{87}{Q94} +% +\gamefont{\sffamily\bfseries\small} +\setdefaults{compmid=s} +\onesuitAll!{JT62}{AK53}{87}{Q94} +\gamefont{\sffamily\bfseries\Large} +\setdefaults{compmid=L} +\onesuitAll!{JT62}{AK53}{87}{Q94} +% +\gamefont{\sffamily\bfseries\normalsize} +\setdefaults{compmid=n} +\onesuitAll!{JT62}{AK53}{87}{Q94} +\gamefont{\sffamily\bfseries\large} +\setdefaults{compmid=l} +\onesuitAll!{JT62}{AK53}{87}{Q94} +\setdefaults{compmid=} +\end{HBox} +\vfill +\end{document} +\endinput diff --git a/macros/latex/contrib/onedown/Examples/ExpertQuiz.tex b/macros/latex/contrib/onedown/Examples/ExpertQuiz.tex new file mode 100644 index 0000000000..ad52dc9b29 --- /dev/null +++ b/macros/latex/contrib/onedown/Examples/ExpertQuiz.tex @@ -0,0 +1,77 @@ +\documentclass[onedown-examples]{subfiles} +\begin{document} +\iffalse +\newgame\setdefaults{bidfirst=W} +\dealer[\east]\vulner[\eastwest] +\hand!{Q952}{K32}{765}{AQ7} + +\begin{bidding}(\explainit{gameforcing} + \explainit{natural, 6-card ab ab ab ab ab ab})% + & & 2D\markit & 2H\markit \\ +p & 3H & 4D & p \\ +? \\ +\end{bidding} + +\makeatletter + :\usebox\ODw@BidBox: +\makeatother + + + +\begin{biddingpair}(\explainit{game forcing} + \explainit{natural, 6-card})% + 2D\markit & 2H\markit \\ + 3H & 4D \\ +? \\ +\end{biddingpair} + +\makeatletter + :\usebox\ODw@BidBox: +\makeatother +\fi +\vfill +A special feature of \OneDown is the so called |expertquiz|. It essentially +displays a hand with a (partial) bidding sequence. The reader has to guess +the best next bid with respect to the hand and the bidding so far. The +different answers are rewarded with points. + +Observe the token '\textbf{-}' in |\hand-| and |\begin{bidding}-| that +suppresses the output. + +With the optional argument we add some extra information to the quiz. +\vfill +\begin{HBox}{expertquiz \hfill File: \FileName} +\newgame\setdefaults{bidfirst=W} +\dealer[\east]\vulner[\eastwest] +\hand!-{Q952}{K32}{765}{AQ7} +\begin{bidding}-(\explainit{gameforcing} + \explainit{natural, 6-card})% + & & 2D\markit & 2H\markit \\ +p & 3H & 4D & p \\ +? \\ +\end{bidding} +\expertquiz[Team: \dealertext, \vulnertext]{% + 4\He= 10, 4\Sp= 7, + 6\Di= 4, + 4\NT/5\NT= 3, 5\Di=~1 +} +\end{HBox} +\vfill +Here we show the same quiz, but the layout resembles the one used by the +DBV\footnote{German Bridge League} in their monthly, called \emph{Bridge +Magazin}. We get this special layout by using the token '\textbf{!}'. Of +course we set it in the German language. +\vfill +\begin{HBox}{expert quiz a la DBV\hfill File: \FileName} +\begin{otherlanguage}{german} +\expertquiz![Team: \dealertext, \vulnertext]{% + 4\He= 10, 4\Sp= 7, + 6\Di= 4, + 4\NT/5\NT= 3, 5\Di= 1 +} +\end{otherlanguage} +\end{HBox} +\vfill +\end{document} +\endinput + diff --git a/macros/latex/contrib/onedown/Examples/FancyColors.tex b/macros/latex/contrib/onedown/Examples/FancyColors.tex new file mode 100644 index 0000000000..4dfaa12562 --- /dev/null +++ b/macros/latex/contrib/onedown/Examples/FancyColors.tex @@ -0,0 +1,49 @@ +\documentclass[onedown-examples]{subfiles} + +\begin{document} +\FancyColors +\begin{HBox}{Fancy colors for card symbols\hfill File: \FileName} +Due to the definition of the card symbols, a simple redefinition like:\\ +\verb|\let\MyClub\Cl|\\ +\verb|\renewcommand{\Cl}{%|\\ +\verb|\textcolor{green}{\MyClub}}|\\ +will \textbf{not} change the color of the symbol. +For details refer to the \OneDown manual, section 6.2.1 \emph{Suit Symbols}. + +Instead put in your preamble e.g. this code to get \textcolor{green}{green} +clubs, \textcolor{orange}{orange} diamonds, \textcolor{red}{red} hearts and +\textcolor{blue}{blue} spades. +\\[\baselineskip] +\verb|\makeatletter|\\ +\verb|\renewrobustcmd\Cl{%|\\ +\verb|\textcolor{green}%|\\ +\verb|{\,[0.3]\ensuremath{%|\\ +\verb|\ODw@clubsuit}}\xspace}%|\\[2mm] +\verb|\renewrobustcmd\Di{%|\\ +\verb|\textcolor{orange}%|\\ +\verb|{\,[0.3]\ensuremath{%|\\ +\verb|\ODw@vardiamond}}\xspace}%|\\[2mm] +\verb|\renewrobustcmd\He{%|\\ +\verb|\textcolor{red}%|\\ +\verb|{\,[0.3]\ensuremath{%|\\ +\verb|\ODw@varheart}}\xspace}%|\\[2mm] +\verb|\renewrobustcmd\Sp{%|\\ +\verb|\textcolor{blue}%|\\ +\verb|{\,[0.3]\ensuremath{%|\\ +\verb|\ODw@spadesuit}}\xspace}%|\\ +\verb|\makeatother| +\\[\baselineskip] +Now you will get yor own fancy colors: + +1\Cl, 2\Di, 3\He, 4\Sp\\ + +\setdefaults{bidlong=off,bidfirst=N} +\begin{bidding}[t] +1C & 1D & 1H & 1S \\ +1N & X & p & p \\ +R & P \\ +\end{bidding} + +\end{HBox} +\end{document} + diff --git a/macros/latex/contrib/onedown/Examples/Fontsizes.tex b/macros/latex/contrib/onedown/Examples/Fontsizes.tex new file mode 100644 index 0000000000..24f4fd4ced --- /dev/null +++ b/macros/latex/contrib/onedown/Examples/Fontsizes.tex @@ -0,0 +1,33 @@ +%\documentclass[onedown-examples]{subfiles} +\documentclass[10pt]{report} +% +\usepackage{libertine} +\usepackage{onedown} + +% +\makeatletter +\newcommand{\mysize}[1]{% + \bgroup\noindent\csname#1\endcsname The #1 size is: \textbf{\csname#1\endcsname\f@size\,pt}.\\The baselineskip is \the\baselineskip\par\vskip2mm\egroup} +\makeatother + +\begin{document} +\noindent +Here we show the different fontsizes with values and output. \\ +For the size commands \emph{ssmall} and \emph{HUGE} refer to package \textsf{moresizes}. +\\[1em] +%%%%% +\mysize{tiny} +\mysize{ssmall} +\mysize{scriptsize} +\mysize{footnotesize} +\mysize{small} +\mysize{normalsize} +\mysize{large} +\mysize{Large} +\mysize{LARGE} +\mysize{huge} +\mysize{Huge} +\mysize{HUGE} +%%%%% +\end{document} +\endinput diff --git a/macros/latex/contrib/onedown/Examples/Hands.tex b/macros/latex/contrib/onedown/Examples/Hands.tex new file mode 100644 index 0000000000..f40721a3a0 --- /dev/null +++ b/macros/latex/contrib/onedown/Examples/Hands.tex @@ -0,0 +1,41 @@ +\documentclass[onedown-examples]{subfiles} +\newgame +\begin{document} +~ +\vfill +In the first example we show how the cards of a hand are entered. The hand +can be displayed horizontally or vertically. It can also be centered. In +general the token |*| will center the diagram, whereas the token |!| does +something special. With the command |\hand| the token |*| switches between +the horizontal and vertical mode. In other situations the token |*| can +force the output of a short notation. With non-diagram commands the token +|*| prints the full expression rather than an abreviation. The token |!| outputs the hand +vertically. Please note that we enter a |T| to get e.g.\ \suit{JT9}. +Entering |10| would yield \suit{J109}, which looks really awful. +\vfill +\begin{HBox}{{single hand (hor/vert)+(left/centered) + \hfill File: \FileName}} + + horizontal \par\noindent +\hand{AQT2}{KQ3}{J98}{T98} + + horizontal centered \par\noindent +\hand*{AQT2}{KQ3}{J98}{T98} + + vertical \par\noindent +\hand!{AQT2}{KQ3}{J98}{T98} + + vertical centered \par\noindent +\hand*!{AQT2}{KQ3}{J98}{T98} + +\end{HBox} +% +\vfill +This example shows how a mistake in entering the cards is detected. +\vfill +\begin{HBox}{{single hand with error\hfill File: \FileName}} +\hand!{AQT2}{KKQ3}{J98}{T98} +\end{HBox} +\vfill +\end{document} + diff --git a/macros/latex/contrib/onedown/Examples/Languages.tex b/macros/latex/contrib/onedown/Examples/Languages.tex new file mode 100644 index 0000000000..0e5d0e6702 --- /dev/null +++ b/macros/latex/contrib/onedown/Examples/Languages.tex @@ -0,0 +1,46 @@ +\documentclass[onedown-examples]{subfiles} + +\begin{document} +As a demonstration of the multilingual features of the \OneDown package we +show a diagram with turkish annotations. \\ +Note:\\ +Due to an quirk in the babel implementation of the turkish and some +other language, you must either call |\shorthandoff{=!}| after loading the +language, or load it with e.g.\ \\ +|\usepackage[turkish,shorthands=]{babel}|. + +Refer to the \OneDown manual for details. +\vfill +\begin{HBox}{Languages (Turkish)\hfill File: \FileName} +\boardnr{32} +\northhand{AK43}{AJ98}{AQJ8}{4} +\southhand{87}{QT5}{432}{K9865} +\easthand{JT6}{764}{KT9}{JT32} +\westhand{Q952}{K32}{765}{AQ7} +\leftupper{\boardtext*}% + {\dealertext}{\vulnertext} +\rightupper[1ex]{\contract: }% + {3\,\NT}{\by \south} +\rightlower[1ex]{\lead: \Di 7}{}{} +\begin{otherlanguage}{turkish} +\showAll* +\end{otherlanguage} +\end{HBox} +\vfill\noindent +Here we switch to the Norwegian language. As we use the same settings for the +diagram, we simply call |\showAll| to display it, after we changed the +language. The Jack is coded with \foreignlanguage{norsk}{\jack{}} +rather than \jack, so the hand is now closer to the right upper legend. (We already discussed ways +to solve this!) +\vfill +% +\begin{HBox}{Languages (Norwegian)\hfill File: \FileName} +\begin{otherlanguage}{norsk} +\showAll* +\end{otherlanguage} +\end{HBox} +\vfill +% +\end{document} +\endinput + diff --git a/macros/latex/contrib/onedown/Examples/Legends.tex b/macros/latex/contrib/onedown/Examples/Legends.tex new file mode 100644 index 0000000000..9d9f603eed --- /dev/null +++ b/macros/latex/contrib/onedown/Examples/Legends.tex @@ -0,0 +1,84 @@ +\documentclass[onedown-examples]{subfiles} + +\begin{document} +\vfill +In this section we will investigate how we can add certain annotations to +card diagrams. We start with |\newgame| and |\resetfonts| in order to +`forget the past'. + +With |\dealer| one can denote which player is the dealer and +with |\vulner| which side is vulnerable. This data is stored and with +|\dealertext| (or |\vulnertext|) one can retrieve it. The macros +|\leftupper| (and also the |right-| and the |lower-| versions) puts its 3 +arguments, each on its own line, in the diagram. If you wonder why we use +the command |\by| instead the text |by| in |\rightupper|: |\by| gets +automatically translated into the active language.\par\noindent +If you look at the diagram, you will notice that the \emph{left}- and \emph{right}-annotations can +extend to the left of the \west hand and the right of the \east hand. +\vfill +\begin{HBox}{Annotations\hfill File: \FileName} +\newgame\resetfonts +\northhand{AK43}{AJ98}{AQJ}{54} +\southhand{87}{QT5}{8432}{K986} +\easthand{JT6}{764}{KT9}{JT32} +\westhand{Q952}{K32}{765}{AQ7} +\dealer[\east]\vulner[\eastwest] +\leftupper{\dealertext}{}{\vulnertext} +\rightlower{}{\lead: \Di 7}{} +\rightupper{\contract: 3\,\NT}{\by \south}{} +\showAll +\end{HBox} +\vfill +In the next example we show all possible annotations. Here you can see that +the |\upper-|versions align the text with the topline, whereas the +|\lower-|versions align with the bottomline. Because the legendfont +can differ from the gamefont and the rows in a hand get some extra space, +the legend lines will normally not align with the rows of a hand. + + We can add an offset (as shown in section showAll) to the \west hand in order to make the hand align to +the left with the left-upper legend. But this enlarges the gap between the +\west hand and the compass. It is perhaps better to have only very short +legends. But it is up to you to decide that. +\vfill +\begin{HBox}{Legends: full overview\hfill File: \FileName} +\leftupper{LUp:Line 1}{and line2}{last Line} +\rightupper{RUp:Line 1}{and line2}{last Line} +\leftlower{LLo:Line 1}{and line2}{last Line} +\rightlower{RLo:Line 1}{and line2}{last Line} +\headlinetext{Here you put some headtext\ldots\par on 2 lines} +\footlinetext{\ldots here goes foottext} +\showAll +\end{HBox} +\needspace{8\baselineskip} +\vfill +The next examples show wich legends are output/suppressed for the other +card diagrams. Note also that the \emph{head/foot}-linetext does not extend beyond the +width of the diagram, and can get real narrow when only the +\NorthSouth*!-hands are shown. In that case it might be better to put a |\raggedright| +in. If you do so, then don't forget to |\protect| it. +\vfill +\begin{HBox}{{Legends for: \northsouth: may need \emph{raggedright}\hfill File: \FileName}} +\showNS + +\hrulefill + +\headlinetext{\protect\raggedright Here you put some headtext\ldots\par on 2 lines} +\footlinetext{\protect\raggedright \ldots here goes foottext} +\showNS +\end{HBox} +\vfill +\begin{HBox}{{Legends: \north-\east, \north-\west, \east-\west\hfill File: \FileName}} + +\showNE + +\hrulefill + +\showNW + +\hrulefill + +\showEW +\end{HBox} +\vfill +\end{document} +\endinput diff --git a/macros/latex/contrib/onedown/Examples/Play.tex b/macros/latex/contrib/onedown/Examples/Play.tex new file mode 100644 index 0000000000..7c0a157d3d --- /dev/null +++ b/macros/latex/contrib/onedown/Examples/Play.tex @@ -0,0 +1,80 @@ +\documentclass[onedown-examples]{subfiles} + +\begin{document} +Here we show the playing tricks diagram. For the user, the environment |play| is like a 4 +column table. Its mandatory argument denotes the player with the opening +lead. With the optional argument the user can specify the trump suit. The +default is |N| for \NT. All leads must have a suit, although this is not +checked by \OneDown. If a suit is +followed, you don't have to repeat the suit: a rank suffices to specify the +card. Of course at discards or when ruffed, the suit must be entered too. + +The |play| diagram has a special feature: it knows which player wins the +trick and thus 1) you do not have to specify who has the lead, except of +course the opening lead, and 2) it calculates (and displays) the tricks won +by each side. +\vfill +\begin{HBox}{{Playing tricks table. Trump is \Cl\hfill File: \FileName}} +\newgame\resetfonts +\begin{play}{W}[C] + H3 & 4 & K & 6 \\ + C3 & 5 & Q & 2 \\ + H5 & 2 & A & 8 \\ + C7 & D9 & J & K \\ + S3 & 4 & Q & 6 \\ + SA & C4 & 2 & T \\ +\end{play} +\end{HBox} +\vfill +It is posible to use either the shorthands (|C, D, H, S|) for the suits as +well as the code (e.g.\ |\Cl| itself, as you can see here. Refer to Bidding +examples for further details. + +In the environment |play| the consistency of the cards played is checked. As +an example the error about card \He\,5 (ocurring $2\times$ in the same trick) +is reported. +\vfill +\begin{HBox}{{Same, but with suit commands\hfill File: \FileName}} +\begin{play}{W}[C] + \He3 & 4 & K & 6 \\ + \Cl3 & 5 & Q & 2 \\ + \He5 & 5 & A & 8 \\ + \Cl7 & \Di9 & J & K \\ + \Sp3 & 4 & Q & 6 \\ + \Sp A & K & 2 & T \\ +\end{play} +\end{HBox} +\vfill +In the next example for a \NT contract, we have changed the language. Here +the double occurence of \Cl\,6 in two different tricks is shown. +\vfill +\begin{HBox}{Playing tricks table for \NT in Dutch\hfill File: \FileName} +\begin{otherlanguage}{dutch} +\begin{play}{W} + C3 & Q & K & 2 \\ + SJ & A & 4 & 2 \\ + C4 & 6 & T & 5 \\ + CA & ST & 6 & 9 \\ + C7 & HT & D5 & S5 \\ + D2 & T & 3 & 4 \\ +\end{play} +\end{otherlanguage} +\end{HBox} +\vfill +\vfill +\begin{HBox}{The same table in German\hfill File: \FileName} +\begin{otherlanguage}{german} +\begin{play}{W} + C3 & Q & K & 2 \\ + SJ & A & 4 & 2 \\ + C4 & 6 & T & 5 \\ + CA & ST & 6 & 9 \\ + C7 & HT & D5 & S5 \\ + D2 & T & 3 & 4 \\ +\end{play} +\end{otherlanguage} +\end{HBox} +\vfill +\end{document} +\endinput + diff --git a/macros/latex/contrib/onedown/Examples/Select-Hands.tex b/macros/latex/contrib/onedown/Examples/Select-Hands.tex new file mode 100644 index 0000000000..51260bfb31 --- /dev/null +++ b/macros/latex/contrib/onedown/Examples/Select-Hands.tex @@ -0,0 +1,56 @@ +\documentclass[onedown-examples]{subfiles} + +\begin{document} +\vfill +Both the |\showNS| and |\showEW| have an extra optional parameter that +controls which of the two hands will be printed and suppresses the other +hand. +\vfill +\begin{HBox}{Select only one hand\hfill File: \FileName} +\northhand{AK43}{AQJ83}{AJ98}{-} +\southhand{87}{T5}{QT5}{K98654} +\easthand{JT6}{764}{K43}{JT32} +\westhand{Q952}{K92}{762}{AQ7} +A \showNS(N) \quad B \showNS(S) + +C \showEW(E) \quad D \showEW(W) + +\end{HBox} +\vfill +The same, but here the compass is suppressed, showing only the selected hand +\vfill +\begin{HBox}{{Only hand, compass suppressed}\hfill File: \FileName} +\setdefaults{compshow=off} +\northhand{AK43}{AQJ83}{AJ98}{-} +\southhand{87}{T5}{QT5}{K98654} +\easthand{JT6}{764}{K43}{JT32} +\westhand{Q952}{K92}{762}{AQ7} +A \showNS(N) \quad B \showNS(S) + +C \showEW(E) \quad D \showEW(W) + +\end{HBox} + +\begin{HBox}{{Only \North*!-hands}\hfill File: \FileName} +\newgame +\setdefaults{compshow=on} +\northhand{AK43}{AQJ83}{AJ98}{-} \showNS(N) +\northhand{87}{T5}{QT5}{K98654} \showNS(N)\quad +\northhand{JT6}{764}{K43}{JT32} \showNS(N) +\northhand{Q952}{K92}{762}{AQ7} \showNS(N) +\end{HBox} + +\begin{HBox}{{Only \North*!-hands, compass suppressed}\hfill File: +\FileName} +\newgame +\setdefaults{compshow=off} +\northhand{AK43}{AQJ83}{AJ98}{-} \showNS(N) +\northhand{87}{T5}{QT5}{K98654} \showNS(N)\quad +\northhand{JT6}{764}{K43}{JT32} \showNS(N) +\northhand{Q952}{K92}{762}{AQ7} \showNS(N) +\end{HBox} + +\end{document} +\endinput + + diff --git a/macros/latex/contrib/onedown/Examples/Suits.tex b/macros/latex/contrib/onedown/Examples/Suits.tex new file mode 100644 index 0000000000..457ab27332 --- /dev/null +++ b/macros/latex/contrib/onedown/Examples/Suits.tex @@ -0,0 +1,65 @@ +\documentclass[onedown-examples]{subfiles} + +\begin{document} + +Here we show a single suit, with and without a suit symbol. You can observe +the influence of changing the |gamefont|. +In the 1st suit, card 4 occurs $2\times$ and an error message is printed. +In the last suit the same happens for card 5 but now the suit is known and +is named in the error message. +\vfill +\begin{HBox}{suit and errors I\hfill File: \FileName} +\suit{AKT544}\hspace{1cm} +\suit[\He]{AKT54} +\gamefont{\sffamily\bfseries\Large} +\par\vspace{1\baselineskip}\noindent +\suit{AKT54}\hspace{1cm} +\suit[\He]{AKT54} +\par\vspace{1\baselineskip}\noindent +\suit[\He]{AKT554} +\end{HBox} +\vfill +\noindent +In the 3rd diagram card 8 occurs $2\times$. In the 4th diagram card 4 is +missing and a warning is raised. Card 5, which occurs $2\times$, raises an +error. Errors are shown by default, warnings must be activated first. These +consistency checks make it easy to spot typos in your diagrams. +\vfill +\begin{HBox}{suits and errors II\hfill File: \FileName} +\resetfonts +\onesuitNS{AK53}{JT6} +\qquad +\onesuitEW{87}{Q952} +\qquad +\onesuitEW{87}{Q852} +\par\vspace{0.5\baselineskip}\noindent +\setdefaults{warn=on} +\onesuitAll{AK53}{JT6}{87}{Q952} +\end{HBox} +\vfill +The other 'onesuit' diagrams, using a small box. +\vfill +\begin{HBox}{onesuitXX with box\hfill File: \FileName} +\setdefaults{warn=off} +\onesuitNE{AK43}{87} +\qquad +\onesuitNE{AK43}{Q952} +\end{HBox} +\vfill +Next we show how to use a compass instead of a small box by using token |!|. +\vfill +\begin{HBox}{onesuitXX with compass\hfill File: \FileName} +\onesuitNS!{AK53}{JT6} +\quad +\onesuitEW!{87}{Q952} +\quad +\onesuitNE!{AK43}{87} +\quad +\onesuitNE!{AK43}{Q952} +\quad +\onesuitAll!{AK43}{JT6}{87}{Q952} +\end{HBox} +\needspace{8\baselineskip} +\vfill +\end{document} + diff --git a/macros/latex/contrib/onedown/Examples/Wrapping.tex b/macros/latex/contrib/onedown/Examples/Wrapping.tex new file mode 100644 index 0000000000..753eea7685 --- /dev/null +++ b/macros/latex/contrib/onedown/Examples/Wrapping.tex @@ -0,0 +1,98 @@ +\documentclass[onedown-examples]{subfiles} + +\begin{document} +\vfill +The package \OneDown renounces to implement so called \emph{hanging hands}. +To achieve such you will have to use external means, e.g.\ the package +|wrapfig|. The advantage of an external package is that 1) you can wrap +anything you like and 2) you have more control over the result. Here follow +some examples to show how to do that. + +You need a new paragraph before the |wrapfig| stuff. For details, refer to +the documentation of the package |wrapfig|. +\vfill +\begin{HBox}{Wrapping a hand\hfill File: \FileName} +\blindtext + +\begin{wraptable}{l}{0cm}% nat. width +\hand!{AQ852}{AKQ3}{-}{AQKJ} +\end{wraptable} +\blindtext +\end{HBox} +\vfill +\needspace{8\baselineskip} +~ +\vfill +\begin{HBox}{Wrapping a bidding table\hfill File: \FileName} +\blindtext + +\begin{wraptable}{l}{0cm}% nat. width +\begin{biddingpair} +1S & 3S \\ +4S & 5S \\ +6S & p \\ +\end{biddingpair} +\end{wraptable} +\blindtext +\end{HBox} +\vfill +\needspace{8\baselineskip} +With a small diagram there is enough space for the wrapped text. +\vfill +\begin{HBox}{{Wrapping a card diagram\hfill File: \FileName}} +\newgame +\blindtext + +\begin{wraptable}{l}{0cm}% nat. width +\gamefont{\sffamily\bfseries\footnotesize} +\northhand{AQ92}{873}{A54}{752} +\southhand{J7543}{Q42}{63}{AKQ} +\showNS +\end{wraptable} +\blindtext +\end{HBox} +\vfill +\needspace{8\baselineskip} +With real big diagrams there is not enough space for the wrapped text. +\vfill +\begin{HBox}{{Show wrapping of hands, Large size\hfill File: \FileName}} +Hello, here is some text without +a meaning. This text should show +what a printed text will look +like at this place. If you read +this text, you will get no +information. + +\newgame +\resetfonts +\begin{wraptable}{l}{0cm}% nat. width +\northhand{AQ92}{873}{A54}{752} +\southhand{J7543}{Q42}{63}{AKQ} +\gamefont{\sffamily\bfseries\scalefont{2.5}} +\showNS +\end{wraptable} +\blindtext +\end{HBox} +\vfill +\needspace{8\baselineskip} +With |\raggedright| or |RaggedRight| from package |ragged2e| it looks much +better. +\vfill +\begin{HBox}{{Same, with RaggedRight\hfill File: \FileName}} +\RaggedRight +Hello, here is some text without +a meaning. This text should show +what a printed text will look +like at this place. If you read +this text, you will get no +information. + +\begin{wraptable}{l}{0cm}% nat. width +\showNS +\end{wraptable} +\blindtext +\end{HBox} +\vfill +\end{document} +\endinput + diff --git a/macros/latex/contrib/onedown/Examples/bidAll.tex b/macros/latex/contrib/onedown/Examples/bidAll.tex new file mode 100644 index 0000000000..24060a5263 --- /dev/null +++ b/macros/latex/contrib/onedown/Examples/bidAll.tex @@ -0,0 +1,69 @@ +\documentclass[onedown-examples]{subfiles} + +\begin{document} +\setdefaults{bidfirst=S} + +Here is a diagram with four hands. We get rid of the past by calling +|\newgame|. Then we define our hands and set the first bid column to +\south and we show only one pair of bidders. Because the bidding table +does not fit on the same line, it appears below the compass. +(In fact it actually would fit on the line. But to illustrate the point we +used |\handskip| to widen the diagram a bit). +Note that the token |-| in the |bidding| environment suppresses the output +of it. Only when calling |\showAll+| (with a |+| token), the saved bidding +diagram is printed together with the card diagram. + +\vfill +\begin{HBox}{not fitting on the line\hfill File: \FileName} +\newgame +\handskip{2em} +\northhand{KJ82}{KQ9}{J32}{JT8} +\southhand{AQ953}{A85}{Q84}{K6} +\easthand{T6}{764}{KT9}{Q5432} +\westhand{74}{JT32}{A765}{A97} +\setdefaults{bidfirst=S} +\begin{biddingpair}- +1S & 4S \\ +p & \\ +\end{biddingpair} +\showAll+ +\end{HBox} +\vfill +Here the hands and the bidding are the same as previous, but the complete diagram +(biddingtable inclusive) is centered and we use the short notation for the +players in the bidding table (by using the token |!|). +Being shorter now, the bidding table does fit on the same line. +\vfill +\begin{HBox}{centered and fitting\hfill File: \FileName} +\setdefaults{bidfirst=S} +\begin{biddingpair}!- +1S & 4S \\ +p & \\ +\end{biddingpair} +\showAll*+ +\end{HBox} +\vfill +\needspace{8\baselineskip} +The same deal, but now we show all bidders in the bidding table with the long notation. +Again it is to wide to fit on the line. +\vfill +\begin{HBox}{left aligned\hfill File: \FileName} +\begin{bidding}-(\explainit{15-17\HLP}) +p & p & P & 1S \\ +p & 2C & {\Pass*!} & 2N\markit \\ +p & 3N & {\Allpass!} \\ +\end{bidding} +\showAll+ +\end{HBox} +\vfill +Finally the same, but the diagram is centered. We also set the extra +handskip to 0 again. +\vfill +\begin{HBox}{centered\hfill File: \FileName} +\handskip{0em} +\showAll*+ +\end{HBox} +\vfill +\end{document} +\endinput + diff --git a/macros/latex/contrib/onedown/Examples/bidEW.tex b/macros/latex/contrib/onedown/Examples/bidEW.tex new file mode 100644 index 0000000000..e91d8ff5f8 --- /dev/null +++ b/macros/latex/contrib/onedown/Examples/bidEW.tex @@ -0,0 +1,51 @@ +\documentclass[onedown-examples]{subfiles} + +\begin{document} +\vfill +In the previous example we changed the gamefont to scriptsize, which is +still in effect here, as you can see in this example. You wonder why the +bidding is shown for \north and \south, but the hands are those of \east and +\west? Well, if you say |\showEW| you get the \eastwest hands. And if you +say |\setdefaults{bidfirst=S}|, then the first column is of \south{}! (BTW: +if you want to get \south{}! as output, you must write |\south{}!|, then +|\south!| and even |\south !| will regard the |!| as a token to |\south| +and will produce \south !). + +We reset the gamefont before we draw the 2nd diagram. Please note that we +have to redefine the bidding. The saved version from the 1st diagram will +not change its font! + +\vfill +\begin{HBox}{bidEWpair\hfill File: \FileName} +\northhand{KJ82}{KQ9}{J}{AQJT8} +\southhand{AQT95}{A52}{864}{K6} +\easthand{63}{J764}{KQT9}{953} +\westhand{74}{T83}{A7532}{742} +\setdefaults{bidfirst=S} +\begin{biddingpair}!-(\explainit{splinter} + \explainit{control}) +1S & 4D\markit \\ +4H\markit & 6S \\ +\end{biddingpair} +\showEW+ +\gamefont{\sffamily\bfseries\normalsize} +\par\vspace{1\baselineskip} +\showEW+ +\begin{biddingpair}!-(\explainit{splinter} + \explainit{control}) +1S & 4D\markit \\ +4H\markit & 6S \\ +\end{biddingpair} +\par\vspace{1\baselineskip} +\showEW+ +\end{HBox} +\vfill +\begin{HBox}{bidEWpair centered\hfill File: \FileName} +\showAll+ + +\showEW*+ +\end{HBox} +\vfill +\end{document} +\endinput + diff --git a/macros/latex/contrib/onedown/Examples/bidNE.tex b/macros/latex/contrib/onedown/Examples/bidNE.tex new file mode 100644 index 0000000000..6e53b8fccd --- /dev/null +++ b/macros/latex/contrib/onedown/Examples/bidNE.tex @@ -0,0 +1,45 @@ +\documentclass[onedown-examples]{subfiles} + +\begin{document} +\vfill +Here we show some examples without comment. +% Trick because of HBox making things local +\setdefaults{bidfirst=S} +\vfill +\begin{HBox}{showNE\hfill File: \FileName} +\northhand{KJ82}{KQ9}{J}{AQJT8} +\southhand{AQT95}{A52}{864}{K6} +\easthand{63}{J764}{KQT9}{432} +\westhand{74}{T83}{A7532}{957} +\gamefont{\sffamily\bfseries\large} +\setdefaults{bidfirst=S} +\begin{biddingpair}!-(\explainit{splinter} + \explainit{control}) +1S & 4D\markit \\ +4H\markit & 6S \\ +\end{biddingpair} + +\showNE+ + +\end{HBox} +\vfill +\begin{HBox}{showNE centered\hfill File: \FileName} +\showNE*+ +\end{HBox} +\vfill +\begin{HBox}{showNE\hfill File: \FileName} +\begin{bidding}!-(\explainit{splinter} +\explainit{control}) +1S & p & 4D\markit & p \\ +4H\markit & p & 6S & p \\ +\end{bidding} +\showNE+ +\end{HBox} +\vfill +\begin{HBox}{showNE centered\hfill File: \FileName} +\showNE*+ +\end{HBox} +\vfill +\end{document} +\endinput + diff --git a/macros/latex/contrib/onedown/Examples/bidNS.tex b/macros/latex/contrib/onedown/Examples/bidNS.tex new file mode 100644 index 0000000000..ca00038328 --- /dev/null +++ b/macros/latex/contrib/onedown/Examples/bidNS.tex @@ -0,0 +1,95 @@ +\documentclass[onedown-examples]{subfiles} + +\makeatletter +\def\SW{\the\ODw@Skip@Width} +\makeatletter +\begin{document} +\vfill +We show a couple of diagrams without comment, with the exception of +number 4. +% We must trick here because HBox makes the settings local +\setdefaults{bidfirst=S} +\vfill +\begin{HBox}{1: showNS pair\hfill File: \FileName} +\newgame +\northhand{KJ82}{KQ9}{J}{AQJT8} +\southhand{AQT95}{A52}{864}{K6} +\easthand{JT6}{764}{KT9}{JT32} +\westhand{Q952}{K32}{765}{AQ7} +\setdefaults{bidfirst=S} +\begin{biddingpair}-(\explainit{splinter}) +1S & 4D\markit \\ +4H & 6S \\ +\end{biddingpair} +\showNS+ +\end{HBox} +\vfill +\begin{HBox}{2: showNS pair centered\hfill File: \FileName} +\begin{biddingpair}!-(\explainit{splinter}) +1S & 4D\markit \\ +4H & 6S \\ +\end{biddingpair} +\showNS*+ +\end{HBox} +\vfill +\begin{HBox}{3: showNS\hfill File: \FileName} +\begin{bidding}!-(\explainit{splinter} +\explainit{control}) +1S & p & 4D\markit & p \\ +4H\markit & p & 6S & p \\ +\end{bidding} +\showNS+ +\end{HBox} +\vfill +\needspace{8\baselineskip} +\vfill +Here we show the influence of command |\handskip|, that adds some extra +space between the card diagram and the bidding diagram. In the 2nd diagram +the negative value diminishes the distance. Because it is within braces, +the length change is local and the normal value is automatically restored +afterwards. In the 4th diagram we add |3em| extra space +\vfill +\begin{HBox}{4: showNS centered\hfill File: \FileName} +\setdefaults{compmid=1} \showNS*+ +{\handskip{-1em}\setdefaults{compmid=2} \showNS*+} +\setdefaults{compmid=3} \showNS*+ +{\handskip{3em}\setdefaults{compmid=4} \showNS*+} +\end{HBox} +\vfill +\begin{HBox}{5: showNS pair\hfill File: \FileName} +\gamefont{\sffamily\bfseries\scriptsize} +\begin{biddingpair}!- +1S & 4D \\ +4H & 6S \\ +\end{biddingpair} +\showNS+ +\end{HBox} +\vfill +Because the previously saved bidding diagram is used, setting |bidfirst| +has no influence on the output\ldots +\vfill +\begin{HBox}{6: showNS pair centered\hfill File: \FileName} +\setdefaults{bidfirst=W} +\showNS*+ +\end{HBox} +\vfill +\ldots But when setting the next bidding diagram, it has! +% Need to trick here again +\setdefaults{bidfirst=W} +\vfill +\begin{HBox}{7: showNS\hfill File: \FileName} +\begin{bidding}-(\explainit{splinter} +\explainit{control}) +1S & p & 4D\markit & p \\ +4H\markit & p & 6S & p \\ +\end{bidding} +\showNS+ +\end{HBox} +\vfill +\begin{HBox}{8: showNS centered\hfill File: \FileName} +\showNS*+ +\end{HBox} +\vfill +\end{document} +\endinput + diff --git a/macros/latex/contrib/onedown/Examples/bidNW.tex b/macros/latex/contrib/onedown/Examples/bidNW.tex new file mode 100644 index 0000000000..e107d0c44e --- /dev/null +++ b/macros/latex/contrib/onedown/Examples/bidNW.tex @@ -0,0 +1,39 @@ +\documentclass[onedown-examples]{subfiles} + +\begin{document} +\vfill +\setdefaults{bidfirst=S} +\begin{HBox}{showNW pair\hfill File: \FileName} +\northhand{KJ82}{KQ9}{J}{AQJT8} +\southhand{AQT95}{A52}{864}{K6} +\easthand{63}{J764}{KQT9}{432} +\westhand{74}{T83}{A7532}{957} +\setdefaults{bidfirst=S} +\gamefont{\sffamily\bfseries\Large} +\begin{biddingpair}-(\explainit{splinter}) +1S & 4D\markit \\ +4H & 6S \\ +\end{biddingpair} +\showNW+ +\end{HBox} +\vfill +\begin{HBox}{showNW pair centered\hfill File: \FileName} +\showNW*+ +\end{HBox} +\vfill +\begin{HBox}{showNW\hfill File: \FileName} +\begin{bidding}-(\explainit{splinter} +\explainit{control}) +1S & p & 4D\markit & p \\ +4H\markit & p & 6S & p \\ +\end{bidding} +\showNW+ +\end{HBox} +\vfill +\begin{HBox}{showNW centered\hfill File: \FileName} +\showNW*+ +\end{HBox} +\vfill +\end{document} +\endinput + diff --git a/macros/latex/contrib/onedown/Examples/onedown-examples.pdf b/macros/latex/contrib/onedown/Examples/onedown-examples.pdf new file mode 100644 index 0000000000..dddbf20904 Binary files /dev/null and b/macros/latex/contrib/onedown/Examples/onedown-examples.pdf differ diff --git a/macros/latex/contrib/onedown/Examples/onedown-examples.tex b/macros/latex/contrib/onedown/Examples/onedown-examples.tex new file mode 100644 index 0000000000..4923e36421 --- /dev/null +++ b/macros/latex/contrib/onedown/Examples/onedown-examples.tex @@ -0,0 +1,217 @@ +%% +%% onedown-examples.tex +%% Dec 06, 2023 Added example Fancy Colors and language italian +%% Oct 04, 2019 Initial version +%% Requires the onedown bundle +%% Part of the OneDown bundle (mirror.ctan.org/onedown) +%% author: J. Wiersma +%%--------NOTE------------------------------------------- +%% USAGE: (pdf)latex onedown-examples.tex +%%------------------------------------------------------- + + +\PassOptionsToPackage{shorthands=off}{babel} +\documentclass[a4paper,fontsize=11pt,% + danish,% + dutch,% + french,% + german,% + ngerman,% + italian,% + norsk,% + spanish,% + swedish,% + turkish,% + english,% this is the default language +]{scrartcl} + +\usepackage{scrlayer-scrpage} +% +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} +% +\usepackage{subfiles}% can compile stand-alone/combined +\usepackage{babel}% + +\usepackage{onedown}% our own style to set bridge stuff +\usepackage[most]{tcolorbox}% show examples with code +%\usepackage{tcolorbox}% show examples with code +\usepackage{enumitem}% +\usepackage{wrapfig}% +\usepackage{ragged2e} +\usepackage{multicol} +\usepackage{blindtext}% to show wrapping +\usepackage{forloop}% for Compass +\usepackage{needspace}% keep lines on one page +\usepackage{scalefnt}% to enlarge even more +\usepackage[a4paper, total={185mm, 257mm},left=12mm,top=20mm]{geometry} + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% To get a PDF for printing on a monochrome printer +% comment out these commands +% +%\setdefaults{colors=mono} +%------------- +% set the look of the example boxes +% +\tcbset{% + colback=red!5!white,colframe=red!75!black, + colbacklower=white, + fonttitle=\bfseries, +} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% To get a PDF for viewing on a screen +% comment out these commands +% +%\tcbset{% +% colback=white,colbacktitle=white,coltitle=black, +% colbacklower=white, +% fonttitle=\bfseries, +%} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% Due to a bug (?) in tcolorbox we cannot return to the default +% "listing and text" after setting "listing side text" globally +% within \tcbset. % So we define HBox and VBox to set this locally. +% We need the VBox for showing 16 boardnrs in Compass.tex +% +\newtcblisting{HBox}[1]{listing side text,title=#1} +\newtcblisting{VBox}[1]{listing and text,title=#1} + +\usepackage{shortvrb} +\MakeShortVerb{\|} +% hack to make verbatim stuff more clear +% adapted from verbatim.sty +\makeatletter +\def\verbatim@font{\ttfamily\bfseries\large + \hyphenchar\font\m@ne + \@noligs} + +\def\Xfer#1{\ODw@Xfer{#1}} +\makeatother +% +% Define macro FancyColors, that set the colors to green, orange, red and blue +% for the card symbols ♣, ♦, ♥ and ♠ resp. as used in example Fancy Colors. +% +\makeatletter +\def\FancyColors{% +\renewrobustcmd\Cl{\textcolor{green}% +{\,[0.3]\ensuremath{\ODw@clubsuit}}\xspace}% +\renewrobustcmd\Di{\textcolor{orange}% +{\,[0.3]\ensuremath{\ODw@vardiamond}}\xspace}% +\renewrobustcmd\He{\textcolor{red}% +{\,[0.3]\ensuremath{\ODw@varheart}}\xspace}% +\renewrobustcmd\Sp{\textcolor{blue}% +{\,[0.3]\ensuremath{\ODw@spadesuit}}\xspace}% +}%FancyColors +\makeatother + +\usepackage[pdfencoding=auto]{hyperref} + \hypersetup{% + pdftitle={onedown-examples.pdf}, + pdfsubject={Bridge Diagrams, OneDown bundle}, + pdfkeywords={OneDown Bridge LaTeX}, + colorlinks, + linkcolor=red, + } + +\newcommand\OneDown{\textcolor{red}{\smaller\bfseries\textsc{OneDown}}\xspace} + +%------------- +\pagestyle{scrheadings} +\clearscrheadfoot +\ihead{\texttt{onedown-examples.pdf} +(\OneDown v\ODwstyleversion, \ODwstyledate)\hfill \pagemark} +%----------- + +\def\FileName{\jobname} +\def\SubFile#1{\def\FileName{#1}\newpage\section{#1}\subfile{#1}} + +\addtolength{\textheight}{1.5cm} +\def\ExLang{english} +\begin{document} +% when compiled with: +% pdflatex '\AtBeginDocument{\def\ExLang{YourLanguage}}\input{onedown-ref.tex}' +% you'll get the onedown commands expansions in YourLanguage +% YourLanguage can be any language out of: +% danish, dutch, english, french, (n)german, italian, norsk, spanish, swedish, +% turkish +% +\expandafter\selectlanguage\expandafter{\ExLang} +\pdfbookmark[1]{Title}{Title} +\title{Examples for the\\\OneDown package% +\footnote{This file is part of the \OneDown bundle. To generate this file, +use the following command: \newline \texttt{\$ pdflatex \jobname.tex}} +\\[1em] +\normalsize\url{www.ctan.org/pkg/onedown} +} +\author{J.\,Wiersma\footnote{email: \textsf{jack46@schuli-wirsi.de}}} +\date{07 December 2023 (v0.6)} +\maketitle + +\section*{Introduction} +This file (\jobname) contains (well, sort of includes) all the example +files from the bundle. We use the 'include' mechanism of the package +|subfiles|. This means that you can compile each example file as +stand-alone, but they also form one document. +The advantage is that you can copy one example file and edit it to your +taste i.e.\ to experiment a little, and you can compile it without changing +the preamble, provided the \OneDown bundle is in your \TeX-path. + +For questions not covered in these examples or any further documentation, +read the \OneDown package manual named onedown.pdf. + +If you encounter difficulties in compiling adapted files, then please read +the section about active characters in the manual. + +To make it easy for you to decide which file to experiment with, all +sections bear the file name, which can also be found in the list below. The +examples are produced using the \textsf{tcolorbox} package. This enables us +to show the code and the output of it side by side. + +The explanatory text is always in the English language. But you can show the +output of all commands in any of the supported languages.\\ +These are: danish, dutch, english, french, (n)german, italian, norsk, spanish, +swedish, turkish. \\ +You obtain this output in \emph{YourLanguage} by compiling onedown-examples.tex with: \\[0.2em] + +\verb|pdflatex '\AtBeginDocument{\def\ExLang{YourLanguage}}\input{onedown-examples.tex}'|\\ +Beware: Copy\&Paste may use wrong quotes! Replace them by the right ones from your keybord. +\\[0.7em] +\centerline{\textbf{This document shows the commands for the \emph{\languagename}\ language}} +\par\vspace{1\baselineskip} +\setlength\columnseprule{.8pt}% rule between cols +\begin{multicols}{3}[{\centering \textbf{\Large List of Examples}}] +% Use \tableofcontents to create a hyperref'ed list of examples +% by stripping all stuff except the toclist itself, +% Change \addvspace too, to keep things tight . + \makeatletter + \renewcommand\tableofcontents{\@starttoc{toc}} + \makeatother + \renewcommand*{\addvspace}[1]{} + \tableofcontents +\end{multicols} +\SubFile{Hands} +\SubFile{Suits} +\SubFile{showNS-warn-I} +\SubFile{showNS-warn-II} +\SubFile{showNS-align} +\SubFile{showAll} +\SubFile{Select-Hands} +\SubFile{Bidding} +\SubFile{bidAll} +\SubFile{bidNS} +\SubFile{bidEW} +\SubFile{bidNE} +\SubFile{bidNW} +\SubFile{Legends} +\SubFile{Wrapping} +\SubFile{Play} +\SubFile{ExpertQuiz} +\SubFile{Languages} +\SubFile{Compass} +\SubFile{FancyColors} +\SubFile{CardSymbols} +\end{document} + diff --git a/macros/latex/contrib/onedown/Examples/onedown-ref.pdf b/macros/latex/contrib/onedown/Examples/onedown-ref.pdf new file mode 100644 index 0000000000..bd8d90a892 Binary files /dev/null and b/macros/latex/contrib/onedown/Examples/onedown-ref.pdf differ diff --git a/macros/latex/contrib/onedown/Examples/onedown-ref.tex b/macros/latex/contrib/onedown/Examples/onedown-ref.tex new file mode 100644 index 0000000000..e562055cba --- /dev/null +++ b/macros/latex/contrib/onedown/Examples/onedown-ref.tex @@ -0,0 +1,536 @@ +%% +%% onedown-ref.tex +%% Oct 04, 2019 +%% Requires the onedown bundle +%% Part of the OneDown bundle (mirror.ctan.org/onedown) +%% author: J. Wiersma +%%--------NOTE------------------------------------------- +%% USAGE: (pdf)latex onedown-ref.tex +%%------------------------------------------------------- + +\PassOptionsToPackage{shorthands=off}{babel} +\documentclass[a4paper,fontsize=11pt,% + danish,% + dutch,% + french,% + german,% + ngerman,% + italian,% + norsk,% + spanish,% + swedish,% + turkish,% + english,% this is the default language +]{scrartcl} +\usepackage{scrlayer-scrpage} +% +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} +% +\usepackage{babel}% +\usepackage{onedown}% our own style to set bridge stuff +\usepackage[a4paper, total={185mm, 257mm},left=12mm,top=20mm]{geometry} +\newcommand\OneDown{\textcolor{red}{\smaller\bfseries\textsc{OneDown}}\xspace} +\usepackage{shortvrb} +\MakeShortVerb{\|} +\usepackage{enumitem}% +\usepackage[pdfencoding=auto]{hyperref} +\hypersetup{% + pdftitle={onedown-ref.pdf}, + pdfsubject={Bridge Diagrams, OneDown bundle}, + pdfkeywords={OneDown Bridge LaTeX}, + colorlinks, + linkcolor=red, +} +% +\usepackage[Q=yes]{examplep} +\makeatletter +\def\verbatim@font{\ttfamily\bfseries + \hyphenchar\font\m@ne + \@noligs} +\makeatother +% +\newcommand\bs{% + \texttt{% + \upshape% the itshape of meta screws the backslash + \textbackslash% + }% +}% bs +% +\let\olditem\item +\renewcommand\item[1][\relax]{\olditem\textbf{\bs#1}} +%\def\Item{\olditem[\bs]} +% +\definecolor{optbackgr}{named}{lightgray} +\newcommand\Oarg[1]{\colorbox{optbackgr}{\texttt{#1}}} +% default language to show the onedown command +\def\RefLang{english} +\begin{document} +% when compiled with: +% pdflatex '\AtBeginDocument{\def\RefLang{YourLanguage}}\input{onedown-ref.tex}' +% you'll get the onedown commands expansions in YourLanguage +% YourLanguage can be any language out of: +% english, danish, dutch, french, (n)german, italian, norsk, spanish, % swedish, +% turkish. +% +\expandafter\selectlanguage\expandafter{\RefLang} +% +\larger +\newgeometry{total={150mm, 265mm},left=25mm,top=15mm} +\pagestyle{empty} +% +\title{Reference Guide for the\\\OneDown package% +\footnote{This file is part of the \OneDown bundle. To generate this file, +use the following command: \newline \texttt{\$ pdflatex \jobname.tex}} +\\[1em] +\normalsize\url{www.ctan.org/pkg/onedown} +} +\author{J.\,Wiersma\footnote{email: \textsf{jack46@schuli-wirsi.de}}} +\date{07 December 2023 (v0.6)} +\maketitle +% +\par\vspace{1\baselineskip}\noindent +Here we show all \textbf{user commands} of the package |onedown| in alphabetical +order. If we only show the ouput that a command produces, then this output +is shown directly behind the command on the same line. If a description of +the command is given, then this description starts on a new line. Optional +parameters of a command appear in brackets |[...]|, parenthesis |(...)| or +angles |<...>|. Optional tokens of a command appear with a different +background color, like \Oarg{*!}. Output of a tokenized |\macro*!| is shown +as: +\quad|\macro|\Oarg{*!}|: \macro, \macro*, \macro!, \macro*!|\\ +The explanatory text is always in the English language. But you can show the output of all commands +in any of the supported languages.\\ +These are: english, danish, dutch, french, (n)german, italian, norsk, spanish, +swedish, turkish. \\ +You obtain this output in \emph{YourLanguage} by compiling onedown-ref.tex with: \\[0.5em] +% +\verb|pdflatex '\AtBeginDocument{\def\RefLang{YourLanguage}}\input{onedown-ref.tex}'|\\ +Beware: Copy\&Paste may use wrong quotes! Replace them by the right ones from your keybord. +\\[0.7em] +\centerline{\textbf{This document shows the commands for the \emph{\languagename}\ language}} +\begin{description}[itemsep=-0.3em] +\item[ace]: \ace +\item[Ace\Oarg{*!}]: \Ace, \Ace*, \Ace!, \Ace*! + +\item[alert]: |2\NT\alert| typesets 2\NT\alert and |2\Cl\alert| typesets +2\Cl\alert + +\item[all]: \all +\item[All\Oarg{*!}]: \All, \All*, \All!, \All*! + +\item[allpass]: \allpass +\item[Allpass\Oarg{*!}]: \Allpass, \Allpass*, \Allpass!, \Allpass*! + +\item[announce]: |2\He\announce| typesets 2\He\announce + +\item[bidderfont\Q{{font} }]\\ +Defines the font for the names in +bidding diagrams. The mandatory parameter for all font commands is a font +description like |\sffamily\bfseries\HUGE| or |\mdseries\slshape\smaller| +or |\sffamily\scalefont{3}|. + +\item[board]: \board +\item[Board\Oarg{*!}]: \Board, \Board*, \Board!, \Board*! + +\item[boardnr\Q{{Nr} }]\\ +Calculates (and stores) the dealership and vulnerability if |Nr| +is a number. If it is just a text it is stored to be used instead of a +board number. + +\item[boardtext\Oarg{*}]\\ +Typesets the value that is stored with |\boardnr|. +The star version writes the text \textbf{\boardtext*} in front of it. + +\item[by]: \by + +\item[Cl]: \Cl + +\item[compassfont\Q{{font} }]\\ +Defines the font for the compass. + +\item[contract]: \contract +\item[Contract\Oarg{*!}]: \Contract, \Contract*, \Contract!, \Contract*! + +\item[deal]: \deal +\item[Deal\Oarg{*!}]: \Deal, \Deal*, \Deal!, \Deal*! + +\item[dealer\Q{[text]}]\\ +Typeset the defined dealer. With the optional +parameter one can define the dealer. + +\item[dealertext\Q{[text]}]\\ +Typeset the user-defined value for the |\dealer|, +e.g.\ \mbox{\dealertext[\east]}. With the optional parameter one can define +the |text| to be printed \emph{as is}. + +\item[declarer]: \declarer +\item[Declarer\Oarg{*!}]: \Declarer, \Declarer*, \Declarer!, \Declarer*! + +\item[Di]: \Di + +\item[double]: \double +\item[Double\Oarg{*!}]: \Double, \Double*, \Double!, \Double*! + +\item[DP]: \DP +\item[dpts\Oarg{*!}]: \dpts, \dpts*, \dpts!, \dpts*! + +\item[east]: \east +\item[East\Oarg{*!}]: \East, \East*, \East!, \East*! + +\item[easthand\Q{[h-offset]{Sp}{He}{Di}{Cl}}]\\ +Defines the cards for the +\East*!-player. With the optional parameter |h-offset| one can adapt the +(\emph{horizontal}) distance between hand and compass (default +\textbf{0pt}). The 4 mandatory parameters define the cards for the 4 suits. +To denote the rank \suit{T}, one has to use the uppercase letter |T|. + +\item[eastwest]: \eastwest +\item[Eastwest\Oarg{*!}]: \EastWest, \EastWest*, \EastWest!, \EastWest*! + +\item[expertquiz\Oarg{*!}\Q{[comment]{award}}]\\ +Typesets a quiz, showing a +predefined hand and a predefined bidding diagram. The star version centers +the output. The token |!| forces a newline between hand and bidding +diagram. With the optional parameter one can add some comments. The +mandatory parameter defines the award for the different solutions. + +\item[explainit\Q{{expl} }]\\ +writes \emph{expl} below the bidding diagram in a footnote like way. + +\item[footlinetext\Q{{text} }]\\ +Typeset the text below the card diagram. + +\item[FSF]: \FSF +\item[fsforce\Oarg{*!}]: \fsforce, \fsforce*, \fsforce!, \fsforce*! + +\item[gamefont\Q{{font} }]\\ +Defines the font for card diagrams, hands and suits. + +\item[GF]: \GF +\item[gforce\Oarg{*!}]: \gforce, \gforce*, \gforce!, \gforce*! + +\item[hand\Oarg{*!-}\Q{[pos]{Sp}{He}{Di}{Cl}}]\\ +Typesets the cards of 1 single hand, +normally horizontally, left aligned. The star version centers the output. +The token |!| typesets the hand vertically, left aligned. With both |*!| +the hand is typeset vertically, centered. The optional argument |pos| +(default \textbf{c}), controls the horizontal alignment. +The third token |-| suppresses all output, which is then only saved for +later use (in e.g.\ |\expertquiz|). The 4 +mandatory parameters define the cards for the 4 suits. To denote the rank +\suit{T}, one has to use the uppercase letter |T|. + +\item[handskip\Q{{length description} }]\\ +Adds |length| to the distance (default |1em|) between the rightmost hand +and the bidding diagram. + +\item[HCP]: \HCP + +\item[headlinetext\Q{{text} }]\\ +Typeset the text above the card diagram. + +\item[He]: \He + +\item[HLP]: \HLP + +\item[hpts\Oarg{*!}]: \hpts, \hpts*, \hpts!, \hpts*! + +\item[jack]: \jack +\item[Jack\Oarg{*!}]: \Jack. \Jack*, \Jack!, \Jack*! + +\item[king]: \king +\item[King\Oarg{*!}]: \King, \King*, \King!, \King*! + +\item[lead]: \lead +\item[Lead\Oarg{*!}]: \Lead, \Lead*, \Lead!, \Lead*! + +\item[leftlower\Q{[h-offset]{line1}{line2}{line3}}] + +\item[leftupper\Q{[h-offset]{line1}{line2}{line3}}]\\ +Typesets an annotation of 3 lines in the left lower/upper corner of the +card diagram. With the optional parameter one can add some extra horizontal +space between hand and annotation. + +\item[legendfont\Q{{font} }]\\ +Defines the font for annotations in card diagrams. + +\item[LP]: \LP +\item[lpts\Oarg{*!}]: \lpts, \lpts*, \lpts!, \lpts*! + +\item[markit]\\ +sets a footnote-like marker in a bidding diagram. + +\item[namefont\Q{{font} }]\\ +Defines the font for the real world names in bidding diagrams. + +\item[namesEW\Q{{E-name}{W-name}}]\\ +Defines the real world names for the \eastwest players, that will appear +in the bidding diagram. + +\item[namesNS\Q{{N-name}{S-name}}]\\ +Defines the real world names for the \northsouth players, that will appear +in the bidding diagram. + + +\item[newgame]\\ +Resets some stored data + +\item[NMF]: \NMF +\item[nmforce\Oarg{*!}]: \nmforce, \nmforce*, \nmforce!, \nmforce*! + +\item[none]: \none +\item[None\Oarg{*!}]: \None, \None*, \None!, \None*! + +\item[north]: \north +\item[North\Oarg{*!}]: \North, \North*, \North!, \North*! + +\item[northhand\Q{[v-offset]{Sp}{He}{Di}{Cl}}]\\ +Defines the cards for the +\North*!-player. With the optional parameter |v-offset| one can adapt the +(\emph{vertical}) distance between hand and compass (default \textbf{0pt}). +The 4 mandatory parameters define the cards for the 4 suits. To denote the +rank \suit{T}, one has to use the uppercase letter |T|. + +\item[northsouth]: \northsouth +\item[NorthSouth\Oarg{*!}]: \NorthSouth, \NorthSouth*, \NorthSouth!, \NorthSouth*! + +\item[nt\Oarg{*!}]: \nt, \nt*, \nt!, \nt*! +\item[NT]: \NT + +\item[onesuitAll\Oarg{*!}\Q{{N}{S}{E}{W}}]\\ +Typesets the cards of 1 suit for all +players. The star version centers the output. The token |!| prints a small +box rather than the compass. The 4 mandatory parameters denote the cards +for the \North*!-, the \South*!-, the \East*!- and the \West*!-player. + +\item[onesuitEW\Oarg{*!}\Q{{E}{W}}]\\ +Same as |onesuitAll|, but only for the \East*!- and the \West*!-player. + +\item[onesuitNE\Oarg{*!}\Q{{N}{E}}]\\ +Same as |onesuitAll|, but only for the \North*!- and the \East*!-player. + +\item[onesuitNS\Oarg{*!}\Q{{N}{S}}]\\ +Same as |onesuitAll|, but only for the \North*!- and the \South*!-player. + +\item[onesuitNW\Oarg{*!}\Q{{N}{W}}]\\ +Same as |onesuitAll|, but only for the \North*!- and the \West*!-player. + +\item[otherfont\Q{{font} }]\\ +Defines the font for other items. + +\item[pass]: \pass +\item[Pass\Oarg{*!}]: \Pass, \Pass*, \Pass!, \Pass*! + +\item[queen]: \queen +\item[Queen\Oarg{*!}]: \Queen, \Queen*, \Queen!, \Queen*! + +\item[redouble]: \redouble +\item[Redouble\Oarg{*!}]: \Redouble, \Redouble*, \Redouble!, \Redouble*! + +\item[resetfonts]\\ +Sets all fonts back to their default value. + +\item[rightlower\Q{[h-offset]{line1}{line2}{line3}}] +\item[rightupper\Q{[h-offset]{line1}{line2}{line3}}]\\ +Typesets an annotation of 3 lines in the right lower/upper corner of the +card diagram. With the optional parameter one can add some extra horizontal +space between hand and annotation. + +\item[setdefaults\Oarg{*}\string{key1=val1,key2=val2,\ldots\string}]\\ +With the keys |bidder|, |compass|, |game|, |legend|, |name| or |other| one +can set the default font for the respective items. With the keys +|compline|, |compmid|, |compshow|, |compsize| or |compturn| on can set the +look of the compass. With the keys |bidders|, |bidfirst|, |bidline| or +|bidlong| one can fine-tune the bidding diagram. The keys that can be used +as package options (|colors|, |err| and |warn|) can also be set here. +The star form also calls |\resetfonts| which effectuates any font change +immediately. + +\item[SF]: \SF +\item[sforce\Oarg{*!}]: \sforce, \sforce*, \sforce!, \sforce*! + +\item[showAll\Oarg{*+}\Q{[pos]}]\\ +Typesets a card diagram with 4 (previously +defined, i.e.\ with |\northhand| etc.) hands. The star version centers the +output. The token |+| adds a bidding table to the diagram, that has to be +previously defined, i.e.\ with e.g:\\ +|\begin{bidding}-|\ldots|\end{bidding}|. The optional parameter |pos| +(default~\textbf{c}) aligns the diagram. + +\DeleteShortVerb{\|} +\item[showEW\Oarg{*+}\Q{[pos]}(E|W)]\\ +\MakeShortVerb{\|} +Same as |\showAll|, but for the \East*!- and the \West*!-hand. |\showEW(E)| +prints only the \East*!-hand + +\item[showNE\Oarg{*+}\Q{[pos]}]\\ +Same as |\showAll|, but for the \North*!- and the \East*!-hand. + +\DeleteShortVerb{\|} +\item[showNS\Oarg{*+}\Q{[pos]}(N|S)]\\ +\MakeShortVerb{\|} +Same as |\showAll|, but for the \North*!- and the \South*!-hand. |\showNS(S)| +prints only the \South*!-hand +\item[showNW\Oarg{*+}\Q{[pos]}]\\ +Same as |\showAll|, but for the \North*!- and the \West*!-hand. + +\item[south]: \south +\item[South\Oarg{*!}]: \South, \South*, \South!, \South*! + +\item[southhand\Q{[v-offset]{Sp}{He}{Di}{Cl}}]\\ +Defines the cards for the +\South*!-player. With the optional parameter |v-offset| one can adapt the +(\emph{vertical}) distance between hand and compass (default \textbf{0pt}). +The 4 mandatory parameters define the cards for the 4 suits. To denote the +rank \suit{T}, one has to use the uppercase letter |T|. + +\item[Sp]: \Sp + +\item[suit\Q{[suit symbol]{cards}}]\\ +Typesets the cards of 1 single suit. +With the optional parameter one can add a suit symbol (e.g.\ \He) in front +of the cards. The mandatory parameter defines the cards for the suit. To +denote the rank \suit{T}, one has to use the letter |T|. + +\item[TP]: \TP +\item[tpts\Oarg{*!}]: \tpts, \tpts*, \tpts!, \tpts*! + +\item[TSF]: \TSF +\item[tsforce\Oarg{*!}]: \tsforce, \tsforce*, \tsforce!, \tsforce*! + +\item[vulner\Q{[text]}]\\ +Typeset the user-defined vulnerability. With the optional parameter one can +define the vulnerability. + +\item[vulnertext\Q{[text]}]\\ +Typeset the defined value for the |\vulner|, e.g.\ +\mbox{\vulnertext[\NorthSouth*]}. With the optional parameter one can +define the |text| to be printed \emph{as is}. + +\item[west]: \west +\item[West\Oarg{*!}]: \West, \West*, \West!, \West*! + +\item[westhand\Q{[h-offset]{Sp}{He}{Di}{Cl}}]\\ +Defines the cards for the +\West*!-player. With the optional parameter |h-offset| one can adapt the +(\emph{horizontal}) distance between hand and compass (default +\textbf{0pt}). The 4 mandatory parameters define the cards for the 4 suits. +To denote the rank \suit{T}, one has to use the uppercase letter |T|. + +\olditem[\string\begin\string{bidding\string}\Oarg{*!-}\Q{[pos](description)}\ldots\string\end\string{bidding\string}]~\\ +Typesets a bidding diagram. The star version centers the output. The +token~|!| forces a short form (\North*!) rather than the long form +(\North*) in the table header. The token~|-| suppresses all output, but the +saved data can be used elsewhere. The optional paramater |pos| (default +\textbf{c}) controls the alignment of the diagram. With the 2nd optional +parameter |description| one can add annotations (see also |\markit| and +|\explainit|) below the diagram. The bids in the bidding can both be +shorthands like |3S| as well as |3\Sp|. The same goes for calls: both |p| +and |\pass| are possible. For an overview of all possible shorthands, refer +to the last page of this document. +\par +The command |\setdefaults| has some keys to fine tune the +look of the bidding diagram. If the real world names of the players are +defined (e.g.\ with |\namesNS|, then they also appear in the table header. + +\olditem[\string\begin\string{biddingpair\string}\Oarg{*!-}\Q{[pos](description)}\ldots\string\end\string{biddingpair\string}]~\\ +Same as environment |bidding| but with only 2 columns. + +\olditem[\string\begin\string{play\string}\Oarg{*}\Q{{lead}[trump]}\ldots\string\end\string{play\string}]~\\ +Typesets a diagram with the playing tricks. The star version centers the +output. The mandatory parameter defines the player who had the opening +lead. The optional parameter defines the trump suit, the default is \NT. +This environment produces a table with 8 columns: the running number; the +player who had had the lead; the 4 cards played in this trick and finally +the 2 columns that show how many tricks \northsouth{} and \eastwest{} have +won so far. The user has only to enter the 4 colums that denote the 4 cards +played in each trick. The rest is handled by \OneDown. +% +\end{description} +% +% reset \item +%\fi +\let\item\olditem +% +\newpage +\centerline{\larger\textbf{Shorthands/Specials in bidding diagrams}} +\par\vspace{1\baselineskip}\noindent +% +\begin{minipage}{6cm} +\begin{verbatim} +\begin{bidding} +p & X & R & P \\ +\end{bidding} +\end{verbatim} +\end{minipage} +% +\begin{minipage}{7cm} +\begin{bidding} +p & X & R & P \\ +\end{bidding} +\end{minipage} +% +\\[1\baselineskip] +% +\begin{minipage}{6cm} +\begin{verbatim} +\setdefaults{bidlong=off} +\begin{bidding} +p & X & R & P \\ +{\frame{2H}} & +{\frame{2\He}} & +{\textit{R}} & +{\textit{\redouble}} \\ +\end{bidding} +\end{verbatim} +\end{minipage} +% +\begin{minipage}{6cm} +\setdefaults{bidlong=off} +\begin{bidding} +p & X & R & P \\ +{\frame{2H}} & {\frame{2\He}} & {\textit{R}} & {\textit{\redouble}} \\ +\end{bidding} +\end{minipage} +% +\\[1\baselineskip] +% +\centerline{\larger\textbf{Macros in bidding diagrams}} +\par\vspace{0.3\baselineskip}\noindent +These macros, called in a bidding table\ldots +\par\vspace{0.5\baselineskip}\noindent +% +\begin{verbatim} +\begin{bidding} +1 \Pass & \Double & \Redouble & \Allpass \\ +2 \Pass* & \Double* & \Redouble* & \Allpass* \\ +3 \Pass! & \Double! & \Redouble! & \Allpass! \\ +4 \Pass*! & \Double*! & \Redouble*! & \Allpass*! \\ +5 \pass & \double & \redouble & \allpass \\ +6 {\Pass*} & {\Double*} & {\Redouble*} & {\Allpass*} \\ +7 {\Pass!} & {\Double!} & {\Redouble!} & {\Allpass!} \\ +8 {\Pass*!} & {\Double*!} & {\Redouble*!} & {\Allpass*!} \\ +9 {\pass} & {\double} & {\redouble} & {\allpass} \\ +\end{bidding} +\end{verbatim} +% + +\ldots produce this output. Please note that line 2--5 are peculiar. +\par\vspace{0.3\baselineskip}\noindent +\begin{tabular}{lBBBB} + & {\west} & {\north} & {\east} & {\south} \\ +1 & \Pass & \Double & \Redouble & \Allpass \\ +2 & \Pass* & \Double* & \Redouble* & \Allpass* \\ +3 & \Pass! & \Double! & \Redouble! & \Allpass! \\ +4 & \Pass*! & \Double*! & \Redouble*! & \Allpass*! \\ +5 & \pass & \double & \redouble & \allpass \\ +6 & {\Pass*} & {\Double*} & {\Redouble*} & {\Allpass*} \\ +7 & {\Pass!} & {\Double!} & {\Redouble!} & {\Allpass!} \\ +8 & {\Pass*!} & {\Double*!} & {\Redouble*!} & {\Allpass*!} \\ +9 & {\pass} & {\double} & {\redouble} & {\allpass} \\ +\end{tabular}\\ + +\end{document} +\endinput + diff --git a/macros/latex/contrib/onedown/Examples/showAll.tex b/macros/latex/contrib/onedown/Examples/showAll.tex new file mode 100644 index 0000000000..e7571f6d3c --- /dev/null +++ b/macros/latex/contrib/onedown/Examples/showAll.tex @@ -0,0 +1,140 @@ +\documentclass[onedown-examples]{subfiles} + +\begin{document} +\vfill +|\showAll| displays a card diagram with the 4 hands. Here the \east hand is +empty and is skipped completely from the diagram. If you want to show an +empty suit explicitly (which is a good thing), just use a single hyphen. +\OneDown will make an en-dash out of it. We added the dealer and +vulnerability to the diagram, the value of which was calculated +automatically from the given boardnumber(18). Please note that the +vulnerable side is printed in red and that the dealer is underlined in the +compass. With |\setdefaults{compmid=\boardtext}| we write the board number +as mid text in the compass. If given this way, it will always print the +\emph{actual} board number, as you can see in the following examples. +\vfill +% due to the grouping of the HBox, we must set |compmid| here. +% Otherwise it would not be in effect in the next HBox! +\setdefaults{compmid=\boardtext} +\begin{HBox}{showBoardNr\hfill File: \FileName} +\setdefaults{compmid=\boardtext} +\northhand{AJ}{K}{-}{-} +\southhand{32}{-}{A}{-} +\easthand{}{}{}{} +\westhand{KQ}{A}{-}{-} +\boardnr{18} +\leftupper{\dealertext}{}{\vulnertext} +\showAll +\end{HBox} +\vfill +This example shows how to add several conditions, such as declarer, lead +etc.\ to a diagram. |\boardtext| just prints the plain board number and was +called in |\setdefault{compmid=\boardtext}| (rather than using the +hard-coded number) to set it in the middle of the compass. In |\leftupper| +we use |\boardtext*| to print the boardnumber behind an additional text. + +You will have noticed that the right upper text does not fit well in the +diagram: it collides with the \north hand\ldots +\vfill +\begin{HBox}{Board Number\hfill File: \FileName} +\boardnr{19} +\northhand{AK43}{AQJ83}{AJ98}{-} +\southhand{87}{T5}{QT5}{K98654} +\easthand{JT6}{764}{K43}{JT32} +\westhand{Q952}{K92}{762}{AQ7} +\leftupper{\boardtext*}% + {\dealertext}{\vulnertext} +\rightupper{\contract: 3\,\NT}{\declarer \south}{} +\rightlower{\lead: \Di 7}{}{} +\showAll* +\end{HBox} +% +\vfill + \needspace{8\baselineskip} + \ldots so we add some (here 2ex) offset, to shift the text a bit to the +right. One can shift the upper/lower and left/right texts independently. A +positive offset shifts away from the compass, a negative offset would shift +the text towards the compass. +\vfill +\begin{HBox}{Board Number\hfill File: \FileName} +\boardnr{20} +\northhand{AK43}{AQJ83}{AJ98}{-} +\southhand{87}{T5}{QT5}{K98654} +\easthand{JT6}{764}{K43}{JT32} +\westhand{Q952}{K92}{762}{AQ7} +\leftupper{\boardtext*}% + {\dealertext}{\vulnertext} +\rightupper[2ex]{\contract: 3\,\NT}{\declarer \south}{} +\rightlower{\lead: \Di 7}{}{} +\showAll* +\end{HBox} +% +\vfill +Please note that the board number in the middle of the compass has been +updated each time that we called |\boardnr|. More important however, is to +see that the very long suit of the \north hand collides massively with the +right upper condition text. Shifting the text wouldn't help here. +\vfill +\begin{HBox}{Very long suits 1\hfill File: \FileName} +\boardnr{21} +\northhand{AKQJT98765432}{-}{-}{-} +\southhand{-}{2}{2}{AKQJT987654} +\easthand{-}{876543}{876543}{3} +\westhand{-}{AKQJT9}{AKQJT9}{2} +\showAll +\end{HBox} +\vfill +\needspace{8\baselineskip} +A simple way to 'correct' this is by lowering the text: leave the first +line of the right-upper text empty. +\vfill +\begin{HBox}{Correction by lowering the text\hfill File: \FileName} +\rightupper{}{\contract: 3\,\NT}{\declarer \south} +\northhand{AKQJT98765432}{-}{-}{-} +\southhand{-}{2}{2}{AKQJT987654} +\easthand{-}{876543}{876543}{3} +\westhand{-}{AKQJT9}{AKQJT9}{2} +\showAll +\end{HBox} +\vfill +Another problem with (very) long suits, is that the \eastwest hands can +seem too close to a \northsouth hand, as can be seen in next example. Of +course the hands are not any closer to each other as before, but the long +suit in the unfavourable position make it clearly look so. +\vfill +\begin{HBox}{Very long suits 2\hfill File: \FileName} +\rightupper{\contract: 3\,\NT}{\declarer \south}{} +\northhand{-}{2}{2}{AKQJT987654} +\southhand{AKQJT98765432}{-}{-}{-} +\easthand{-}{876543}{876543}{3} +\westhand{-}{AKQJT9}{AKQJT9}{2} +\rightlower{}{\lead: \Di 7}{} +\showAll +\end{HBox} +\vfill +\needspace{8\baselineskip} +The solution is to add some offset. In a previous example we already showed +how to use an offset with an annotation. Here we add an offset to the +apropriate \emph{hand}. This +is done with the optional parameter in the \north and the \south hand. The +\north hand shifts upwards, the \south hand downwards. As a little +demonstration, we also shifted the \east hand a bit to the right and the +\west hand a bit to the left. Negative offset values reverse the shift +direction. +\vfill +\begin{HBox}{Very long suits 3 with extra offset\hfill File: \FileName} +\northhand[1em]{-}{2}{2}% + {AKQJT987654} +\southhand[1em]{AKQJT98765432}% + {-}{-}{-} +\easthand[1em]{-}{876543}% + {876543}{3} +\westhand[1em]{-}{AKQJT9}% + {AKQJT9}{2} +\showAll +\end{HBox} +\vfill +\end{document} +\endinput + + diff --git a/macros/latex/contrib/onedown/Examples/showNS-align.tex b/macros/latex/contrib/onedown/Examples/showNS-align.tex new file mode 100644 index 0000000000..47234eb1d0 --- /dev/null +++ b/macros/latex/contrib/onedown/Examples/showNS-align.tex @@ -0,0 +1,39 @@ +\documentclass[onedown-examples]{subfiles} +\begin{document} +These examples show the alignment of diagrams. +The alignment is given as an optional argument to the |showXX| commands. It +bears the usual name for alignments: \textbf{t} for top, \textbf{b} for +bottom and \textbf{c} for centered. Note that the |\smaller\smaller| from +a previous example is still in effect: The command |\newgame| does not +reset any font. Please note the difference between diagram 1 and 3. The +font used for the suits is \textbf{not} the same. + +\vfill +\begin{HBox}{showNS top algned\hfill File: \FileName} +\newgame +\northhand{KJ92}{KQ9}{J}{AQJT8} +\southhand{AQT85}{A52}{64}{K96} +A \showNS[t] B +\resetfonts +C \showNS[t] D +\gamefont{\sffamily\bfseries\smaller\smaller} +E \showNS[t] F +\end{HBox} +\vfill +We do need to call |\resetfonts| (or |\gamefont|) explicitly to reset the +font or size. +\vfill +\begin{HBox}{showNS center aligned\hfill File: \FileName} +\resetfonts +% \gamefont would do the job as well +%\gamefont{\bfseries\sffamily} +A \showNS[c] B +\end{HBox} +\vfill +\begin{HBox}{showNS bottom aligned\hfill File: \FileName} +A \showNS[b] B +\end{HBox} +\vfill +\end{document} +\endinput + diff --git a/macros/latex/contrib/onedown/Examples/showNS-warn-I.tex b/macros/latex/contrib/onedown/Examples/showNS-warn-I.tex new file mode 100644 index 0000000000..a24c9a0066 --- /dev/null +++ b/macros/latex/contrib/onedown/Examples/showNS-warn-I.tex @@ -0,0 +1,29 @@ +\documentclass[onedown-examples]{subfiles} +\newgame +\begin{document} + +If you do not define all cards of a deck, then a lot of `missing card' +warnings will appear. Therefore most of the time it is better that warnings +are switched off. This is the default, but you can explicitly do that with +|\setdefaults{warn=off}|. It is also the default to produce \emph{error} +messages, which you can also switch off with |\setdefaults{err=off}|. +We recommend to have errors shown when you enter new diagrams. Please +observe how the |\smaller\smaller| command shrinked the diagram. We did +that to make all the warnings fit in the box. To avoid that all following +diagrams are also shrinked you must call |\gamefont{\bfseries\sffamily}| +again without the resizing. Calling |\resetfonts| has the same effect, but +would also influence the other fonts. +\vfill +\begin{HBox}{showNS with warnings\hfill File: \FileName} +\setdefaults{warn=on} + \gamefont{\bfseries\sffamily% + \smaller\smaller} + \northhand{KJ92}{KQ9}{J}{AQJT8} + \southhand{AQT85}{A52}{64}{K96} + \showNS +\end{HBox} +\vfill +% +\end{document} +\endinput + diff --git a/macros/latex/contrib/onedown/Examples/showNS-warn-II.tex b/macros/latex/contrib/onedown/Examples/showNS-warn-II.tex new file mode 100644 index 0000000000..c7e6475d63 --- /dev/null +++ b/macros/latex/contrib/onedown/Examples/showNS-warn-II.tex @@ -0,0 +1,59 @@ +\documentclass[onedown-examples]{subfiles} +\begin{document} +In the previous example we enabled warnings and set a much smaller font to +make the example fit on the page. As we compile these examples as one big +file, \OneDown remembers these values. If you compile this file +(showNS-warn-II) standalone with |pdflatex showNS-warn-II| and view the +result, then you'll see no warnings and no shrinking. + +\vfill +\begin{HBox}{showNS \hfill File: \FileName} +\northhand{KJ92}{KQ9}{J}{AQJT8} +\southhand{AQT85}{A52}{64}{K96} +\showNS +\end{HBox} +% +\vfill +\needspace{8\baselineskip} +\vfill +Now warnings are switched off explicitly and the size is reset by calling +|\resetfonts|. +\vfill +\begin{HBox}{showNS \hfill File: \FileName} +\setdefaults{warn=off} +\resetfonts +\showNS +\end{HBox} +% +\vfill +|\newgame| clears the hands. A hand with no cards at all is completely +suppressed, so we see only the compass. With |\setdefaults{compmid=text}| +we can write 'text' in the middle of the compass. We enlarged the compass, +so you can see that it \emph{is} on the vertical line through the mids of +\North*! and \South*!. With |\resetfonts| we return to the default values +of the fonts. With |\setdefaults| one can influence the look of diagrams. +In section |Compass| we'll go more into detail. Please note that |\setdefaults| has +only 1 argument, It is \emph{mandatory} and must be enclosed in +braces (|{...}|). The argument is a key-val list, separated by commas. I.e. rather +than |\setdefaults{warn=off}\setdefaults{compmid=15}| one can also write +|\setdefaults{warn=off,compmid=15}|. +\vfill +\begin{HBox}{showNS \hfill File: \FileName} +\newgame +\raggedright +\setdefaults{compmid=15} +\showNS +\showNS +\gamefont{\sffamily\bfseries\Huge} +\showNS +\resetfonts +\setdefaults{compmid=} +\showNS +\gamefont{\smaller\smaller} +\showNS +\end{HBox} +\vfill +% +\end{document} +\endinput + diff --git a/macros/latex/contrib/onedown/ODw-French.dict b/macros/latex/contrib/onedown/ODw-French.dict index 4f75bfe53f..3a9f502654 100644 --- a/macros/latex/contrib/onedown/ODw-French.dict +++ b/macros/latex/contrib/onedown/ODw-French.dict @@ -68,7 +68,7 @@ \providetranslation{game forcing-(ODw)}{forcing de manche} \providetranslation{Game Forcing-(ODw)}{Forcing de Manche} \providetranslation{GF-(ODw)}{FM} -\providetranslation{gf-(ODw)}{gf} +\providetranslation{gf-(ODw)}{fm} \providetranslation{hand-(ODw)}{main} \providetranslation{Hand-(ODw)}{Main} \providetranslation{hcp-(ODw)}{h} diff --git a/macros/latex/contrib/onedown/ODw-Italian.dict b/macros/latex/contrib/onedown/ODw-Italian.dict new file mode 100644 index 0000000000..016f7d01a3 --- /dev/null +++ b/macros/latex/contrib/onedown/ODw-Italian.dict @@ -0,0 +1,174 @@ +% this is file ODw-Italian.dict from the OneDown bundle +% made available by Nicola Lombardi +% +% Entries with a "!" denote an abreviated form +% +% retrieve with e.g. \translation{dealer-(ODw)} to get dealer +% +\ProvidesDictionary{ODw}{Italian}[V0.2-2024/12/06] + +\providetranslation{1st-(ODw)}{1.} +\providetranslation{2nd-(ODw)}{2.} +\providetranslation{3rd-(ODw)}{3.} +\providetranslation{4th-(ODw)}{4.} +\providetranslation{ace-(ODw)}{asso} +\providetranslation{Ace-(ODw)}{Asso} +\providetranslation{all-(ODw)}{tutti} +\providetranslation{All-(ODw)}{Tutti} +\providetranslation{all!-(ODw)}{tutti} +\providetranslation{All!-(ODw)}{Tutti} +\providetranslation{all pass-(ODw)}{tutti passano} +\providetranslation{All pass-(ODw)}{Tutti passano} +\providetranslation{a-(ODw)}{a} +\providetranslation{A-(ODw)}{A} +\providetranslation{ap-(ODw)}{tp} +\providetranslation{AP-(ODw)}{TP} +%(JW) \providetranslation{Award-(ODw)}{Risultato} +\providetranslation{Award-(ODw)}{Premio} +%(JW) \providetranslation{award-(ODw)}{risultato}% = points you earn in a quiz +\providetranslation{award-(ODw)}{premio}% = points you earn in a quiz +\providetranslation{Bid-(ODw)}{Licita} +\providetranslation{bid-(ODw)}{licita}% = e.g. 2C, 4H or 6NT +\providetranslation{Board-(ODw)}{Board} +\providetranslation{board-(ODw)}{board}% = equipment that holds 1 deal +\providetranslation{Brd-(ODw)}{Brd} +\providetranslation{brd-(ODw)}{brd}% = equipment that holds 1 deal +\providetranslation{by-(ODw)}{da} +%(JW) \providetranslation{Call-(ODw)}{Licita} +\providetranslation{Call-(ODw)}{Dichiarazione} +\providetranslation{call-(ODw)}{dichiarazione}% = bid + pass, (re)double +\providetranslation{-card-(ODw)}{-carta} +\providetranslation{contract-(ODw)}{contratto} +\providetranslation{Contract-(ODw)}{Contratto} +\providetranslation{contr-(ODw)}{contr} +\providetranslation{Contr-(ODw)}{Contr} +%(JW) \providetranslation{Dbl-(ODw)}{X} +\providetranslation{Dbl-(ODw)}{Contr} +\providetranslation{dealer-(ODw)}{dichiarante} +%\providetranslation{dealer-(ODw)}{mazziere} +\providetranslation{Dealer-(ODw)}{Dichiarante} +%\providetranslation{Dealer-(ODw)}{Mazziere} +\providetranslation{Deal-(ODw)}{Smazzata} +\providetranslation{Deal!-(ODw)}{Smazzata} +\providetranslation{deal-(ODw)}{smazzata}% = 4 hands +\providetranslation{deal!-(ODw)}{smazzata}% = 4 hands +\providetranslation{declarer-(ODw)}{giocante} +%\providetranslation{declarer-(ODw)}{dichiarante} +\providetranslation{Declarer-(ODw)}{Giocante} +%\providetranslation{Declarer-(ODw)}{Dichiarante} +\providetranslation{decl-(ODw)}{gioc} +%\providetranslation{decl-(ODw)}{dich} +\providetranslation{Decl-(ODw)}{Gioc} +%\providetranslation{Decl-(ODw)}{Dich} +\providetranslation{distribution points-(ODw)}{punti distribuzionali} +\providetranslation{Distribution Points-(ODw)}{Punti Distribuzionali} +\providetranslation{doubled-(ODw)}{contrato} +\providetranslation{Doubled-(ODw)}{Contrato} +\providetranslation{double-(ODw)}{contro} +\providetranslation{Double-(ODw)}{Contro} +\providetranslation{dp-(ODw)}{pd} +\providetranslation{DP-(ODw)}{PD} +\providetranslation{east-(ODw)}{est} +\providetranslation{East-(ODw)}{Est} +\providetranslation{e-(ODw)}{e} +\providetranslation{E-(ODw)}{E} +\providetranslation{fourth suit forcing-(ODw)}{quarto colore forzante} +\providetranslation{Fourth Suit Forcing-(ODw)}{Quarto Colore Forzante} +\providetranslation{fsf-(ODw)}{4.\,cf} +\providetranslation{FSF-(ODw)}{4.\,CF} +\providetranslation{game forcing-(ODw)}{forzante manche} +\providetranslation{Game Forcing-(ODw)}{Forzante Manche} +\providetranslation{gf-(ODw)}{fm} +\providetranslation{GF-(ODw)}{FM} +\providetranslation{Hand-(ODw)}{Mano} +\providetranslation{hand-(ODw)}{mano}% = 13 cards of 1 player +\providetranslation{hcp-(ODw)}{po} +\providetranslation{HCP-(ODw)}{PO} +\providetranslation{high card points-(ODw)}{punti onore} +\providetranslation{High Card Points-(ODw)}{Punti Onore} +%(JW) \providetranslation{HLP-(ODw)}{por} +\providetranslation{hlp-(ODw)}{pol}% HCP+LP (punti onore + punti di lunghezza) +%(JW) \providetranslation{HLP-(ODw)}{POR} +\providetranslation{HLP-(ODw)}{POL} +\providetranslation{jack-(ODw)}{fante} +\providetranslation{Jack-(ODw)}{Fante} +\providetranslation{j-(ODw)}{f} +\providetranslation{J-(ODw)}{F} +\providetranslation{king-(ODw)}{re} +\providetranslation{King-(ODw)}{Re} +\providetranslation{k-(ODw)}{r} +\providetranslation{K-(ODw)}{R} +\providetranslation{lead-(ODw)}{attacco} +\providetranslation{Lead-(ODw)}{Attacco} +\providetranslation{lead!-(ODw)}{attacco} +\providetranslation{Lead!-(ODw)}{Attacco} +\providetranslation{length points-(ODw)}{punti di lunghezza} +\providetranslation{Length Points-(ODw)}{Punti di Lunghezza} +\providetranslation{lp-(ODw)}{pl} +\providetranslation{LP-(ODw)}{PL} +\providetranslation{new minor forcing-(ODw)}{nuovo minore forzante} +\providetranslation{New Minor Forcing-(ODw)}{Nuovo Minore Forzante} +\providetranslation{nmf-(ODw)}{nmf} +\providetranslation{NMF-(ODw)}{NMF} +\providetranslation{n-(ODw)}{n} +\providetranslation{N-(ODw)}{N} +\providetranslation{none-(ODw)}{nessuno} +\providetranslation{None-(ODw)}{Nessuno} +\providetranslation{none!-(ODw)}{nessuno} +\providetranslation{None!-(ODw)}{Nessuno} +\providetranslation{north-(ODw)}{nord} +\providetranslation{North-(ODw)}{Nord} +\providetranslation{no trump-(ODw)}{sans atout} +\providetranslation{No Trump-(ODw)}{Sans Atout} +\providetranslation{Nr-(ODw)}{\textnumero} +\providetranslation{Nr.-(ODw)}{\textnumero.} +\providetranslation{NT-(ODw)}{S\kern-0.01emA} +\providetranslation{nt-(ODw)}{sa} +\providetranslation{pass-(ODw)}{passo} +\providetranslation{Pass-(ODw)}{Passo} +\providetranslation{pass!-(ODw)}{p} +\providetranslation{Pass!-(ODw)}{P} +\providetranslation{q-(ODw)}{d} +\providetranslation{Q-(ODw)}{D} +\providetranslation{queen-(ODw)}{dama} +\providetranslation{Queen-(ODw)}{Dama} +%(JW) \providetranslation{ReDbl-(ODw)}{XX} +\providetranslation{ReDbl-(ODw)}{SurCon} +\providetranslation{redoubled-(ODw)}{surcontrato} +\providetranslation{Redoubled-(ODw)}{Surcontrato} +\providetranslation{redouble-(ODw)}{surcontro} +\providetranslation{ReDouble-(ODw)}{Surcontro} +\providetranslation{semi forcing-(ODw)}{semi forzante} +\providetranslation{Semi Forcing-(ODw)}{Semi Forzante} +\providetranslation{sf-(ODw)}{sf} +\providetranslation{SF-(ODw)}{SF} +\providetranslation{s-(ODw)}{s} +\providetranslation{S-(ODw)}{S} +\providetranslation{south-(ODw)}{sud} +\providetranslation{South-(ODw)}{Sud} +\providetranslation{suiter-(ODw)}{colore} +\providetranslation{Suiter-(ODw)}{Colore} +\providetranslation{suit-(ODw)}{colore} +\providetranslation{Suit-(ODw)}{Colore} +\providetranslation{third suit forcing-(ODw)}{terzo colore forzante} +\providetranslation{Third Suit Forcing-(ODw)}{Terzo Colore Forzante} +\providetranslation{total points-(ODw)}{punti totali} +\providetranslation{Total Points-(ODw)}{Punti Totali} +\providetranslation{tp-(ODw)}{pt} +\providetranslation{TP-(ODw)}{PT} +\providetranslation{trial bid-(ODw)}{tentativo di manche} +\providetranslation{Trial bid-(ODw)}{Tentativo di Manche} +\providetranslation{trick-(ODw)}{presa} +\providetranslation{Trick-(ODw)}{Presa} +\providetranslation{tsf-(ODw)}{3.\,cf} +\providetranslation{TSF-(ODw)}{3.\,CF} +\providetranslation{vulnerable-(ODw)}{vulnerabile} +\providetranslation{Vulnerable-(ODw)}{Vulnerabile} +\providetranslation{vul-(ODw)}{vul} +\providetranslation{Vul-(ODw)}{Vul} +\providetranslation{west-(ODw)}{ovest} +\providetranslation{West-(ODw)}{Ovest} +\providetranslation{w-(ODw)}{o} +\providetranslation{W-(ODw)}{O} +% +\endinput diff --git a/macros/latex/contrib/onedown/README b/macros/latex/contrib/onedown/README index fdc16ef9f6..b563b49098 100644 --- a/macros/latex/contrib/onedown/README +++ b/macros/latex/contrib/onedown/README @@ -1,5 +1,5 @@ -------------------------------------------------------------------------- -The OneDown package v1.6 - 2021/04/27 +The OneDown package v1.7 - 2023/12/07 A package to typeset diagrams for the game of bridge -------------------------------------------------------------------------- @@ -7,7 +7,7 @@ Jacob Wiersma Web: E-Mail: jack46@schuli-wirsi.de -------------------------------------------------------------------------- -Copyright 2018-21 Jacob Wiersma +Copyright 2018-2023 Jacob Wiersma This work has the LPPL maintenance status `maintained'. @@ -31,7 +31,7 @@ the files onedown.sty, onedown.pdf - ODw-Danish.dict, ODw-Dutch.dict, ODw-English.dict, - ODw-French.dict, ODw-German.dict ODw-Norsk.dict, + ODw-French.dict, ODw-German.dict ODw-Italian.dict, ODw-Norsk.dict, ODw-Spanish.dict, ODw-Swedish.dict, ODw-Turkish.dict the directory examples with the files diff --git a/macros/latex/contrib/onedown/examples/Bidding.tex b/macros/latex/contrib/onedown/examples/Bidding.tex deleted file mode 100644 index 18ca0f7c3c..0000000000 --- a/macros/latex/contrib/onedown/examples/Bidding.tex +++ /dev/null @@ -1,244 +0,0 @@ -\documentclass[onedown-examples]{subfiles} - -\begin{document} -% -The first diagram reflects the default: the first column is for \west, -full names are shown, the alignment is \textbf{c} and the long form is -used: The lowercase |p| yields \Xfer{p} and an uppercase |P| yields -\Xfer{P}. |X| yields \Xfer{X} and |R| yields \Xfer{R}. One can use -'mixed-mode' for the entries in the table: both the abreviation |C| or the -command |\Cl| for clubs are possible. \OneDown takes care of the spacing -between the rank and the nomination, so you do not have to fiddle around -with |\thinspace|, |\,| or the like. - -In the second diagram we use the short form of the non-bid calls, by -calling |\setdefaults{bidlong=off}|. -The alignment is \textbf{t} and we have put \north in the first column. -Please observe that the change to |bidfirst=N| is made local by the -surrounding |{...}| - -In the third diagram we also use the short form for the table header by -calling the bidding table with the token |!|. The alignment is \textbf{b}. - -In the first example we also added an |\alert| and an |\announce|, just to -show their layout. -\vfill -% -\begin{HBox}{{bidding, alignment and long/short forms}\hfill File: \FileName} -%\gamefont{\smaller\smaller} -A -\begin{bidding}% default= [c] -1\Cl\announce & 1D & 1H & 1S\alert \\ -1N & X & p & p \\ -R & P \\ -\end{bidding} -B -\\[2\baselineskip] -A -{ -\setdefaults{bidlong=off,bidfirst=N} -\begin{bidding}[t] -1C & 1D & 1H & 1S \\ -1N & X & p & p \\ -R & P \\ -\end{bidding} -}B -\\[2\baselineskip] -A -%\setdefaults{bidlong=off} -\begin{bidding}![b] -1C & 1D & 1H & 1S \\ -1N & X & p & p \\ -R & p & p & p \\ -\end{bidding} -B -\end{HBox} -\vfill -\needspace{8\baselineskip} -We now show bidding diagrams with the real names of the players. In every -of the four diagrams we have a different first column. Please observe that -the association of the individuals with the \north, \east etc.\ -direction is preserved. -\vfill -\begin{HBox}{{bidding, names and first column}\hfill File: \FileName} -\namesNS{Jan}{Joris} -\namesEW{Piet}{Corneel} -\setdefaults{bidfirst=N} -\begin{bidding} -1S & p & 3C & p\\ -3D & p & 3H & p\\ -3S & p & p & p\\ -\end{bidding} -\par\hrulefill\par -\setdefaults{bidfirst=E} -\begin{bidding} -1S & p & 3C & p\\ -3D & p & 3H & p\\ -3S & p & p & p\\ -\end{bidding} -\par\hrulefill\par -\setdefaults{bidfirst=S} -\begin{bidding} -1S & p & 3C & p\\ -3D & p & 3H & p\\ -3S & p & p & p\\ -\end{bidding} -\par\hrulefill\par -\setdefaults{bidfirst=W} -\begin{bidding} -1S & p & 3C & p\\ -3D & p & 3H & p\\ -3S & p & p & p\\ -\end{bidding} -\end{HBox} -\vfill -\needspace{8\baselineskip} -Here we show the bidding diagram for only 2 bidders, with 4 different first -columns. Observe that also here the real names stay in connection with -their directions. -\vfill -\begin{HBox}{{biddingpairs, names and first column}\hfill File: \FileName} -\namesNS{Jan}{Piet} -\namesEW{Joris}{Corneel} -\setdefaults{bidfirst=N} -\begin{biddingpair} -1S & 3C \\ -3D & 3H \\ -3S & p \\ -\end{biddingpair} -\par\hrulefill\par -\setdefaults{bidfirst=E} -\begin{biddingpair} -1S & 3C \\ -3D & 3H \\ -3S & p \\ -\end{biddingpair} -\par\hrulefill\par -\setdefaults{bidfirst=S} -\begin{biddingpair} -1S & 3C \\ -3D & 3H \\ -3S & p \\ -\end{biddingpair} -\par\hrulefill\par -\setdefaults{bidfirst=W} -\begin{biddingpair} -1S & 3C \\ -3D & 3H \\ -3S & p \\ -\end{biddingpair} -\end{HBox} -% -\vfill -\needspace{8\baselineskip} -The next example shows how one can put a marker to a call with |\markit| -and refer to it with by calling |\explainit|. -These explanations must appear in the -optional argument of the bidding table. You yourself are responsible that -the order in which they appear corresponds with the order of the markers. -The explanations are typeset like a footnote mechanism below the table and -they will never extend beyond the right edge of the table, as you can see -in the 2nd diagram. The width in a biddingpair table is even more limited, -that's the reason why we use raggedright to obtain a result that is -typographically acceptable. The last diagram shows that we can get an -annotation without the need for |\markit| or |\explainit|. - -\vfill -\begin{HBox}{bidding with (very long) annotation\hfill File: \FileName} -\begin{bidding}(% - \explainit{Bergen} - \explainit{How strong?} - \explainit{Minimum hand}) -1\Sp & p & 3C\markit & p\\ -3D\markit & p & 3H\markit & p\\ -3S & p & p & p\\ -\end{bidding} -\par\vspace{2\baselineskip}\noindent -\begin{bidding}(% - \explainit{Here we have a very very - long annotation that does - not fit on one line}) -1\Sp & p & 3C\markit & p\\ -\end{bidding} -\par\vspace{2\baselineskip}\noindent -\begin{biddingpair}(% - \explainit{Here we have a very very - long annotation that does - not fit on one line}) -1S & 3C\markit \\ -\end{biddingpair} -\qquad -\begin{biddingpair}(% - no explain/markit here but still an annotation) -1S & 3C \\ -\end{biddingpair} - -\end{HBox} -\vfill -\needspace{8\baselineskip} -In this examples we'll change some fonts to see what it accomplishes.\\ -By default the bidderfont is |\mdseries\sffamily| and the namefont is -|\mdseries\slshape|, as you can clearly see in the header of the bidding -diagram. -\begin{itemize}[itemsep=0em] -\item |\gamefont{...\Large}| enlarges everything, also where other fonts are -active, e.g.\ in the header. (1st diagram) -\item |\scalefont| scales all fonts, not only the |\gamefont| -controlled stuff. (2nd diagram) -\item If you change only the \emph{size} of e.g.\ the |\namefont|, -without giving a font description, you 'lose the font' and the current font -will be used instead of |namefont|. In diagrams most of the time this will -be the |gamefont|. (3rd diagram) -\end{itemize} -We also used |\setdefaults{bidline=1}| to separate the header of the -bidding table from the bidding sequence with a |\hline|. -% -\vfill -\begin{HBox}{Same but with changed font\hfill File: \FileName} -\gamefont{\sffamily\bfseries\Large} -\setdefaults{bidline=1} -\begin{bidding}[c](\explainit{Bergen}) -1S & p & 3C\markit & p\\ -3D & p & 3H & p\\ -3S & p & p & p\\ -\end{bidding} - -\gamefont{\sffamily\bfseries\normalsize} -\gamefont{\sffamily\scalefont{2}} -\begin{biddingpair}[c]% - (\explainit{Bergen}) -1S & 3C\markit \\ -3D & 3H \\ -3S & p \\ -\end{biddingpair} - -\gamefont{\sffamily\bfseries\normalsize} -\namefont{\smaller} -\begin{bidding}(\explainit{Bergen}) -1S & p & 3C\markit & p\\ -3D & p & 3H & p\\ -3S & p & p & p\\ -\end{bidding} -\setdefaults{bidline=off} -\end{HBox} -\vfill -Normally one uses shorthands in bidding tables. We already showed that one -can use macros calls like |\Cl|. If a macro uses tokens, or if a shorthand -appears as argument of another macro, one has to be careful. Note that the -first entry (|\frame{2H}|) of row 2 does not produce the correct result, -but |{\frame{2\He}}| does: We have to enclose these specials in braces -(|{...}|) and not use the shorthand notation. -\vfill -\begin{HBox}{Special effects\hfill File: \FileName} -\namesNS{}{}\namesEW{}{} -\begin{bidding} -p & X & R & P \\ -{\frame{2H}} & {\frame{2\He}} & -{\textit{R}} & {\textit{\redouble}} \\ -{\Pass*!} & {\Redouble*!} & \Allpass\\ -\end{bidding} -\end{HBox} -\vfill -\end{document} -\endinput - diff --git a/macros/latex/contrib/onedown/examples/CardSymbols.tex b/macros/latex/contrib/onedown/examples/CardSymbols.tex deleted file mode 100644 index 5ecca8a55d..0000000000 --- a/macros/latex/contrib/onedown/examples/CardSymbols.tex +++ /dev/null @@ -1,44 +0,0 @@ -\documentclass[onedown-examples]{subfiles} - -\begin{document} -\noindent -\begin{tcolorbox}[colback=red!5!white,colframe=red!75!black, - title={Use card symbols like {\setdefaults{colors=b+w}♣,♢,♡,♠} directly as input}] -%\begin{HBox}{Use card symbols like {\setdefaults{colors=b+w}♣,♢,♡,♠} directly as input} -If you want to use the card symbols {\setdefaults{colors=b+w}♣,♢,♡,♠} within your \LaTeX-document, -then put these lines in your preamble. That's all. -\\[0.3em] -\verb|\DeclareUnicodeCharacter{2660}{\Sp}| -\verb|\DeclareUnicodeCharacter{2661}{\He}| \\ -\verb|\DeclareUnicodeCharacter{2662}{\Di}| -\verb|\DeclareUnicodeCharacter{2663}{\Cl}| \\ -\verb|\DeclareUnicodeCharacter{2664}{\Sp}| -\verb|\DeclareUnicodeCharacter{2665}{\He}| \\ -\verb|\DeclareUnicodeCharacter{2666}{\Di}| -\verb|\DeclareUnicodeCharacter{2667}{\Cl}| \\[0.3em] - -%\vspace{0.3em} -%\\[0.3em] -If you put them in a file \textbf{\emph{onedown.symbols}}, somewhere where -\LaTeX{} can find it, then the \OneDown package will take care of loading it. An -apropriate place would be in your .texmf directory. -\end{tcolorbox} -%\end{HBox} -\begin{tcolorbox}[colback=red!5!white,colframe=red!75!black, - title={To enter these card symbols on your keyboard, use this with Linux}] -Add following lines to your \emph{.Xmodmap} and run \textbf{xmodmap .Xmodmap} -\\[0.3em] -{\ttfamily -keycode 38 = 0x0061 0x0041 0x0061 0x0041 0x1002663 0x1002667 0x00e6 \\ -keycode 39 = 0x0073 0x0053 0x0073 0x0053 0x1002662 0x1002666 0x100017f \\ -keycode 40 = 0x0064 0x0044 0x0064 0x0044 0x1002661 0x1002665 0x00f0 \\ -keycode 41 = 0x0066 0x0046 0x0066 0x0046 0x1002660 0x1002664 0x01f0 \\ -keycode 65 = space nobreakspace space nobreakspace nobreakspace NoSymbol \\ -} -\tcblower -Now you can enter {\setdefaults{colors=b+w}♣,♢,♡,♠} with \emph{Shift+AltGr} a,s,d,f -\end{tcolorbox} - - -\end{document} -\endinput diff --git a/macros/latex/contrib/onedown/examples/Compass.pdf b/macros/latex/contrib/onedown/examples/Compass.pdf deleted file mode 100644 index c9d613f276..0000000000 Binary files a/macros/latex/contrib/onedown/examples/Compass.pdf and /dev/null differ diff --git a/macros/latex/contrib/onedown/examples/Compass.tex b/macros/latex/contrib/onedown/examples/Compass.tex deleted file mode 100644 index cbb19739b5..0000000000 --- a/macros/latex/contrib/onedown/examples/Compass.tex +++ /dev/null @@ -1,151 +0,0 @@ -\documentclass[onedown-examples]{subfiles} -%\usepackage{forloop} - -\gamefont{\larger\larger} -\makeatletter - \def\CP{\ODw@Compass} -\makeatother - -\begin{document} -\noindent -Here we show the 16 possible combinations of dealership and vulnerability. -We use the default |colors=2| (|black & red|) and so the vulners appear in -red. The command |\CP| is to be defined in every V- or HBox. -\par\vspace{1em}\noindent -% - -\begin{VBox}{The 16 combinations of dealer/vulner\hfill File: \FileName} -\newcounter{Nr} -\newcounter{Tmp} -\makeatletter - \def\CP{\ODw@Compass} -\makeatother -\centering -\setdefaults{compsize=1.3,compmid=\boardtext} -\begin{tabular}{ll|ll} -\forloop{Nr}{1}{\value{Nr} < 9}{% - \boardnr{\theNr} \theNr: \dealertext\vulnertext & \CP &% - \setcounter{Tmp}{8 + \theNr}% - \boardnr{\theTmp} \theTmp: \dealertext\vulnertext & \CP \\ -} -\end{tabular} -\end{VBox} -\vfill -\needspace{15\baselineskip} -\vfill -With |\setdefaults| we can influence the look of the compass in detail. The -keys that control this are |compline| to set the thickness of the frame, -|compshow| to hide/show the compass, |compsize| to multiply the compass -size with a factor and |compturn| with which the letter 'E' and 'W' can be -rotated over 90°. With the key |compass| one can set the font that is used -for the letters in the compass. - -First we enlarge the compass 1.5$\times$. Note that this does influence -neither the fontsize nor the frame thickness. Then we enlarge the fonsize. -As you see, this does influence the size of the compass too. Finally -we set the size factor back to 1. Notice the difference with the first -compass. -\vfill -\begin{HBox}{controlling the compass I\hfill File: \FileName} -\makeatletter - \def\CP{\ODw@Compass} -\makeatother -\CP -\setdefaults{compsize=1.5}\CP -\setdefaults*{compass=\Large}\CP -\setdefaults{compsize=1}\CP -\end{HBox} -\vfill -As you see, we can make the frame very thick, very thin or let it -disappear completely when we use factor 0. -\vfill -\begin{HBox}{controlling the compass II\hfill File: \FileName} -\makeatletter - \def\CP{\ODw@Compass} -\makeatother -\setdefaults{compsize=1.5}\CP -\setdefaults{compline=3}\CP -\setdefaults{compline=0.1}\CP -\setdefaults{compline=0}\CP -\end{HBox} -\vfill -If you watch the first compass carefully, you'll notice (maybe you must -enlarge it to see what is meant) that the small |x| is exactly in the -middle of the compass. Nevertheless the impressesion is that the |x| is -closer to the '|W|'. This is because a '|W|' is wider than an '|E|'. -It simply looks unbalanced. We can diminish this by enlarging the compass. -Another trick is to rotate the |W| and |E| 90°, as shown in the third -compass. In the second line we see a diagram with compass, but its -frame is supressed. Finally we see a diagram where the total compass is -suppressed. For clarity's sake we have added the \east and \west hand. -\vfill -\begin{HBox}{controlling the compass III\hfill File: \FileName} -\makeatletter - \def\CP{\ODw@Compass} -\makeatother -\boardnr{0} -\setdefaults{compsize=1,compmid=x}\CP -\setdefaults{compsize=1.5}\CP -\setdefaults{compsize=1,compturn=on}\CP -\setdefaults{compturn=off,compline=0} -\gamefont{\footnotesize} -\easthand{JT6}{764}{K43}{JT32} -\westhand{Q952}{K92}{762}{AQ7} -\showEW\hfill -\setdefaults{compshow=off} -\showEW -\end{HBox} -\vfill -On the next page we show the compass for all available sizes. In order to -get all diagrams in one color box, we combined the smallest with the -largest etc. The first line gets out of the frame, but you'll get the idea -all the same. Using |\scalefont| you can get even bigger diagrams. -\vfill -\begin{HBox}{onesuitAll for all sizes\hfill File: \FileName} -\setdefaults{compshow=on} -\gamefont{\sffamily\bfseries\tiny} -\setdefaults{compmid=~t} -\onesuitAll!{JT62}{AK53}{87}{Q94} -\gamefont{\sffamily\bfseries\HUGE} -\setdefaults{compmid=U} -\onesuitAll!{JT62}{AK53}{87}{Q94} -% -\gamefont{\sffamily\bfseries\ssmall} -\setdefaults{compmid=~s} -\onesuitAll!{JT62}{AK53}{87}{Q94} -\gamefont{\sffamily\bfseries\Huge} -\setdefaults{compmid=H} -\onesuitAll!{JT62}{AK53}{87}{Q94} -% -\gamefont{\sffamily\bfseries\scriptsize} -\setdefaults{compmid=c} -\onesuitAll!{JT62}{AK53}{87}{Q94} -\gamefont{\sffamily\bfseries\huge} -\setdefaults{compmid=h} -\onesuitAll!{JT62}{AK53}{87}{Q94} -% -\gamefont{\sffamily\bfseries\footnotesize} -\setdefaults{compmid=f} -\onesuitAll!{JT62}{AK53}{87}{Q94} -\gamefont{\sffamily\bfseries\LARGE} -\setdefaults{compmid=A} -\onesuitAll!{JT62}{AK53}{87}{Q94} -% -\gamefont{\sffamily\bfseries\small} -\setdefaults{compmid=s} -\onesuitAll!{JT62}{AK53}{87}{Q94} -\gamefont{\sffamily\bfseries\Large} -\setdefaults{compmid=L} -\onesuitAll!{JT62}{AK53}{87}{Q94} -% -\gamefont{\sffamily\bfseries\normalsize} -\setdefaults{compmid=n} -\onesuitAll!{JT62}{AK53}{87}{Q94} -\gamefont{\sffamily\bfseries\large} -\setdefaults{compmid=l} -\onesuitAll!{JT62}{AK53}{87}{Q94} -\setdefaults{compmid=} -\end{HBox} -\vfill -\end{document} -\endinput diff --git a/macros/latex/contrib/onedown/examples/ExpertQuiz.tex b/macros/latex/contrib/onedown/examples/ExpertQuiz.tex deleted file mode 100644 index ad52dc9b29..0000000000 --- a/macros/latex/contrib/onedown/examples/ExpertQuiz.tex +++ /dev/null @@ -1,77 +0,0 @@ -\documentclass[onedown-examples]{subfiles} -\begin{document} -\iffalse -\newgame\setdefaults{bidfirst=W} -\dealer[\east]\vulner[\eastwest] -\hand!{Q952}{K32}{765}{AQ7} - -\begin{bidding}(\explainit{gameforcing} - \explainit{natural, 6-card ab ab ab ab ab ab})% - & & 2D\markit & 2H\markit \\ -p & 3H & 4D & p \\ -? \\ -\end{bidding} - -\makeatletter - :\usebox\ODw@BidBox: -\makeatother - - - -\begin{biddingpair}(\explainit{game forcing} - \explainit{natural, 6-card})% - 2D\markit & 2H\markit \\ - 3H & 4D \\ -? \\ -\end{biddingpair} - -\makeatletter - :\usebox\ODw@BidBox: -\makeatother -\fi -\vfill -A special feature of \OneDown is the so called |expertquiz|. It essentially -displays a hand with a (partial) bidding sequence. The reader has to guess -the best next bid with respect to the hand and the bidding so far. The -different answers are rewarded with points. - -Observe the token '\textbf{-}' in |\hand-| and |\begin{bidding}-| that -suppresses the output. - -With the optional argument we add some extra information to the quiz. -\vfill -\begin{HBox}{expertquiz \hfill File: \FileName} -\newgame\setdefaults{bidfirst=W} -\dealer[\east]\vulner[\eastwest] -\hand!-{Q952}{K32}{765}{AQ7} -\begin{bidding}-(\explainit{gameforcing} - \explainit{natural, 6-card})% - & & 2D\markit & 2H\markit \\ -p & 3H & 4D & p \\ -? \\ -\end{bidding} -\expertquiz[Team: \dealertext, \vulnertext]{% - 4\He= 10, 4\Sp= 7, - 6\Di= 4, - 4\NT/5\NT= 3, 5\Di=~1 -} -\end{HBox} -\vfill -Here we show the same quiz, but the layout resembles the one used by the -DBV\footnote{German Bridge League} in their monthly, called \emph{Bridge -Magazin}. We get this special layout by using the token '\textbf{!}'. Of -course we set it in the German language. -\vfill -\begin{HBox}{expert quiz a la DBV\hfill File: \FileName} -\begin{otherlanguage}{german} -\expertquiz![Team: \dealertext, \vulnertext]{% - 4\He= 10, 4\Sp= 7, - 6\Di= 4, - 4\NT/5\NT= 3, 5\Di= 1 -} -\end{otherlanguage} -\end{HBox} -\vfill -\end{document} -\endinput - diff --git a/macros/latex/contrib/onedown/examples/Fontsizes.pdf b/macros/latex/contrib/onedown/examples/Fontsizes.pdf deleted file mode 100644 index d2accbc38c..0000000000 Binary files a/macros/latex/contrib/onedown/examples/Fontsizes.pdf and /dev/null differ diff --git a/macros/latex/contrib/onedown/examples/Fontsizes.tex b/macros/latex/contrib/onedown/examples/Fontsizes.tex deleted file mode 100644 index 24f4fd4ced..0000000000 --- a/macros/latex/contrib/onedown/examples/Fontsizes.tex +++ /dev/null @@ -1,33 +0,0 @@ -%\documentclass[onedown-examples]{subfiles} -\documentclass[10pt]{report} -% -\usepackage{libertine} -\usepackage{onedown} - -% -\makeatletter -\newcommand{\mysize}[1]{% - \bgroup\noindent\csname#1\endcsname The #1 size is: \textbf{\csname#1\endcsname\f@size\,pt}.\\The baselineskip is \the\baselineskip\par\vskip2mm\egroup} -\makeatother - -\begin{document} -\noindent -Here we show the different fontsizes with values and output. \\ -For the size commands \emph{ssmall} and \emph{HUGE} refer to package \textsf{moresizes}. -\\[1em] -%%%%% -\mysize{tiny} -\mysize{ssmall} -\mysize{scriptsize} -\mysize{footnotesize} -\mysize{small} -\mysize{normalsize} -\mysize{large} -\mysize{Large} -\mysize{LARGE} -\mysize{huge} -\mysize{Huge} -\mysize{HUGE} -%%%%% -\end{document} -\endinput diff --git a/macros/latex/contrib/onedown/examples/Hands.tex b/macros/latex/contrib/onedown/examples/Hands.tex deleted file mode 100644 index f40721a3a0..0000000000 --- a/macros/latex/contrib/onedown/examples/Hands.tex +++ /dev/null @@ -1,41 +0,0 @@ -\documentclass[onedown-examples]{subfiles} -\newgame -\begin{document} -~ -\vfill -In the first example we show how the cards of a hand are entered. The hand -can be displayed horizontally or vertically. It can also be centered. In -general the token |*| will center the diagram, whereas the token |!| does -something special. With the command |\hand| the token |*| switches between -the horizontal and vertical mode. In other situations the token |*| can -force the output of a short notation. With non-diagram commands the token -|*| prints the full expression rather than an abreviation. The token |!| outputs the hand -vertically. Please note that we enter a |T| to get e.g.\ \suit{JT9}. -Entering |10| would yield \suit{J109}, which looks really awful. -\vfill -\begin{HBox}{{single hand (hor/vert)+(left/centered) - \hfill File: \FileName}} - - horizontal \par\noindent -\hand{AQT2}{KQ3}{J98}{T98} - - horizontal centered \par\noindent -\hand*{AQT2}{KQ3}{J98}{T98} - - vertical \par\noindent -\hand!{AQT2}{KQ3}{J98}{T98} - - vertical centered \par\noindent -\hand*!{AQT2}{KQ3}{J98}{T98} - -\end{HBox} -% -\vfill -This example shows how a mistake in entering the cards is detected. -\vfill -\begin{HBox}{{single hand with error\hfill File: \FileName}} -\hand!{AQT2}{KKQ3}{J98}{T98} -\end{HBox} -\vfill -\end{document} - diff --git a/macros/latex/contrib/onedown/examples/Languages.tex b/macros/latex/contrib/onedown/examples/Languages.tex deleted file mode 100644 index 0e5d0e6702..0000000000 --- a/macros/latex/contrib/onedown/examples/Languages.tex +++ /dev/null @@ -1,46 +0,0 @@ -\documentclass[onedown-examples]{subfiles} - -\begin{document} -As a demonstration of the multilingual features of the \OneDown package we -show a diagram with turkish annotations. \\ -Note:\\ -Due to an quirk in the babel implementation of the turkish and some -other language, you must either call |\shorthandoff{=!}| after loading the -language, or load it with e.g.\ \\ -|\usepackage[turkish,shorthands=]{babel}|. - -Refer to the \OneDown manual for details. -\vfill -\begin{HBox}{Languages (Turkish)\hfill File: \FileName} -\boardnr{32} -\northhand{AK43}{AJ98}{AQJ8}{4} -\southhand{87}{QT5}{432}{K9865} -\easthand{JT6}{764}{KT9}{JT32} -\westhand{Q952}{K32}{765}{AQ7} -\leftupper{\boardtext*}% - {\dealertext}{\vulnertext} -\rightupper[1ex]{\contract: }% - {3\,\NT}{\by \south} -\rightlower[1ex]{\lead: \Di 7}{}{} -\begin{otherlanguage}{turkish} -\showAll* -\end{otherlanguage} -\end{HBox} -\vfill\noindent -Here we switch to the Norwegian language. As we use the same settings for the -diagram, we simply call |\showAll| to display it, after we changed the -language. The Jack is coded with \foreignlanguage{norsk}{\jack{}} -rather than \jack, so the hand is now closer to the right upper legend. (We already discussed ways -to solve this!) -\vfill -% -\begin{HBox}{Languages (Norwegian)\hfill File: \FileName} -\begin{otherlanguage}{norsk} -\showAll* -\end{otherlanguage} -\end{HBox} -\vfill -% -\end{document} -\endinput - diff --git a/macros/latex/contrib/onedown/examples/Legends.tex b/macros/latex/contrib/onedown/examples/Legends.tex deleted file mode 100644 index 9d9f603eed..0000000000 --- a/macros/latex/contrib/onedown/examples/Legends.tex +++ /dev/null @@ -1,84 +0,0 @@ -\documentclass[onedown-examples]{subfiles} - -\begin{document} -\vfill -In this section we will investigate how we can add certain annotations to -card diagrams. We start with |\newgame| and |\resetfonts| in order to -`forget the past'. - -With |\dealer| one can denote which player is the dealer and -with |\vulner| which side is vulnerable. This data is stored and with -|\dealertext| (or |\vulnertext|) one can retrieve it. The macros -|\leftupper| (and also the |right-| and the |lower-| versions) puts its 3 -arguments, each on its own line, in the diagram. If you wonder why we use -the command |\by| instead the text |by| in |\rightupper|: |\by| gets -automatically translated into the active language.\par\noindent -If you look at the diagram, you will notice that the \emph{left}- and \emph{right}-annotations can -extend to the left of the \west hand and the right of the \east hand. -\vfill -\begin{HBox}{Annotations\hfill File: \FileName} -\newgame\resetfonts -\northhand{AK43}{AJ98}{AQJ}{54} -\southhand{87}{QT5}{8432}{K986} -\easthand{JT6}{764}{KT9}{JT32} -\westhand{Q952}{K32}{765}{AQ7} -\dealer[\east]\vulner[\eastwest] -\leftupper{\dealertext}{}{\vulnertext} -\rightlower{}{\lead: \Di 7}{} -\rightupper{\contract: 3\,\NT}{\by \south}{} -\showAll -\end{HBox} -\vfill -In the next example we show all possible annotations. Here you can see that -the |\upper-|versions align the text with the topline, whereas the -|\lower-|versions align with the bottomline. Because the legendfont -can differ from the gamefont and the rows in a hand get some extra space, -the legend lines will normally not align with the rows of a hand. - - We can add an offset (as shown in section showAll) to the \west hand in order to make the hand align to -the left with the left-upper legend. But this enlarges the gap between the -\west hand and the compass. It is perhaps better to have only very short -legends. But it is up to you to decide that. -\vfill -\begin{HBox}{Legends: full overview\hfill File: \FileName} -\leftupper{LUp:Line 1}{and line2}{last Line} -\rightupper{RUp:Line 1}{and line2}{last Line} -\leftlower{LLo:Line 1}{and line2}{last Line} -\rightlower{RLo:Line 1}{and line2}{last Line} -\headlinetext{Here you put some headtext\ldots\par on 2 lines} -\footlinetext{\ldots here goes foottext} -\showAll -\end{HBox} -\needspace{8\baselineskip} -\vfill -The next examples show wich legends are output/suppressed for the other -card diagrams. Note also that the \emph{head/foot}-linetext does not extend beyond the -width of the diagram, and can get real narrow when only the -\NorthSouth*!-hands are shown. In that case it might be better to put a |\raggedright| -in. If you do so, then don't forget to |\protect| it. -\vfill -\begin{HBox}{{Legends for: \northsouth: may need \emph{raggedright}\hfill File: \FileName}} -\showNS - -\hrulefill - -\headlinetext{\protect\raggedright Here you put some headtext\ldots\par on 2 lines} -\footlinetext{\protect\raggedright \ldots here goes foottext} -\showNS -\end{HBox} -\vfill -\begin{HBox}{{Legends: \north-\east, \north-\west, \east-\west\hfill File: \FileName}} - -\showNE - -\hrulefill - -\showNW - -\hrulefill - -\showEW -\end{HBox} -\vfill -\end{document} -\endinput diff --git a/macros/latex/contrib/onedown/examples/Play.tex b/macros/latex/contrib/onedown/examples/Play.tex deleted file mode 100644 index 7c0a157d3d..0000000000 --- a/macros/latex/contrib/onedown/examples/Play.tex +++ /dev/null @@ -1,80 +0,0 @@ -\documentclass[onedown-examples]{subfiles} - -\begin{document} -Here we show the playing tricks diagram. For the user, the environment |play| is like a 4 -column table. Its mandatory argument denotes the player with the opening -lead. With the optional argument the user can specify the trump suit. The -default is |N| for \NT. All leads must have a suit, although this is not -checked by \OneDown. If a suit is -followed, you don't have to repeat the suit: a rank suffices to specify the -card. Of course at discards or when ruffed, the suit must be entered too. - -The |play| diagram has a special feature: it knows which player wins the -trick and thus 1) you do not have to specify who has the lead, except of -course the opening lead, and 2) it calculates (and displays) the tricks won -by each side. -\vfill -\begin{HBox}{{Playing tricks table. Trump is \Cl\hfill File: \FileName}} -\newgame\resetfonts -\begin{play}{W}[C] - H3 & 4 & K & 6 \\ - C3 & 5 & Q & 2 \\ - H5 & 2 & A & 8 \\ - C7 & D9 & J & K \\ - S3 & 4 & Q & 6 \\ - SA & C4 & 2 & T \\ -\end{play} -\end{HBox} -\vfill -It is posible to use either the shorthands (|C, D, H, S|) for the suits as -well as the code (e.g.\ |\Cl| itself, as you can see here. Refer to Bidding -examples for further details. - -In the environment |play| the consistency of the cards played is checked. As -an example the error about card \He\,5 (ocurring $2\times$ in the same trick) -is reported. -\vfill -\begin{HBox}{{Same, but with suit commands\hfill File: \FileName}} -\begin{play}{W}[C] - \He3 & 4 & K & 6 \\ - \Cl3 & 5 & Q & 2 \\ - \He5 & 5 & A & 8 \\ - \Cl7 & \Di9 & J & K \\ - \Sp3 & 4 & Q & 6 \\ - \Sp A & K & 2 & T \\ -\end{play} -\end{HBox} -\vfill -In the next example for a \NT contract, we have changed the language. Here -the double occurence of \Cl\,6 in two different tricks is shown. -\vfill -\begin{HBox}{Playing tricks table for \NT in Dutch\hfill File: \FileName} -\begin{otherlanguage}{dutch} -\begin{play}{W} - C3 & Q & K & 2 \\ - SJ & A & 4 & 2 \\ - C4 & 6 & T & 5 \\ - CA & ST & 6 & 9 \\ - C7 & HT & D5 & S5 \\ - D2 & T & 3 & 4 \\ -\end{play} -\end{otherlanguage} -\end{HBox} -\vfill -\vfill -\begin{HBox}{The same table in German\hfill File: \FileName} -\begin{otherlanguage}{german} -\begin{play}{W} - C3 & Q & K & 2 \\ - SJ & A & 4 & 2 \\ - C4 & 6 & T & 5 \\ - CA & ST & 6 & 9 \\ - C7 & HT & D5 & S5 \\ - D2 & T & 3 & 4 \\ -\end{play} -\end{otherlanguage} -\end{HBox} -\vfill -\end{document} -\endinput - diff --git a/macros/latex/contrib/onedown/examples/Select-Hands.tex b/macros/latex/contrib/onedown/examples/Select-Hands.tex deleted file mode 100644 index 51260bfb31..0000000000 --- a/macros/latex/contrib/onedown/examples/Select-Hands.tex +++ /dev/null @@ -1,56 +0,0 @@ -\documentclass[onedown-examples]{subfiles} - -\begin{document} -\vfill -Both the |\showNS| and |\showEW| have an extra optional parameter that -controls which of the two hands will be printed and suppresses the other -hand. -\vfill -\begin{HBox}{Select only one hand\hfill File: \FileName} -\northhand{AK43}{AQJ83}{AJ98}{-} -\southhand{87}{T5}{QT5}{K98654} -\easthand{JT6}{764}{K43}{JT32} -\westhand{Q952}{K92}{762}{AQ7} -A \showNS(N) \quad B \showNS(S) - -C \showEW(E) \quad D \showEW(W) - -\end{HBox} -\vfill -The same, but here the compass is suppressed, showing only the selected hand -\vfill -\begin{HBox}{{Only hand, compass suppressed}\hfill File: \FileName} -\setdefaults{compshow=off} -\northhand{AK43}{AQJ83}{AJ98}{-} -\southhand{87}{T5}{QT5}{K98654} -\easthand{JT6}{764}{K43}{JT32} -\westhand{Q952}{K92}{762}{AQ7} -A \showNS(N) \quad B \showNS(S) - -C \showEW(E) \quad D \showEW(W) - -\end{HBox} - -\begin{HBox}{{Only \North*!-hands}\hfill File: \FileName} -\newgame -\setdefaults{compshow=on} -\northhand{AK43}{AQJ83}{AJ98}{-} \showNS(N) -\northhand{87}{T5}{QT5}{K98654} \showNS(N)\quad -\northhand{JT6}{764}{K43}{JT32} \showNS(N) -\northhand{Q952}{K92}{762}{AQ7} \showNS(N) -\end{HBox} - -\begin{HBox}{{Only \North*!-hands, compass suppressed}\hfill File: -\FileName} -\newgame -\setdefaults{compshow=off} -\northhand{AK43}{AQJ83}{AJ98}{-} \showNS(N) -\northhand{87}{T5}{QT5}{K98654} \showNS(N)\quad -\northhand{JT6}{764}{K43}{JT32} \showNS(N) -\northhand{Q952}{K92}{762}{AQ7} \showNS(N) -\end{HBox} - -\end{document} -\endinput - - diff --git a/macros/latex/contrib/onedown/examples/Suits.tex b/macros/latex/contrib/onedown/examples/Suits.tex deleted file mode 100644 index 457ab27332..0000000000 --- a/macros/latex/contrib/onedown/examples/Suits.tex +++ /dev/null @@ -1,65 +0,0 @@ -\documentclass[onedown-examples]{subfiles} - -\begin{document} - -Here we show a single suit, with and without a suit symbol. You can observe -the influence of changing the |gamefont|. -In the 1st suit, card 4 occurs $2\times$ and an error message is printed. -In the last suit the same happens for card 5 but now the suit is known and -is named in the error message. -\vfill -\begin{HBox}{suit and errors I\hfill File: \FileName} -\suit{AKT544}\hspace{1cm} -\suit[\He]{AKT54} -\gamefont{\sffamily\bfseries\Large} -\par\vspace{1\baselineskip}\noindent -\suit{AKT54}\hspace{1cm} -\suit[\He]{AKT54} -\par\vspace{1\baselineskip}\noindent -\suit[\He]{AKT554} -\end{HBox} -\vfill -\noindent -In the 3rd diagram card 8 occurs $2\times$. In the 4th diagram card 4 is -missing and a warning is raised. Card 5, which occurs $2\times$, raises an -error. Errors are shown by default, warnings must be activated first. These -consistency checks make it easy to spot typos in your diagrams. -\vfill -\begin{HBox}{suits and errors II\hfill File: \FileName} -\resetfonts -\onesuitNS{AK53}{JT6} -\qquad -\onesuitEW{87}{Q952} -\qquad -\onesuitEW{87}{Q852} -\par\vspace{0.5\baselineskip}\noindent -\setdefaults{warn=on} -\onesuitAll{AK53}{JT6}{87}{Q952} -\end{HBox} -\vfill -The other 'onesuit' diagrams, using a small box. -\vfill -\begin{HBox}{onesuitXX with box\hfill File: \FileName} -\setdefaults{warn=off} -\onesuitNE{AK43}{87} -\qquad -\onesuitNE{AK43}{Q952} -\end{HBox} -\vfill -Next we show how to use a compass instead of a small box by using token |!|. -\vfill -\begin{HBox}{onesuitXX with compass\hfill File: \FileName} -\onesuitNS!{AK53}{JT6} -\quad -\onesuitEW!{87}{Q952} -\quad -\onesuitNE!{AK43}{87} -\quad -\onesuitNE!{AK43}{Q952} -\quad -\onesuitAll!{AK43}{JT6}{87}{Q952} -\end{HBox} -\needspace{8\baselineskip} -\vfill -\end{document} - diff --git a/macros/latex/contrib/onedown/examples/Wrapping.tex b/macros/latex/contrib/onedown/examples/Wrapping.tex deleted file mode 100644 index 753eea7685..0000000000 --- a/macros/latex/contrib/onedown/examples/Wrapping.tex +++ /dev/null @@ -1,98 +0,0 @@ -\documentclass[onedown-examples]{subfiles} - -\begin{document} -\vfill -The package \OneDown renounces to implement so called \emph{hanging hands}. -To achieve such you will have to use external means, e.g.\ the package -|wrapfig|. The advantage of an external package is that 1) you can wrap -anything you like and 2) you have more control over the result. Here follow -some examples to show how to do that. - -You need a new paragraph before the |wrapfig| stuff. For details, refer to -the documentation of the package |wrapfig|. -\vfill -\begin{HBox}{Wrapping a hand\hfill File: \FileName} -\blindtext - -\begin{wraptable}{l}{0cm}% nat. width -\hand!{AQ852}{AKQ3}{-}{AQKJ} -\end{wraptable} -\blindtext -\end{HBox} -\vfill -\needspace{8\baselineskip} -~ -\vfill -\begin{HBox}{Wrapping a bidding table\hfill File: \FileName} -\blindtext - -\begin{wraptable}{l}{0cm}% nat. width -\begin{biddingpair} -1S & 3S \\ -4S & 5S \\ -6S & p \\ -\end{biddingpair} -\end{wraptable} -\blindtext -\end{HBox} -\vfill -\needspace{8\baselineskip} -With a small diagram there is enough space for the wrapped text. -\vfill -\begin{HBox}{{Wrapping a card diagram\hfill File: \FileName}} -\newgame -\blindtext - -\begin{wraptable}{l}{0cm}% nat. width -\gamefont{\sffamily\bfseries\footnotesize} -\northhand{AQ92}{873}{A54}{752} -\southhand{J7543}{Q42}{63}{AKQ} -\showNS -\end{wraptable} -\blindtext -\end{HBox} -\vfill -\needspace{8\baselineskip} -With real big diagrams there is not enough space for the wrapped text. -\vfill -\begin{HBox}{{Show wrapping of hands, Large size\hfill File: \FileName}} -Hello, here is some text without -a meaning. This text should show -what a printed text will look -like at this place. If you read -this text, you will get no -information. - -\newgame -\resetfonts -\begin{wraptable}{l}{0cm}% nat. width -\northhand{AQ92}{873}{A54}{752} -\southhand{J7543}{Q42}{63}{AKQ} -\gamefont{\sffamily\bfseries\scalefont{2.5}} -\showNS -\end{wraptable} -\blindtext -\end{HBox} -\vfill -\needspace{8\baselineskip} -With |\raggedright| or |RaggedRight| from package |ragged2e| it looks much -better. -\vfill -\begin{HBox}{{Same, with RaggedRight\hfill File: \FileName}} -\RaggedRight -Hello, here is some text without -a meaning. This text should show -what a printed text will look -like at this place. If you read -this text, you will get no -information. - -\begin{wraptable}{l}{0cm}% nat. width -\showNS -\end{wraptable} -\blindtext -\end{HBox} -\vfill -\end{document} -\endinput - diff --git a/macros/latex/contrib/onedown/examples/bidAll.tex b/macros/latex/contrib/onedown/examples/bidAll.tex deleted file mode 100644 index 24060a5263..0000000000 --- a/macros/latex/contrib/onedown/examples/bidAll.tex +++ /dev/null @@ -1,69 +0,0 @@ -\documentclass[onedown-examples]{subfiles} - -\begin{document} -\setdefaults{bidfirst=S} - -Here is a diagram with four hands. We get rid of the past by calling -|\newgame|. Then we define our hands and set the first bid column to -\south and we show only one pair of bidders. Because the bidding table -does not fit on the same line, it appears below the compass. -(In fact it actually would fit on the line. But to illustrate the point we -used |\handskip| to widen the diagram a bit). -Note that the token |-| in the |bidding| environment suppresses the output -of it. Only when calling |\showAll+| (with a |+| token), the saved bidding -diagram is printed together with the card diagram. - -\vfill -\begin{HBox}{not fitting on the line\hfill File: \FileName} -\newgame -\handskip{2em} -\northhand{KJ82}{KQ9}{J32}{JT8} -\southhand{AQ953}{A85}{Q84}{K6} -\easthand{T6}{764}{KT9}{Q5432} -\westhand{74}{JT32}{A765}{A97} -\setdefaults{bidfirst=S} -\begin{biddingpair}- -1S & 4S \\ -p & \\ -\end{biddingpair} -\showAll+ -\end{HBox} -\vfill -Here the hands and the bidding are the same as previous, but the complete diagram -(biddingtable inclusive) is centered and we use the short notation for the -players in the bidding table (by using the token |!|). -Being shorter now, the bidding table does fit on the same line. -\vfill -\begin{HBox}{centered and fitting\hfill File: \FileName} -\setdefaults{bidfirst=S} -\begin{biddingpair}!- -1S & 4S \\ -p & \\ -\end{biddingpair} -\showAll*+ -\end{HBox} -\vfill -\needspace{8\baselineskip} -The same deal, but now we show all bidders in the bidding table with the long notation. -Again it is to wide to fit on the line. -\vfill -\begin{HBox}{left aligned\hfill File: \FileName} -\begin{bidding}-(\explainit{15-17\HLP}) -p & p & P & 1S \\ -p & 2C & {\Pass*!} & 2N\markit \\ -p & 3N & {\Allpass!} \\ -\end{bidding} -\showAll+ -\end{HBox} -\vfill -Finally the same, but the diagram is centered. We also set the extra -handskip to 0 again. -\vfill -\begin{HBox}{centered\hfill File: \FileName} -\handskip{0em} -\showAll*+ -\end{HBox} -\vfill -\end{document} -\endinput - diff --git a/macros/latex/contrib/onedown/examples/bidEW.tex b/macros/latex/contrib/onedown/examples/bidEW.tex deleted file mode 100644 index e91d8ff5f8..0000000000 --- a/macros/latex/contrib/onedown/examples/bidEW.tex +++ /dev/null @@ -1,51 +0,0 @@ -\documentclass[onedown-examples]{subfiles} - -\begin{document} -\vfill -In the previous example we changed the gamefont to scriptsize, which is -still in effect here, as you can see in this example. You wonder why the -bidding is shown for \north and \south, but the hands are those of \east and -\west? Well, if you say |\showEW| you get the \eastwest hands. And if you -say |\setdefaults{bidfirst=S}|, then the first column is of \south{}! (BTW: -if you want to get \south{}! as output, you must write |\south{}!|, then -|\south!| and even |\south !| will regard the |!| as a token to |\south| -and will produce \south !). - -We reset the gamefont before we draw the 2nd diagram. Please note that we -have to redefine the bidding. The saved version from the 1st diagram will -not change its font! - -\vfill -\begin{HBox}{bidEWpair\hfill File: \FileName} -\northhand{KJ82}{KQ9}{J}{AQJT8} -\southhand{AQT95}{A52}{864}{K6} -\easthand{63}{J764}{KQT9}{953} -\westhand{74}{T83}{A7532}{742} -\setdefaults{bidfirst=S} -\begin{biddingpair}!-(\explainit{splinter} - \explainit{control}) -1S & 4D\markit \\ -4H\markit & 6S \\ -\end{biddingpair} -\showEW+ -\gamefont{\sffamily\bfseries\normalsize} -\par\vspace{1\baselineskip} -\showEW+ -\begin{biddingpair}!-(\explainit{splinter} - \explainit{control}) -1S & 4D\markit \\ -4H\markit & 6S \\ -\end{biddingpair} -\par\vspace{1\baselineskip} -\showEW+ -\end{HBox} -\vfill -\begin{HBox}{bidEWpair centered\hfill File: \FileName} -\showAll+ - -\showEW*+ -\end{HBox} -\vfill -\end{document} -\endinput - diff --git a/macros/latex/contrib/onedown/examples/bidNE.tex b/macros/latex/contrib/onedown/examples/bidNE.tex deleted file mode 100644 index 6e53b8fccd..0000000000 --- a/macros/latex/contrib/onedown/examples/bidNE.tex +++ /dev/null @@ -1,45 +0,0 @@ -\documentclass[onedown-examples]{subfiles} - -\begin{document} -\vfill -Here we show some examples without comment. -% Trick because of HBox making things local -\setdefaults{bidfirst=S} -\vfill -\begin{HBox}{showNE\hfill File: \FileName} -\northhand{KJ82}{KQ9}{J}{AQJT8} -\southhand{AQT95}{A52}{864}{K6} -\easthand{63}{J764}{KQT9}{432} -\westhand{74}{T83}{A7532}{957} -\gamefont{\sffamily\bfseries\large} -\setdefaults{bidfirst=S} -\begin{biddingpair}!-(\explainit{splinter} - \explainit{control}) -1S & 4D\markit \\ -4H\markit & 6S \\ -\end{biddingpair} - -\showNE+ - -\end{HBox} -\vfill -\begin{HBox}{showNE centered\hfill File: \FileName} -\showNE*+ -\end{HBox} -\vfill -\begin{HBox}{showNE\hfill File: \FileName} -\begin{bidding}!-(\explainit{splinter} -\explainit{control}) -1S & p & 4D\markit & p \\ -4H\markit & p & 6S & p \\ -\end{bidding} -\showNE+ -\end{HBox} -\vfill -\begin{HBox}{showNE centered\hfill File: \FileName} -\showNE*+ -\end{HBox} -\vfill -\end{document} -\endinput - diff --git a/macros/latex/contrib/onedown/examples/bidNS.tex b/macros/latex/contrib/onedown/examples/bidNS.tex deleted file mode 100644 index ca00038328..0000000000 --- a/macros/latex/contrib/onedown/examples/bidNS.tex +++ /dev/null @@ -1,95 +0,0 @@ -\documentclass[onedown-examples]{subfiles} - -\makeatletter -\def\SW{\the\ODw@Skip@Width} -\makeatletter -\begin{document} -\vfill -We show a couple of diagrams without comment, with the exception of -number 4. -% We must trick here because HBox makes the settings local -\setdefaults{bidfirst=S} -\vfill -\begin{HBox}{1: showNS pair\hfill File: \FileName} -\newgame -\northhand{KJ82}{KQ9}{J}{AQJT8} -\southhand{AQT95}{A52}{864}{K6} -\easthand{JT6}{764}{KT9}{JT32} -\westhand{Q952}{K32}{765}{AQ7} -\setdefaults{bidfirst=S} -\begin{biddingpair}-(\explainit{splinter}) -1S & 4D\markit \\ -4H & 6S \\ -\end{biddingpair} -\showNS+ -\end{HBox} -\vfill -\begin{HBox}{2: showNS pair centered\hfill File: \FileName} -\begin{biddingpair}!-(\explainit{splinter}) -1S & 4D\markit \\ -4H & 6S \\ -\end{biddingpair} -\showNS*+ -\end{HBox} -\vfill -\begin{HBox}{3: showNS\hfill File: \FileName} -\begin{bidding}!-(\explainit{splinter} -\explainit{control}) -1S & p & 4D\markit & p \\ -4H\markit & p & 6S & p \\ -\end{bidding} -\showNS+ -\end{HBox} -\vfill -\needspace{8\baselineskip} -\vfill -Here we show the influence of command |\handskip|, that adds some extra -space between the card diagram and the bidding diagram. In the 2nd diagram -the negative value diminishes the distance. Because it is within braces, -the length change is local and the normal value is automatically restored -afterwards. In the 4th diagram we add |3em| extra space -\vfill -\begin{HBox}{4: showNS centered\hfill File: \FileName} -\setdefaults{compmid=1} \showNS*+ -{\handskip{-1em}\setdefaults{compmid=2} \showNS*+} -\setdefaults{compmid=3} \showNS*+ -{\handskip{3em}\setdefaults{compmid=4} \showNS*+} -\end{HBox} -\vfill -\begin{HBox}{5: showNS pair\hfill File: \FileName} -\gamefont{\sffamily\bfseries\scriptsize} -\begin{biddingpair}!- -1S & 4D \\ -4H & 6S \\ -\end{biddingpair} -\showNS+ -\end{HBox} -\vfill -Because the previously saved bidding diagram is used, setting |bidfirst| -has no influence on the output\ldots -\vfill -\begin{HBox}{6: showNS pair centered\hfill File: \FileName} -\setdefaults{bidfirst=W} -\showNS*+ -\end{HBox} -\vfill -\ldots But when setting the next bidding diagram, it has! -% Need to trick here again -\setdefaults{bidfirst=W} -\vfill -\begin{HBox}{7: showNS\hfill File: \FileName} -\begin{bidding}-(\explainit{splinter} -\explainit{control}) -1S & p & 4D\markit & p \\ -4H\markit & p & 6S & p \\ -\end{bidding} -\showNS+ -\end{HBox} -\vfill -\begin{HBox}{8: showNS centered\hfill File: \FileName} -\showNS*+ -\end{HBox} -\vfill -\end{document} -\endinput - diff --git a/macros/latex/contrib/onedown/examples/bidNW.tex b/macros/latex/contrib/onedown/examples/bidNW.tex deleted file mode 100644 index e107d0c44e..0000000000 --- a/macros/latex/contrib/onedown/examples/bidNW.tex +++ /dev/null @@ -1,39 +0,0 @@ -\documentclass[onedown-examples]{subfiles} - -\begin{document} -\vfill -\setdefaults{bidfirst=S} -\begin{HBox}{showNW pair\hfill File: \FileName} -\northhand{KJ82}{KQ9}{J}{AQJT8} -\southhand{AQT95}{A52}{864}{K6} -\easthand{63}{J764}{KQT9}{432} -\westhand{74}{T83}{A7532}{957} -\setdefaults{bidfirst=S} -\gamefont{\sffamily\bfseries\Large} -\begin{biddingpair}-(\explainit{splinter}) -1S & 4D\markit \\ -4H & 6S \\ -\end{biddingpair} -\showNW+ -\end{HBox} -\vfill -\begin{HBox}{showNW pair centered\hfill File: \FileName} -\showNW*+ -\end{HBox} -\vfill -\begin{HBox}{showNW\hfill File: \FileName} -\begin{bidding}-(\explainit{splinter} -\explainit{control}) -1S & p & 4D\markit & p \\ -4H\markit & p & 6S & p \\ -\end{bidding} -\showNW+ -\end{HBox} -\vfill -\begin{HBox}{showNW centered\hfill File: \FileName} -\showNW*+ -\end{HBox} -\vfill -\end{document} -\endinput - diff --git a/macros/latex/contrib/onedown/examples/onedown-examples.pdf b/macros/latex/contrib/onedown/examples/onedown-examples.pdf deleted file mode 100644 index 1aab50b8d1..0000000000 Binary files a/macros/latex/contrib/onedown/examples/onedown-examples.pdf and /dev/null differ diff --git a/macros/latex/contrib/onedown/examples/onedown-examples.tex b/macros/latex/contrib/onedown/examples/onedown-examples.tex deleted file mode 100644 index 12a00a6e24..0000000000 --- a/macros/latex/contrib/onedown/examples/onedown-examples.tex +++ /dev/null @@ -1,195 +0,0 @@ -%% -%% onedown-examples.tex -%% Oct 04, 2019 -%% Requires the onedown bundle -%% Part of the OneDown bundle (mirror.ctan.org/onedown) -%% author: J. Wiersma -%%--------NOTE------------------------------------------- -%% USAGE: (pdf)latex onedown-examples.tex -%%------------------------------------------------------- - - -\PassOptionsToPackage{shorthands=off}{babel} -\documentclass[a4paper,fontsize=11pt,% - danish,% - dutch,% - french,% - german,% - norsk,% - spanish,% - swedish,% - turkish,% - english,% this is the default language -]{scrartcl} - -\usepackage{scrlayer-scrpage} -% -\usepackage[utf8]{inputenc} -\usepackage[T1]{fontenc} -% -\usepackage{subfiles}% can compile stand-alone/combined -\usepackage{babel}% - -%\usepackage[mono=false]{libertine}% verbatim needs option mono=false -% libertine screws verbatim, at least I don't know how to handle that -\usepackage{onedown}% our own style to set bridge stuff -\usepackage[most]{tcolorbox}% show examples with code -%\usepackage{tcolorbox}% show examples with code -\usepackage{enumitem}% -\usepackage{wrapfig}% -\usepackage{ragged2e} -\usepackage{multicol} -\usepackage{blindtext}% to show wrapping -\usepackage{forloop}% for Compass -\usepackage{needspace}% keep lines on one page -\usepackage{scalefnt}% to enlarge even more -\usepackage[a4paper, total={185mm, 257mm},left=12mm,top=20mm]{geometry} - - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% To get a PDF for printing on a monochrome printer -% comment out these commands -% -\setdefaults{colors=4A} -%------------- -% set the look of the example boxes -% -\tcbset{% - colback=red!5!white,colframe=red!75!black, - colbacklower=white, - fonttitle=\bfseries, -} -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% To get a PDF for viewing on a screen -% comment out these commands -% -%\tcbset{% -% colback=white,colbacktitle=white,coltitle=black, -% colbacklower=white, -% fonttitle=\bfseries, -%} -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% -% Due to a bug (?) in tcolorbox we cannot return to the default -% "listing and text" after setting "listing side text" globally -% within \tcbset. % So we define HBox and VBox to set this locally. -% We need the VBox for showing 16 boardnrs in Compass.tex -% -\newtcblisting{HBox}[1]{listing side text,title=#1} -\newtcblisting{VBox}[1]{listing and text,title=#1} - -\usepackage{shortvrb} -\MakeShortVerb{\|} -% hack to make verbatim stuff more clear -% adapted from verbatim.sty -\makeatletter -\def\verbatim@font{\ttfamily\bfseries\large - \hyphenchar\font\m@ne - \@noligs} - -\def\Xfer#1{\ODw@Xfer{#1}} -\makeatother - - -\usepackage[pdfencoding=auto]{hyperref} - \hypersetup{% - pdftitle={onedown-examples.pdf}, - pdfsubject={Bridge Diagrams, OneDown bundle}, - pdfkeywords={OneDown Bridge LaTeX}, - colorlinks, - linkcolor=red, - } - -\newcommand\OneDown{\textcolor{red}{\smaller\bfseries\textsc{OneDown}}\xspace} - -%------------- -\pagestyle{scrheadings} -\clearscrheadfoot -\ihead{\texttt{onedown-examples.pdf} -(\OneDown v\ODwstyleversion, \ODwstyledate)\hfill \pagemark} -%----------- - -\def\FileName{\jobname} -\def\SubFile#1{\def\FileName{#1}\newpage\section{#1}\subfile{#1}} - -\addtolength{\textheight}{1.5cm} -\def\ExLang{english} -\begin{document} -% when compiled with: -% pdflatex '\AtBeginDocument{\def\ExLang{YourLanguage}}\input{onedown-ref.tex}' -% you'll get the onedown commands expansions in YourLanguage -% YourLanguage can be any language out of: -% danish, dutch, english, french, german, norsk, spanish, swedish, turkish -% -\expandafter\selectlanguage\expandafter{\ExLang} -\pdfbookmark[1]{Title}{Title} -\title{Examples for the\\\OneDown package% -\footnote{This file is part of the \OneDown bundle. To generate this file, -use the following command: \newline \texttt{\$ pdflatex \jobname.tex}} -\\[1em] -\normalsize\url{www.ctan.org/pkg/onedown} -} -\author{J.\,Wiersma\footnote{email: \textsf{jack@schuli-wirsi.de}}} -\date{29 January 2020 (v0.5)} -\maketitle - -\section*{Introduction} -This file (\jobname) contains (well, sort of includes) all the example -files from the bundle. We use the 'include' mechanism of the package -|subfiles|. This means that you can compile each example file as -stand-alone, but they also form one document. -The advantage is that you can copy one example file and edit it to your -taste i.e.\ to experiment a little, and you can compile it without changing -the preamble, provided the \OneDown bundle is in your \TeX-path. - -For questions not covered in these examples or any further documentation, -read the \OneDown package manual named onedown.pdf. - -If you encounter difficulties in compiling adapted files, then please read -the section about active characters in the manual. - -To make it easy for you to decide which file to experiment with, all -sections bear the file name, which can also be found in the list below. The -examples are produced using the \textsf{tcolorbox} package. This enables us -to show the code and the output of it side by side. - -The explanatory text is always in the English language. But you can show the -output of all commands in any of the supported languages.\\ -These are: danish, dutch, english, french, german, norsk, spanish, swedish, turkish. \\ -You obtain this output in \emph{YourLanguage} by compiling onedown-ref.tex with: \\[0.2em] - -\verb|pdflatex '\AtBeginDocument{\def\ExLang{YourLanguage}}\input{onedown-examples.tex}'| -\par\vspace{1\baselineskip} -\setlength\columnseprule{.8pt}% rule between cols -\begin{multicols}{3}[{\centering \textbf{\Large List of Examples}}] -% Use \tableofcontents to create a hyperref'ed list of examples -% by stripping all stuff except the toclist itself, -% Change \addvspace too, to keep things tight . - \makeatletter - \renewcommand\tableofcontents{\@starttoc{toc}} - \makeatother - \renewcommand*{\addvspace}[1]{} - \tableofcontents -\end{multicols} -\SubFile{Hands} -\SubFile{Suits} -\SubFile{showNS-warn-I} -\SubFile{showNS-warn-II} -\SubFile{showNS-align} -\SubFile{showAll} -\SubFile{Select-Hands} -\SubFile{Bidding} -\SubFile{bidAll} -\SubFile{bidNS} -\SubFile{bidEW} -\SubFile{bidNE} -\SubFile{bidNW} -\SubFile{Legends} -\SubFile{Wrapping} -\SubFile{Play} -\SubFile{ExpertQuiz} -\SubFile{Languages} -\SubFile{Compass} -\SubFile{CardSymbols} -\end{document} - diff --git a/macros/latex/contrib/onedown/examples/onedown-ref.pdf b/macros/latex/contrib/onedown/examples/onedown-ref.pdf deleted file mode 100644 index 92ec145e0a..0000000000 Binary files a/macros/latex/contrib/onedown/examples/onedown-ref.pdf and /dev/null differ diff --git a/macros/latex/contrib/onedown/examples/onedown-ref.tex b/macros/latex/contrib/onedown/examples/onedown-ref.tex deleted file mode 100644 index 95d6918172..0000000000 --- a/macros/latex/contrib/onedown/examples/onedown-ref.tex +++ /dev/null @@ -1,517 +0,0 @@ -%% -%% onedown-ref.tex -%% Oct 04, 2019 -%% Requires the onedown bundle -%% Part of the OneDown bundle (mirror.ctan.org/onedown) -%% author: J. Wiersma -%%--------NOTE------------------------------------------- -%% USAGE: (pdf)latex onedown-ref.tex -%%------------------------------------------------------- - -\PassOptionsToPackage{shorthands=off}{babel} -\documentclass[a4paper,fontsize=11pt,% - danish,% - dutch,% - french,% - german,% - norsk,% - spanish,% - swedish,% - turkish,% - english,% this is the default language -]{scrartcl} -\usepackage{scrlayer-scrpage} -% -\usepackage[utf8]{inputenc} -\usepackage[T1]{fontenc} -% -\usepackage{babel}% -\usepackage{onedown}% our own style to set bridge stuff -\usepackage[a4paper, total={185mm, 257mm},left=12mm,top=20mm]{geometry} -\newcommand\OneDown{\textcolor{red}{\smaller\bfseries\textsc{OneDown}}\xspace} -\usepackage{shortvrb} -\MakeShortVerb{\|} -\usepackage{enumitem}% -%\fi -% -%%% -% -\usepackage[Q=yes]{examplep} -\makeatletter -\def\verbatim@font{\ttfamily\bfseries - \hyphenchar\font\m@ne - \@noligs} -\makeatother -% -\newcommand\bs{% - \texttt{% - \upshape% the itshape of meta screws the backslash - \textbackslash% - }% -}% bs -% -\let\olditem\item -\renewcommand\item[1][\relax]{\olditem\textbf{\bs#1}} -%\def\Item{\olditem[\bs]} -% -\definecolor{optbackgr}{named}{lightgray} -\newcommand\Oarg[1]{\colorbox{optbackgr}{\texttt{#1}}} -% default language to show the onedown command -\def\RefLang{english} -\begin{document} -% when compiled with: -% pdflatex '\AtBeginDocument{\def\RefLang{YourLanguage}}\input{onedown-ref.tex}' -% you'll get the onedown commands expansions in YourLanguage -% YourLanguage can be any language out of: -% english, danish, dutch, french, german, norsk, spanish, swedish, turkish -% -\expandafter\selectlanguage\expandafter{\RefLang} -% -\larger -\newgeometry{total={150mm, 265mm},left=25mm,top=15mm} -\pagestyle{empty} -%\iffalse -\centerline{\larger\larger\textbf{\OneDown Reference Guide}} -\par\vspace{1\baselineskip}\noindent -Here we show all user commands of the package |onedown| in alphabetical -order. If we only show the ouput that a command produces, then this output -is shown directly behind the command on the same line. If a description of -the command is given, then this description starts on a new line. Optional -parameters of a command appear in brackets |[...]|, parenthesis |(...)| or -angles |<...>|. Optional tokens of a command appear with a different -background color, like \Oarg{*!}. Output of a tokenized |\macro*!| is shown -as: -\quad|\macro|\Oarg{*!}|: \macro, \macro*, \macro!, \macro*!|\\ -The explanatory text is always in the English language. But you can show the output of all commands -in any of the supported languages.\\ -These are: english, danish, dutch, french, german, norsk, spanish, swedish, turkish. \\ -You obtain this output in \emph{YourLanguage} by compiling onedown-ref.tex with: \\[0.5em] -% -\verb|pdflatex '\AtBeginDocument{\def\RefLang{YourLanguage}}\input{onedown-ref.tex}'| -\\[0.7em] -\centerline{\textbf{This document shows the commands for the \emph{\languagename}\ language}} -\begin{description}[itemsep=-0.3em] -\item[ace]: \ace -\item[Ace\Oarg{*!}]: \Ace, \Ace*, \Ace!, \Ace*! - -\item[alert]: |2\NT\alert| typesets 2\NT\alert and |2\Cl\alert| typesets -2\Cl\alert - -\item[all]: \all -\item[All\Oarg{*!}]: \All, \All*, \All!, \All*! - -\item[allpass]: \allpass -\item[Allpass\Oarg{*!}]: \Allpass, \Allpass*, \Allpass!, \Allpass*! - -\item[announce]: |2\He\announce| typesets 2\He\announce - -\item[bidderfont\Q{{font} }]\\ -Defines the font for the names in -bidding diagrams. The mandatory parameter for all font commands is a font -description like |\sffamily\bfseries\HUGE| or |\mdseries\slshape\smaller| -or |\sffamily\scalefont{3}|. - -\item[board]: \board -\item[Board\Oarg{*!}]: \Board, \Board*, \Board!, \Board*! - -\item[boardnr\Q{{Nr} }]\\ -Calculates (and stores) the dealership and vulnerability if |Nr| -is a number. If it is just a text it is stored to be used instead of a -board number. - -\item[boardtext\Oarg{*}]\\ -Typesets the value that is stored with |\boardnr|. -The star version writes the text \textbf{\boardtext*} in front of it. - -\item[by]: \by - -\item[Cl]: \Cl - -\item[compassfont\Q{{font} }]\\ -Defines the font for the compass. - -\item[contract]: \contract -\item[Contract\Oarg{*!}]: \Contract, \Contract*, \Contract!, \Contract*! - -\item[deal]: \deal -\item[Deal\Oarg{*!}]: \Deal, \Deal*, \Deal!, \Deal*! - -\item[dealer\Q{[text]}]\\ -Typeset the defined dealer. With the optional -parameter one can define the dealer. - -\item[dealertext\Q{[text]}]\\ -Typeset the user-defined value for the |\dealer|, -e.g.\ \mbox{\dealertext[\east]}. With the optional parameter one can define -the |text| to be printed \emph{as is}. - -\item[declarer]: \declarer -\item[Declarer\Oarg{*!}]: \Declarer, \Declarer*, \Declarer!, \Declarer*! - -\item[Di]: \Di - -\item[double]: \double -\item[Double\Oarg{*!}]: \Double, \Double*, \Double!, \Double*! - -\item[DP]: \DP -\item[dpts\Oarg{*!}]: \dpts, \dpts*, \dpts!, \dpts*! - -\item[east]: \east -\item[East\Oarg{*!}]: \East, \East*, \East!, \East*! - -\item[easthand\Q{[h-offset]{Sp}{He}{Di}{Cl}}]\\ -Defines the cards for the -\East*!-player. With the optional parameter |h-offset| one can adapt the -(\emph{horizontal}) distance between hand and compass (default -\textbf{0pt}). The 4 mandatory parameters define the cards for the 4 suits. -To denote the rank \suit{T}, one has to use the uppercase letter |T|. - -\item[eastwest]: \eastwest -\item[Eastwest\Oarg{*!}]: \EastWest, \EastWest*, \EastWest!, \EastWest*! - -\item[expertquiz\Oarg{*!}\Q{[comment]{award}}]\\ -Typesets a quiz, showing a -predefined hand and a predefined bidding diagram. The star version centers -the output. The token |!| forces a newline between hand and bidding -diagram. With the optional parameter one can add some comments. The -mandatory parameter defines the award for the different solutions. - -\item[explainit\Q{{expl} }]\\ -writes \emph{expl} below the bidding diagram in a footnote like way. - -\item[footlinetext\Q{{text} }]\\ -Typeset the text below the card diagram. - -\item[FSF]: \FSF -\item[fsforce\Oarg{*!}]: \fsforce, \fsforce*, \fsforce!, \fsforce*! - -\item[gamefont\Q{{font} }]\\ -Defines the font for card diagrams, hands and suits. - -\item[GF]: \GF -\item[gforce\Oarg{*!}]: \gforce, \gforce*, \gforce!, \gforce*! - -\item[hand\Oarg{*!-}\Q{[pos]{Sp}{He}{Di}{Cl}}]\\ -Typesets the cards of 1 single hand, -normally horizontally, left aligned. The star version centers the output. -The token |!| typesets the hand vertically, left aligned. With both |*!| -the hand is typeset vertically, centered. The optional argument |pos| -(default \textbf{c}), controls the horizontal alignment. -The third token |-| suppresses all output, which is then only saved for -later use (in e.g.\ |\expertquiz|). The 4 -mandatory parameters define the cards for the 4 suits. To denote the rank -\suit{T}, one has to use the uppercase letter |T|. - -\item[handskip\Q{{length description} }]\\ -Adds |length| to the distance (default |1em|) between the rightmost hand -and the bidding diagram. - -\item[HCP]: \HCP - -\item[headlinetext\Q{{text} }]\\ -Typeset the text above the card diagram. - -\item[He]: \He - -\item[HLP]: \HLP - -\item[hpts\Oarg{*!}]: \hpts, \hpts*, \hpts!, \hpts*! - -\item[jack]: \jack -\item[Jack\Oarg{*!}]: \Jack. \Jack*, \Jack!, \Jack*! - -\item[king]: \king -\item[King\Oarg{*!}]: \King, \King*, \King!, \King*! - -\item[lead]: \lead -\item[Lead\Oarg{*!}]: \Lead, \Lead*, \Lead!, \Lead*! - -\item[leftlower\Q{[h-offset]{line1}{line2}{line3}}] - -\item[leftupper\Q{[h-offset]{line1}{line2}{line3}}]\\ -Typesets an annotation of 3 lines in the left lower/upper corner of the -card diagram. With the optional parameter one can add some extra horizontal -space between hand and annotation. - -\item[legendfont\Q{{font} }]\\ -Defines the font for annotations in card diagrams. - -\item[LP]: \LP -\item[lpts\Oarg{*!}]: \lpts, \lpts*, \lpts!, \lpts*! - -\item[markit]\\ -sets a footnote-like marker in a bidding diagram. - -\item[namefont\Q{{font} }]\\ -Defines the font for the real world names in bidding diagrams. - -\item[namesEW\Q{{E-name}{W-name}}]\\ -Defines the real world names for the \eastwest players, that will appear -in the bidding diagram. - -\item[namesNS\Q{{N-name}{S-name}}]\\ -Defines the real world names for the \northsouth players, that will appear -in the bidding diagram. - - -\item[newgame]\\ -Resets some stored data - -\item[NMF]: \NMF -\item[nmforce\Oarg{*!}]: \nmforce, \nmforce*, \nmforce!, \nmforce*! - -\item[none]: \none -\item[None\Oarg{*!}]: \None, \None*, \None!, \None*! - -\item[north]: \north -\item[North\Oarg{*!}]: \North, \North*, \North!, \North*! - -\item[northhand\Q{[v-offset]{Sp}{He}{Di}{Cl}}]\\ -Defines the cards for the -\North*!-player. With the optional parameter |v-offset| one can adapt the -(\emph{vertical}) distance between hand and compass (default \textbf{0pt}). -The 4 mandatory parameters define the cards for the 4 suits. To denote the -rank \suit{T}, one has to use the uppercase letter |T|. - -\item[northsouth]: \northsouth -\item[NorthSouth\Oarg{*!}]: \NorthSouth, \NorthSouth*, \NorthSouth!, \NorthSouth*! - -\item[nt\Oarg{*!}]: \nt, \nt*, \nt!, \nt*! -\item[NT]: \NT - -\item[onesuitAll\Oarg{*!}\Q{{N}{S}{E}{W}}]\\ -Typesets the cards of 1 suit for all -players. The star version centers the output. The token |!| prints a small -box rather than the compass. The 4 mandatory parameters denote the cards -for the \North*!-, the \South*!-, the \East*!- and the \West*!-player. - -\item[onesuitEW\Oarg{*!}\Q{{E}{W}}]\\ -Same as |onesuitAll|, but only for the \East*!- and the \West*!-player. - -\item[onesuitNE\Oarg{*!}\Q{{N}{E}}]\\ -Same as |onesuitAll|, but only for the \North*!- and the \East*!-player. - -\item[onesuitNS\Oarg{*!}\Q{{N}{S}}]\\ -Same as |onesuitAll|, but only for the \North*!- and the \South*!-player. - -\item[onesuitNW\Oarg{*!}\Q{{N}{W}}]\\ -Same as |onesuitAll|, but only for the \North*!- and the \West*!-player. - -\item[otherfont\Q{{font} }]\\ -Defines the font for other items. - -\item[pass]: \pass -\item[Pass\Oarg{*!}]: \Pass, \Pass*, \Pass!, \Pass*! - -\item[queen]: \queen -\item[Queen\Oarg{*!}]: \Queen, \Queen*, \Queen!, \Queen*! - -\item[redouble]: \redouble -\item[Redouble\Oarg{*!}]: \Redouble, \Redouble*, \Redouble!, \Redouble*! - -\item[resetfonts]\\ -Sets all fonts back to their default value. - -\item[rightlower\Q{[h-offset]{line1}{line2}{line3}}] -\item[rightupper\Q{[h-offset]{line1}{line2}{line3}}]\\ -Typesets an annotation of 3 lines in the right lower/upper corner of the -card diagram. With the optional parameter one can add some extra horizontal -space between hand and annotation. - -\item[setdefaults\Oarg{*}\string{key1=val1,key2=val2,\ldots\string}]\\ -With the keys |bidder|, |compass|, |game|, |legend|, |name| or |other| one -can set the default font for the respective items. With the keys -|compline|, |compmid|, |compshow|, |compsize| or |compturn| on can set the -look of the compass. With the keys |bidders|, |bidfirst|, |bidline| or -|bidlong| one can fine-tune the bidding diagram. The keys that can be used -as package options (|colors|, |err| and |warn|) can also be set here. -The star form also calls |\resetfonts| which effectuates any font change -immediately. - -\item[SF]: \SF -\item[sforce\Oarg{*!}]: \sforce, \sforce*, \sforce!, \sforce*! - -\item[showAll\Oarg{*+}\Q{[pos]}]\\ -Typesets a card diagram with 4 (previously -defined, i.e.\ with |\northhand| etc.) hands. The star version centers the -output. The token |+| adds a bidding table to the diagram, that has to be -previously defined, i.e.\ with e.g:\\ -|\begin{bidding}-|\ldots|\end{bidding}|. The optional parameter |pos| -(default~\textbf{c}) aligns the diagram. - -\DeleteShortVerb{\|} -\item[showEW\Oarg{*+}\Q{[pos]}(E|W)]\\ -\MakeShortVerb{\|} -Same as |\showAll|, but for the \East*!- and the \West*!-hand. |\showEW(E)| -prints only the \East*!-hand - -\item[showNE\Oarg{*+}\Q{[pos]}]\\ -Same as |\showAll|, but for the \North*!- and the \East*!-hand. - -\DeleteShortVerb{\|} -\item[showNS\Oarg{*+}\Q{[pos]}(N|S)]\\ -\MakeShortVerb{\|} -Same as |\showAll|, but for the \North*!- and the \South*!-hand. |\showNS(S)| -prints only the \South*!-hand -\item[showNW\Oarg{*+}\Q{[pos]}]\\ -Same as |\showAll|, but for the \North*!- and the \West*!-hand. - -\item[south]: \south -\item[South\Oarg{*!}]: \South, \South*, \South!, \South*! - -\item[southhand\Q{[v-offset]{Sp}{He}{Di}{Cl}}]\\ -Defines the cards for the -\South*!-player. With the optional parameter |v-offset| one can adapt the -(\emph{vertical}) distance between hand and compass (default \textbf{0pt}). -The 4 mandatory parameters define the cards for the 4 suits. To denote the -rank \suit{T}, one has to use the uppercase letter |T|. - -\item[Sp]: \Sp - -\item[suit\Q{[suit symbol]{cards}}]\\ -Typesets the cards of 1 single suit. -With the optional parameter one can add a suit symbol (e.g.\ \He) in front -of the cards. The mandatory parameter defines the cards for the suit. To -denote the rank \suit{T}, one has to use the letter |T|. - -\item[TP]: \TP -\item[tpts\Oarg{*!}]: \tpts, \tpts*, \tpts!, \tpts*! - -\item[TSF]: \TSF -\item[tsforce\Oarg{*!}]: \tsforce, \tsforce*, \tsforce!, \tsforce*! - -\item[vulner\Q{[text]}]\\ -Typeset the user-defined vulnerability. With the optional parameter one can -define the vulnerability. - -\item[vulnertext\Q{[text]}]\\ -Typeset the defined value for the |\vulner|, e.g.\ -\mbox{\vulnertext[\NorthSouth*]}. With the optional parameter one can -define the |text| to be printed \emph{as is}. - -\item[west]: \west -\item[West\Oarg{*!}]: \West, \West*, \West!, \West*! - -\item[westhand\Q{[h-offset]{Sp}{He}{Di}{Cl}}]\\ -Defines the cards for the -\West*!-player. With the optional parameter |h-offset| one can adapt the -(\emph{horizontal}) distance between hand and compass (default -\textbf{0pt}). The 4 mandatory parameters define the cards for the 4 suits. -To denote the rank \suit{T}, one has to use the uppercase letter |T|. - -\olditem[\string\begin\string{bidding\string}\Oarg{*!-}\Q{[pos](description)}\ldots\string\end\string{bidding\string}]~\\ -Typesets a bidding diagram. The star version centers the output. The -token~|!| forces a short form (\North*!) rather than the long form -(\North*) in the table header. The token~|-| suppresses all output, but the -saved data can be used elsewhere. The optional paramater |pos| (default -\textbf{c}) controls the alignment of the diagram. With the 2nd optional -parameter |description| one can add annotations (see also |\markit| and -|\explainit|) below the diagram. The bids in the bidding can both be -shorthands like |3S| as well as |3\Sp|. The same goes for calls: both |p| -and |\pass| are possible. For an overview of all possible shorthands, refer -to the last page of this document. -\par -The command |\setdefaults| has some keys to fine tune the -look of the bidding diagram. If the real world names of the players are -defined (e.g.\ with |\namesNS|, then they also appear in the table header. - -\olditem[\string\begin\string{biddingpair\string}\Oarg{*!-}\Q{[pos](description)}\ldots\string\end\string{biddingpair\string}]~\\ -Same as environment |bidding| but with only 2 columns. - -\olditem[\string\begin\string{play\string}\Oarg{*}\Q{{lead}[trump]}\ldots\string\end\string{play\string}]~\\ -Typesets a diagram with the playing tricks. The star version centers the -output. The mandatory parameter defines the player who had the opening -lead. The optional parameter defines the trump suit, the default is \NT. -This environment produces a table with 8 columns: the running number; the -player who had had the lead; the 4 cards played in this trick and finally -the 2 columns that show how many tricks \northsouth{} and \eastwest{} have -won so far. The user has only to enter the 4 colums that denote the 4 cards -played in each trick. The rest is handled by \OneDown. -% -\end{description} -% -% reset \item -%\fi -\let\item\olditem -% -\newpage -\centerline{\larger\textbf{Shorthands/Specials in bidding diagrams}} -\par\vspace{1\baselineskip}\noindent -% -\begin{minipage}{6cm} -\begin{verbatim} -\begin{bidding} -p & X & R & P \\ -\end{bidding} -\end{verbatim} -\end{minipage} -% -\begin{minipage}{7cm} -\begin{bidding} -p & X & R & P \\ -\end{bidding} -\end{minipage} -% -\\[1\baselineskip] -% -\begin{minipage}{6cm} -\begin{verbatim} -\setdefaults{bidlong=off} -\begin{bidding} -p & X & R & P \\ -{\frame{2H}} & -{\frame{2\He}} & -{\textit{R}} & -{\textit{\redouble}} \\ -\end{bidding} -\end{verbatim} -\end{minipage} -% -\begin{minipage}{6cm} -\setdefaults{bidlong=off} -\begin{bidding} -p & X & R & P \\ -{\frame{2H}} & {\frame{2\He}} & {\textit{R}} & {\textit{\redouble}} \\ -\end{bidding} -\end{minipage} -% -\\[1\baselineskip] -% -\centerline{\larger\textbf{Macros in bidding diagrams}} -\par\vspace{0.3\baselineskip}\noindent -These macros, called in a bidding table\ldots -\par\vspace{0.5\baselineskip}\noindent -% -\begin{verbatim} -\begin{bidding} -1 \Pass & \Double & \Redouble & \Allpass \\ -2 \Pass* & \Double* & \Redouble* & \Allpass* \\ -3 \Pass! & \Double! & \Redouble! & \Allpass! \\ -4 \Pass*! & \Double*! & \Redouble*! & \Allpass*! \\ -5 \pass & \double & \redouble & \allpass \\ -6 {\Pass*} & {\Double*} & {\Redouble*} & {\Allpass*} \\ -7 {\Pass!} & {\Double!} & {\Redouble!} & {\Allpass!} \\ -8 {\Pass*!} & {\Double*!} & {\Redouble*!} & {\Allpass*!} \\ -9 {\pass} & {\double} & {\redouble} & {\allpass} \\ -\end{bidding} -\end{verbatim} -% - -\ldots produce this output. Please note that line 2--5 are peculiar. -\par\vspace{0.3\baselineskip}\noindent -\begin{tabular}{lBBBB} - & {\west} & {\north} & {\east} & {\south} \\ -1 & \Pass & \Double & \Redouble & \Allpass \\ -2 & \Pass* & \Double* & \Redouble* & \Allpass* \\ -3 & \Pass! & \Double! & \Redouble! & \Allpass! \\ -4 & \Pass*! & \Double*! & \Redouble*! & \Allpass*! \\ -5 & \pass & \double & \redouble & \allpass \\ -6 & {\Pass*} & {\Double*} & {\Redouble*} & {\Allpass*} \\ -7 & {\Pass!} & {\Double!} & {\Redouble!} & {\Allpass!} \\ -8 & {\Pass*!} & {\Double*!} & {\Redouble*!} & {\Allpass*!} \\ -9 & {\pass} & {\double} & {\redouble} & {\allpass} \\ -\end{tabular}\\ - -\end{document} -\endinput - diff --git a/macros/latex/contrib/onedown/examples/showAll.tex b/macros/latex/contrib/onedown/examples/showAll.tex deleted file mode 100644 index e7571f6d3c..0000000000 --- a/macros/latex/contrib/onedown/examples/showAll.tex +++ /dev/null @@ -1,140 +0,0 @@ -\documentclass[onedown-examples]{subfiles} - -\begin{document} -\vfill -|\showAll| displays a card diagram with the 4 hands. Here the \east hand is -empty and is skipped completely from the diagram. If you want to show an -empty suit explicitly (which is a good thing), just use a single hyphen. -\OneDown will make an en-dash out of it. We added the dealer and -vulnerability to the diagram, the value of which was calculated -automatically from the given boardnumber(18). Please note that the -vulnerable side is printed in red and that the dealer is underlined in the -compass. With |\setdefaults{compmid=\boardtext}| we write the board number -as mid text in the compass. If given this way, it will always print the -\emph{actual} board number, as you can see in the following examples. -\vfill -% due to the grouping of the HBox, we must set |compmid| here. -% Otherwise it would not be in effect in the next HBox! -\setdefaults{compmid=\boardtext} -\begin{HBox}{showBoardNr\hfill File: \FileName} -\setdefaults{compmid=\boardtext} -\northhand{AJ}{K}{-}{-} -\southhand{32}{-}{A}{-} -\easthand{}{}{}{} -\westhand{KQ}{A}{-}{-} -\boardnr{18} -\leftupper{\dealertext}{}{\vulnertext} -\showAll -\end{HBox} -\vfill -This example shows how to add several conditions, such as declarer, lead -etc.\ to a diagram. |\boardtext| just prints the plain board number and was -called in |\setdefault{compmid=\boardtext}| (rather than using the -hard-coded number) to set it in the middle of the compass. In |\leftupper| -we use |\boardtext*| to print the boardnumber behind an additional text. - -You will have noticed that the right upper text does not fit well in the -diagram: it collides with the \north hand\ldots -\vfill -\begin{HBox}{Board Number\hfill File: \FileName} -\boardnr{19} -\northhand{AK43}{AQJ83}{AJ98}{-} -\southhand{87}{T5}{QT5}{K98654} -\easthand{JT6}{764}{K43}{JT32} -\westhand{Q952}{K92}{762}{AQ7} -\leftupper{\boardtext*}% - {\dealertext}{\vulnertext} -\rightupper{\contract: 3\,\NT}{\declarer \south}{} -\rightlower{\lead: \Di 7}{}{} -\showAll* -\end{HBox} -% -\vfill - \needspace{8\baselineskip} - \ldots so we add some (here 2ex) offset, to shift the text a bit to the -right. One can shift the upper/lower and left/right texts independently. A -positive offset shifts away from the compass, a negative offset would shift -the text towards the compass. -\vfill -\begin{HBox}{Board Number\hfill File: \FileName} -\boardnr{20} -\northhand{AK43}{AQJ83}{AJ98}{-} -\southhand{87}{T5}{QT5}{K98654} -\easthand{JT6}{764}{K43}{JT32} -\westhand{Q952}{K92}{762}{AQ7} -\leftupper{\boardtext*}% - {\dealertext}{\vulnertext} -\rightupper[2ex]{\contract: 3\,\NT}{\declarer \south}{} -\rightlower{\lead: \Di 7}{}{} -\showAll* -\end{HBox} -% -\vfill -Please note that the board number in the middle of the compass has been -updated each time that we called |\boardnr|. More important however, is to -see that the very long suit of the \north hand collides massively with the -right upper condition text. Shifting the text wouldn't help here. -\vfill -\begin{HBox}{Very long suits 1\hfill File: \FileName} -\boardnr{21} -\northhand{AKQJT98765432}{-}{-}{-} -\southhand{-}{2}{2}{AKQJT987654} -\easthand{-}{876543}{876543}{3} -\westhand{-}{AKQJT9}{AKQJT9}{2} -\showAll -\end{HBox} -\vfill -\needspace{8\baselineskip} -A simple way to 'correct' this is by lowering the text: leave the first -line of the right-upper text empty. -\vfill -\begin{HBox}{Correction by lowering the text\hfill File: \FileName} -\rightupper{}{\contract: 3\,\NT}{\declarer \south} -\northhand{AKQJT98765432}{-}{-}{-} -\southhand{-}{2}{2}{AKQJT987654} -\easthand{-}{876543}{876543}{3} -\westhand{-}{AKQJT9}{AKQJT9}{2} -\showAll -\end{HBox} -\vfill -Another problem with (very) long suits, is that the \eastwest hands can -seem too close to a \northsouth hand, as can be seen in next example. Of -course the hands are not any closer to each other as before, but the long -suit in the unfavourable position make it clearly look so. -\vfill -\begin{HBox}{Very long suits 2\hfill File: \FileName} -\rightupper{\contract: 3\,\NT}{\declarer \south}{} -\northhand{-}{2}{2}{AKQJT987654} -\southhand{AKQJT98765432}{-}{-}{-} -\easthand{-}{876543}{876543}{3} -\westhand{-}{AKQJT9}{AKQJT9}{2} -\rightlower{}{\lead: \Di 7}{} -\showAll -\end{HBox} -\vfill -\needspace{8\baselineskip} -The solution is to add some offset. In a previous example we already showed -how to use an offset with an annotation. Here we add an offset to the -apropriate \emph{hand}. This -is done with the optional parameter in the \north and the \south hand. The -\north hand shifts upwards, the \south hand downwards. As a little -demonstration, we also shifted the \east hand a bit to the right and the -\west hand a bit to the left. Negative offset values reverse the shift -direction. -\vfill -\begin{HBox}{Very long suits 3 with extra offset\hfill File: \FileName} -\northhand[1em]{-}{2}{2}% - {AKQJT987654} -\southhand[1em]{AKQJT98765432}% - {-}{-}{-} -\easthand[1em]{-}{876543}% - {876543}{3} -\westhand[1em]{-}{AKQJT9}% - {AKQJT9}{2} -\showAll -\end{HBox} -\vfill -\end{document} -\endinput - - diff --git a/macros/latex/contrib/onedown/examples/showNS-align.tex b/macros/latex/contrib/onedown/examples/showNS-align.tex deleted file mode 100644 index 47234eb1d0..0000000000 --- a/macros/latex/contrib/onedown/examples/showNS-align.tex +++ /dev/null @@ -1,39 +0,0 @@ -\documentclass[onedown-examples]{subfiles} -\begin{document} -These examples show the alignment of diagrams. -The alignment is given as an optional argument to the |showXX| commands. It -bears the usual name for alignments: \textbf{t} for top, \textbf{b} for -bottom and \textbf{c} for centered. Note that the |\smaller\smaller| from -a previous example is still in effect: The command |\newgame| does not -reset any font. Please note the difference between diagram 1 and 3. The -font used for the suits is \textbf{not} the same. - -\vfill -\begin{HBox}{showNS top algned\hfill File: \FileName} -\newgame -\northhand{KJ92}{KQ9}{J}{AQJT8} -\southhand{AQT85}{A52}{64}{K96} -A \showNS[t] B -\resetfonts -C \showNS[t] D -\gamefont{\sffamily\bfseries\smaller\smaller} -E \showNS[t] F -\end{HBox} -\vfill -We do need to call |\resetfonts| (or |\gamefont|) explicitly to reset the -font or size. -\vfill -\begin{HBox}{showNS center aligned\hfill File: \FileName} -\resetfonts -% \gamefont would do the job as well -%\gamefont{\bfseries\sffamily} -A \showNS[c] B -\end{HBox} -\vfill -\begin{HBox}{showNS bottom aligned\hfill File: \FileName} -A \showNS[b] B -\end{HBox} -\vfill -\end{document} -\endinput - diff --git a/macros/latex/contrib/onedown/examples/showNS-warn-I.tex b/macros/latex/contrib/onedown/examples/showNS-warn-I.tex deleted file mode 100644 index a24c9a0066..0000000000 --- a/macros/latex/contrib/onedown/examples/showNS-warn-I.tex +++ /dev/null @@ -1,29 +0,0 @@ -\documentclass[onedown-examples]{subfiles} -\newgame -\begin{document} - -If you do not define all cards of a deck, then a lot of `missing card' -warnings will appear. Therefore most of the time it is better that warnings -are switched off. This is the default, but you can explicitly do that with -|\setdefaults{warn=off}|. It is also the default to produce \emph{error} -messages, which you can also switch off with |\setdefaults{err=off}|. -We recommend to have errors shown when you enter new diagrams. Please -observe how the |\smaller\smaller| command shrinked the diagram. We did -that to make all the warnings fit in the box. To avoid that all following -diagrams are also shrinked you must call |\gamefont{\bfseries\sffamily}| -again without the resizing. Calling |\resetfonts| has the same effect, but -would also influence the other fonts. -\vfill -\begin{HBox}{showNS with warnings\hfill File: \FileName} -\setdefaults{warn=on} - \gamefont{\bfseries\sffamily% - \smaller\smaller} - \northhand{KJ92}{KQ9}{J}{AQJT8} - \southhand{AQT85}{A52}{64}{K96} - \showNS -\end{HBox} -\vfill -% -\end{document} -\endinput - diff --git a/macros/latex/contrib/onedown/examples/showNS-warn-II.tex b/macros/latex/contrib/onedown/examples/showNS-warn-II.tex deleted file mode 100644 index 516e959005..0000000000 --- a/macros/latex/contrib/onedown/examples/showNS-warn-II.tex +++ /dev/null @@ -1,59 +0,0 @@ -\documentclass[onedown-examples]{subfiles} -\begin{document} -In the previous example we enabled warnings and set a much smaller font to -make the example fit on the page. As we compile these examples as one big -file, \OneDown remembers these values. If you compile this file -(showNS-warn-II) standalone with |pdflatex showNS-warn-II| and view the -result, then you'll see no warnings and no shrinking. - -\vfill -\begin{HBox}{showNS \hfill File: \FileName} -\northhand{KJ92}{KQ9}{J}{AQJT8} -\southhand{AQT85}{A52}{64}{K96} -\showNS -\end{HBox} -% -\vfill -\needspace{8\baselineskip} -\vfill -Now warnings are switched off explicitly and the size is reset by calling -|\resetfonts|. -\vfill -\begin{HBox}{showNS \hfill File: \FileName} -\setdefaults{warn=off} -\resetfonts -\showNS -\end{HBox} -% -\vfill -|\newgame| clears the hands. A hand with no cards at all is completelly -suppressed, so we see only the compass. With |\setdefaults{compmid=text}| -we can write 'text' in the middle of the compass. We enlarged the compass, -so you can see that it \emph{is} on the vertical line through the mids of -\North*! and \South*!. With |\resetfonts| we return to the default values -of the fonts. With |\setdefaults| one can influence the look of diagrams. -In section |Compass| we'll go more into detail. Please note that |\setdefaults| has -only 1 argument, It is \emph{mandatory} and must be enclosed in -braces (|{...}|). The argument is a key-val list, separated by commas. I.e. rather -than |\setdefaults{warn=off}\setdefaults{compmid=15}| one can also write -|\setdefaults{warn=off,compmid=15}|. -\vfill -\begin{HBox}{showNS \hfill File: \FileName} -\newgame -\raggedright -\setdefaults{compmid=15} -\showNS -\showNS -\gamefont{\sffamily\bfseries\Huge} -\showNS -\resetfonts -\setdefaults{compmid=} -\showNS -\gamefont{\smaller\smaller} -\showNS -\end{HBox} -\vfill -% -\end{document} -\endinput - diff --git a/macros/latex/contrib/onedown/onedown.dtx b/macros/latex/contrib/onedown/onedown.dtx index 92ffa66155..7f1afcfc7a 100644 --- a/macros/latex/contrib/onedown/onedown.dtx +++ b/macros/latex/contrib/onedown/onedown.dtx @@ -1,6 +1,6 @@ % \iffalse meta-comment % -% Copyright (C) 2018 by Jacob Wiersma +% Copyright (C) 2018 by Jacob Wiersma % --------------------------------------------------------------------------- % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 @@ -24,10 +24,10 @@ \ProvidesFile{onedown.dtx} % %\NeedsTeXFormat{LaTeX2e}[2014/05/01] -%\def\ODwstyleversion{1.6}\def\ODwstyledate{2021/04/27} +%\def\ODwstyleversion{1.7}\def\ODwstyledate{2023/12/07} %\ProvidesPackage{onedown} % [\ODwstyledate\space v\ODwstyleversion\space -% Typeset Bridge Diagrams - Jacob Wiersma (C) 2016-2021] +% Typeset Bridge Diagrams - Jacob Wiersma (C) 2016-2023] % %<*driver> \PassOptionsToPackage{shorthands=off}{babel} @@ -35,12 +35,13 @@ % with draft no hyperrefs \documentclass[a4paper,12pt,% german,dutch,french,swedish,english]{ltxdoc} +% Of all available languages, we use only thes few in some examples % the package |shortvrb| is auto-loaded, providing |...| as shorthand \usepackage[utf8]{inputenc} % \usepackage[T1]{fontenc} \usepackage{babel} -\usepackage{onedown}[2021/04/27] +\usepackage{onedown}[2023/12/07] \usepackage[normalem]{ulem}% for strikeout todos that are done \usepackage{needspace}% keep contiguous lines on one page \usepackage[inline]{enumitem}% Control various parameters of lists @@ -212,7 +213,7 @@ german,dutch,french,swedish,english]{ltxdoc} % % \fi % -% \CheckSum{3810} +% \CheckSum{3814} % % \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 @@ -399,6 +400,10 @@ german,dutch,french,swedish,english]{ltxdoc} % - Translation files are named like: ODw-German.dict\\ % - Adapted the code to read them on the fly % } +% \changes{v1.7}{2023/12/07}{\\ +% - Added support for the italian language \\ +% - Added an example showing how to define own colors for card symbols +% } % ^^A Note: ^^21 denotes the exclamation mark (!) % ^^A Note: Char ' is not allowed within changes % @@ -757,14 +762,15 @@ pdflatex --shell-escape onedown.dtx % translate often appearing brigde terms like e.g.\ \emph{declarer}. It does % so by looking up these terms in the special |ODw|-dictionary for the % active language. The current \OneDown version supports English, German, -% Dutch, French, Spanish, most Scandinavian languages and Turkish. Some +% Dutch, French, Italian, Spanish, most Scandinavian languages and Turkish. Some % dictionaries may not be complete or may contain errors, please send % corrections/additions to the maintainer. % % In order to make \packname{translator} do its job (automatically select the -% right translation when the current language switches to another), it is -% necessary to specify the languages with the |documentclass|, and not with -% |babel|! +% right translation when the current language switches to another), +% \textbf{\larger it is +% necessary to specify the languages with the \texttt{documentclass}, and not with +% \texttt{babel}! } % % \needspace{5\baselineskip} % @@ -1731,6 +1737,8 @@ pdflatex --shell-escape onedown.dtx % \subsection{ToDo} % % \begin{itemize}[itemsep=-2mm] +% \item \textbf{Correct the description how to enable automatic language +% switching (since we use package translator)} % \item Add the High Points to card diagrams (like Turnier in KA) % \item Check if |\def\xspace{}| is also needed in bidding...? % \item Make a template for showing 16 hands on 1 DIN A4 (3x5+1 or 4x4 @@ -1765,6 +1773,7 @@ pdflatex --shell-escape onedown.dtx % % \StopEventually{} % +% \newpage % \section{Implementation} % % \iffalse @@ -1785,7 +1794,6 @@ pdflatex --shell-escape onedown.dtx moresize,% add \HUGE and \ssmall to font-sizes relsize,% relative font-sizes. (e.g. \smaller) makecmds,% needed for provideenvironment -% expl3,% needed for LaTeX3 packages (xparse) xparse,% optional params and starred commands xspace,% handling of spacing behind a command calc,% makes calculations and lengths easier @@ -5970,6 +5978,11 @@ pdflatex --shell-escape onedown.dtx {\uselanguage{German}% \PackageInfo{ODw}{Dictionary ODw-German.dict loaded} }{\PackageWarning{ODw}{Dictionary ODw-German.dict missing}}}% +% + {italian}{\IfFileExists{ODw-Italian.dict}% + {\uselanguage{Italian}% + \PackageInfo{ODw}{Dictionary ODw-Italian.dict loaded} + }{\PackageWarning{ODw}{Dictionary ODw-Italian.dict missing}}}% % {norsk}{\IfFileExists{ODw-Norsk.dict}% {\uselanguage{Norsk}% diff --git a/macros/latex/contrib/onedown/onedown.pdf b/macros/latex/contrib/onedown/onedown.pdf index 726f4bb0d3..10ec860396 100644 Binary files a/macros/latex/contrib/onedown/onedown.pdf and b/macros/latex/contrib/onedown/onedown.pdf differ diff --git a/macros/latex/contrib/tkz/tkz-elements/README.md b/macros/latex/contrib/tkz/tkz-elements/README.md index 75744500d4..93bf219100 100644 --- a/macros/latex/contrib/tkz/tkz-elements/README.md +++ b/macros/latex/contrib/tkz/tkz-elements/README.md @@ -1,10 +1,10 @@ # tkz-elements — for euclidean geometry -Release 1.40c 2023/12/03 +Release 1.50c 2023/12/08 ## Description -`tkz-elements v.1.40c` is the new version of a library written in lua, allowing to make all the necessary calculations to define the objects of a Euclidean geometry figure. You need to compile with `LuaLaTeX`. With `tkz-elements`, the definitions and calculations are only done with `Lua`. +`tkz-elements v.1.50c` is the new version of a library written in lua, allowing to make all the necessary calculations to define the objects of a Euclidean geometry figure. You need to compile with `LuaLaTeX`. With `tkz-elements`, the definitions and calculations are only done with `Lua`. The main possibility of programmation proposed is oriented "object programming" with object classes like point, line, triangle, circle and ellipse. For the moment, once the calculations are done, it is `tkz-euclide` or `TikZ` which allows the drawings. @@ -58,6 +58,30 @@ package conflicts. Some examples will be stored on my site : [http://altermundus.fr](http://altermundus.fr). ## History + - version 1.50c Correction of the documentation + + Added "swap" option to create triangles from the "line" object. + + "iscyclic" is a new method to know if a quadrilateral is inscribable in a circle. + + Added function "diameter" to create a circle. + + Added function "swap" to swap two points. + + Correction method "gold" of object rectangle. + + Correction method "in_circle_" of object triangle. + + Correction method "incentral_tr_" of object triangle. + + Added method "soddy_center" of object triangle. + + Added option "swap" for method "square" of object line. + + Added method "report" for object line. Transfer a defined length from a point + + Added option "swap" to the function "square : side" + - Version 1.40c Restructuring objects New version for all transformations. Now, they accept all objects as parameters. diff --git a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-line.tex b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-line.tex index 099c75a278..1bd4b831e4 100644 --- a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-line.tex +++ b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-line.tex @@ -154,63 +154,65 @@ Here's the list of methods for the \tkzNameObj{line} object. The results are eit \label{ssub:table_of_the_methods_from_class_line} \vspace{1em} -\bgroup -\catcode`_=12 -\small -\captionof{table}{Methods of the class line.} -\begin{tabular}{lll} -\toprule -\textbf{Methods} & \textbf{Comments} & \\ -\midrule -\Imeth{line}{new(A, B)} & |L.AB = line : new(z.A,z.B)| line through the points $A$ and $B$&\\ -\midrule - \textbf{Points} &&\\ -\midrule -\Imeth{line}{gold\_ratio ()} & |z.C = L.AB : gold_ratio()| & gold ratio \\ -\Imeth{line}{normalize ()} & |z.C = L.AB : normalize()| & AC =1 and $C\in (AB)$ \\ -\Imeth{line}{normalize\_inv ()} & |z.C = L.AB : normalize_inv()| & CB =1 and $C\in (AB)$ \\ -\Imeth{line}{barycenter (ka,kb)} & |z.C = L.AB : barycenter (1,2)| $C$ & barycenter of |{(A,1)(B,2)}|\\ -\Imeth{line}{point (t)} & |z.C = L.AB : point (2)| & $\overrightarrow{AC} = 2\overrightarrow{AB}$\\ -\Imeth{line}{midpoint ()} & |z.M = L.AB : midpoint ()| & better is |z.M = L.AB.mid| \\ -\Imeth{line}{harmonic\_int } & |z.D = L.AB : harmonic_int (z.C)| & $D\in [AB]$ $C\notin [AB]$\\ -\Imeth{line}{harmonic\_ext (pt)} & |z.D = L.AB : harmonic_ext (z.C)| & $D\notin [AB]$ $C\in [AB]$\\ -\Imeth{line}{harmonic\_both (k)} & |z.C,z.D = L.AB : harmonic_both (tkzphi)| & ${ {CA/CB}={DA/DB}=t\varphi.}$\\ -\Imeth{line}{square ()} & |S.AB =(L.AB : square ()) | & create a square |S.AB|.\footnote{ |_,_,z.C,z.D = get_points(S.AB)|}\\ -\midrule - \textbf{Lines} &&\\ -\midrule -\Imeth{line}{ll\_from ( pt )} & |L.CD = L.AB : ll_from (z.C)| & $(CD) \parallel (AB)$ \\ -\Imeth{line}{ortho\_from ( pt )} & |L.CD = L.AB : ortho_from (z.C)|& $(CD) \perp (AB)$\\ -\Imeth{line}{mediator ()}&|L.uv = L.AB : mediator ()| & $(u,v)$ mediator of $(A,B)$\\ -\midrule - \textbf{Triangles} &&\\ -\midrule -\Imeth{line}{equilateral (swap)} & |T.ABC = L.AB : equilateral ()| $(\overrightarrow{AB},\overrightarrow{AC})>0$ & or < with swap \\ -\Imeth{line}{isosceles (phi)} & |T.ABC = L.AB : isosceles (math.pi/6)|& \\ -\Imeth{line}{gold ()} & |T.ABC = L.AB : gold ()| & right in $B$ and $AC = \varphi \times AB $ \\ -\Imeth{line}{euclide ()} & |T.ABC = L.AB : euclide ()| & $AB=AC$ and $(\overrightarrow{AB},\overrightarrow{AC}) = math.pi/5$ \\ -\Imeth{line}{golden ()} & |T.ABC = L.AB : golden ()| & $(\overrightarrow{AB},\overrightarrow{AC}) = 2\times \pi/5$ \\ -\midrule - \textbf{Circles} &&\\ -\midrule -\Imeth{line}{circle ()} & |C.AB = L.AB : circle ()| & center pa through pb \\ -\Imeth{line}{circle\_swap ()} & |C.BA = L.AB : circle\_swap ()|& center pb through pa \\ -\midrule - \textbf{Transformations} &&\\ -\midrule -\Imeth{line}{reflection ( obj )} & |new obj = L.AB : reflection (obj|&\\ -\Imeth{line}{translation ( obj )} & |new obj = L.AB : translation (obj)|&\\ -\Imeth{line}{projection ( obj )} & |z.H = L.AB : projection (z.C)| & $CH \perp (AB)$ and $H\in (AB)$\\ -\midrule - \textbf{Miscellaneous} &&\\ -\midrule -\Imeth{line}{distance (pt)} & |d = L.Ab : distance (z.C)| & see \ref{ssub:example_distance_and_projection}\\ -\Imeth{line}{in\_out (pt)} & |b = L.AB : in_out (z.C)| $b$ is a boolean b=true if $C\in (AB)$ &\\ -\Imeth{line}{slope ()} & |a = L.AB : slope()| & better is L.AB.slope \\ -\bottomrule -\end{tabular} - -\egroup +\begin{minipage}{\textwidth} + \bgroup + \catcode`_=12 + \small + \captionof{table}{Methods of the class line.} + \begin{tabular}{lll} + \toprule + \textbf{Methods} & \textbf{Comments} & \\ + \midrule + \Imeth{line}{new(A, B)} & |L.AB = line : new(z.A,z.B)| line through the points $A$ and $B$&\\ + \midrule + \textbf{Points} &&\\ + \midrule + \Imeth{line}{gold\_ratio ()} & |z.C = L.AB : gold_ratio()| & gold ratio \\ + \Imeth{line}{normalize ()} & |z.C = L.AB : normalize()| & AC =1 and $C\in (AB)$ \\ + \Imeth{line}{normalize\_inv ()} & |z.C = L.AB : normalize_inv()| & CB =1 and $C\in (AB)$ \\ + \Imeth{line}{barycenter (ka,kb)} & |z.C = L.AB : barycenter (1,2)| $C$ & barycenter of |{(A,1)(B,2)}|\\ + \Imeth{line}{point (t)} & |z.C = L.AB : point (2)| & $\overrightarrow{AC} = 2\overrightarrow{AB}$\\ + \Imeth{line}{midpoint ()} & |z.M = L.AB : midpoint ()| & better is |z.M = L.AB.mid| \\ + \Imeth{line}{harmonic\_int } & |z.D = L.AB : harmonic_int (z.C)| & $D\in [AB]$ $C\notin [AB]$\\ + \Imeth{line}{harmonic\_ext (pt)} & |z.D = L.AB : harmonic_ext (z.C)| & $D\notin [AB]$ $C\in [AB]$\\ + \Imeth{line}{harmonic\_both (k)} & |z.C,z.D = L.AB : harmonic_both (tkzphi)| & ${ {CA/CB}={DA/DB}=t\varphi.}$\\ + \Imeth{line}{square ()} & |S.AB =(L.AB : square ()) | & create a square |S.AB|.\footnote{ |_,_,z.C,z.D = get_points(S.AB)|}\\ + \midrule + \textbf{Lines} &&\\ + \midrule + \Imeth{line}{ll\_from ( pt )} & |L.CD = L.AB : ll_from (z.C)| & $(CD) \parallel (AB)$ \\ + \Imeth{line}{ortho\_from ( pt )} & |L.CD = L.AB : ortho_from (z.C)|& $(CD) \perp (AB)$\\ + \Imeth{line}{mediator ()}&|L.uv = L.AB : mediator ()| & $(u,v)$ mediator of $(A,B)$\\ + \midrule + \textbf{Triangles}&&\\ + \midrule + \Imeth{line}{equilateral (swap)} & |T.ABC = L.AB : equilateral ()| $(\overrightarrow{AB},\overrightarrow{AC})>0$ & or < with swap \footnote{Triangles are defined in the direct sense of rotation, unless the "swap" option is present.} \\ + \Imeth{line}{isosceles (phi,swap)} & |T.ABC = L.AB : isosceles (math.pi/6)|& \\ + \Imeth{line}{gold (swap)} & |T.ABC = L.AB : gold ()| & right in $B$ and $AC = \varphi \times AB $ \\ + \Imeth{line}{euclide (swap)} & |T.ABC = L.AB : euclide ()| & $AB=AC$ and $(\overrightarrow{AB},\overrightarrow{AC}) = math.pi/5$ \\ + \Imeth{line}{golden (swap)} & |T.ABC = L.AB : golden ()| & $(\overrightarrow{AB},\overrightarrow{AC}) = 2\times \pi/5$ \\ + \midrule + \textbf{Circles} &&\\ + \midrule + \Imeth{line}{circle ()} & |C.AB = L.AB : circle ()| & center pa through pb \\ + \Imeth{line}{circle\_swap ()} & |C.BA = L.AB : circle\_swap ()|& center pb through pa \\ + \midrule + \textbf{Transformations} &&\\ + \midrule + \Imeth{line}{reflection ( obj )} & |new obj = L.AB : reflection (obj|&\\ + \Imeth{line}{translation ( obj )} & |new obj = L.AB : translation (obj)|&\\ + \Imeth{line}{projection ( obj )} & |z.H = L.AB : projection (z.C)| & $CH \perp (AB)$ and $H\in (AB)$\\ + \midrule + \textbf{Miscellaneous} &&\\ + \midrule + \Imeth{line}{distance (pt)} & |d = L.Ab : distance (z.C)| & see \ref{ssub:example_distance_and_projection}\\ + \Imeth{line}{in\_out (pt)} & |b = L.AB: in_out(z.C)| b=true if $C\in (AB)$ &\\ + \Imeth{line}{slope ()} & |a = L.AB : slope()| & better is L.AB.slope \\ + \bottomrule + \end{tabular} + + \egroup +\end{minipage} % subsubsection table_of_the_methods_from_class_line (end) Here are a few examples. diff --git a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-quadrilateral.tex b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-quadrilateral.tex index 1e1a23b1d4..2171337792 100644 --- a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-quadrilateral.tex +++ b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-quadrilateral.tex @@ -93,7 +93,7 @@ z.G = Q.ABCD.g \toprule \textbf{Methods} & \textbf{Comments} \\ \midrule \\ -\Imeth{quadrilateral}{cyclic ()} & inscribed ? (see next example)\\ +\Imeth{quadrilateral}{iscyclic ()} & inscribed ? (see next example)\\ \bottomrule % \end{tabular} \egroup @@ -110,7 +110,7 @@ L.DB = line : new (z.D,z.B) T.equ = L.DB : equilateral () z.C = T.equ.pc Q.new = quadrilateral : new (z.A,z.B,z.C,z.D) -bool = Q.new : cyclic () +bool = Q.new : iscyclic () if bool == true then C.cir = triangle : new (z.A,z.B,z.C): circum_circle () z.O = C.cir.center @@ -138,7 +138,7 @@ L.DB = line : new (z.D,z.B) T.equ = L.DB : equilateral () z.C = T.equ.pc Q.new = quadrilateral : new (z.A,z.B,z.C,z.D) -bool = Q.new : cyclic () +bool = Q.new : iscyclic () if bool == true then C.cir = triangle : new (z.A,z.B,z.C): circum_circle () z.O = C.cir.center diff --git a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-rectangle.tex b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-rectangle.tex index 29e9fb89d4..62cb44b1c9 100644 --- a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-rectangle.tex +++ b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-classes-rectangle.tex @@ -122,12 +122,11 @@ z.I = R.new.center scale = .5 z.A = point : new ( 0 , 0 ) z.B = point : new ( 4 , 0 ) -z.C = point : new ( 4 , 3 ) -P.ABCD = rectangle : angle ( z.C , z.A , math.pi/6) +z.I = point : new ( 4 , 3 ) +P.ABCD = rectangle : angle ( z.I , z.A , math.pi/6) z.B = P.ABCD.pb z.C = P.ABCD.pc z.D = P.ABCD.pd -z.I = P.ABCD.center \end{tkzelements} \begin{tikzpicture} @@ -144,12 +143,11 @@ z.I = P.ABCD.center scale = .5 z.A = point : new ( 0 , 0 ) z.B = point : new ( 4 , 0 ) -z.C = point : new ( 4 , 3 ) -P.ABCD = rectangle : angle ( z.C , z.A , math.pi/6) +z.I = point : new ( 4 , 3 ) +P.ABCD = rectangle : angle ( z.I , z.A , math.pi/6) z.B = P.ABCD.pb z.C = P.ABCD.pc z.D = P.ABCD.pd -z.I = P.ABCD.center \end{tkzelements} \begin{tikzpicture} \tkzGetNodes @@ -211,21 +209,22 @@ z.I = R.side.center \begin{minipage}{.5\textwidth} \begin{verbatim} \begin{tkzelements} -z.E = point : new ( 0 , 0 ) -z.G = point : new ( 4 , 3 ) -R.diag = rectangle : diagonal (z.E,z.G) -z.F = R.diag.pb -z.H = R.diag.pd -z.I = R.diag.center +z.A = point : new ( 0 , 0 ) +z.C = point : new ( 4 , 3 ) +R.diag = rectangle : diagonal (z.A,z.C) +z.B = R.diag.pb +z.D = R.diag.pd +z.I = R.diag.center \end{tkzelements} \begin{tikzpicture} \tkzGetNodes -\tkzDrawPolygon(E,F,G,H) -\tkzDrawPoints(E,F,G,H) -\tkzLabelPoints((E,F) -\tkzLabelPoints[above](G,H) +\tkzDrawPolygon(A,B,C,D) +\tkzDrawPoints(A,B,C,D) +\tkzLabelPoints(A,B) +\tkzLabelPoints[above](C,D) \tkzDrawPoints[red](I) +\tkzLabelSegment[sloped,above](A,B){|rectangle : diagonal (z.A,z.C)|} \end{tikzpicture} \end{verbatim} \end{minipage} @@ -266,11 +265,12 @@ z.I = R.gold.center \begin{tikzpicture} \tkzGetNodes -\tkzDrawPolygon(A,B,C,D) -\tkzDrawPoints(A,B,C,D) -\tkzLabelPoints(A,B) -\tkzLabelPoints[above](C,D) +\tkzDrawPolygon(X,Y,Z,W) +\tkzDrawPoints(X,Y,Z,W) +\tkzLabelPoints(X,Y) +\tkzLabelPoints[above](Z,W) \tkzDrawPoints[red](I) +\tkzLabelSegment[sloped,above](X,Y){|rectangle : gold (z.X,z.Y)|} \end{tikzpicture} \end{verbatim} \end{minipage} diff --git a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-convention.tex b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-convention.tex index f25d02d569..90e07b1ef7 100644 --- a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-convention.tex +++ b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-convention.tex @@ -16,7 +16,7 @@ and outside the environment \tkzNameEnv{tkzelements} you can use the macro \begin{mybox} - |\fthenelse{\equal{\tkzUseLua{bool}}{true}}{ ... }{ ... }| + |\ifthenelse{\equal{\tkzUseLua{bool}}{true}}{ ... }{ ... }| \end{mybox} after loading the \tkzNamePack{ifthen} package. diff --git a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-examples.tex b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-examples.tex old mode 100644 new mode 100755 index f9658252c2..7a00735fd4 --- a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-examples.tex +++ b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-examples.tex @@ -804,38 +804,40 @@ z.L = intersection (L.AR,L.BG) \subsection{Director circle} % (fold) \label{sub:director_circle} - -\begin{tkzexample}[latex=0cm,small,code only] -\begin{tkzelements} -scale = .5 -z.O = point: new (0 , 0) -z.F1 = point: new (4 , 0) -z.F2 = point: new (-4 , 0) -z.H = point: new (4*math.sqrt(2) , 0) -E = ellipse: foci (z.F2,z.F1,z.H) -a,b = E.Rx, E.Ry -z.A = E.covertex -T = triangle: new (z.H,z.O,z.A) -z.P = T: parallelogram () -C = circle: new (z.O,z.P) -z.L = C: point (2) -L.J,L.K = E: tangent_from (z.L) -z.J = L.J.pb -z.K = L.K.pb -\end{tkzelements} - \begin{tikzpicture} - \tkzGetNodes - \tkzDrawPoints(F1,F2,O) -\tkzDrawCircles[teal](O,P) -\tkzDrawPolygon(H,O,A,P) -\tkzDrawEllipse[red](O,\tkzUseLua{a},\tkzUseLua{b},0) -\tkzDrawSegments[orange](O,P O,L L,J L,K) -\tkzDrawPoints(F1,F2,O,H,A,P,L,J,K) -\tkzLabelPoints(F1,F2,O,H,A,P,L,J,K) -\tkzMarkRightAngles(A,P,H J,L,K) -\end{tikzpicture} -\end{tkzexample} - +% modif C: point (0.25) instead of 2 +\begin{minipage}[t]{.5\textwidth}\vspace{0pt}% + \begin{verbatim} + \begin{tkzelements} + scale = .5 + z.O = point: new (0 , 0) + z.F1 = point: new (4 , 0) + z.F2 = point: new (-4 , 0) + z.H = point: new (4*math.sqrt(2) , 0) + E = ellipse: foci (z.F2,z.F1,z.H) + a,b = E.Rx, E.Ry + z.A = E.covertex + T = triangle: new (z.H,z.O,z.A) + z.P = T: parallelogram () + C = circle: new (z.O,z.P) + z.L = C: point (0.25) + L.J,L.K = E: tangent_from (z.L) + z.J = L.J.pb + z.K = L.K.pb + \end{tkzelements} + \begin{tikzpicture} + \tkzGetNodes + \tkzDrawPoints(F1,F2,O) + \tkzDrawCircles[teal](O,P) + \tkzDrawPolygon(H,O,A,P) + \tkzDrawEllipse[red](O,\tkzUseLua{a},\tkzUseLua{b},0) + \tkzDrawSegments[orange](O,P O,L L,J L,K) + \tkzDrawPoints(F1,F2,O,H,A,P,L,J,K) + \tkzLabelPoints(F1,F2,O,H,A,P,L,J,K) + \tkzMarkRightAngles(A,P,H J,L,K) + \end{tikzpicture} + \end{verbatim} +\end{minipage} +\begin{minipage}[t]{.5\textwidth}\vspace{0pt}% \begin{tkzelements} scale = .5 z.O = point: new (0 , 0) @@ -848,13 +850,12 @@ z.A = E.covertex T = triangle: new (z.H,z.O,z.A) z.P = T: parallelogram () C = circle: new (z.O,z.P) -z.L = C: point (2) +z.L = C: point (0.25) L.J,L.K = E: tangent_from (z.L) z.J = L.J.pb z.K = L.K.pb \end{tkzelements} - \hspace*{\fill} \begin{tikzpicture} \tkzGetNodes @@ -867,7 +868,7 @@ z.K = L.K.pb \tkzLabelPoints(F1,F2,O,H,A,P,L,J,K) \tkzMarkRightAngles(A,P,H J,L,K) \end{tikzpicture} -\hspace*{\fill} +\end{minipage} % subsection director_circle (end) diff --git a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-main.pdf b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-main.pdf new file mode 100644 index 0000000000..d05eb7fbb9 Binary files /dev/null and b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-main.pdf differ diff --git a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-main.tex b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-main.tex index 6540ebffaf..101a65ed15 100644 --- a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-main.tex +++ b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-main.tex @@ -21,10 +21,10 @@ headings = small ]{tkz-doc} \gdef\tkznameofpack{tkz-elements} -\gdef\tkzversionofpack{1.40c} +\gdef\tkzversionofpack{1.50c} \gdef\tkzdateofpack{\today} \gdef\tkznameofdoc{tkz-elements.pdf} -\gdef\tkzversionofdoc{1.40c} +\gdef\tkzversionofdoc{1.50c} \gdef\tkzdateofdoc{\today} \gdef\tkzauthorofpack{Alain Matthes} \gdef\tkzadressofauthor{} @@ -88,8 +88,10 @@ \newfontfamily\ttcondensed{lmmonoltcond10-regular.otf} %% (La)TeX font-related declarations: \linespread{1.05} % Pagella needs more space between lines -\usepackage[math-style=literal,bold-style=literal]{unicode-math} +%\usepackage[math-style=literal,bold-style=literal]{unicode-math} +\usepackage{unicode-math} \usepackage{fourier-otf} +\setmathfont{Concrete-Math.otf} \let\rmfamily\ttfamily \usepackage{multicol,lscape,wrapfig} \usepackage[english]{babel} diff --git a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-why.tex b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-why.tex index e76340cbd0..afc64f416d 100644 --- a/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-why.tex +++ b/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-why.tex @@ -158,7 +158,7 @@ The following section concerns only drawings, and is handled by tkz-euclide. \vspace{1em} \begin{tkzelements} - scale = .35 + scale = .4 z.A = point: new (0,0) z.B = point: new (6,0) z.C = point: new (0.8,4) @@ -198,10 +198,6 @@ The following section concerns only drawings, and is handled by tkz-euclide. \end{minipage} % subsubsection example_apollonius_circle (end) - % subsubsection using_objects (end) - % subsection calculation_accuracy (end) - - % section why_tkz_elements (end) \ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-elements/doc/tkz-elements.pdf b/macros/latex/contrib/tkz/tkz-elements/doc/tkz-elements.pdf index cee54a9cfe..d05eb7fbb9 100644 Binary files a/macros/latex/contrib/tkz/tkz-elements/doc/tkz-elements.pdf and b/macros/latex/contrib/tkz/tkz-elements/doc/tkz-elements.pdf differ diff --git a/macros/latex/contrib/tkz/tkz-elements/latex/tkz-elements.sty b/macros/latex/contrib/tkz/tkz-elements/latex/tkz-elements.sty index 1a14660eaa..e8d633c9f6 100644 --- a/macros/latex/contrib/tkz/tkz-elements/latex/tkz-elements.sty +++ b/macros/latex/contrib/tkz/tkz-elements/latex/tkz-elements.sty @@ -1,5 +1,5 @@ % encoding : utf8 -% tkz-elements.sty v1.40c +% tkz-elements.sty v1.50c % Copyright 2023 Alain Matthes % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 @@ -11,7 +11,7 @@ % This work has the LPPL maintenance status “maintained”. % The Current Maintainer of this work is Alain Matthes. -\ProvidesPackage{tkz-elements}[23/12/03 v1.40c Graphic Object Library] +\ProvidesPackage{tkz-elements}[23/12/08 v1.50c Graphic Object Library] \RequirePackage{luacode} \directlua{require "tkz_elements_main"} diff --git a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_circle.lua b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_circle.lua index bc3508a5aa..91ff4f659e 100644 --- a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_circle.lua +++ b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_circle.lua @@ -1,6 +1,6 @@ -- tkz_elements-circles.lua --- date 23/12/03 --- version 1.40c +-- date 23/12/08 +-- version 1.50c -- Copyright 2023 Alain Matthes -- This work may be distributed and/or modified under the -- conditions of the LaTeX Project Public License, either version 1.3 @@ -39,6 +39,11 @@ end function circle: radius (center, radius) -- c --> center r --> radius return circle : new (center, center + point( radius, 0 ) ) end + +function circle: diameter (za, zb) + local c = midpoint_(za,zb) + return circle : new (c, zb ) +end ----------------------- -- boolean -- ----------------------- diff --git a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_class.lua b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_class.lua index f63b0d183a..fb15fd3b03 100644 --- a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_class.lua +++ b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_class.lua @@ -1,6 +1,6 @@ -- tkz_elements_class.lua --- date 23/12/03 --- version 1.40c +-- date 23/12/08 +-- version 1.50c -- from class.lua (Simple Lua Classes from Lua-users wiki) -- Compatible with Lua 5.1 (not 5.0). -- http://lua-users.org/wiki/SimpleLuaClasses DavidManura diff --git a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_ellipse.lua b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_ellipse.lua index b4cbe76a7e..dcac24758b 100644 --- a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_ellipse.lua +++ b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_ellipse.lua @@ -1,6 +1,6 @@ -- tkz_elements-ellipses.lua --- date 23/12/03 --- version 1.40c +-- date 23/12/08 +-- version 1.50c -- Copyright 2023 Alain Matthes -- This work may be distributed and/or modified under the -- conditions of the LaTeX Project Public License, either version 1.3 diff --git a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_circles.lua b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_circles.lua index 76b8fb395b..a45987d1c8 100644 --- a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_circles.lua +++ b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_circles.lua @@ -1,6 +1,6 @@ -- tkz_elements_functions_circles.lua --- date 23/12/03 --- version 1.40c +-- date 23/12/08 +-- version 1.50c -- Copyright 2023 Alain Matthes -- This work may be distributed and/or modified under the -- conditions of the LaTeX Project Public License, either version 1.3 diff --git a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_intersections.lua b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_intersections.lua index 314174cb30..5c2a754352 100644 --- a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_intersections.lua +++ b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_intersections.lua @@ -1,6 +1,6 @@ -- tkz_elements_intersections.lua --- date 23/12/03 --- version 1.40c +-- date 23/12/08 +-- version 1.50c -- Copyright 2023 Alain Matthes -- This work may be distributed and/or modified under the -- conditions of the LaTeX Project Public License, either version 1.3 diff --git a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_lines.lua b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_lines.lua index 4c3c260ff4..98f16d499b 100644 --- a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_lines.lua +++ b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_lines.lua @@ -1,6 +1,6 @@ -- tkz_elements_functions_lines.lua --- date 23/12/03 --- version 1.40c +-- date 23/12/08 +-- version 1.50c -- Copyright 2023 Alain Matthes -- This work may be distributed and/or modified under the -- conditions of the LaTeX Project Public License, either version 1.3 diff --git a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_maths.lua b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_maths.lua index fd030de8c1..c0b3effa0b 100644 --- a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_maths.lua +++ b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_maths.lua @@ -1,6 +1,6 @@ -- tkz_elements_functions_maths.lua --- date 23/12/03 --- version 1.40c +-- date 23/12/08 +-- version 1.50c -- Copyright 2023 Alain Matthes -- This work may be distributed and/or modified under the -- conditions of the LaTeX Project Public License, either version 1.3 @@ -124,3 +124,10 @@ end function barycenter (...) return barycenter_ (...) end + +function swap(a,b) + local t=a + a=b + b=t + return a,b +end \ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_points.lua b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_points.lua index 34107d76fe..b396194148 100644 --- a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_points.lua +++ b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_points.lua @@ -1,6 +1,6 @@ -- tkz_elements_functions_points.lua --- date 23/12/03 --- version 1.40c +-- date 23/12/08 +-- version 1.50c -- Copyright 2023 Alain Matthes -- This work may be distributed and/or modified under the -- conditions of the LaTeX Project Public License, either version 1.3 diff --git a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_regular.lua b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_regular.lua index 378d855a21..3beff723ad 100644 --- a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_regular.lua +++ b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_regular.lua @@ -1,6 +1,6 @@ -- tkz_elements_functions_regular.lua --- date 23/12/03 --- version 1.40c +-- date 23/12/08 +-- version 1.50c -- Copyright 2023 Alain Matthes -- This work may be distributed and/or modified under the -- conditions of the LaTeX Project Public License, either version 1.3 diff --git a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_triangles.lua b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_triangles.lua index 426bc1a88e..90781d961b 100644 --- a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_triangles.lua +++ b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_triangles.lua @@ -1,6 +1,6 @@ -- tkz_elements_functions_triangles.lua --- date 23/12/03 --- version 1.40c +-- date 23/12/08 +-- version 1.50c -- Copyright 2023 Alain Matthes -- This work may be distributed and/or modified under the -- conditions of the LaTeX Project Public License, either version 1.3 @@ -143,9 +143,9 @@ function in_circle_ ( a,b,c ) kb = point.abs (c-a) o = barycenter_ ( {a,ka} , {b,kb} , {c,kc} ) return o , - projection_ (a,b,o) , projection_ (b,c,o) , - projection_ (c,a,o) + projection_ (a,c,o) , + projection_ (a,b,o) end function ex_circle_ ( a,b,c ) @@ -196,7 +196,7 @@ end function incentral_tr_ (a,b,c) local i,r,s,t - i = in_center (a , b , c) + i = in_center_ (a , b , c) r = intersection_ll_ ( a,i , b,c) s = intersection_ll_ ( b,i , a,c) t = intersection_ll_ ( c,i , a,b) @@ -311,4 +311,24 @@ function in_out_ (a,b,c,pt) else return false end -end \ No newline at end of file +end + +function soddy_center_ (a,b,c) + local i,ha,hb,hc,e,f,g,x,y,z,xp,yp,zp + i,e,f,g = in_circle_ (a,b,c) + ha,hb,hc = orthic_tr_ (a,b,c) + x,xp = intersection_lc_ (a,ha,a,g) + if (point.mod(ha-x) couple of points ------------------------------ -function line: square () - return square : side (self.pa,self.pb) +function line: square (swap) + if swap == nil + then + return square : side (self.pa,self.pb) + else + return square : side (self.pa,self.pb,indirect) + end +end + +function line : report (d,pt) + local t + t = d/self.length + if pt == nil + then + return barycenter_({self.pa,1-t},{self.pb,(t)}) +else + return barycenter_({self.pa,1-t},{self.pb,(t)}) +pt-self.pa +end end return line \ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_main.lua b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_main.lua index 4efa5b6169..86239953b6 100644 --- a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_main.lua +++ b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_main.lua @@ -1,6 +1,6 @@ -- tkz_elements-main.lua --- date 23/12/03 --- version 1.40c +-- date 23/12/08 +-- version 1.50c -- Copyright 2023 Alain Matthes -- This work may be distributed and/or modified under the -- conditions of the LaTeX Project Public License, either version 1.3 @@ -37,6 +37,8 @@ require "tkz_elements_parallelogram.lua" require "tkz_elements_quadrilateral.lua" require "tkz_elements_rectangle.lua" require "tkz_elements_square.lua" +require "tkz_elements_misc.lua" +require "tkz_elements_vector.lua" require "tkz_elements_functions_maths.lua" require "tkz_elements_functions_intersections.lua" @@ -45,4 +47,3 @@ require "tkz_elements_functions_lines.lua" require "tkz_elements_functions_circles.lua" require "tkz_elements_functions_triangles.lua" require "tkz_elements_functions_regular.lua" -require "tkz_elements_misc.lua" \ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_misc.lua b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_misc.lua index 5667aba67f..f5f74a9a41 100644 --- a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_misc.lua +++ b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_misc.lua @@ -1,6 +1,6 @@ -- tkz_elements_functions_maths.lua --- date 23/12/03 --- version 1.40c +-- date 23/12/08 +-- version 1.50c -- Copyright 2023 Alain Matthes -- This work may be distributed and/or modified under the -- conditions of the LaTeX Project Public License, either version 1.3 diff --git a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_parallelogram.lua b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_parallelogram.lua index 330fd53f01..4839dce030 100644 --- a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_parallelogram.lua +++ b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_parallelogram.lua @@ -1,6 +1,6 @@ -- tkz_elements_parallelogram.lua --- date 23/12/03 --- version 1.40c +-- date 23/12/08 +-- version 1.50c -- Copyright 2023 Alain Matthes -- This work may be distributed and/or modified under the -- conditions of the LaTeX Project Public License, either version 1.3 diff --git a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_point.lua b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_point.lua index 32e549a749..c2a12932f7 100644 --- a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_point.lua +++ b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_point.lua @@ -1,6 +1,6 @@ -- tkz_elements_point.lua --- date 23/12/03 --- version 1.40c +-- date 23/12/08 +-- version 1.50c -- Copyright 2023 Alain Matthes -- This work may be distributed and/or modified under the -- conditions of the LaTeX Project Public License, either version 1.3 diff --git a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_quadrilateral.lua b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_quadrilateral.lua index 0731732310..011970ef53 100644 --- a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_quadrilateral.lua +++ b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_quadrilateral.lua @@ -1,6 +1,6 @@ -- tkz_elements_quadrilateral.lua --- date 23/12/03 --- version 1.40c +-- date 23/12/08 +-- version 1.50c -- Copyright 2023 Alain Matthes -- This work may be distributed and/or modified under the -- conditions of the LaTeX Project Public License, either version 1.3 @@ -49,7 +49,7 @@ function quadrilateral: new (za, zb, zc, zd) return o end ----------------------- -function quadrilateral : cyclic () +function quadrilateral : iscyclic () local d,epsilon epsilon = 10^(-8) local alpha = point.arg ((self.pd-self.pa) / (self.pb-self.pa)) diff --git a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_rectangle.lua b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_rectangle.lua index 142ddbd8b2..7c53646978 100644 --- a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_rectangle.lua +++ b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_rectangle.lua @@ -1,6 +1,6 @@ -- tkz_elements-rectangle.lua --- date 23/12/03 --- version 1.40c +-- date 23/12/08 +-- version 1.50c -- Copyright 2023 Alain Matthes -- This work may be distributed and/or modified under the -- conditions of the LaTeX Project Public License, either version 1.3 @@ -59,36 +59,65 @@ function rectangle: new (za, zb,zc,zd) end function rectangle : angle (zi,za,an) + local zb,zc,zd local zc = symmetry_ (zi,za) local zb = rotation_(zi,-an,zc) local zd = symmetry_ (zi,zb) return rectangle : new (za,zb,zc,zd) end -function rectangle : gold (za,zb) - a = point.arg (zb-za) - local d = point.abs(zb-za)/tkzphi - local zc = zb : north (d/scale) - zc = rotation_ (zb,a,zc) - local zd = za : north (d/scale) - zd = rotation_ (za,a,zd) - return rectangle : new (za,zb,zc,zd) +function rectangle : gold (za,zb,swap) + local zc,zd + local a = point.arg (zb-za) + local d = point.abs(zb-za)/tkzphi + if swap == nil then swap = false end + if swap then + zc = zb : south (d/scale) + zc = rotation_ (zb,a,zc) + zd = za : south (d/scale) + zd = rotation_ (za,a,zd) + return rectangle : new (za,zb,zc,zd) + else + zc = zb : north (d/scale) + zc = rotation_ (zb,a,zc) + zd = za : north (d/scale) + zd = rotation_ (za,a,zd) + return rectangle : new (za,zb,zc,zd) + end end -function rectangle : diagonal (za,zc) - local zb = point (zc.re,za.im) - local zd = point (za.re,zc.im) +function rectangle : diagonal (za,zc,swap) + local zb,zd + if swap == nil then swap = false end + if swap then + zd = point (zc.re,za.im) + zb = point (za.re,zc.im) + return rectangle : new (za,zb,zc,zd) + else + zb = point (zc.re,za.im) + zd = point (za.re,zc.im) return rectangle : new (za,zb,zc,zd) end +end -function rectangle : side (za,zb,d) - a = point.arg (zb-za) - local zc = zb : north (d/scale) - zc = rotation_ (zb,a,zc) - local zd = za : north (d/scale) - zd = rotation_ (za,a,zd) +function rectangle : side (za,zb,d,swap) + local a,zc,zd + a = point.arg (zb-za) + if swap == nil then swap = false end + if swap then + zc = zb : south (d/scale) + zc = rotation_ (zb,a,zc) + zd = za : south (d/scale) + zd = rotation_ (za,a,zd) + return rectangle : new (za,zb,zc,zd) + else + zc = zb : north (d/scale) + zc = rotation_ (zb,a,zc) + zd = za : north (d/scale) + zd = rotation_ (za,a,zd) return rectangle : new (za,zb,zc,zd) end +end ------------------- function rectangle : get_lengths () diff --git a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_regular.lua b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_regular.lua index 4415b1c66f..bcf899f549 100644 --- a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_regular.lua +++ b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_regular.lua @@ -1,6 +1,6 @@ -- tkz_elements_regular.lua --- date 23/12/03 --- version 1.40c +-- date 23/12/08 +-- version 1.50c -- Copyright 2023 Alain Matthes -- This work may be distributed and/or modified under the -- conditions of the LaTeX Project Public License, either version 1.3 diff --git a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_square.lua b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_square.lua index 4dd007cc77..3e3724cd33 100644 --- a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_square.lua +++ b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_square.lua @@ -1,6 +1,6 @@ -- tkz_elements-square.lua --- date 23/12/03 --- version 1.40c +-- date 23/12/08 +-- version 1.50c -- Copyright 2023 Alain Matthes -- This work may be distributed and/or modified under the -- conditions of the LaTeX Project Public License, either version 1.3 @@ -72,10 +72,17 @@ function square : rotation (zi,za) return square : new (za,zb,zc,zd) end -function square : side (za,zb) - local zc = rotation_ (zb,-math.pi/2,za) - local zd = rotation_ (za,math.pi/2,zb) - return square : new (za,zb,zc,zd) +function square : side (za,zb,swap) + if swap == nil + then + local zc = rotation_ (zb,-math.pi/2,za) + local zd = rotation_ (za,math.pi/2,zb) + return square : new (za,zb,zc,zd) + else + local zc = rotation_ (zb,math.pi/2,za) + local zd = rotation_ (za,-math.pi/2,zb) + return square : new (za,zb,zc,zd) + end end return square \ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_triangle.lua b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_triangle.lua index 6ef6be0a9a..356b4cc76a 100644 --- a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_triangle.lua +++ b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_triangle.lua @@ -1,6 +1,6 @@ -- tkz_elements_triangles.lua --- date 23/12/03 --- version 1.40c +-- date 23/12/08 +-- version 1.50c -- Copyright 2023 Alain Matthes -- This work may be distributed and/or modified under the -- conditions of the LaTeX Project Public License, either version 1.3 @@ -396,6 +396,15 @@ end function triangle: check_equilateral () return check_equilateral_ (self.pa,self.pb,self.pc) end +function triangle : soddy_center () + local s,i,j,k + return soddy_center_ (self.pa,self.pb,self.pc) +end +function triangle : soddy_circle () + local s,i + s,i = soddy_center_ (self.pa,self.pb,self.pc) + return circle : new ( s , i ) +end return triangle \ No newline at end of file diff --git a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_vector.lua b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_vector.lua index 96d6eee1fc..3ac9aa877c 100644 --- a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_vector.lua +++ b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_vector.lua @@ -1,6 +1,6 @@ -- tkz_elements_vectors.lua --- date 23/12/03 --- version 1.40c +-- date 23/12/08 +-- version 1.50c -- Copyright 2023 Alain Matthes -- This work may be distributed and/or modified under the -- conditions of the LaTeX Project Public License, either version 1.3 @@ -15,12 +15,14 @@ -- ---------------------------------------------------------------------------- vector = {} function vector: new(z1, z2) - local type = 'vector' - local norm = point.abs(z2-z1) + local type = 'vector' + local norm = point.abs (z2-z1) + local arg = point.arg (z2-z1) local o = {st = z1, - ed = z2, - norm = norm, - type = type } + ed = z2, + norm = norm, + arg = arg, + type = type } setmetatable(o, self) self.__index = self return o @@ -36,4 +38,9 @@ end function vector: add (v) return vector :new (self.st+v.st, self.ed,v.ed) end + + function vector: ortho () + return vector : new (self.st, rotation_(self.st,math.pi/2,self.ed)) + end + return vector -- cgit v1.2.3