5

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.

  • 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
10

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}

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.