Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!ucla-cs!oahu.cs.ucla.edu!kirkaas From: kirkaas@oahu.cs.ucla.edu (paul kirkaas) Newsgroups: comp.text.tex Subject: How to include unbalanced brackets `}' in macro substitution? Message-ID: <1991Feb5.023920.20619@cs.ucla.edu> Date: 5 Feb 91 02:39:20 GMT Sender: news@cs.ucla.edu (Shemp News Account) Organization: UCLA Computer Science Department Lines: 29 Nntp-Posting-Host: oahu.cs.ucla.edu I want to define macros that end a group, doing a few cleanup chores in the process --- for example, a \beginvcenter \endvcenter pair to center text vertically in a page. I would like to find a way to either: 1) Include a closing brace `}' as part of the macro substitution or 2) Figure out how to properly use \begingroup & \endgroup to achieve the same end. I have defined a macro \vcenter{ *TEXT* } that will vertically center the argument text within the brackets as follows: \long\def\page{\vbox to\vsize \relax} \long\def\vcenter#1{\page{\vfil #1 \vfil}} What I want to do is define two macros \beginvcenter & \endvcenter which allow me to say: \beginvcenter *TEXT* \endvcenter and I don't know how. -- Paul Kirkaas kirkaas@cs.ucla.edu