I want to create a big single curly bracket over a paragraph of text. I will be using this for many, many paragraphs. I want to make it left and/or right idented. This is for a conversational styled work.
Edit 1: What I want:
I would like to know the same for square brackets, too. I've tried using some normal math modes, but the text goes off the page.
Edit 2: I'm now using the first response here: by Peter Grill: Dynamically sized brackets/parentheses for text
How can I get the LEFT bracket to "work" without all the text being compressed on one side? I get badness 10000.
Dump:
\documentclass[12pt]{memoir}
\newcommand{\LBracket}[4][0.1\textwidth]{%
\begin{math}%
\left.%
\parbox{#1}{#3}\vphantom{\parbox{#1}{#4}}%
\right#2%
\parbox{#1}{#4}\vphantom{\parbox{#1}{#3}}%
\end{math}
}%
\newcommand{\RBracket}[4][0.9\textwidth]{%
\begin{math}%
\left.%
\parbox{#1}{#3}\vphantom{\parbox{#1}{#4}}%
\right#2%
\parbox{#1}{#4}\vphantom{\parbox{#1}{#3}}%
\end{math}
}%
\begin{document}
\RBracket{)}
{Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsu}
{Words}% Use a round )
\LBracket{\{}
{Words}
{Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsu}% ETC
\end{document}
Edit 3: In the interim: i'm using Werner's response in the link above. I am able to rescale without much trouble. But changing symbols is I cannot do.
How can I change the bracket symbol? e.g. to { or [ etc.? I cannot find where this controlled for in the code.
\documentclass[11pt]{memoir}
\usepackage[margin=15mm]{geometry}% http://ctan.org/pkg/geometry
\usepackage{xparse}% http://ctan.org/pkg/xparse
\usepackage{varwidth}% http://ctan.org/pkg/varwidth
\begin{document}
\newsavebox{\leftbox} \newsavebox{\rightbox}%
\NewDocumentCommand{\lrboxbrace}{s O{0.05\linewidth} m O{0.8\linewidth} m}{% \lrboxbrace[<lwidth>]{<ltext>}[<rwidth>]{<rtext>}
\begin{lrbox}{\leftbox}% Left box
\IfBooleanTF{#1}% starred/unstarred
{\begin{varwidth}{#2}#3\end{varwidth}}
{\begin{minipage}{#2}#3\end{minipage}}
\end{lrbox}
\begin{lrbox}{\rightbox}% Right box
\IfBooleanTF{#1}% starred/unstarred
{\begin{varwidth}{#4}#5\end{varwidth}}
{\begin{minipage}{#4}#5\end{minipage}}
\end{lrbox}
\ensuremath{\left.\usebox\leftbox\rule{0pt}{\ht\rightbox}\right\}\usebox\rightbox}
}
\lrboxbrace%
{Word}%
{Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed eleifend
tincidunt enim, eu tincidunt felis auctor quis. Aenean eget enim urna.
Pellentesque tincidunt adipiscing velit a fermentum. \endgraf
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed eleifend
tincidunt enim, eu tincidunt felis auctor quis. Aenean eget enim urna.
Pellentesque tincidunt adipiscing velit a fermentum.}
\end{document}
Edit 4: For the paragraph with only one bracket, I'm trying to figure a solution. Went I try to leave an empty space in the brackets where "Word" would be, it causes a misalignment. The two paragraphs are no longer placed perfectly underneath each other. The one with {} is positioned slightly left to the first paragraph.
Obviously this is due to the proportional sizes specified. But I want that to remain so it can adjust according to any document specific. But in the interim I put an underscore there, but it brings up bad errors. What should I do?
Tex:
\documentclass[oldfontcommands,12pt]{memoir}
\usepackage[margin=1in, paperwidth=8.5in, paperheight=11in]{geometry}% http://ctan.org/pkg/geometry
\usepackage{xparse}% http://ctan.org/pkg/xparse
\usepackage{varwidth}% http://ctan.org/pkg/varwidth
\usepackage{musixtex}
\usepackage{feyn}
\usepackage{feynmp}
% Bracket commands:
%% Box array setup:
\newsavebox{\leftbox} \newsavebox{\rightbox}%
%%% Box Bracket Command:
\NewDocumentCommand{\boxbrace}{s O{\{} O{\}} O{0.05\linewidth} m O{0.8\linewidth} m}{% \lrboxbrace[<lbrace>][<rbrace>][<lwidth>]{<ltext>}[<rwidth>]{<rtext>}
\begin{lrbox}{\leftbox}% Left box
\IfBooleanTF{#1}% starred/unstarred
{\begin{varwidth}{#4}#5\end{varwidth}}
{\begin{minipage}{#4}#5\end{minipage}}
\end{lrbox}
\begin{lrbox}{\rightbox}% Right box
\IfBooleanTF{#1}% starred/unstarred
{\begin{varwidth}{#6}#7\end{varwidth}}
{\begin{minipage}{#6}#7\end{minipage}}
\end{lrbox}
\ensuremath{\usebox\leftbox\left#2\,\usebox\rightbox\,\right#3}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
Example of full brackets on both sides. By default it fully covers
both sides of the paragraph.
\begin{center}
\boxbrace {abc}%
{Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed
eleifend tincidunt enim, eu tincidunt felis auctor quis. Aenean eget
enim urna. Pellentesque tincidunt adipiscing velit a
fermentum. \endgraf Lorem ipsum dolor sit amet, consectetur
adipiscing elit. Sed eleifend tincidunt enim, eu tincidunt felis
auctor quis. Aenean eget enim urna. Pellentesque tincidunt
adipiscing velit a fermentum.}
\end{center}
Example of only one bracket: just fill the relevant comment area with
a single full stop.
\begin{center}
\boxbrace [\lbrace][.] {abc}%
{Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed
eleifend tincidunt enim, eu tincidunt felis auctor quis. Aenean eget
enim urna. Pellentesque tincidunt adipiscing velit a
fermentum. \endgraf Lorem ipsum dolor sit amet, consectetur
adipiscing elit. Sed eleifend tincidunt enim, eu tincidunt felis
auctor quis. Aenean eget enim urna. Pellentesque tincidunt
adipiscing velit a fermentum.}
\end{center}
With a second one to follow
\begin{center}
\boxbrace [.][\rbrace] {_}%
{Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed
eleifend tincidunt enim, eu tincidunt felis auctor quis. Aenean eget
enim urna. Pellentesque tincidunt adipiscing velit a
fermentum. \endgraf Lorem ipsum dolor sit amet, consectetur
adipiscing elit. Sed eleifend tincidunt enim, eu tincidunt felis
auctor quis. Aenean eget enim urna. Pellentesque tincidunt
adipiscing velit a fermentum.}
\end{center}
Errors turn up here. Otherwise with just a space it's misaligned like
this:
\begin{center}
\boxbrace [.][\rbrace] { }%
{Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed
eleifend tincidunt enim, eu tincidunt felis auctor quis. Aenean eget
enim urna. Pellentesque tincidunt adipiscing velit a
fermentum. \endgraf Lorem ipsum dolor sit amet, consectetur
adipiscing elit. Sed eleifend tincidunt enim, eu tincidunt felis
auctor quis. Aenean eget enim urna. Pellentesque tincidunt
adipiscing velit a fermentum.}
\end{center}
\end{document}
Edit 5: Bach again! Currently attempting a dual bracket thing: where word {para}{para} word are all on one line. I'm trying to play around with the code. But I cannot seem to get it to work. Here's my attempt. Any advice much appreciated!
Command:
%% Dual Convo Bracket Command:
\NewDocumentCommand{\dboxbrace}{s O{\{} O{\}} O{0.05\linewidth} m O{0.4\linewidth} m }{% \lrboxbrace[<lbrace>][<rbrace>][<lwidth>]{<ltext>}[<rwidth>]{<rtext>}
\begin{lrbox}{\leftlatbox}% Left Lateral box
\IfBooleanTF{#1}% starred/unstarred
{\begin{varwidth}{#4}#5\end{varwidth}}
{\begin{minipage}{#4}#5\end{minipage}}
\end{lrbox}
\begin{lrbox}{\rightmedbox}% Right Medial box
\IfBooleanTF{#1}% starred/unstarred
{\begin{varwidth}{#6}#7\end{varwidth}}
{\begin{minipage}{#6}#7\end{minipage}}
\begin{lrbox}{\leftmedbox}% Left Medial box
\IfBooleanTF{#1}% starred/unstarred
{\begin{varwidth}{#4}#5\end{varwidth}}
{\begin{minipage}{#4}#5\end{minipage}}
\end{lrbox}
\begin{lrbox}{\rightlatbox}% Right Lateral box
\IfBooleanTF{#1}% starred/unstarred
{\begin{varwidth}{#6}#7\end{varwidth}}
{\begin{minipage}{#6}#7\end{minipage}}
\end{lrbox}
\ensuremath{\usebox\leftlatbox\left#2\usebox\rightmedbox\right#3\left#2\usebox\leftmedbox\right#3\usebox\rightlatbox}
}
Example of attempted use
%% Example of dual Work
\begin{center}
\dboxbrace {word} {Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed
eleifend tincidunt enim, eu tincidunt felis auctor quis. Aenean eget
enim urna. Pellentesque tincidunt adipiscing velit a
fermentum. \endgraf Lorem ipsum dolor sit amet, consectetur
adipiscing elit. Sed eleifend tincidunt enim, eu tincidunt felis
auctor quis. Aenean eget enim urna. Pellentesque tincidunt
adipiscing velit a fermentum.} {Lorem ipsum dolor sit amet, sectetur adipiscing elit. Sed
eleifend tincidunt enim, eu tincidunt felis auctor quis. Aenean eget
enim urna. Pellentesque tincidunt adipiscing velit a
fermentum. \endgraf Lorem ipsum dolor sit amet, consectetur
adipiscing elit. Sed eleifend tincidunt enim, eu tincidunt felis
auctor quis. Aenean eget enim urna. Pellentesque tincidunt
adipiscing velit a fermentum.} {word}
\end{center}
Best Answer
The brace in Werner's code is hiding in the final line of the macro as
\}
preceeded by\right
. Here is a simple modification of his code to make the brace an optional argument, providing a right brace too and tweaking a bit of spacing: