3

The Background

I am trying to determine how to conveniently typeset some Bible verses from different Bible translations side by side. Solution I have came up is to have custom environment for each Bible translation. Each environment contains macros that should only work within that environment. These macros determine how the final outcome should be displayed. Finally Bible verses are displayed side by side with tabu-tables.

The idea here is that these macros should make later changes in formatting easy. For example if I want to turn displaying of cross-reference markers in particular translation, I can do that by modifying the corresponding macro.

Working code I so far have is following...

\documentclass{article}

\usepackage{tabu}

\newenvironment{net}{
\def\bibleref##1{\textsuperscript{##1}}
\def\book##1{##1 }
\def\chapter##1{##1:}
\def\verse##1{##1}

\def\yhwh##1{\textsc{##1}}
\def\translatorsnote##1{\textsuperscript{##1}}
\def\studynote##1{\textsuperscript{##1}}
}{}

\newenvironment{nasb}{
\def\bibleref##1{\textsuperscript{##1}}
\def\book##1{##1 }
\def\chapter##1{##1:}
\def\verse##1{##1}

\def\yhwh##1{\textsc{##1}}
\def\crossref##1{\textsuperscript{##1}}
\def\implied##1{\textit{##1}}
}{}

\begin{document}

\begin{tabu}{XX}
\begin{net}
\bibleref{\book{Psa.}\chapter{20}\verse{1}}
May the \yhwh{Lord} answer\translatorsnote{2} you\studynote{3} when
you are in trouble;\studynote{4} may the God of Jacob\studynote{5}
make you secure!
\end{net}
&
\begin{nasb}
\bibleref{\book{Psa.}\chapter{20}\verse{1}}
May the \yhwh{Lord} answer you \crossref{a}in the day of trouble!  May
the \crossref{b}name of the \crossref{c}God of Jacob set you
\implied{securely} on high!
\end{nasb}
\end{tabu}

\end{document}

The Problem

The problem I have is that when I tried to move enviroments' \begin{...} and \end{...} declarations from each individual cell to tabu-table's table spec -argument the code does not compile anymore. The end idea is to maybe have custom column type for each bible translation to make end "product" as hassle free as possible.

Unfortunately my knowledge of LaTeX is not sufficient in understanding the problem or even know the general direction to look for solution. That is also the reason why I just had to describe the whole setting as comprehensively but yet compactly as I could. So, be free to edit the question, if you have an idea how it could serve the community better.

Code that does not work...

\documentclass{article}

\usepackage{tabu}

\newenvironment{net}{
\def\bibleref##1{\textsuperscript{##1}}
\def\book##1{##1 }
\def\chapter##1{##1:}
\def\verse##1{##1}

\def\yhwh##1{\textsc{##1}}
\def\translatorsnote##1{\textsuperscript{##1}}
\def\studynote##1{\textsuperscript{##1}}
}{}

\newenvironment{nasb}{
\def\bibleref##1{\textsuperscript{##1}}
\def\book##1{##1 }
\def\chapter##1{##1:}
\def\verse##1{##1}

\def\yhwh##1{\textsc{##1}}
\def\crossref##1{\textsuperscript{##1}}
\def\implied##1{\textit{##1}}
}{}

\begin{document}

\begin{tabu}{>{\begin{net}}X<{\end{net}} >{\begin{nasb}}X<{\end{nasb}}}
% Moving \begin{...} and \end{...} declarations to previous line causes the problems.
%\begin{net}
\bibleref{\book{Psa.}\chapter{20}\verse{1}}
May the \yhwh{Lord} answer\translatorsnote{2} you\studynote{3} when
you are in trouble;\studynote{4} may the God of Jacob\studynote{5}
make you secure!
%\end{net}
&
%\begin{nasb}
\bibleref{\book{Psa.}\chapter{20}\verse{1}}
May the \yhwh{Lord} answer you \crossref{a}in the day of trouble!  May
the \crossref{b}name of the \crossref{c}God of Jacob set you
\implied{securely} on high!
%\end{nasb}
\end{tabu}

\end{document}
1
  • 1
    Think of LaTeX as a network of beaten paths criss-crossing a swamp. If you want the journey to be hassle-free, stick to the paths ;) Commented Dec 20, 2016 at 14:29

1 Answer 1

2

What is the reason that you want to surround first X column with your net environment? From your example, the macros you define in both environments net and nasb are identical. I suggest you define them top-level once and do not go through the hassle. Further, I suggest you stay away from re-defining macros provided by LaTeX (chapter, even in article class or verse). You can define \bibleref with 3 arguments to do the job. I also suggest not to use a long-table; it gets very confusing once you have a long document and you loose other features. Here a solution with paracol:

\documentclass{article}

\usepackage{paracol}

\newcommand{\Bibleref}[3]{%
  \noindent \textsuperscript{#1~#2:3}%
}
\newcommand\Yhwh[1]{\textsc{#1}}
\newcommand\Translatorsnote[1]{\textsuperscript{#1}}
\newcommand\Studynote[1]{\textsuperscript{#1}}
\newcommand\Crossref[1]{\textsuperscript{#1}}
\newcommand\Implied[1]{\textit{#1}}

\begin{document}

\begin{center}
  With column synchronization:
\end{center}
\begin{paracol}{2}
  \Bibleref{Psa.}{20}{1} May the \Yhwh{Lord} answer\Translatorsnote{2}
  you\Studynote{3} when you are in trouble;\Studynote{4} may the God
  of Jacob\Studynote{5} make you secure!
  \switchcolumn
  \Bibleref{Psa.}{20}{1} May the \Yhwh{Lord} answer you \Crossref{a}in
  the day of trouble!  May the \Crossref{b}name of the \Crossref{c}God
  of Jacob set you \Implied{securely} on high! \par
  \Bibleref{Psa.}{20}{1} May the \Yhwh{Lord} answer you \Crossref{a}in
  the day of trouble!  May the \Crossref{b}name of the \Crossref{c}God
  of Jacob set you \Implied{securely} on high!
  \switchcolumn*
  \Bibleref{Psa.}{20}{1} May the \Yhwh{Lord} answer\Translatorsnote{2}
  you\Studynote{3} when you are in trouble;\Studynote{4} may the God
  of Jacob\Studynote{5} make you secure!
\end{paracol}

\vspace{3ex}

\begin{center}
  Without column synchronization:
\end{center}
\begin{paracol}{2}
  \Bibleref{Psa.}{20}{1} May the \Yhwh{Lord} answer\Translatorsnote{2}
  you\Studynote{3} when you are in trouble;\Studynote{4} may the God
  of Jacob\Studynote{5} make you secure!
  \switchcolumn
  \Bibleref{Psa.}{20}{1} May the \Yhwh{Lord} answer you \Crossref{a}in
  the day of trouble!  May the \Crossref{b}name of the \Crossref{c}God
  of Jacob set you \Implied{securely} on high! \par
  \Bibleref{Psa.}{20}{1} May the \Yhwh{Lord} answer you \Crossref{a}in
  the day of trouble!  May the \Crossref{b}name of the \Crossref{c}God
  of Jacob set you \Implied{securely} on high!
  \switchcolumn
  \Bibleref{Psa.}{20}{1} May the \Yhwh{Lord} answer\Translatorsnote{2}
  you\Studynote{3} when you are in trouble;\Studynote{4} may the God
  of Jacob\Studynote{5} make you secure!
\end{paracol}

\end{document}

enter image description here

You must log in to answer this question.

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