每页并列两种语言

每页并列两种语言

我将借鉴并改编一些这一页

--- left side of page 1 ---
this is an english text
which spans over several pages
--- right side of page 1 ---
ceci est un texte anglais
qui s'étale sur plusieurs pages
--- left side of page 2 ---
this is the end of the english text
--- right side of page 2 ---
ceci est la fin du texte en anglais

我怎样才能让 LaTeX 做到这一点?

答案1

对于并排放置不同语言的两列来说,这个包很有帮助paracol

对于其他选项,请参阅https://www.ctan.org/topic/parallel

这个例子将帮助你入门。

C

图中的绿线标记了选择同步的(三个)段落的开始。

用于\switchcolumn更改列或 \switchcolumn* 同步文本。

\documentclass[12pt,a4paper]{article}
\usepackage{fontspec}
\usepackage[left=1.5cm,right=1.5cm,top=2cm,bottom=2cm]{geometry}

\usepackage[american, french]{babel}

\usepackage{microtype}
\usepackage{libertine} 

\title{ Ball of Lard \hfill Boule de Suif }

\author{GUY DE MAUPASSANT}
\date{April 1880}

\usepackage{paracol} % needed <<<<<
\parindent=0pt

\begin{document}

\maketitle

\setcolumnwidth{0.40\textwidth/20pt, 0.40\textwidth} % column width + column inter space

\begin{paracol}{2}% 
\begin{otherlanguage}{american}
    For several days in succession fragments of a defeated army had passed through the town. 
    
    They were mere disorganized bands, not disciplined forces. 
    The men wore long, dirty beards and tattered uniforms; they advanced in listless fashion, without a flag, without a leader.
    All seemed exhausted, worn out, incapable of thought or resolve, marching onward merely by force of habit, and dropping to the ground with fatigue the moment they halted.
\end{otherlanguage}

\switchcolumn   
Pendant plusieurs jours de suite des lambeaux d’armée en déroute avaient traversé la ville. 

Ce n’était point de la troupe, mais des hordes débandées. 
Les hommes avaient la barbe longue et sale, des uniformes en guenilles, et ils avançaient d’une allure molle, 
sans drapeau, sans régiment. Tous semblaient accablés, éreintés, incapables d’une pensée ou d’une résolution,   marchant seulement par habitude, et tombant de fatigue sitôt qu’ils s’arrêtaient. 

\switchcolumn*  % syncronize
\begin{otherlanguage}{american}
    One saw, in particular, many enlisted men, pea\-ceful citizens, men who lived quietly on their income, bending beneath the weight of their rifles; and little active volunteers,
    easily frightened but full of enthusiasm, as eager to attack as they were ready to take to flight; and amid these, a sprinkling of red-breeched soldiers,
    the pitiful remnant of a division cut down in a great battle; somber artillerymen, side by side with nondescript foot-soldiers;
    and, here and there, the gleaming helmet of a heavy-footed dragoon who had difficulty in
    keeping up with the quicker pace of the soldiers of the line.
\end{otherlanguage}

\switchcolumn
On voyait surtout des mobilisés, gens pacifiques, rentiers tranquilles,  pliant sous le poids du fusil;  des petits moblots alertes,    faciles à l’épouvante et prompts à l’enthousiasme, prêts à l’attaque comme à la fuite; 
puis, au milieu d’eux, quelques culottes rouges, débris d’une division moulue dans une gran\-de bataille;   des artilleurs sombres alignés avec des fantassins divers; et, parfois, le casque brillant d’un dragon au pied pesant qui suivait avec peine la marche plus légère des lignards.

\switchcolumn*  % syncronize
\begin{otherlanguage}{american} 
    Legions of irregulars with high---sounding na\-mes ``Avengers of Defeat'', ``Citizens of the Tomb'', ``Breth\-ren in Death''---passed in their turn, looking like banditti. 
\end{otherlanguage}

\switchcolumn   
Des légions de francs---tireurs aux appellations héroïques : « les Vengeurs de la Défaite, les Citoyens de la Tombe,
les Partageurs de la Mort » --- passaient à leur tour, avec des airs de bandits.

\switchcolumn*% syncronize
\begin{otherlanguage}{american}
    Their leaders, former drapers or grain merchants, or tallow or soap chandlers---warriors by force of circumstances, officers by reason of their mustachios or their money---covered with weapons, flannel and gold lace, spoke in an impressive manner,
    discussed plans of campaign,and behaved as though they alone bore the fortunes of dying France on their braggart shoulders; 
    though, in truth, they frequently were afraid of their own men---scoundrels often brave beyond measure, but pillagers and debauchees.
\end{otherlanguage}

\switchcolumn   
Leurs chefs, anciens commerçants en draps ou en graines, ex--marchands de suif ou de savon, guerriers de circonstance, 
nommés officiers pour leurs écus ou la longueur de leurs moustaches, couverts d’armes, de flanelle et de galons, 
parlaient d’une voix retentissante, discutaient plans de campagne, et prétendaient soutenir seuls la France agonisante sur leurs épaules de fanfarons;
mais ils redoutaient parfois leurs propres soldats, gens de sac et de corde, souvent braves à outrance, pillards et débauchés.

\end{paracol} 

% text taken from http://learn-french-free-with-stories.weebly.com/p1s-boule-de-suif---guy-de-maupassant-free-online-intermediate-level-french-english-spanish-bilingual-short-story-parallel-text.html
    
\end{document}

相关内容