# Ordering vertically aligned words into a paragraph

I am compiling a text in Latin and need to have the pronunciation guide beneath each word. The actual word will be in a larger font size than the guide beneath it, so that the guide never is longer than the word above it. I want build an entire paragraph this way, matching each word with its pronunciation. I plan on building a \newcommand so that I can enter two paragraphs of text, one in Latin and the other made up of the pronunciation guides, and zip them together - otherwise this project will take forever. I am trying to do something like the \underset command.

Right now I am trying to use tabularx and minipage. I have two issues here:

1. My minipages are not able to line up perfectly and automatically.
2. The tables are adding too much space below the paragraphs, probably because of the \raisebox command.

Alternatively, is there a way to move a single word to its left the length of the word before it? There has to be something like this but I cannot find it.

This question is similar to what I want, but not exact, since I have to combine two paragraphs of text.

Here is what I have thus far:

\documentclass[11pt, twoside, notitlepage]{article}

\usepackage{geometry}
\geometry{letterpaper}
\usepackage{showframe}
\usepackage{libertine}
\usepackage{tabularx}
\usepackage{float}

\begin{document}

\begin{minipage}{0.18\textwidth}
\begin{tabularx}{\textwidth}{|@{}l@{}|}
\Large{\raisebox{-1ex}{juventútem}} \\
\small{\raisebox{3ex}{yoo-ven-too-tem}} \\
\end{tabularx}
\end{minipage}%
\begin{minipage}{0.18\textwidth}
\begin{tabularx}{\textwidth}{|X|}
\Large{\raisebox{-1ex}{juventútem}} \\
\small{\raisebox{3ex}{yoo-ven-too-tem}} \\
\end{tabularx}
\end{minipage}%

% ALTERNATIVE: move the \small{} to the left, inline with the \Large{}
\Large{juventútem}%
\small{\raisebox{-2ex}{yoo-ven-too-tem}}

% THIS IS NOT QUITE WHAT I NEED:
% $\underset{juventútem}{yoo-ven-too-tem}$

\end{document}


EDIT: This is what I am trying to achieve, but with a single function/command, rather than the 20 or so that this required, using Steven B. Segletes' solution. This isn't bad, just time consuming to write out:

Code:

