diff options
author | Karl Berry <karl@freefriends.org> | 2018-05-24 21:36:36 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2018-05-24 21:36:36 +0000 |
commit | b3dc1b6fdac11d737f34e433fe1e61590466b6a8 (patch) | |
tree | 6b6581617b94dbc42f3119589a38b3a2721ae0e8 /Master/texmf-dist/doc/latex/onedown/examples/onedown-ref.tex | |
parent | 7f3c84d5d08d7a3c4047e31edfb3164ef787de97 (diff) |
onedown (24may18)
git-svn-id: svn://tug.org/texlive/trunk@47828 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/onedown/examples/onedown-ref.tex')
-rw-r--r-- | Master/texmf-dist/doc/latex/onedown/examples/onedown-ref.tex | 469 |
1 files changed, 469 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/onedown/examples/onedown-ref.tex b/Master/texmf-dist/doc/latex/onedown/examples/onedown-ref.tex new file mode 100644 index 00000000000..c514817052d --- /dev/null +++ b/Master/texmf-dist/doc/latex/onedown/examples/onedown-ref.tex @@ -0,0 +1,469 @@ +\documentclass[onedown-examples]{subfiles} +\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]} +% +\begin{document} +\iffalse +Word1 \onesuitEW{K98}{A65} word2 +% +\onesuitNE{K}{A65} word3 +% +\onesuitNS{K98}{A65} word4 +% +\onesuitNW{K98}{A65} word5 + +Word1 \onesuitEW!{K98}{A65} word2 +% +\onesuitNE!{K98}{A65} word3 +% +\onesuitNS!{K98}{A65} word4 +% +\onesuitNW!{K98}{A65} word5 + +Word1 \onesuitAll{K}{A}{QT7}{J432} word2 +% +\onesuitAll!{K98}{A65}{QT7}{J432} word3 +\fi + +\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 (including tokens) appear in brackets +|[...]|. Output of a tokenized |\macro*!| is shown as: +\qquad|\macro[*!]: \macro, \macro*, \macro!, \macro*!|\\ +All output is shown for the English language. + +\begin{description}[itemsep=-0.3em] +\item[ace]: \ace +\item[Ace\Q{[*!]}]: \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\Q{[*!]}]: \All, \All*, \All!, \All*! + +\item[allpass]: \allpass +\item[Allpass\Q{[*!]}]: \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\Q{[*!]}]: \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\Q{[*]}]\\ +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\Q{[*!]}]: \Contract, \Contract*, \Contract!, \Contract*! + +\item[deal]: \deal +\item[Deal\Q{[*!]}]: \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\Q{[*!]}]: \Declarer, \Declarer*, \Declarer!, \Declarer*! + +\item[Di]: \Di + +\item[double]: \double +\item[Double\Q{[*!]}]: \Double, \Double*, \Double!, \Double*! + +\item[DP]: \DP +\item[dpts\Q{[*!]}]: \dpts, \dpts*, \dpts!, \dpts*! + +\item[east]: \east +\item[East\Q{[*!]}]: \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 uppercase letter |T|. + +\item[eastwest]: \eastwest +\item[Eastwest\Q{[*!]}]: \EastWest, \EastWest*, \EastWest!, \EastWest*! + +\item[expertquiz\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\Q{[*!]}]: \fsforce, \fsforce*, \fsforce!, \fsforce*! + +\item[gamefont\Q{{font} }]\\ +Defines the font for card diagrams, hands and suits. + +\item[GF]: \GF +\item[gforce\Q{[*!]}]: \gforce, \gforce*, \gforce!, \gforce*! + +\item[hand\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 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[hpts\Q{[*!]}]: \hpts, \hpts*, \hpts!, \hpts*! + +\item[jack]: \jack +\item[Jack\Q{[*!]}]: \Jack. \Jack*, \Jack!, \Jack*! + +\item[king]: \king +\item[King\Q{[*!]}]: \King, \King*, \King!, \King*! + +\item[lead]: \lead +\item[Lead\Q{[*!]}]: \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\Q{[*!]}]: \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\Q{[*!]}]: \nmforce, \nmforce*, \nmforce!, \nmforce*! + +\item[none]: \none +\item[None\Q{[*!]}]: \None, \None*, \None!, \None*! + +\item[north]: \north +\item[North\Q{[*!]}]: \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 uppercase letter |T|. + +\item[northsouth]: \northsouth +\item[NorthSouth\Q{[*!]}]: \NorthSouth, \NorthSouth*, \NorthSouth!, \NorthSouth*! + +\item[nt\Q{[*!]}]: \nt, \nt*, \nt!, \nt*! +\item[NT]: \NT + +\item[onesuitAll\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\Q{[*!]{E}{W}}]\\ +Same as |onesuitAll|, but only for the \East*!- and the \West*!-player. + +\item[onesuitNE\Q{[*!]{N}{E}}]\\ +Same as |onesuitAll|, but only for the \North*!- and the \East*!-player. + +\item[onesuitNS\Q{[*!]{N}{S}}]\\ +Same as |onesuitAll|, but only for the \North*!- and the \South*!-player. + +\item[onesuitNW\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\Q{[*!]}]: \Pass, \Pass*, \Pass!, \Pass*! + +\item[queen]: \queen +\item[Queen\Q{[*!]}]: \Queen, \Queen*, \Queen!, \Queen*! + +\item[redouble]: \redouble +\item[Redouble\Q{[*!]}]: \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\Q{[*]}\string{key1=val1,key2=val2,\ldots\string}]\\ +With the key |bidder|, |compass|, |game|, |legend|, |name| or |other| one +can set the default font for the respective items. With the key |compline|, +|compshow|, |compsize| or |compturn| on can set the look of the compass. +With the key |bidders| +|bidfirst|, |bidline| or |bidlong| one can fine-tune the bidding diagram. +The star form also calls |\resetfonts| which effectuates any font change +immediately. + +\item[SF]: \SF +\item[sforce\Q{[*!]}]: \sforce, \sforce*, \sforce!, \sforce*! + +\item[showAll\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. + +\item[showEW\Q{[*+][pos]}]\\ +Same as showAll, but for the \East*!- and the \West*!-hand. + +\item[showNE\Q{[*+][pos]}]\\ +Same as showAll, but for the \North*!- and the \East*!-hand. + +\item[showNS\Q{[*+][pos]}]\\ +Same as showAll, but for the \North*!- and the \South*!-hand. + +\item[showNW\Q{[*+][pos]}]\\ +Same as showAll, but for the \North*!- and the \West*!-hand. + +\item[south]: \south +\item[South\Q{[*!]}]: \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 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\Q{[*!]}]: \tpts, \tpts*, \tpts!, \tpts*! + +\item[TSF]: \TSF +\item[tsforce\Q{[*!]}]: \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\Q{[*!]}]: \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 uppercase letter |T|. + +\olditem[\string\begin\string{bidding\string}\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}\Q{[*!-][pos](description)}\ldots\string\end\string{biddingpair\string}]~\\ +Same as environment |bidding| but with only 2 columns. + +\olditem[\string\begin\string{play\string}\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}{5cm} +\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}{5cm} +\begin{verbatim} +\setdefaults{bidlong=off} +\begin{bidding} +p & X & R & P \\ +\end{bidding} +\end{verbatim} +\end{minipage} +% +\begin{minipage}{7cm} +\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: +\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 + |