I want to typeset a hexaglot work. Each language will occupy its own column, and there will be 3 columns on each page. The text will be aligned by paragraphs and headings.
Basically, I want something that looks like this:
Left Page Right Page
+--------------------------------------+ +--------------------------------------+
| Heading | Тема 1 | Primero | | Χαίρετε! | 標題1 | ספרות |
| ------- | --------- | ---------- | | ---------- | ---------- | ---------- |
| English t- | Це не рос- | No tengo | | Πώς είσαι; | 其實我不知 | פוליטיקה |
| ext taking | ійський т- | nada. Pero | | Καλό. | 中國。 | לערך אינו |
| up 3 lines | екст а ук- | Juan tiene | | | 我使用的是 | ציו ישראל |
| | раїнській. | | | | 翻譯。 | תבניות |
| | | | | | | |
| Heading 2 | Дуже довг- | Segundo | | Ελληνική ε | 我喜歡牛肉!| בהיסטוריה |
| ---------- | ий Тема | ---------- | | ίναι ωραία | ---------- | ---------- |
| | ---------- | | | ---------- | | |
| Text taki- | Круто! | Estoy abu- | | Σ 'αγαπώ. | 你喜歡牛肉 | אם מפתח |
| ng up 2 | | rrido. | | | 嗎? | קישורים |
| | | | | | | תקשורת |
+--------------------------------------+ +--------------------------------------+
I looked at the parallel library but I couldn't figure out how to put in 3 columns. I also looked at parcolumns but I couldn't get text the two pages to line up.
How could I go about doing this?
Best Answer
REVISED VERSION (AUTOMATED PAGEBREAK CONTROL):
As with the manual solution, one initializes a "special table" with
\newspecialtable
. Likewise, one enters any number of rows to the table with repeated invocations of the macro\sixby{}{}{}{}{}{}
, once per row. In this case, however, if a row would be so large as to push to the next page, the double-page is broken at that point and the complete new row is bumped to the next double-page.When all the rows are entered via
\sixby
, one employs\finishspecialtable
, to clear out the straggler rows onto a final double-page. As a bonus, I added Russian and greek support to this MWE. I hope I am not inadvertantly cursing or using foreign foul language, as I just copied the foreign text from other pages on the site.In case one doesn't spot it immediately, the table column width and overall maximum text height have been reset here (for demonstration purposes) to
\def\colwidth{1in}
and\textheight=4in\relax
, respectively. They should be reset to appropriate values for actual use.The
\printtabtoks
method came from Herbert at How to programmatically make tabular rows using `\whiledo` ?EDITED to handle centering and quotes.
Here are shown the first two pages of output. The MWE puts out 6 pages of output, demonstrating the auto-pagebreaks
ORIGINAL SOLUTION (MANUAL PAGEBREAK CONTROL):
One initializes a "special table" with
\newspecialtable
. Then, one enters any number of rows to the table with repeated invocations of the macro\sixby{}{}{}{}{}{}
, once per row. When all the rows are entered, one employs\makespecialtable[
rows]
, where "rows" is the number of rows to printout, so as not to extend past a page break. Multiple invocations of\makespecialtable
will proceed through the rows, until the table rows are exhausted.In this MWE, I use
\sixby
four times. Then I output the table withIn this way, rows(1-3)cols(1-3) appear on p.1, rows(1-3)cols(4-6) appear on page 2, row(4)cols(1-3) appear on p.3 and row(4)cols(4-6) appear on page 4.