Graphics, Figures & TablesTwo different languages side by side

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
wcapio
Posts: 6
Joined: Wed Aug 04, 2010 7:25 pm

Two different languages side by side

Post by wcapio »

Hi folks,

I am typesetting a thesis that includes quite a lot of quotes from the Hebrew Bible. There's a few principles I do not fully understand though.

I work with xelatex (texlive, windows and linux). I have a series of poems of various widths and lengths I want to typeset. The english text should be on the left, the Hebrew on the right.

My questions:

- should I put every poem in a tabular and try to vertically align the tabulars to top? If so, how come my Hebrew tabular does not take the {lrc} commands, but needs p{5cm} commands? Should I make a new columnstyle?

- should I use minipages and align these to the top?

My basic problem is alignment. I want the Hebrew and English the one next to the other. As the width of the text varies, I want the environment to be flexible.

Looking for some ideas here...

I have the following minimal example:

Code: Select all

\documentclass[11pt, oneside, a4paper]{book} %or koma: scrreprt
\usepackage{bidi}
\usepackage{fontspec}
\usepackage{lipsum}

\newfontfamily{\hebrewfont}[Script=Hebrew, Scale=MatchUppercase]{SBL Hebrew}
\newenvironment{poem}{\footnotesize\begin{center}\begin{tabular}{p{8,5cm}}}{\end{tabular}\end{center}} % CENTERED
\newenvironment{Hbpoem}{\begin{center}\begin{tabular}{p{8,5cm}}}{\end{tabular}\end{center}} %

\begin{document}

\lipsum
\begin{Hbpoem}
\raggedleft\RLE{\hebrewfont 
כַּמָּה נֵר־רְשָׁעִים יִדְעָךְ }\\
\RLE{\hebrewfont 
 וְיָבֹא עָלֵימוֹ אֵידָם 
}\\
\RLE{\hebrewfont 
חֲבָלִים יְחַלֵּק בְּאַפּוֹ
}\end{Hbpoem}
\begin{poem}
\footnotesize How often is the lamp of the wicked put out? \\
How often does calamity come upon them? \\
How often does God distribute pains in his anger (verse ref)?
\end{poem}
\lipsum
\end{document}


help will be appreciated!
Walter

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Two different languages side by side

Post by frabjous »

I would use the parcolumns package. See its documentation for how to use it.
wcapio
Posts: 6
Joined: Wed Aug 04, 2010 7:25 pm

Re: Two different languages side by side

Post by wcapio »

Thanks 4 the reply

The disadvantages I can see in parcolumns are

1. it is designed for full textwidth (so if I'm right it requires a minipage every time). I want to type as little as possible (for instance, by using a newcolumnstyle? [one that I can align right, use \RLE from the bidi package and set the font in one go]

2. it is meant to set the lines on the same level. this causes the english text to have something like 1,3 interlinear... Not nice...

suggestions?
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Two different languages side by side

Post by localghost »

Then just try the parallel package. Therein I see no problem for what you want to do. The manual has the necessary details.


Best regards and welcome to the board
Thorsten
Post Reply