5

I would like to align text using the align* environment.

What I would like to do in the example below is to align the different elements inside the braces after # meaning. So, I would like to have indefinite(?x), masculine(?x) and singular(?x) below each other and aligned.

I have tried inserting another align* environment, but this gives me the error: Argument of \align* has an extra }

How can I do this? If this can be done in another way, i.e. not using the align* environment, this is fine for me either.

enter image description here

\documentclass{article}
\usepackage{amsmath}
\begin{document} 

\begin{footnotesize}
    \begin{align*}
    &\left[
        \begin{tabular}{l}
            \textbf{?un-word}\\
            \hline \hline
            args: \lbrack ?x \rbrack\\
            syn-cat: \\
            \qquad lex-cat: article \\
            \qquad number: singular \\
            \qquad gender: masculine \\
        \end{tabular}
    \right]
    \leftarrow
    &\left[
        \begin{tabular}{l}
            \textbf{?un-word}\\
            \hline \hline
            \# meaning: \{indefinite(?x), masculine(?x), singular(?x)\}\\
            \hline
            \# form: \{string(?un-word, un)\}\\
        \end{tabular}
    \right]
    \tag{un-cxn}
    \end{align*}
\end{footnotesize}
\end{document}

1 Answer 1

6

I think it's not possible to use align environments inside tabular, but you can use tabular inside other tabulars. In this case you can align all elements after meaning with a new tabular with option [t] to align its top line with previous text. The final brace } is included after last element, because I don't know how to align with bottom tabular line.

\documentclass{article}
\usepackage{amsmath}
\begin{document} 

\begin{footnotesize}
    \begin{align*}
    &\left[
        \begin{tabular}{l}
            \textbf{?un-word}\\
            \hline \hline
            args: \lbrack ?x \rbrack\\
            syn-cat: \\
            \qquad lex-cat: article \\
            \qquad number: singular \\
            \qquad gender: masculine \\
        \end{tabular}
    \right]
    \leftarrow
    &\left[
        \begin{tabular}{l}
            \textbf{?un-word}\\
            \hline \hline
            \# meaning: \{\begin{tabular}[t]{@{}l@{}}
                                    indefinite(?x),\\ 
                                    masculine(?x),\\
                                    singular(?x)\}
                                    \end{tabular}\\
            \hline
            \# form: \{string(?un-word, un)\}\\
        \end{tabular}
    \right]
    \tag{un-cxn}
    \end{align*}
\end{footnotesize}
\end{document}

enter image description here

4
  • This is not what I mean in my question. I would like indefinite(?x), masculine(?x) and singular(?x) to be below each other and aligned. The three elements inside the curly braces, after # meaning in the right part.
    – JNevens
    Dec 28, 2015 at 16:06
  • @JNevens Sorry, I've misunderstood the question. I've updated my answer, is it better now?
    – Ignasi
    Dec 28, 2015 at 17:08
  • I would get rid of the align and use equation without the &s.
    – Werner
    Dec 28, 2015 at 17:46
  • @Ignasi This is what I was looking for, thank you! @Werner In this example, the outer align* environment is indeed useless, but I have some bigger constructions like this where alignment is done on left[
    – JNevens
    Dec 28, 2015 at 18:06

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.