我想在一個大型文檔中一次翻譯整個段落,並開始新的句子對齊。以下幾乎是我想要做的事情,儘管它還沒有對新句子進行調整。LaTeX中雙語雙語段落的句子對齊方式
\documentclass{article}
\usepackage[margin=1in, paperwidth=8.5in, paperheight=11in]{geometry}
\usepackage[utf8]{inputenc}
\usepackage{url}
\usepackage{setspace}
\begin{document}
\def\english{In the heart of the forest lived three little pigs who were brothers. The wolf always was chasing them in order to eat them. In order to escape the wolf, the pigs decided to make a house each. The smallest made his from straw, to finish first and go out to play. The middle one constructed a cottage from wood. Seeing that his little brother had finished already, he hurried to go and play with him. The oldest worked on his house of brick. 'You'll soon see what the wolf does with your houses,' he scolded his brothers but they were having a great time.}
\def\spanish{En el corazón del bosque vivían tres cerditos que eran hermanos. El lobo siempre andaba persiguiéndoles para comérselos. Para escapar del lobo, los cerditos decidieron hacerse una casa. El pequeño la hizo de paja, para acabar antes y poder irse a jugar. El mediano construyó una casita de madera. Al ver que su hermano perqueño había terminado ya, se dio prisa para irse a jugar con él. El mayor trabajaba en su casa de ladrillo. - Ya veréis lo que hace el lobo con vuestras casas - riñó a sus hermanos mientras éstos se lo pasaban en grande.}
\begin{minipage}[t][0pt]{\linewidth}
\setstretch{3}
\english
\end{minipage}
\begin{minipage}[t]{\linewidth}
\setstretch{3}
\spanish
\end{minipage}
\end{document}
Sample of dual line translation http://i49.tinypic.com/w80u8k.jpg
我怎樣才能自動對齊新的句子?對於獎勵積分,如何修改此方法以手動指示英語中的一個句子與西班牙語中的兩個句子對齊?
你願意手動標記與一些標誌句子結束了嗎?這可能會產生積分問題,而且問題總體上更容易。 – Geoff 2010-06-03 19:39:46
是的,出於獎金問題的目的,我願意用一面旗子標記句子的結尾,只在英語中的一個句子與西班牙語中的多個句子對齊(反之亦然)的情況下。 – 2010-06-03 20:26:17
我猜想這個問題即將到來。我認爲這非常困難,因爲Tex82引擎不能讓你有機會知道已經排版了一個hbox的距離(當然,因爲分段算法會改變空間的寬度),並且因爲一條線上所需的額外空間可能取決於下一條線。我不會說*無法完成,但我不明白。 Luatex是另一個故事,但現在它不穩定,沒有很好的文檔記錄。 – 2010-06-04 08:55:50