summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/onedown/examples/showNS-warn-II.tex
blob: 516e9590056eb825688cce2dfc167317d8be010e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
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 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