\newcommand{\server}[1]{%
\noindent
#1
}
\newcommand{\subword}[2]{%
\noindent
\begin{justifying}
\stackunder{\Large\ #1}{\tiny\ #2}%
\end{justifying}
}
\server{\subword{Suscípiat}{Soo-shee´pee-ott} \subword{Dóminus}{Doh´mee-noos} \subword{sacrifícium}{sah-kree-fee´chee-oom} \subword{de}{day} \subword{mánibus}{mah´nee-boose} \subword{tuis,}{too-eese,} \subword{ad}{ahd} \subword{laudem}{lou´dem} \subword{et}{ett} \subword{glóriam}{gloh´ree-ahm} \subword{nominis}{noh´mee-neese} \subword{sui,}{soo´ee,} \subword{ad}{ahd} \subword{utilitátem}{oo-tee-lee-tah´tem} \subword{quoque}{quoh´quay} \subword{nostram,}{noh´strahm,} \subword{totiúsque}{tohd-see-oos´quay} \subword{Ecclésiæ}{at-clay´see-ay} \subword{suæ}{soo´ay} \subword{sanctæ.}{sahnk´tay.}}

• size commands do not take an argument: \small{zzz} makes the rest of the document small, not just zzz Oct 18, 2021 at 16:26
• @DavidCarlisle thanks! Correction made. Oct 19, 2021 at 14:19

An approach with stackengine. See SUPPLEMENT for an automated version, after a fashion.

\documentclass[11pt, twoside, notitlepage]{article}
\usepackage{geometry}
\geometry{letterpaper}
\usepackage{showframe}
\usepackage{libertine}
%\usepackage{tabularx}
%\usepackage{float}
\usepackage{stackengine,scalerel}
\newcommand\pronounce[2]{%
\stretchleftright{|}
{\stackengine{10pt}{\Large #1\strut}{\small #2\strut}{U}{c}{F}{F}{L}}
{|}%
}
\begin{document}
\noindent
\pronounce{juventútem}{yoo-ven-too-tem}
\pronounce{fubar}{foo-barr}
\pronounce{juventútem}{yoo-ven-too-tem}
\pronounce{fubar}{foo-barr}
\pronounce{juventútem}{yoo-ven-too-tem}
\pronounce{fubar}{foo-barr}
\pronounce{juventútem}{yoo-ven-too-tem}
\pronounce{fubar}{foo-barr}
\pronounce{juventútem}{yoo-ven-too-tem}
\pronounce{fubar}{foo-barr}
\pronounce{juventútem}{yoo-ven-too-tem}
\pronounce{fubar}{foo-barr}
\end{document}


SUPPLEMENT

Here is one attempt to create a form of automation, assuming that both the paragraph and its pronunciated form share identical format of spaces and punctuation.

\documentclass[11pt, twoside, notitlepage]{article}
\usepackage{geometry}
\geometry{letterpaper}
\usepackage{showframe}
\usepackage{libertine}
%\usepackage{tabularx}
%\usepackage{float}
\usepackage{stackengine,scalerel,listofitems}
\newcommand\pronounce[2]{%
\stretchleftright{|}
{\stackengine{10pt}{\Large #1\strut}{\small #2\strut}{U}{c}{F}{F}{L}}
{|}%
}
\newcommand\pronouncepars[2]{%
\setsepchar{ ||,||.||?||!}%
\foreachitem\z\in\thewords[]{%
\ifx\z\empty\else
\pronounce{\z}{\thepronunciations[\zcnt]}%
\fi
\thewordssep[\zcnt]%
}%
}
\begin{document}
\pronouncepars{Give me liberty, or give me death!
These are the words of Patrick Henry.}
{Giv mee lib-er-tee, or giv mee deth!
Theez ar the wordz of Pat-rik Hen-ree.}
\end{document}


• This seems to be the only realistic way to do it -- time consuming though. I know that I could speed things up with Python, which I am way more familiar with, but is there a way to do this within LaTeX? I was looking at if/while statements and for loops but it seems pretty limited. Ideally, I would like to join two paragraphs together with something like Python's zip function. Oct 19, 2021 at 12:34
• @Senrab Will every word in the paragraph have a pronunciation attached, or only certain words? Oct 19, 2021 at 16:03
• Each word. I will update the question with an image of what I want. I have nearly finished with the project, but would still like to find an easier method, for the future. Oct 19, 2021 at 20:25
• @Senrab Please see the SUPPLEMENT to my answer. Oct 20, 2021 at 1:49

Please forgive me but I couldn't resist showing off the longest Latin text I remember; displaying two lines using Steven B. Segletes answer's code.

• LOL! Very clever! Oct 20, 2021 at 2:44

I borrowed Setven's example text but simplyuse a tabular here.

\documentclass[11pt, twoside, notitlepage]{article}
\usepackage{geometry}
\geometry{letterpaper}
\usepackage{showframe}
\usepackage{libertine}
%\usepackage{tabularx}
%\usepackage{float}

\newcommand\pronounce[2]{%
\begin{tabular}[t]{@{}c@{}}#1\\\footnotesize#2\end{tabular}%
}
\begin{document}
\raggedright

\noindent
\pronounce{juventútem}{yoo-ven-too-tem}
\pronounce{fubar}{foo-barr}
\pronounce{juventútem}{yoo-ven-too-tem}
\pronounce{fubar}{foo-barr}
\pronounce{juventútem}{yoo-ven-too-tem}
\pronounce{fubar}{foo-barr}
\pronounce{juventútem}{yoo-ven-too-tem}
\pronounce{fubar}{foo-barr}
\pronounce{juventútem}{yoo-ven-too-tem}
\pronounce{fubar}{foo-barr}
\pronounce{juventútem}{yoo-ven-too-tem}
\pronounce{fubar}{foo-barr}
\end{document}