%% %% onedown-examples.tex %% Oct 04, 2019 %% 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,% 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[mono=false]{libertine}% verbatim needs option mono=false % libertine 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} \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, german, 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{jack@schuli-wirsi.de}}} \date{29 January 2020 (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. 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, german, norsk, spanish, swedish, turkish. \\ You obtain this output in \emph{YourLanguage} by compiling onedown-ref.tex with: \\[0.2em] \verb|pdflatex '\AtBeginDocument{\def\ExLang{YourLanguage}}\input{onedown-examples.tex}'| \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{CardSymbols} \end{document}