# Put a text into Brackets (no math mode)

I want to make something like this. Put a text into Brackets (can be (). {}, [] ..., whatever type is the easiest).

I am looking for an easy way. There are a lot of similar question on this site, yet they need quite a lot of text writing.

Isn´t there any way like:

$\left\lbrace \text{something to write here, also$math$in some parts of the text} \right\rbrace$

• but without the $ and \text{}? • Using MiKTeX Package (on Windows), so having the most packages available. EDIT: The text put into Brackets will be a stand alone text (paragraph), no including in other text. So can be environments like \begin{} \end{}. • Sample text you can use: \textit{Beweis:} \\ - Sei$f(a) = b$injektiv. Setzen$g(b) = a$injektiv.$f\left(g(b)\right) = f(a) = b \Rightarrow f\circ g = id_B \Rrightarrow$B. Für$f\left(g(b)\right) \neq b$gilt dies nicht. \\ -$g\left(f(a)\right) = g(b) = a \Rightarrow g\circ f = id_A \Rrightarrow$A Feb 9, 2015 at 10:57 • Feb 9, 2015 at 11:02 • Yes, I am aware of that site. Yet the easiest answert there is like this: - use three packages (not that much of a problem) - define a command (with 20 lines and only a manual brasket, that wont size as long as the text is) I want a bracket, that automatically changes its size depending on the amount of lines it has to cover. Feb 9, 2015 at 11:07 ## 2 Answers Your question is very far from clear. Here's a hint: \documentclass{article} % This package is just for the example \usepackage{lipsum} \newenvironment{braced} {\par\smallskip\hbox to\columnwidth\bgroup \hss$\left\{\begin{minipage}{\columnwidth}}
{\end{minipage}\right\}\$\hss\egroup\smallskip}

\begin{document}

\lipsum[2]

\begin{braced}
\lipsum[3]
\end{braced}

\lipsum[4]

\end{document}


The environment ends a possible preceding paragraph and inserts a small vertical space. Then it opens an \hbox as wide as the current \columnwidth (you may want to use \linewidth if you plan to use this inside a list environment). In this box math mode is started and \left\{ is issued. Then a minipage is opened, as wide as \columnwidth. This finishes the starting part. The ending part closes the minipage and issues \right\} to balance the left delimiter and closes math mode; then the \hbox is closed and typeset. A small vertical space is added. Since \hss is added at either side of the math formula, the braces will be in the margins (the box is actually wider than \columnwidth, but the shrinkable glue provided by \hss makes it appear to fit).

• Thats it. Would you mind explaining what exactly the \newenvironment{braced} does? - left\{\begin{minipage}{\columnwidth}} {\end{minipage}\right\} I understand that part fully - embracing the environmentwidth with {} Great idea. For what do you need the package "calc"? Feb 9, 2015 at 11:58

With tcolorbox.

\documentclass{article}
\usepackage[many]{tcolorbox}
\usetikzlibrary{decorations.pathreplacing}
\usepackage{lipsum}

\newtcolorbox{braced}[1][]{%
colback=white,
%    boxrule=0pt,
%    boxsep=0pt,
blanker,
frame code={
\draw [line width=1pt,decorate,decoration={brace,amplitude=5pt,raise=2pt,mirror}]
(frame.north west)--(frame.south west);
\draw [line width=1pt,decorate,decoration={brace,amplitude=5pt,raise=2pt}]
(frame.north east)--(frame.south east);
},
width=\linewidth,
before=\par\smallskip\noindent,
after={},
%breakable,
#1}

\begin{document}

\lipsum[2]

\begin{braced}
\lipsum[3]
\end{braced}

\lipsum[4-5]

\end{document}