1

I am trying to create numbered LFG-style lexical entries that consist of three columns:

  1. the actual item
  2. the category
  3. functional equations.

I tried to use tabular environment to make them. However, the lexical entries appear misaligned like on this picture:

enter image description here

Could someone help me to align them properly?

\documentclass[10pt,a4paper]{article}
\usepackage{linguex}



\begin{document}


\ex.
\a. 
\begin{tabular}[t]{lll}
\textit{pje} &N& ($\uparrow$ \textsc{pred}) = `\textsc{lièvre}'\\
\end{tabular}
\mbox{}\\
\b.
\begin{tabular}[t]{lll}
\textit{le} &D&   ($\uparrow$ \textsc{def} ) = -\\
& & ($\uparrow$ \textsc{nbre}) = \textsc{sg}\\
& & ($\uparrow$ \textsc{gnre}) = 3\\
\end{tabular}
\mbox{}\\
\c. 
\begin{tabular}[t]{lll}
\textit{dunugnan} & \mbox{} \mbox{} \mbox{} N & \mbox{} \mbox{}  ($\uparrow$ \textsc{pred} ) = `\textsc{monde}'\\
\end{tabular}


\end{document}

2 Answers 2

2

(updated this answer after receiving additional information from the OP)

Instead of using independent tabular environments, I'd like to suggest you employ a common one, with pre-defined column widths.

I'd further like to suggest streamlining some formatting tasks, such as assigning automatic italic mode to column 1 and automatic small-caps mode to columns 3 and 4.

enter image description here

\documentclass[10pt,a4paper]{article}
\usepackage{linguex,booktabs,array}
\newcommand\mytab[1]{\begin{tabular}[t]{@{} %
   >{\itshape}wl{1.5cm} l >{\scshape}wl{1.5cm} @{\,} >{\scshape}l @{}}
   #1 \\
   \end{tabular}}

\begin{document}

\ex.
\a. \mytab{pje     & N & ($\uparrow$ pred) &= `lièvre'}
\b. \mytab{le      & D & ($\uparrow$ def)  &= -- \\
                   &   & ($\uparrow$ nbre) &= sg \\
                   &   & ($\uparrow$ gnre) &= 3  }
\c. \mytab{dunugna & N & ($\uparrow$ pred) &= `monde'}

\end{document}
4
  • Thanks a lot. That works. But the numbering of the examples and the reference to them will be difficult since in the tabular environment, I cannot include \ex., \a., \b. etc. I saw that you put them manually. But what if I want to refer to example 1b? Oct 19, 2023 at 6:56
  • @SiluéLacina - You wrote, "I cannot include \ex ... I saw that you put them manually". That's not the case, since the example does use \ex. I'll update the code to allow the use of \a, \b, etc.
    – Mico
    Oct 19, 2023 at 7:12
  • In fact, the ex. has to be put before the tabular environment, not inside it. If not, there will be some errors. This means that I cannot put the commands \a., \b. etc inside that environment either. Oct 19, 2023 at 7:16
  • @SiluéLacina - Please see the updated answer I posted a few minutes ago.
    – Mico
    Oct 19, 2023 at 7:47
2

Like this:

enter image description here

You need to prescribe the width of the first columns:

\documentclass[10pt,a4paper]{article}
\usepackage{linguex}
\usepackage{array}
\newlength{\colwidth}
\settowidth\colwidth{\textit{dugugnamn}}  % the widest column text


\begin{document}

\ex.
\a. \begin{tabular}[t]{>{\itshape}w{l}{\colwidth} l >{\scshape}l}
    pje         & N & ($\uparrow$ pred) = `lièvre'
    \end{tabular}   \medskip
\b. \begin{tabular}[t]{>{\itshape}w{l}{\colwidth} l >{\scshape}l}
    le          & D & ($\uparrow$ def)  = --   \\
                &   & ($\uparrow$ nbre) = sg   \\
                &   & ($\uparrow$ gnre) = 3
    \end{tabular}   \medskip
\c. \begin{tabular}[t]{>{\itshape}w{l}{\colwidth} l >{\scshape}l}
    dunugnan    & N & ($\uparrow$ pred) = `monde'
    \end{tabular}

\end{document}
3
  • Thanks. That works. Could you explain me why there is a `w' before the \colwidth command and why we have {l} instead of l? Oct 19, 2023 at 6:58
  • 1
    +1. You may want to replace \settowidth\colwidth{dugugnam} with \settowidth\colwidth{\textit{dugugnam}}, though.
    – Mico
    Oct 19, 2023 at 7:09
  • 1
    hapw i@Mico, you are right. This text in table is in \itshape ... corrected now!
    – Zarko
    Oct 19, 2023 at 7:26

You must log in to answer this question.

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