LaTeX LaTeX won't let me create a macro to \begin{split}

  • Thread starter Thread starter joftius
  • Start date Start date
  • Tags Tags
    Latex
Click For Summary
SUMMARY

The discussion focuses on creating custom LaTeX commands for the \begin{split} environment. The user attempts to define commands \bsp and \esp to encapsulate the split environment within an equation, but encounters a "Runaway argument" error. The error arises because LaTeX does not recognize the custom commands as valid delimiters for the split environment. The user seeks a solution to simplify the syntax for using \begin{equation*} and \begin{split} together.

PREREQUISITES
  • Familiarity with LaTeX command definitions
  • Understanding of the equation and split environments in LaTeX
  • Basic knowledge of error handling in LaTeX
  • Experience with LaTeX packages that enhance mathematical typesetting
NEXT STEPS
  • Research the use of the \newenvironment command in LaTeX
  • Explore the amsmath package for advanced math formatting
  • Learn about LaTeX error messages and debugging techniques
  • Investigate keyboard shortcut tools for LaTeX editing
USEFUL FOR

LaTeX users, mathematicians, and anyone looking to streamline their mathematical document preparation with custom commands.

joftius
Messages
1
Reaction score
0
So I'm trying to do this:

\newcommand{\bq}{\begin{equation*}}
\newcommand{\eq}{\end{equation*}}

\newcommand{\bsp}{\begin{split}}
\newcommand{\esp}{\end{split}}

\bq
\bsp
1 & = 1 \\
2 & = 1 + 1
\esp
\eq

but then LaTeX gives me this error

Runaway argument?
1 & = 1 \\ 2 & = 1 + 1 \esp \eq
! Paragraph ended before \split was complete.

What I really want is just one command to do
\begin{equation*}
\begin{split}
and one command to do the corresponding ends.

Is there any way to do this?

Note: I've tried using \begin{align*} instead, and I get a similar type of weird error.
 
Physics news on Phys.org

Similar threads

  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 9 ·
Replies
9
Views
6K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 5 ·
Replies
5
Views
5K
  • · Replies 8 ·
Replies
8
Views
12K
  • · Replies 11 ·
Replies
11
Views
6K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
5K