Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Can I create a logical block (like HTML div element), so I can apply features like \centering locally, but not affect the outside environment?

share|improve this question
4  
You can use them in a group \bgroup.....\egroup. Whatever is used is applied only within that group. –  Harish Kumar Sep 15 '12 at 2:30

1 Answer 1

up vote 15 down vote accepted

Yes. The most basic of these blocks are braces { (for opening) and } (for closing). You can also use \begingroup and \endgroup or \bgroup and \egroup.

When defining your own environment <env>, using \begin{<env>} ... \end{<env>} necessarily forms a group, localizing most modifications.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.