I’m trying to typeset a parallel translation of a mathematical text, with the original text and translation facing each other in two columns.
For the most part, the paracol package provides this excellently (and it looks like reledmac/reledpar would also work well) — it provides several very nice features like smooth synchronisation of theorem numbering, and so on.
But I would also like, if possible, to have displayed equations (and similar environments) shared between the two versions, i.e. not duplicated in each column, but appearing once, and full text width. This doesn’t seem to be provided for by either paracol or reledpar. The simple kludge is to end the 2-column environment, give the displayed equation, and restart the 2-columns afterwards. This isn’t great, but it’s good enough to be getting on with, especially with some by-hand adjustment to the spacing.
What I really can’t find any decent way to do is displayed equations, shared between the columns, within theorems or similar environments — the kludge above doesn’t work, because to temporarily end the two-column environment, one has to end the theorem environment. The desired outcome is that each column would look like an ordinary theorem-containing-a-displayed-equation, except with the equation shared, and extra vertical space as necessary if the text preceding the equation is longer in one column than the other.
A principled solution would be great, if anyone knows of one, but I would be happy just to find a reasonable kludge that works for the within-theorem case as well as for the simple case.
My MWE uses paracol, but I would be very happy also for solutions using reledpar, or any other package that provides a comparable setup for parallel texts.
MWE output:
MWE source:
\documentclass{article}
\usepackage{paracol}
\usepackage{amsthm}
\newtheorem{sats}{Sats}
\newtheorem{theorem}[sats]{Theorem}
\begin{document}
\begin{paracol}{2}
Här skriver jag på svenska, bara ett par linjer för at skapa ett kort paragraf.
\switchcolumn
Here I write in English, just a couple of lines to make a short paragraph.
\switchcolumn*
\begin{sats}
Tyvärr vet jag inga matematiska satser att skriva här.
\end{sats}
\switchcolumn
\begin{theorem}
Unfortunately I know no mathematical theorems to write here.
\end{theorem}
\switchcolumn*
Här är en ekvation: för alla rella tal $a$ och $b$,
\switchcolumn
Here is an equation: for all real numbers $a$ and $b$,
\end{paracol}
\[a + b = b + a; \]
\begin{paracol}{2}
\noindent men troligtvis är det för enkel för att kallas för en sats. Men det har en mer interessant generalisering:
\switchcolumn
\noindent but it’s probably too simple to be called a theorem. But it has a more interesting generalisation:
\switchcolumn*
\begin{sats}
För alla rella tal $a$, $b$, $c$, och $d$,
\end{sats}
\switchcolumn
\begin{theorem}
For all real numbers $a$, $b$, $c$, och $d$,
\end{theorem}
\end{paracol}
\[a + b + c + d = c + d + a + b; \]
\begin{paracol}{2}
\noindent som är ganska användbar (och det här ska vara en forstättning av satsen).
\switchcolumn
\noindent which is quite useful (and this should be a continuation of the theorem).
\end{paracol}
\end{document}
