5

In my project I am using the xtab package.

\usepackage{xtab}

\begin{document}
\def\hsa{\hspace{0.03in}}   
\def\hsb{\hspace{0.05in}}
\def\hsc{\hspace{1.01in}}
\def\hsd{\hspace{0in}}
\begin{xtabular}{llp{0.65in}l}  
    Sáncte  &\textbf{Pá}ule,    &\hsb o\textit{ra}      &\hsd \textit{pro} \hsa \textbf{nó}bis. \\
    Sáncte  &An\textbf{dré}a,   &\hsb o\textit{ra}      &\hsd \textit{pro} \hsa \textbf{nó}bis. \\
    Sáncte  &Ja\textbf{có}be,   &\hsb o\textit{ra}      &\hsd \textit{pro} \hsa \textbf{nó}bis. \\
    Sáncte  &Jo\textbf{án}nes,  &\hsb o\textit{ra}      &\hsd \textit{pro} \hsa \textbf{nó}bis. \\
    Sáncte  &\textbf{Thó}ma,    &\hsb o\textit{ra}      &\hsd \textit{pro} \hsa \textbf{nó}bis. \\
    Sáncte  &Ja\textbf{có}be,   &\hsb o\textit{ra}      &\hsd \textit{pro} \hsa \textbf{nó}bis. \\
    ...
\end{xtabular}
\end{document}

Now, I want to adjust the space to the left of the the xtabular table. I could add some \hspace before the table begins, but if the table is long enough to break across pages, the table part on the following page does not honour the \space. I've tried \parskip and \parindent lengths already to no avail.

How can I modify the space there?

2
  • \begin{xtabular}{@{\hspace{2cm}llp{0.65in}} should work (here 2cm is just a random value, adjust to suit).
    – egreg
    Mar 3 '15 at 15:52
  • @egreg That's the answer!
    – bgmCoder
    Mar 3 '15 at 16:03
3

Set the fixed space before the first column specifier.

Here's how I'd typeset the litanies:

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}

\usepackage{xtab}

\newcommand{\ora}{o\textit{ra}}
\newcommand{\orate}{o\textbf{rá}\textit{te}}
\newcommand{\pro}{\textit{pro} \textbf{nó}bis}

\begin{document}

\noindent
Some text to show the left margin

\begin{xtabular}{@{\hspace{2cm}}l@{ }l@{ }l@{ }l@{}}
Sáncte & \textbf{Pá}ule,    & \ora   & \pro \\
Sáncte & An\textbf{dré}a,   & \ora   & \pro \\
Sáncte & Ja\textbf{có}be,   & \ora   & \pro \\
Sáncte & Jo\textbf{án}nes,  & \ora   & \pro \\
Sáncte & \textbf{Thó}ma,    & \ora   & \pro \\
Sáncte & Ja\textbf{có}be,   & \ora   & \pro \\
Sáncti & Phi\textbf{lí}ppe et Ja\textbf{có}be & \orate & \pro \\
\end{xtabular}
\end{document}

Between columns I use normal interword spaces; the left alignment will take care of correct spacing.

Better using macros as I show.

enter image description here

4
  • Wow! Thank you for the advice and the idea for using \newcommand! I wish you would hang out on the #gregorio irc!
    – bgmCoder
    Mar 3 '15 at 16:09
  • Do I have to leave spaces between & and \ora in the code like that? It will work fine without the spaces won't it?
    – bgmCoder
    Mar 3 '15 at 16:50
  • 1
    @BGM Spaces are ignored after & by TeX rule and before it by LaTeX implementation.
    – egreg
    Mar 3 '15 at 16:51
  • That's what I though; so it's just a matter of coding style, then. Thanks again!
    – bgmCoder
    Mar 3 '15 at 17:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.