summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/onedown/examples/showNS-warn-II.tex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/onedown/examples/showNS-warn-II.tex
Initial commit
Diffstat (limited to 'macros/latex/contrib/onedown/examples/showNS-warn-II.tex')
-rw-r--r--macros/latex/contrib/onedown/examples/showNS-warn-II.tex59
1 files changed, 59 insertions, 0 deletions
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..516e959005
--- /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 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
+