summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/onedown/examples/onedown-examples.tex
blob: d572b06cd2365d7e2718f9a45531a5d469b69538 (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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
%%
%% onedown-examples.tex
%% April 16, 2018
%% Requires  the onedown bundle 
%% Part of the OneDown bundle (mirror.ctan.org/onedown)
%% author: J. Wiersma
%%--------NOTE-------------------------------------------
%% USAGE:   (pdf)latex  onedown-examples.tex
%%-------------------------------------------------------



\documentclass[a4paper,fontsize=11pt]{scrartcl}
\usepackage{scrlayer-scrpage}
%
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
%
\usepackage{subfiles}%               can compile stand-alone/combined
\usepackage[dutch,norsk,%
            turkish,shorthands=,%    avoid problems with ':', '=' and '!'
            german,english]{babel}%  introduce possible languages

%\usepackage[mono=false]{libertine}%  verbatim needs option mono=false
% linertine screws verbatim, at least I don't know how to handle that
\usepackage{onedown}%                our own style to set bridge stuff
\usepackage[most]{tcolorbox}%        show examples with code
%\usepackage{tcolorbox}%        show examples with code
\usepackage{enumitem}%
\usepackage{wrapfig}%
\usepackage{ragged2e}
\usepackage{multicol}
\usepackage{blindtext}%              to show wrapping
\usepackage{forloop}%                for Compass
\usepackage{needspace}%              keep lines on one page
\usepackage{scalefnt}%               to enlarge even more
\usepackage[a4paper, total={185mm, 257mm},left=12mm,top=20mm]{geometry}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% To get a PDF for printing on a monochrome printer
% comment out these commands
% 
\setdefaults{colors=4A}
%-------------
% set the look of the example boxes
%
\tcbset{%
  colback=red!5!white,colframe=red!75!black,
  colbacklower=white,
  fonttitle=\bfseries,
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% To get a PDF for viewing on a screen
% comment out these commands
%
%\tcbset{%
%  colback=white,colbacktitle=white,coltitle=black,
%  colbacklower=white,
%  fonttitle=\bfseries,
%}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Due to a bug (?) in tcolorbox we cannot return to the default 
% "listing and text" after setting "listing side text" globally
% within \tcbset. % So we define HBox and VBox to set this locally.
% We need the VBox for showing 16 boardnrs in Compass.tex
%
\newtcblisting{HBox}[1]{listing side text,title=#1}
\newtcblisting{VBox}[1]{listing and text,title=#1}

\usepackage{shortvrb}
\MakeShortVerb{\|}
% hack to make verbatim stuff more clear
% adapted from verbatim.sty
\makeatletter
\def\verbatim@font{\ttfamily\bfseries\large
                   \hyphenchar\font\m@ne
                   \@noligs}

\def\Xfer#1{\ODw@Xfer{#1}}
\makeatother


\usepackage[pdfencoding=auto]{hyperref}
  \hypersetup{%
     pdftitle={onedown-examples.pdf},
     pdfsubject={Bridge Diagrams, OneDown bundle},
     pdfkeywords={OneDown Bridge LaTeX},
     colorlinks,
     linkcolor=red,
  }

\newcommand\OneDown{\textcolor{red}{\smaller\bfseries\textsc{OneDown}}\xspace}

%-------------
\pagestyle{scrheadings}
\clearscrheadfoot
\ihead{\texttt{onedown-examples.pdf}
(\OneDown v\ODwstyleversion, \ODwstyledate)\hfill \pagemark}
%-----------

\def\FileName{\jobname}
\def\SubFile#1{\def\FileName{#1}\newpage\section{#1}\subfile{#1}}

\addtolength{\textheight}{1.5cm}

\begin{document}
\pdfbookmark[1]{Title}{Title}
\title{Examples for the\\\OneDown package%
\footnote{This file is part of the \OneDown bundle. To generate this file,
use the following command: \newline \texttt{\$ pdflatex \jobname.tex}}
\\[1em]
\normalsize\url{www.ctan.org/pkg/onedown}
}
\author{J.\,Wiersma\footnote{email: \textsf{jack46@online.de}}}
\date{23 September 2018 (v0.5)}
\maketitle

\section*{Introduction}
This file (\jobname) contains (well, sort of includes) all the example
files from the bundle. We use the 'include' mechanism of the package
|subfiles|. This means that you can compile each example file as
stand-alone, but they also form one document.
The advantage is that you can copy one example file and edit it to your
taste i.e.\ to experiment a little, and you can compile it without changing
the preamble, provided the \OneDown bundle is in your \TeX-path.

For questions not covered in these examples or any further documentation,
read the \OneDown package manual named onedown.pdf.

If you encounter difficulties in compiling adapted files, then please read
the section about active characters in the manual.

To make it easy for you to decide which file to experiment with, all
sections bear the file name, which can also be found in the list below. The
examples are produced using the \textsf{tcolorbox} package. This enables us
to show the code and the output of it side by side.

\par\vspace{1\baselineskip}
\setlength\columnseprule{.8pt}% rule between cols
\begin{multicols}{3}[{\centering \textbf{\Large List of Examples}}]
% Use \tableofcontents to create a hyperref'ed list of examples
% by stripping all stuff except the toclist itself,
% Change \addvspace too, to keep things tight .
  \makeatletter
  \renewcommand\tableofcontents{\@starttoc{toc}}
  \makeatother
  \renewcommand*{\addvspace}[1]{}
  \tableofcontents 
\end{multicols}
\SubFile{Hands}
\SubFile{Suits}
\SubFile{showNS-warn-I}
\SubFile{showNS-warn-II}
\SubFile{showNS-align}
\SubFile{showAll}
\SubFile{Select-Hands}
\SubFile{Bidding}
\SubFile{bidAll}
\SubFile{bidNS}
\SubFile{bidEW}
\SubFile{bidNE}
\SubFile{bidNW}
\SubFile{Legends}
\SubFile{Wrapping}
\SubFile{Play}
\SubFile{ExpertQuiz}
\SubFile{Languages}
\SubFile{Compass}
\end{document}