1

How to make something like this outside math mode?

A sample goes here:

enter image description here

\documentclass{article}

\begin{document}

$$\left.\begin{aligned}
\text{inclusive} \\
\text{opposite} \\
\text{causal} \\
\text{parallel}
\end{aligned}\right\} \text{relationship}$$

\end{document}

I only know how to do this using \left. and \right\} in the math environment. Is there any ways outside math mode?

4
  • Can you show a complete use case? Is it because you're using \text everywhere that you want it "outside math mode"?
    – Werner
    Apr 8, 2020 at 2:09
  • @Werner Yes, I can only make this with \left. ... \right\{ in math mode and I'm wondering is there something like this outside math mode.
    – Sherry869
    Apr 8, 2020 at 2:12
  • ...yet the answer you accepted uses math mode. Hmmm... what am I missing here.
    – Werner
    Apr 8, 2020 at 3:45
  • Here are solutions without math mode.
    – user194703
    Apr 8, 2020 at 5:17

2 Answers 2

3

You can obtain it in text mode in at least two ways: either with bigdelim of with blkarray:

\documentclass{article}
\usepackage{bigdelim}
\usepackage{delarray}
\usepackage{blkarray}

\begin{document}

  \begin{tabular}{r@{\,}c} %
     inclusive & \rdelim\}{4}{*}[relationship] \\
     opposite \\
     causal \\
     parallel
   \end{tabular}
    \vskip 1em

  \begin{blockarray}{r\Right{\}}{relationship}} %
     inclusive \\
     opposite \\
     causal \\
     parallel
   \end{blockarray}

\end{document} 

enter image description here

5

I think that you need to use math-mode to some extent, however, you can reduce the number of \text{...} statements that you need if you use the rcases* environment from the mathtools package:

\[
  \begin{rcases*}
    & inclusive\\
    & opposite\\
    & casual \\
    & parallel\\
  \end{rcases*}\text{relationship}
\]

This produces:

enter image description here

If you want to pretend that you are not using math-mode then you could wrap this into a command. The easiest way to do this is to define a command, say \MyCases, that takes a comma separated list of the cases that appear to the left of the brace together with the text that appears on the right. With this in place, you would be able to produce the output above using

\MyCases{inclusive, opposite, casual, parallel}{relationship}

The output is essentially the same as before. Here is the full code:

\documentclass{article}
\usepackage{mathtools,etoolbox}

% \MyCases{comma separated list of cases}{right hand text}
\newcommand\MyCases[2]{%
   \[
     \renewcommand*{\do}[1]{&##1\\}% a line in the rcases* environment
     \begin{rcases*}
       \docsvlist{#1}% add the cases
      \end{rcases*}\text{#2}
   \]
}

\begin{document}

\[
  \begin{rcases*}
    & inclusive\\
    & opposite\\
    & casual \\
    & parallel\\
  \end{rcases*}\text{relationship}
\]

\MyCases{inclusive, opposite, casual, parallel}{relationship}

\end{document}

A few remarks about how the \MyCases command works. The key point is to use the \docsvlist command from the etoolbox package to loop over the contents of the comma separated list. This is done by redefining the \do command. After this, we are essentially just doing what I did above using the rcases* environment.

You must log in to answer this question.

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