兩列中的平行翻譯,在定理內,列之間共享顯示數學?

兩列中的平行翻譯,在定理內,列之間共享顯示數學?

我正在嘗試排版數學文本的平行翻譯,原始文本和翻譯在兩列中面對面。

在大多數情況下,該paracol套件很好地提供了這一點(看起來reledmac/reledpar也能很好地工作)——它提供了幾個非常好的功能,例如定理編號的平滑同步等等。

但如果可能的話,我還希望顯示兩個版本之間共享的方程式(和類似的環境),即不在每列中重複,但出現一次,以及全文寬度。paracol或似乎都沒有提供這一點reledpar。簡單的組裝是結束 2 列環境,給出顯示的方程,然後重新啟動 2 列。這不是很好,但已經足夠了,特別是可以手動調整間距。

我真的找不到任何合適的方法來做的是顯示的方程,在列之間、定理或類似環境中共享— 上面的拼湊不起作用,因為要暫時結束兩列環境,必須結束定理環境。期望的結果是,每一列看起來都像一個包含顯示方程式的普通定理,除了共享方程式之外,如果一列中方程式前面的文字比另一列中方程式前面的文字長,則需要額外的垂直空間。

如果有人知道一個有原則的解決方案,那就太好了,但我很高興找到一個適用於定理內情況以及簡單情況的合理拼湊。

我的 MWE 使用paracol,但我也很高興使用 的解決方案reledpar,或任何其他為平行文字提供類似設定的套件。

MWE 輸出:

MWE 輸出的螢幕截圖

MWE來源:

\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}

答案1

這展示瞭如何進行疊加技巧。

\documentclass{article}

\usepackage{paracol}

\usepackage{amsthm}
\newtheorem{sats}{Sats}
\newtheorem{theorem}[sats]{Theorem}

\newcommand{\singlecol}[2][0]% #1 = column (0=left) to wind up in (optional), #2 = text to appear as if in a signel column
  {\switchcolumn[0]*
  \noindent\rlap{\parbox{\textwidth}{#2}}
  \switchcolumn[#1]*}

\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$,
\singlecol{\[a + b = b + a; \]}
\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}
\singlecol{\[a + b + c + d = c + d + a + b; \]}
\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}

事實證明,如果您在一列中啟動一個環境,​​它將影響兩列,直到結束。 OTOH,定理環境可以嵌套,並且每列使用獨立的計數器。

注意:您只能在段落之間切換列。

\documentclass{article}

\usepackage{paracol}

\usepackage{amsthm}
\newtheorem{sats}{Sats}
\newtheorem{theorem}[sats]{Theorem}

\newcommand{\singlecol}[2][0]% #1 = column (0=left) to wind up in (optional), #2 = text to appear as if in a signel column
  {\switchcolumn[0]*
  \noindent\rlap{\parbox[b]{\textwidth}{#2}}
  \switchcolumn[#1]*}

\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.
\switchcolumn
\begin{theorem}
Unfortunately I know no mathematical theorems to write here.
\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$,
\singlecol{\[a + b = b + a; \]}
\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:
\end{theorem}\end{sats}% note order of nesting
\switchcolumn*
\begin{sats}
För alla rella tal $a$, $b$, $c$, och $d$,
\switchcolumn
\begin{theorem}
For all real numbers $a$, $b$, $c$, och $d$,
\singlecol{\[a + b + c + d = c + d + a + b; \]}
\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{theorem}\end{sats}% note order of nesting
\end{paracol}
\end{document}

相關內容