[texhax] Has anyone created bilingual translations with a tex
package.
Tom Schneider
toms at ncifcrf.gov
Sun Sep 7 03:13:24 CEST 2003
> >>>>> "Craig" == W Craig Carter <ccarter at mit.edu> writes:
>
> Craig> I am about to start a translation project and am wondering
> Craig> if someone else has done something similar.
>
> Craig> You might have seen bilingual translations where, say,
> Craig> english appears on the odd (left-hand-leaf) and , say, the
> Craig> translated french appears on the even (right-hand-leaf).
> Craig> The pages match up so that a reader can check their
> Craig> abilities to translate.
>
> Craig> I'd like to do a similar project, with the addition of
> Craig> extra material such as figures and equations and
> Craig> references, of having an original and my translation show
> Craig> up side-by-side.
>
> One way of doing this might be as follows:
>
> 1. Create a pdf of your English version.
>
> 2. Create another pdf of your French version with same classes and
> packges.
>
> 3. Now create a document, say 'print.tex':
>
> \documentclass{article}
> \usepackage[final]{pdfpages}
>
> \def\totalpages{<n>} % number of pages of any one of your version + 1
>
> \newcounter{xpage}
>
> \def\Include#1#2{%
> \loop\stepcounter{xpage}
> \ifnum\thexpage<\totalpages
> \includepdf[pages=\thexpage,pagecommand={\thispagestyle{plain}}]{#1}
> \includepdf[pages=\thexpage,pagecommand={\thispagestyle{plain}}]{#2}
> \repeat}
>
> \begin{document}
>
> \Include{english.pdf}{french.pdf}
>
> \end{document}
>
> 4. Run pdflatex over this print.tex, you will get print.pdf which
> should have English pages and corresponding French pages repeating
> alternatively.
>
> This has worked for me very well. It might be better, if your
> language versions of document do not have any page numbers, because
> you can have continuous page numbers inserted by \pagecommand in the
> composite one.
>
> Best.
>
> Radhakrishnan
It seems to me that this is not a good solution. For one thing, the
two language parts are separated which would make comparisons inside
the editor more difficult. Secondly, it requires a lot of external
mechanisms.
It would seem that a better solution would be to define some
functions. Something like floating text:
The first sentence.
\translate{The first sentence in the other language.}
The second sentence.
\translate{The second sentence in the other language.}
Then define translate to be a float that floats to the next page.
\clearpage % trigger dropping of all the translations
\clearpage % jump to next page to continue ...
Though I'm not familar with the syntax (someone else can help!)
programming it like this would make it \emph{really} easy
for the translator!
Tom
Dr. Thomas D. Schneider
National Cancer Institute
Laboratory of Experimental and Computational Biology
Frederick, Maryland 21702-1201
toms at ncifcrf.gov
permanent email: toms at alum.mit.edu (use only if first address fails)
http://www.lecb.ncifcrf.gov/~toms/
More information about the texhax
mailing list