diff options
Diffstat (limited to 'Master/texmf-dist/doc/latex/onedown/Examples/onedown-examples.tex')
-rw-r--r-- | Master/texmf-dist/doc/latex/onedown/Examples/onedown-examples.tex | 217 |
1 files changed, 217 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/onedown/Examples/onedown-examples.tex b/Master/texmf-dist/doc/latex/onedown/Examples/onedown-examples.tex new file mode 100644 index 00000000000..4923e36421f --- /dev/null +++ b/Master/texmf-dist/doc/latex/onedown/Examples/onedown-examples.tex @@ -0,0 +1,217 @@ +%% +%% onedown-examples.tex +%% Dec 06, 2023 Added example Fancy Colors and language italian +%% Oct 04, 2019 Initial version +%% Requires the onedown bundle +%% Part of the OneDown bundle (mirror.ctan.org/onedown) +%% author: J. Wiersma +%%--------NOTE------------------------------------------- +%% USAGE: (pdf)latex onedown-examples.tex +%%------------------------------------------------------- + + +\PassOptionsToPackage{shorthands=off}{babel} +\documentclass[a4paper,fontsize=11pt,% + danish,% + dutch,% + french,% + german,% + ngerman,% + italian,% + norsk,% + spanish,% + swedish,% + turkish,% + english,% this is the default language +]{scrartcl} + +\usepackage{scrlayer-scrpage} +% +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} +% +\usepackage{subfiles}% can compile stand-alone/combined +\usepackage{babel}% + +\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=mono} +%------------- +% 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 +% +% Define macro FancyColors, that set the colors to green, orange, red and blue +% for the card symbols ♣, ♦, ♥ and ♠ resp. as used in example Fancy Colors. +% +\makeatletter +\def\FancyColors{% +\renewrobustcmd\Cl{\textcolor{green}% +{\,[0.3]\ensuremath{\ODw@clubsuit}}\xspace}% +\renewrobustcmd\Di{\textcolor{orange}% +{\,[0.3]\ensuremath{\ODw@vardiamond}}\xspace}% +\renewrobustcmd\He{\textcolor{red}% +{\,[0.3]\ensuremath{\ODw@varheart}}\xspace}% +\renewrobustcmd\Sp{\textcolor{blue}% +{\,[0.3]\ensuremath{\ODw@spadesuit}}\xspace}% +}%FancyColors +\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} +\def\ExLang{english} +\begin{document} +% when compiled with: +% pdflatex '\AtBeginDocument{\def\ExLang{YourLanguage}}\input{onedown-ref.tex}' +% you'll get the onedown commands expansions in YourLanguage +% YourLanguage can be any language out of: +% danish, dutch, english, french, (n)german, italian, norsk, spanish, swedish, +% turkish +% +\expandafter\selectlanguage\expandafter{\ExLang} +\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@schuli-wirsi.de}}} +\date{07 December 2023 (v0.6)} +\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. + +The explanatory text is always in the English language. But you can show the +output of all commands in any of the supported languages.\\ +These are: danish, dutch, english, french, (n)german, italian, norsk, spanish, +swedish, turkish. \\ +You obtain this output in \emph{YourLanguage} by compiling onedown-examples.tex with: \\[0.2em] + +\verb|pdflatex '\AtBeginDocument{\def\ExLang{YourLanguage}}\input{onedown-examples.tex}'|\\ +Beware: Copy\&Paste may use wrong quotes! Replace them by the right ones from your keybord. +\\[0.7em] +\centerline{\textbf{This document shows the commands for the \emph{\languagename}\ language}} +\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} +\SubFile{FancyColors} +\SubFile{CardSymbols} +\end{document} + |