summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/onedown/examples/onedown-examples.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/onedown-examples.tex
Initial commit
Diffstat (limited to 'macros/latex/contrib/onedown/examples/onedown-examples.tex')
-rw-r--r--macros/latex/contrib/onedown/examples/onedown-examples.tex172
1 files changed, 172 insertions, 0 deletions
diff --git a/macros/latex/contrib/onedown/examples/onedown-examples.tex b/macros/latex/contrib/onedown/examples/onedown-examples.tex
new file mode 100644
index 0000000000..d572b06cd2
--- /dev/null
+++ b/macros/latex/contrib/onedown/examples/onedown-examples.tex
@@ -0,0 +1,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}
+