summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/onedown/onedown.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/onedown/onedown.dtx')
-rw-r--r--macros/latex/contrib/onedown/onedown.dtx116
1 files changed, 88 insertions, 28 deletions
diff --git a/macros/latex/contrib/onedown/onedown.dtx b/macros/latex/contrib/onedown/onedown.dtx
index 9e5e53941d..89f6d5034b 100644
--- a/macros/latex/contrib/onedown/onedown.dtx
+++ b/macros/latex/contrib/onedown/onedown.dtx
@@ -24,10 +24,10 @@
\ProvidesFile{onedown.dtx}
%</driver>
%<package>\NeedsTeXFormat{LaTeX2e}[2014/05/01]
-%<package>\def\ODwstyleversion{1.3}\def\ODwstyledate{2019/02/21}
+%<package>\def\ODwstyleversion{1.4}\def\ODwstyledate{2019/10/15}
%<package>\ProvidesPackage{onedown}
%<package> [\ODwstyledate\space v\ODwstyleversion\space
-%<package> Typeset Bridge Diagrams - Jacob Wiersma (C) 2016-2018]
+%<package> Typeset Bridge Diagrams - Jacob Wiersma (C) 2016-2019]
%
%<*driver>
%\documentclass[a4paper,12pt,draft]{ltxdoc}% with draft no hyperrefs
@@ -37,7 +37,7 @@
%
\usepackage[T1]{fontenc}
\usepackage[german,dutch,french,swedish,english,shorthands=]{babel}
-\usepackage{onedown}[2018/10/31]
+\usepackage{onedown}[2019/10/15]
\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
@@ -209,7 +209,7 @@
%</driver>
% \fi
%
-% \CheckSum{3731}
+% \CheckSum{3771}
%
% \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
@@ -272,7 +272,7 @@
% - Made ODw@OtherFont local where necessary.\\
% - Redefined columntypes.\\
% - Made 'T' a code for '10'.\\
-% - Adapted the translate macro to enable both 1H and 1\cmd{\He} etc. \\
+% - Adapted the 'translate' macro to enable both 1H and 1\cmd{\He} etc. \\
% - Enhanced the documentation.}
%
% \changes{v0.6}{2018/03/14}{\\
@@ -290,9 +290,9 @@
%
% \changes{v0.7a}{2018/03/24}{\\
% - Major change: Removed all \cmd{\bidXX} and \cmd{\bidXXpair} commands.\\
-% - The biddings can now be shown with \cmd{\showXX+} (with token '+').\\
+% - The biddings can now be shown with \cmd{\showXX+} (with token '\texttt{+}').\\
% - The macros \cmd{\hand-} and the bidding environments suppress their
-% output with token '-'}
+% output with token '\texttt{-}'}
%
% \changes{v0.8}{2018/04/11}{\\
% - Added package \packname{verbatimbox} to adjust verbatim font easily.\\
@@ -357,16 +357,35 @@
% \cmd{\ODw@LongCalls}\\
% - In command \cmd{\suit} changed 'JW \cmd{\ODw@GameSize}' into
% '\cmd{\ODw@GameSize}'}
-% \changes{v1.3}{2019/02/21}{\\
+% \changes{v1.3a}{2019/02/21}{\\
% - Added \cmd{\HLP} \\
% - Changed/Added in all relevant ODw-lang.trsl: \\
-% - FP into F and fp into f (entry HCP/hcp) \\
-% - Figuren-Punkte into Figurenpunkte and figuren-punkte into figurenpunkte \\
-% - FL into L and f{}l into l \\
-% - \cmd{\NewDictTranslation\\
-% \{HLP-(ODw)\}\{FL\}} (e.g. for german)
+% - 'V0.4' into 'V0.4-2018/12/01' \\
+% - 'FP' into 'F' , 'fp' into 'f' (entry HCP/hcp) \\
+% - 'Figuren-Punkte' into 'Figurenpunkte' , 'figuren-punkte' into 'figurenpunkte' \\
+% - 'FL' into 'L' , 'f{}l' into 'l' \\
+% - \cmd{\NewDictTranslation\\ \{HLP-(ODw)\}\{FL\}} (german)
+% }
+% \changes{v1.3b}{2019/03/16}{\\
+% - Added setdefaults to the list of User Commands \\
+% - Corrected \cmd{\setdefaults} in onedown-examples: \\
+% - changed [~] into \{\} \\
+% - Adapted/corrected onedown-ref and onedown-examples \\
+% - Added color 'gray' for special effects
+% }
+% \changes{v1.4}{2019/10/12}{\\
+% - Made \emph{onedown-ref} independent of \emph{onedown-examples} and \emph{subfiles} \\
+% - Corrected some mistakes ODw-*.trsl files, all \texttt{V0.51-2019/10/15} \\
+% - Added macro \cmd{\Ten} to get rid of the extra enlargment by 'scalefnt' in \cmd{\gamefont}
+% - Added support for the spanish language \\
+% - Made onedown-ref.tex and onedown-examples.tex multilangual. We can output the onedown
+% commands in all supported languages. \\
+% - \cmd{\DeclareSymbolFont \\ \{symbols\}\{OMS\} \{txsy\}\{m\}\{n\}} interferes with package \packname{newtxmath}.
+% I renamed \emph{symbols} into \textbf{ODw@symbols} and \emph{symbolsC} into \textbf{ODw@symbolsC}
+% to solve this.
% }
% ^^A Note: ^^21 denotes the exclamation mark (!)
+% ^^A Note: Char ' is not allowed within changes
%
% \DoNotIndex{\newcommand,\newenvironment,\BODY,\boolean,\IfEqCase,\IfInteger,
% \DeclareFontSubstitution,\dimexpr,\ifcat,\ifmmode,\IfValueT,
@@ -442,7 +461,7 @@
% ^^A The frustrating ltxdoc also obfuscates this simple thing!
% \thispagestyle{empty}
% }
-% \author{Jacob Wiersma \\ \url{jack46@online.de}}
+% \author{Jacob Wiersma \\ \url{jack@schuli-wirsi.de}}
% \date{v\ODwstyleversion~from \ODwstyledate}
%
% \maketitle
@@ -670,10 +689,11 @@ pdflatex --shell-escape onedown.dtx
% As said before, the package loads its options using the
% \meta{key}=\meta{val} syntax. These options deal with:
% \begin{itemize}
-% \item[colors] \verb:colors=0|1|2|4A|4B:\\
+% \item[colors] \verb:colors=0|1|2|3|4A|4B:\\
% The color in which the card symbols will
% be printed. The color options are \textbf{0} (black only), \textbf{1}
-% (black and white) \textbf{2} (black and red), \textbf{4A} (green, orange,
+% (black and white) \textbf{2} (black and red), \textbf{3} (grey (for special effects)),
+% \textbf{4A} (green, orange,
% red and blue), \textbf{4B} (black, orange, red and green). We also
% defined some synonyms, as shown in the table below.
% \par
@@ -685,12 +705,16 @@ pdflatex --shell-escape onedown.dtx
% (synonyms: |b+w|)
% \item[x=2:] {\setdefaults{colors=2} \Cl, \Di, \He and \Sp}
% (synonyms: |b+r|)
+% \item[x=3:] {\setdefaults{colors=3} \Cl, \Di, \He and \Sp}
+% (synonyms: |gray|, |grey|)
% \item[x=4A:] {\setdefaults{colors=4A} \Cl, \Di, \He and \Sp}
% (synonyms: |4a|, |fourA|)
% \item[x=4B:] {\setdefaults{colors=4B} \Cl, \Di, \He and \Sp}
% (synonyms: |4b|, |fourB|)
% \end{itemize}
-% The default is |colors=2| for printing in black and red.
+% The default is |colors=2| for printing in black and red. Please note, that |colors=3| is not
+% meant to typeset the whole document. You can use it if you want e.g. to repeat something and want
+% it to be less apparent.
% \item[err, warn] \verb:err=on|off:\qquad\verb:warn=|on|off:\\
% These options regulate which messages are to be output. These
% messages have to do with the consistency of cards in
@@ -712,7 +736,7 @@ pdflatex --shell-escape onedown.dtx
% \subsubsection{Active Characters: a Warning}\label{Languages}
%
% \OneDown uses the \packname{tranlation} package to automatically
-% translate oft appearing brigde terms like e.g.\ \emph{declarer}. It does
+% 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, most Scadinavian languages and Turkish. Some dictionaries
@@ -875,7 +899,9 @@ pdflatex --shell-escape onedown.dtx
% \DescribeMacro{\eastwest}\MacroDef*+{eastwest}[\hfill \eastwest]
% The next 4 macros typeset the \emph{unit} of the points when valuing a
% bridge hand. If one or more of these items do not appear in your bridge
-% world, don't argue them, Just don't use them!
+% world, don't argue them, Just don't use them! They are meant to specify
+% \emph{High Card Points}, \emph{High Card + Length Points}, \emph{Length Points},
+% \emph{Distribution Points} and \emph{Total Points} respectively.
% \par\vspace{0.5\baselineskip}\noindent
% \DescribeMacro{\HCP}\MacroDef*+{HCP}[\hfill \HCP]
% \par\noindent
@@ -1426,7 +1452,7 @@ pdflatex --shell-escape onedown.dtx
% other & otherfont \\\hline
% \\
% key & value \\\hline
-% colors & 0|1|\underline{2}|4A|4B \\
+% colors & 0|1|\underline{2}|3|4A|4B \\
% warn & \underline{off}|on \\
% err & off|\underline{on} \\
% \hline
@@ -1661,6 +1687,7 @@ pdflatex --shell-escape onedown.dtx
% \subsection{ToDo}
%
% \begin{itemize}[itemsep=-2mm]
+% \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
% landscape) e.g as handout for the hands on slides.
@@ -2131,32 +2158,34 @@ pdflatex --shell-escape onedown.dtx
%
% Code stolen from txfonts.sty.
% It works smoothly: thank you guys!
+% Because of an interference with package newtxmath I had to rename
+% symbols into ODw@symbols and symbolsC into ODw@symbolsC
%
-\DeclareSymbolFont{symbols}{OMS}{txsy}{m}{n}
-\SetSymbolFont{symbols}{bold}{OMS}{txsy}{bx}{n}
+\DeclareSymbolFont{ODw@symbols}{OMS}{txsy}{m}{n}
+\SetSymbolFont{ODw@symbols}{bold}{OMS}{txsy}{bx}{n}
\DeclareFontSubstitution{OMS}{txsy}{m}{n}
-\DeclareSymbolFont{symbolsC}{U}{txsyc}{m}{n}
-\SetSymbolFont{symbolsC}{bold}{U}{txsyc}{bx}{n}
+\DeclareSymbolFont{ODw@symbolsC}{U}{txsyc}{m}{n}
+\SetSymbolFont{ODw@symbolsC}{bold}{U}{txsyc}{bx}{n}
\DeclareFontSubstitution{U}{txsyc}{m}{n}
% \end{macrocode}
% \begin{macro}{\ODw@spadesuit}
% \begin{macrocode}
-\DeclareMathSymbol{\ODw@spadesuit}{\mathord}{symbols}{127}
+\DeclareMathSymbol{\ODw@spadesuit}{\mathord}{ODw@symbols}{127}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\ODw@varheart}
% \begin{macrocode}
-\DeclareMathSymbol{\ODw@varheart}{\mathord}{symbolsC}{114}
+\DeclareMathSymbol{\ODw@varheart}{\mathord}{ODw@symbolsC}{114}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\ODw@vardiamond}
% \begin{macrocode}
-\DeclareMathSymbol{\ODw@vardiamond}{\mathord}{symbolsC}{113}
+\DeclareMathSymbol{\ODw@vardiamond}{\mathord}{ODw@symbolsC}{113}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\ODw@clubsuit}
% \begin{macrocode}
-\DeclareMathSymbol{\ODw@clubsuit}{\mathord}{symbols}{124}
+\DeclareMathSymbol{\ODw@clubsuit}{\mathord}{ODw@symbols}{124}
% \end{macrocode}
% \end{macro}
%
@@ -2172,6 +2201,8 @@ pdflatex --shell-escape onedown.dtx
% |colors=0| means mono-color (black only), synonyms of key 0 are |mono|
% and |black|. |colors=1| means black and white, a synonym is |b+w|.
% |colors=2| means bi-color (black and red), with synonym |b+r|.
+% |colors=3| means grey, with synonyms |gray| and |grey|. This 'color' is meant for special
+% effects, e.g. for making unimportant parts less visible
% |colors=4A| gives qua-color (green, orange, red and blue); synonyms are
% |fourA| and |4a|. Finally |colors=4B| defines the second qua-color (black,
% orange, red and green) with synonyms |fourB| and |4b|.
@@ -2236,6 +2267,22 @@ pdflatex --shell-escape onedown.dtx
\ODw@set{colors/b+r/.code={\pgfkeys{/ODw/colors=2}}}
%
\ODw@set{%
+ colors/3/.code={%
+ \ODw@monochromefalse%
+ \renewrobustcmd\Cl{\textcolor{gray}%
+ {\,[0.3]\ensuremath{\ODw@clubsuit}}\xspace}%
+ \renewrobustcmd\Di{\textcolor{gray}%
+ {\,[0.3]\ensuremath{\ODw@vardiamond}}\xspace}%
+ \renewrobustcmd\He{\textcolor{gray}%
+ {\,[0.3]\ensuremath{\ODw@varheart}}\xspace}%
+ \renewrobustcmd\Sp{\textcolor{gray}%
+ {\,[0.3]\ensuremath{\ODw@spadesuit}}\xspace}%
+ }%
+}
+\ODw@set{colors/grey/.code={\pgfkeys{/ODw/colors=3}}}
+\ODw@set{colors/gray/.code={\pgfkeys{/ODw/colors=3}}}
+%
+\ODw@set{%
colors/4A/.code={%
\ODw@monochromefalse%
\renewrobustcmd\Cl{\textcolor{green}%
@@ -5343,6 +5390,19 @@ pdflatex --shell-escape onedown.dtx
% \end{macro}
% \end{macro}
%
+% \begin{macro}{\Ten}
+% \begin{macrocode}
+\newcommand{\Ten}{%
+ \bgroup%
+%JW \ODw@GameFont%
+ 10%
+ \egroup%
+ \xspace%
+}% Ten
+% \end{macrocode}
+% \end{macro}
+
+%
% \subsubsection{Vulnerability}
%
% These macros retrieve the translations of the 4 alternative forms of the