Adding a large brace next to a body of text

As this is one of the initial, and therefore most visible, incarnations of \tikzmark, I thought it a good idea to update it to an answer using the \tikzmark library.

\documentclass{article}
%\url{https://tex.stackexchange.com/a/1570/86}
\usepackage{tikz}
\usetikzlibrary{decorations.pathreplacing,calc,tikzmark}

\begin{document}

\hfill\tikzmark{right}
\begin{itemize}
\item First line
\item Second line \tikzmark{2nd}
\item Third line, which is quite long and seemingly tedious in the extreme
\item Fourth line, which isn't as long as the third \tikzmark{4th}
\item Fifth line
\end{itemize}

\begin{tikzpicture}[overlay, remember picture]
\node[anchor=base] (a) at (pic cs:2nd) {\vphantom{h}}; % push the mark to the top of the line (ie including ascenders)
\node[anchor=base] (b) at (pic cs:4th) {\vphantom{g}}; % push the mark to the bottom of the line (ie including descenders)
\draw [decoration={brace,amplitude=0.5em},decorate,ultra thick,gray]
 (a.north -| {pic cs:right}) -- (b.south -| {pic cs:right});
\end{tikzpicture}
\end{document}

braces next to text


Original Answer

I'd seriously suggest using tikz for this. Here's an alternative to Caramdir's (excellent) solution:

\documentclass{article}

\usepackage{tikz}
\usetikzlibrary{decorations.pathreplacing,calc}

\newcommand{\tikzmark}[1]{\tikz[overlay,remember picture] \node (#1) {};}

\begin{document}

\hfill\tikzmark{right}
\begin{itemize}
\item First line
\item Second line \tikzmark{2nd}
\item Third line, which is quite long and seemingly tedious in the extreme
\item Fourth line, which isn't as long as the third \tikzmark{4th}
\item Fifth line
\end{itemize}

\begin{tikzpicture}[overlay, remember picture]
\draw [decoration={brace,amplitude=0.5em},decorate,ultra thick,gray]
 ($(right)!(2nd.north)!($(right)-(0,1)$)$) --  ($(right)!(4th.south)!($(right)-(0,1)$)$);
\end{tikzpicture}
\end{document}

What I like about this one is that it doesn't mess around with how the actual data is put in, the decoration is added afterwards almost as an afterthought, which (to me) fits in better with the feel of what you're trying to do.

What isn't so good is the placement of the brace horizontally. Because I don't know how your are typesetting your data, nor what sort of data it is, I've just shoved the brace to the right-hand side. If your data is more structured, as the graphic suggests, then it would be easy to make it appear in the right place. (Indeed, from experimenting, I'd say that if your data isn't nicely structured - by which I mean that the lines should be of similar widths - then a brace at the right-hand side doesn't look good as it's not easy to see exactly which lines it is including or excluding.)


I suggest a variation of Giel's answer with tabular

$\left.\begin{tabular}{l}
line \\
one more line
\end{tabular}\right\}$

(or smth like {tabular}{p{5cm}} if you need not a couple of short lines but a paragraph inside the tabular).


A simpler solution:

\documentclass{article}
\usepackage{lipsum}
\usepackage{schemata}
\begin{document}
\lipsum[1]
\schema[close]{\lipsum[2]}{}
\lipsum[3]
\end{document}

MWE