summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/onedown/examples
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-10-22 03:01:55 +0000
committerNorbert Preining <norbert@preining.info>2019-10-22 03:01:55 +0000
commit7bf461efa5036b361e9500c4ed5c675cc819652c (patch)
tree23bb25035cc3b6e1c64748d1d5e11ce85f69fc9e /macros/latex/contrib/onedown/examples
parent7da4243862494d1fc7478956362f4da6d80f4f7e (diff)
CTAN sync 201910220301
Diffstat (limited to 'macros/latex/contrib/onedown/examples')
-rw-r--r--macros/latex/contrib/onedown/examples/onedown-examples.pdfbin847441 -> 0 bytes
-rw-r--r--macros/latex/contrib/onedown/examples/onedown-examples.tex31
-rw-r--r--macros/latex/contrib/onedown/examples/onedown-ref.pdfbin210831 -> 0 bytes
-rw-r--r--macros/latex/contrib/onedown/examples/onedown-ref.tex63
4 files changed, 83 insertions, 11 deletions
diff --git a/macros/latex/contrib/onedown/examples/onedown-examples.pdf b/macros/latex/contrib/onedown/examples/onedown-examples.pdf
deleted file mode 100644
index 9bc5e63247..0000000000
--- a/macros/latex/contrib/onedown/examples/onedown-examples.pdf
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/onedown/examples/onedown-examples.tex b/macros/latex/contrib/onedown/examples/onedown-examples.tex
index d572b06cd2..1e5f5b57ad 100644
--- a/macros/latex/contrib/onedown/examples/onedown-examples.tex
+++ b/macros/latex/contrib/onedown/examples/onedown-examples.tex
@@ -1,6 +1,6 @@
%%
%% onedown-examples.tex
-%% April 16, 2018
+%% Oct 04, 2019
%% Requires the onedown bundle
%% Part of the OneDown bundle (mirror.ctan.org/onedown)
%% author: J. Wiersma
@@ -17,9 +17,17 @@
\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[%
+ 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[mono=false]{libertine}% verbatim needs option mono=false
% linertine screws verbatim, at least I don't know how to handle that
@@ -104,8 +112,15 @@
\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\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{\ExLang}
\pdfbookmark[1]{Title}{Title}
\title{Examples for the\\\OneDown package%
\footnote{This file is part of the \OneDown bundle. To generate this file,
@@ -137,6 +152,12 @@ 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: english, danish, dutch, 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\RefLang{YourLanguage}}\input{onedown-examples.tex}'|
\par\vspace{1\baselineskip}
\setlength\columnseprule{.8pt}% rule between cols
\begin{multicols}{3}[{\centering \textbf{\Large List of Examples}}]
diff --git a/macros/latex/contrib/onedown/examples/onedown-ref.pdf b/macros/latex/contrib/onedown/examples/onedown-ref.pdf
deleted file mode 100644
index c59b80f641..0000000000
--- a/macros/latex/contrib/onedown/examples/onedown-ref.pdf
+++ /dev/null
Binary files differ
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