I'm trying to create a command to use when I need to translate the language or make examples to both languages. So far I have created a box around the text and two columns, one for each language.
\newcommand{\biling}[3]{%
\begin{tcolorbox}[colback=blue!10!white,boxrule=0pt]
\begin{center}%
\begin{minipage}{#3cm}%
\flushright%
#1%
\end{minipage}\hspace{.5cm}%
\begin{minipage}{#3cm}%
\flushleft%
#2%
\end{minipage}%
\end{center}%
\end{tcolorbox}%
}
It works in the two first boxes, but on the following chapter it's vertically misaligned as you can see in the image:
The entire code is shown below:
\documentclass[12pt,a4paper]{book}
\usepackage{geometry}
\geometry{hmargin = 2cm}
\usepackage{fontspec}
\usepackage{polyglossia}
\setdefaultlanguage{english}
\disablehyphenation
\usepackage{mathastext}
\def\dtch{\( \dot{H} \)}
\def\dth{\( \dot{h} \)}
\def\dtcm{\( \dot{M} \)}
\def\dtm{\( \dot{m} \)}
\def\dtcy{\( \dot{Y} \)}
\def\dty{\( \dot{y} \)}
\usepackage{tcolorbox}
\usepackage{xcolor}
\newcommand{\biling}[3]{%
\begin{tcolorbox}[colback=blue!10!white,boxrule=0pt]
\begin{center}%
\begin{minipage}{#3cm}%
\flushright%
#1%
\end{minipage}\hspace{.5cm}%
\begin{minipage}{#3cm}%
\flushleft%
#2%
\end{minipage}%
\end{center}%
\end{tcolorbox}%
}
\title{Comprehensive Guide To Þerysh}
\begin{document}
Starting with the basics we have the conjugation for the verb to be.
\biling{I am \\
You are \\
He is \\
She is \\
It is \\
We are \\
You are \\
They are}%
%
{À ty \\
\dtcy\ ty \\
Þi ty \\
Þa ty \\
Iss ty \\
Jos ty \\
Wos ty \\
Ðè ty}
{2}
The conjugation of the verb to be is the same for every person. It's important to notice that you singular form is a different word from a you plural form. Let's take a look in some examples of sentences:
\biling{
F \dty\ kn \textcolor{red}{bohw} ess, \dty\ ty ðróss! \\
\dtch, \dtm\ cwaþ \textcolor{red}{ty} Bjorn. \\
Iss ty h lajr \textcolor{red}{ganyst} \dty. \\
À \textcolor{red}{valtur} portugsh. \\
Þa \textcolor{red}{almie} þi. \\
Ðè \textcolor{red}{svo} h kr. \\
Jos \textcolor{red}{fint} mísk.}%
%
{If you can \textcolor{red}{read} this, you're awesome! \\
Hi, my name \textcolor{red}{is} Bjorn. \\
It's a pleasure to \textcolor{red}{meet} you. \\
I \textcolor{red}{speak} portuguese. \\
She \textcolor{red}{loves} he. \\
They \textcolor{red}{see} a car. \\
We \textcolor{red}{listen} to music.}
{7}
\chapter{The Present Tense}
To form the \textsc{present tense} one simply conjugates the verb in its primal form to all persons to express the idea of an action or something that is currently going on or habitually performed, or a state that currently or generally exists. If one wants to say that someone eats, the verb to be conjugated is \textit{ctom}.
\biling{À ctom \\
\dtcy\ ctom \\
Þi ctom \\
Þa ctom \\
Iss ctom \\
Jos ctom \\
Wos ctom \\
Ðè ctom}%
%
{I eat \\
You eat \\
He eats \\
She eats \\
It eats \\
We eat \\
You eat \\
They eat}%
{3}
\end{document}
How to align it? Is there a package, or a command or an environment that already does that? I'm compiling it with LuaLaTeX.