Can I replace the begin and end of an environment just with a pair of braces {} where the left brace { will take care of the \begin{} part and right brace } will function like the \end{} part? This is slightly similar to using \centering in place of \begin{center} and \end{center}.
See this MWE with the alignment environment below.
\documentclass{article}
\usepackage{amsmath}
\def\blgn#1\elgn{\begin{align}#1\end{align}}
% I want to define something like \align{} where
% the left brace { will take care of the \begin part
% and rigth brace } will function like the\end part.
\begin{document}
\blgn
(a+b)^2 = a^2 + 2ab + b^2.
\elgn
\end{document}
\def\blgn#1{\begin{align}#1\end{align}}but don't do this. – David Carlisle May 02 '23 at 17:33\centering{} in place of \begin{center} and \end{center}???\centeringdoes not have a{ }argument and produces different spacing than\begin{center}..\end{center}– David Carlisle May 02 '23 at 17:35\newcommandinstead of\def? You're right. I have corrected it. However, hope you've got the essence of the question. – hbaromega May 02 '23 at 20:44\begin{align}hiding that in a macro only has disadvantages, but the code in my first comment is the answer to your question if you really need that. I can not see any connection with\centeringas that does not take an argument. – David Carlisle May 02 '23 at 20:48\newcommand{\olist}[1]{\begin{enumerate}#1\end{enumerate}}. Then you would write\olist{\item 1 \item 2}. I think that is harder to maintain, though, because instead of a logical marker for the beginning and the end, you just have the bracket, which could mean a lot of things. This won't work with every environment, as there usually is some reason why an environment was provided instead of a command. – musarithmia May 02 '23 at 21:00\defis used. Ifcenteringdoesn't seem to fit to the analogy, I can recall something frombeamer. There both\frame{}and\begin{frame}...\end{frame}serve the same purpose imo. Anyway, following @musarithmia's suggestion I find both\newcommand{\algn}[1]{\begin{align}#1\end{align}}and\def\algn#1{\begin{align}#1\end{align}}resolve my issue. Thanks. – hbaromega Aug 05 '23 at 10:40