2

I am working on a book that includes word-to-word translations that need to be put in a table. The format of the average page looks like this:

  1. Regular paragraph text.
  2. Verse.
  3. Translation section.
  4. Regular Paragraph text.

The following picture illustrates this format:

enter image description here

My question is about section 3.

I would like to put word-by-word translations of the verse in a table with two columns - One for the word and one for the meaning/translation. This section/paragraph itself must flow into two columns. Optionally it must support it's own footnote that appears at the end of the second column.

Ideally I would like something like this:

\begin{mytable}
    \entry[Word]Meaning
    \entry[Apple]Apple is a fruit
    \entry[Banana]Banana is also a fruit
    \entry[Cat]Cat is an mammal\myfootnote{A mammal is an animal}.
\end{mytable}

The mytable macro should create a 2-column table that itself flows into two columns on the page. Optionally the myfootnote function creates a footnote at the end of the second column. When typeset, the two columns should be of same height.

When encountering a page-break, the order of entries on each pages must be preserved in the flow. Thus a table with 10 entries when split should result in:

Entry1    Entry4
Entry2    Entry5
Entry3    Footnote for Entry 2
----PAGE BREAK----
Entry 6   Entry 9
Entry 7   Entry 10
Entry 8   Footnote for Entry 9
3
  • I'm thinking your question is asking way too much for a single question. It sounds a great deal like "I have this difficult problem, please do it for me." One aspect of your problem concerns parallel texts. There are some questions on the site about that, Here is one: tex.stackexchange.com/questions/130907/…. The search function will help you in many areas. Breaking a problem down into smaller chunks is helpful for those trying to help you. Oct 24, 2014 at 18:10
  • you say table but looking at your image I thinnk there is no alignment, each is set as "word -- translation" without the -- lining up? Oct 24, 2014 at 19:16
  • Your first solution would work very well. Thank you so much. You are correct that my image has no alignment. However I would prefer if I could left-align the word and the meaning. So this would mean putting each "entry" as a row in a table.
    – hashable
    Oct 24, 2014 at 19:56

2 Answers 2

3

Drawing on David Carlisle's multicol idea, I suggest creating an environment to set up the translation, and a command to put each word-gloss pair in tabular alignment. The footnote package allows footnotes from inside the tabular.

\documentclass{article}
\usepackage{multicol,footnote}

\newenvironment{translation}
    {\par\begin{multicols}{2}\setlength\parindent{0pt}}
    {\end{multicols}}
\makesavenoteenv{translation}   % allows footnotes in tabular

% Set width of tabular columns
\newcommand{\gloss}[2]{%
    \begin{tabular}{p{0.22\linewidth} c p{0.22\linewidth}}
    #1 & --- & #2\\ 
    \end{tabular}\newline%
    }
\usepackage{lipsum}

\begin{document}
\lipsum[1]

\begin{translation}
\gloss{Pollo}{Chicken}
\gloss{Burrito}{Burrito}
\gloss{Grande}{Big}
\gloss{Cerveza}{Beer}
\gloss{Alegre}{Happy}
\gloss{Cansado}{Tired%
    \footnote{\lipsum[10]}%
    }
\end{translation}

\lipsum[2]
\end{document}

enter image description here

2
  • Would there be a way to get the footnote at the end of the translation section (end of right column) like David Carlisle's solution does?
    – hashable
    Nov 6, 2014 at 7:06
  • @hashable You could put the translation environment inside a minipage and remove the line \makesavenoteenv{translation}; and then you will get by default alphabetic "table notes" under the environment. The defaults would place them under a rule on the left side. Perhaps someone else knows how to do multicolumn table footnotes. Nov 6, 2014 at 19:44
3

I'm not sure, but do you mean something like this?

enter image description here

\documentclass{article}

\usepackage{multicol}

\newcommand\entry[2]{\par#1~---~#2\par}
\newcommand\myfootnote[1]{%
\stepcounter{mpfootnote}%
\footnotemark[\value{mpfootnote}]%
\edef\tmp{\toks0\par\noexpand\footnotemark[\the\value{mpfootnote}]}%
\toks0\expandafter{\the\tmp#1\par}}

\begin{document}

\noindent blah \dotfill blah \dotfill blah\\
blahlah \dotfill blah \dotfill blah


\begin{multicols}{2}\setlength\parindent{0pt}
    \entry{Word}{Meaning}
    \entry{Woord}{Meeaning\myfootnote{my spelling is poor}}
    \entry{Apple}{Apple is a fruit}
    \entry{Worrrd}{Meannnning}
    \entry{Wordddd}{More meaning}
    \entry{Banana}{Banana is also a fruit}
    \entry{Bananana}{Bananaanana is also a fruit}
    \entry{Banana}{Banana is also a fruit}
    \entry{Cat}{Cat is an mammal\myfootnote{A mammal is an animal}}
\the\toks0\relax
\end{multicols}

\noindent blah \dotfill blah \dotfill blah\\
blahlah \dotfill blah \dotfill blah

\noindent blah \dotfill blah \dotfill blah\\
blahlah \dotfill blah \dotfill blah

\end{document}
3
  • Very nice. Thanks for showing me how to do this. I also replied to your question above clarifying that it would be great if each entry were a table row so that I could left-align the word and the meaning.
    – hashable
    Oct 24, 2014 at 20:00
  • 1
    @hashable you could change \par#1~---~#2 to \par\makebox[1cm]{#1}~---~#2 (or any other suitable length) then all the dashes will line up. Oct 24, 2014 at 21:46
  • Andrew Cashner's solution of putting each entry in a table which is in a multicol environment works mostly. My only remaining issue is to get the footnotes at the end of the second column that doesn't appear to work in his solution (footnotes appear at the bottom of the page). I tried to use your \myfootnote command, but that doesn't work in the table. Do you have any suggestions to get the footnote at the end of the translation section in Andrew's solution?
    – hashable
    Nov 7, 2014 at 2:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .