\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