I need to create bi-lingual document, left column in russian and right in english. For this purpose I choose package paracol. But to make it easyer for translator to translate russian text, I want put all russian parts to one group of files (named somedir/text_rus.tex) and all english to another (named somedir/text_eng.tex). To input them I create macro


It works, but all two-column images inserts only after the part, but I need them to be inserter where they was mentioned. So, I need some way to synchronise columns and insert image outside paracol environment.

I try such thing:


The idea is to input english part before russian to create many small files with text between images, after that I simply \input contents of that files after russian text, close paracol and put image.

The problem is how to simplify this. How can I simply put some marker like \syncpoint to english file and when process it write text between consequent markers into another temporary file?

Or maybe I didn't hear about some package that can solve my problem — synchronize text in two columns without need to write this text consequent into one file?

  • you mean that you want to be able to switch between the 2 files?
    – touhami
    Feb 16 '16 at 14:53
  • @touhami, yes to take text from second file part by part
    – Eddy_Em
    Feb 16 '16 at 19:24

One thing you can do rather easily is put all the text into macros then merge them together. You might run out of memory rather quickly though.



\newcommand{\merge}[1]% #1 = number of bloxks to merge
  \csname rus\themerge\endcsname
  \global\expandafter\let\csname rus\themerge\endcsname=\relax% erase macro
  \csname eng\themerge\endcsname
  \global\expandafter\let\csname rus\themerge\endcsname=\relax% erase macro
%left column to end
%right column to end
\newcommand{\engA}{First paragraph}
\newcommand{\engB}{Second paragraph}
%merge macros
  • I don't see the connection between my question and your answer. Can't understand where should I write \begin{image*}... to put wide image between first and second text parts.
    – Eddy_Em
    Feb 16 '16 at 19:37
  • I modified my example to add a wide image. Feb 16 '16 at 22:41

Here is a solution. (I use french)






\advance\mt by 1\relax%

\divide\mtt by 2\relax%
\advance\mt by 1\relax%


text_rus.tex sample:

Généralement, ...
Ce texte a ...
Il circule ...
Nulla facilisi...

text_eng.tex sample

Lorem ipsum dolor... 
Class aptent... 
Mauris ipsum...
Nulla facilisi...

enter image description here

  • This isn't what I want: at syncpoints paracol environment should be ended, after that I put there an image and begin new paracol.
    – Eddy_Em
    Feb 16 '16 at 19:26
  • @Eddy_Em you can't adapte my solution?
    – touhami
    Feb 16 '16 at 19:27
  • I tried another variant: tex.stackexchange.com/questions/294238/… I hope, it would be better.
    – Eddy_Em
    Feb 16 '16 at 19:29

Thanks to @egreg! This answer was very usefull. So, I create a MWE that shows an idea.

Contents of file main.tex:

    {{\bfseries\csname @rus\@captype\endcsname\,\csname%
    {{\bfseries\csname @eng\@captype\endcsname\,\csname%
\seq_new:N \en_seq_items
\int_new:N \en_seq_ctr
\cs_new_protected:Npn \startsync #1 \endsync{
    \seq_set_split:Nnn \en_seq_items { \syncpoint } { #1 }
    \seq_map_inline:Nn \en_seq_items
        \int_gincr:N \en_seq_ctr
        \tl_gset:cn { en_part \int_to_roman:n { \en_seq_ctr} _tl } { ##1 }
\def\insrt#1{\tl_use:c { en_part \int_to_roman:n { #1 } _tl }}
\def\paraend{\int_gincr:N \en_seq_ctr\switchcolumn\eng\insrt{\en_seq_ctr}\end{paracol}\rus}

Contents of 01/text_rus.tex:

\section{Какой-то раздел}
Первый абзац
Here we can paste a wide image
\bicaption{Название изображения на русском языке}{English image name}
Второй абзац
Текст шириной на две колонки вне окружения \verb'paracol'.
И заключительный кусок текста

And contents of 01/text_eng.tex:

\section{Some section}
First paragraph
Second paragraph
Third paragraph

Here is result:
(source: pic4a.ru)

The only trouble is need to write \startsync in beginning of every english file and \endsync in its end, because construction like \startsync\input{file}\endsync inside macro don't work.

P.S. another very bad part of this code is usage of awful latex3e syntax. But unfortunately normal syntax would be much more bulky.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.