summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/bilingualpages
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-06-20 03:01:22 +0000
committerNorbert Preining <norbert@preining.info>2021-06-20 03:01:22 +0000
commit0b024adf546cd484554e4de5bd1a9919a4fdd03d (patch)
treef688c8afa79d522868966c9c91e09088f28b5248 /macros/latex/contrib/bilingualpages
parentdaa6873fe1d06863ffc2980970295b39071f02ba (diff)
CTAN sync 202106200301
Diffstat (limited to 'macros/latex/contrib/bilingualpages')
-rw-r--r--macros/latex/contrib/bilingualpages/README.md23
-rw-r--r--macros/latex/contrib/bilingualpages/bilingualpages.sty15
2 files changed, 38 insertions, 0 deletions
diff --git a/macros/latex/contrib/bilingualpages/README.md b/macros/latex/contrib/bilingualpages/README.md
new file mode 100644
index 0000000000..405d4d177c
--- /dev/null
+++ b/macros/latex/contrib/bilingualpages/README.md
@@ -0,0 +1,23 @@
+bilingualpages (v1.0.0): Parallel facing pages for bilingual texts.
+===
+Copyright (C) 2021 Arlie Coles
+This package can be redistributed and/or modified under the terms
+of the LaTeX Project Public License 1.3c.
+===
+
+This package is a convenience package to facilitate parallel facing pages for bilingual texts. It wraps the paracol package such that aligned content can be presented on left and right facing pages via readable macros.
+
+Example:
+
+```
+\begin{bilingualpages}
+ \leftpage
+ Hello world!
+ \rightpage
+ Bonjour tout le monde!
+\end{bilingualpages}
+```
+
+This will put "Hello world!" on the left page and "Bonjour tout le monde" on the right facing page in parallel.
+
+This material is subject to the LaTeX Project Public License 1.3c.
diff --git a/macros/latex/contrib/bilingualpages/bilingualpages.sty b/macros/latex/contrib/bilingualpages/bilingualpages.sty
new file mode 100644
index 0000000000..6defd32fea
--- /dev/null
+++ b/macros/latex/contrib/bilingualpages/bilingualpages.sty
@@ -0,0 +1,15 @@
+% Author: Arlie Coles
+% License: LaTeX Project Public License 1.3c
+
+\NeedsTeXFormat{LaTeX2e}
+\RequirePackage{paracol}
+\ProvidesPackage{bilingual}[2021/06/19 Bilingual facing pages.]
+
+% Facing pages
+\newenvironment{bilingualpages}
+{\begin{paracol}[1]{2}}
+{\end{paracol}}
+
+% Left and right pages
+\newcommand{\leftpage}{\switchcolumn[0]}
+\newcommand{\rightpage}{\switchcolumn[1]}