7

For language learning purposes I would like to use curly brackets with an selection of objects (multiple lines of text, no math environment like this).

Result needed

But the code

\documentclass[12pt]{extarticle}
\usepackage[a4paper,verbose]{geometry}
\usepackage{fontspec}
\usepackage{empheq}

\setmainfont[Ligatures=TeX]{Gentium Plus}


\begin{document}

I want to buy
\begin{empheq}[left=\empheqlbrace,right=\empheqrbrace]{align*}
    tomatoes \\
    onions \\
    cucumbers
\end{empheq}
in the market.

\end{document}

produces

Wrong result

In addition the words within the brackets should be left aligned.

Hannes
  • 409
  • To expand on David's answer: you need an alignment environment that aligns to the left (align* alternates between right and left alignment). You also need something to switch to text mode, like \text{tomatoes}. David used a tabular environment to perform both of these functions. – Dan Nov 18 '14 at 20:57
  • Thank you for this clarification, Dan. I use a math environment but within that I switch to a text environment. – Hannes Nov 19 '14 at 14:46

1 Answers1

14

enter image description here

\documentclass[12pt]{extarticle}
\usepackage[a4paper,verbose]{geometry}

\begin{document}

I want to buy
$\left\{
\begin{tabular}{@{}l@{}}
    tomatoes \\
    onions \\
    cucumbers
\end{tabular}
\right\}$
in the market.

\end{document}
David Carlisle
  • 757,742