summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/onedown/examples/onedown-ref.tex
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/onedown/examples/onedown-ref.tex')
-rw-r--r--macros/latex/contrib/onedown/examples/onedown-ref.tex63
1 files changed, 57 insertions, 6 deletions
diff --git a/macros/latex/contrib/onedown/examples/onedown-ref.tex b/macros/latex/contrib/onedown/examples/onedown-ref.tex
index 44930e12e0..6d16724130 100644
--- a/macros/latex/contrib/onedown/examples/onedown-ref.tex
+++ b/macros/latex/contrib/onedown/examples/onedown-ref.tex
@@ -1,4 +1,41 @@
-\documentclass[onedown-examples]{subfiles}
+%%
+%% onedown-ref.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-ref.tex
+%%-------------------------------------------------------
+
+\documentclass[a4paper,fontsize=11pt]{scrartcl}
+\usepackage{scrlayer-scrpage}
+%
+\usepackage[utf8]{inputenc}
+\usepackage[T1]{fontenc}
+%
+\usepackage[%
+ danish,%
+ dutch,%
+ french,%
+ german,%
+ norsk,%
+ spanish,es-noshorthands,% unset active chars to avoid problems with '.' '’' '"' '~' '<' and '>'
+ swedish,%
+ turkish,shorthands=,% unset active chars to avoid problems with ':', '=' and '!'
+ english,%
+]{babel}% introduce all known languages, default is english
+
+\usepackage{onedown}% our own style to set bridge stuff
+\usepackage[a4paper, total={185mm, 257mm},left=12mm,top=20mm]{geometry}
+\newcommand\OneDown{\textcolor{red}{\smaller\bfseries\textsc{OneDown}}\xspace}
+\usepackage{shortvrb}
+\MakeShortVerb{\|}
+\usepackage{enumitem}%
+%\fi
+%
+%%%
+%
\usepackage[Q=yes]{examplep}
\makeatletter
\def\verbatim@font{\ttfamily\bfseries
@@ -19,9 +56,16 @@
%
\definecolor{optbackgr}{named}{lightgray}
\newcommand\Oarg[1]{\colorbox{optbackgr}{\texttt{#1}}}
-
+% default language to show the onedown command
+\def\RefLang{english}
\begin{document}
-
+% when compiled with:
+% pdflatex '\AtBeginDocument{\def\RefLang{YourLanguage}}\input{onedown-ref.tex}'
+% you'll get the onedown commands expansions in YourLanguage
+% YourLanguage can be any language out of:
+% english, danish, dutch, french, german, norsk, spanish, swedish, turkish
+%
+\expandafter\selectlanguage\expandafter{\RefLang}
\larger
\newgeometry{total={150mm, 265mm},left=25mm,top=15mm}
\pagestyle{empty}
@@ -37,8 +81,14 @@ angles |<...>|. Optional tokens of a command appear with a different
background color, like \Oarg{*!}. Output of a tokenized |\macro*!| is shown
as:
\quad|\macro|\Oarg{*!}|: \macro, \macro*, \macro!, \macro*!|\\
-All output is shown for the English language.
-
+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: english, danish, dutch, french, german, norsk, spanish, swedish, turkish. \\
+You obtain this output in \emph{YourLanguage} by compiling onedown-ref.tex with: \\[0.5em]
+%
+\verb|pdflatex '\AtBeginDocument{\def\RefLang{YourLanguage}}\input{onedown-ref.tex}'|
+\\[0.7em]
+\centerline{\textbf{This document shows the commands for the \emph{\RefLang}\ language}}
\begin{description}[itemsep=-0.3em]
\item[ace]: \ace
\item[Ace\Oarg{*!}]: \Ace, \Ace*, \Ace!, \Ace*!
@@ -118,7 +168,7 @@ To denote the rank \suit{T}, one has to use the uppercase letter |T|.
\item[eastwest]: \eastwest
\item[Eastwest\Oarg{*!}]: \EastWest, \EastWest*, \EastWest!, \EastWest*!
-\item[expertquiz\Oarg{*!}\Q{[comment]}{award}]\\
+\item[expertquiz\Oarg{*!}\Q{[comment]{award}}]\\
Typesets a quiz, showing a
predefined hand and a predefined bidding diagram. The star version centers
the output. The token |!| forces a newline between hand and bidding
@@ -460,6 +510,7 @@ These macros, called in a bidding table\ldots
8 & {\Pass*!} & {\Double*!} & {\Redouble*!} & {\Allpass*!} \\
9 & {\pass} & {\double} & {\redouble} & {\allpass} \\
\end{tabular}\\
+
\end{document}
\endinput