Forgotten brace error when I use left and right
up vote
3
down vote
favorite
I've a simple formula:
documentclass{article}
usepackage{mathtools}
newcommandnorm[1]{leftlVert#1rightrVert}
begin{document}
begin{equation*}
displaystylesumlimits_{mathclap{j in {1,2}}}~frac{q^{0} - q^{j}}{{(norm{q^{0} - q^{j}}^{2} - d^{2}})^{2}}
end{equation*}
end{document}
After adding left
and right
commands to make the parenthesis of the denominator bigger, LaTeX generates the output as follows:
documentclass{article}
usepackage{mathtools}
newcommandnorm[1]{leftlVert#1rightrVert}
begin{document}
begin{equation*}
displaystylesumlimits_{mathclap{j in {1,2}}}~frac{q^{0} - q^{j}}{{left(norm{q^{0} - q^{j}}^{2} - d^{2}}right)^{2}}
end{equation*}
end{document}
but there is an error like Extra }, or forgotten right. ...orm{q^{0} - q^{j}}^{2} - d^{2}}right)^{2}}
. The code is seamlessly compiled without those left
and right
commands.
amsmath
New contributor
add a comment |
up vote
3
down vote
favorite
I've a simple formula:
documentclass{article}
usepackage{mathtools}
newcommandnorm[1]{leftlVert#1rightrVert}
begin{document}
begin{equation*}
displaystylesumlimits_{mathclap{j in {1,2}}}~frac{q^{0} - q^{j}}{{(norm{q^{0} - q^{j}}^{2} - d^{2}})^{2}}
end{equation*}
end{document}
After adding left
and right
commands to make the parenthesis of the denominator bigger, LaTeX generates the output as follows:
documentclass{article}
usepackage{mathtools}
newcommandnorm[1]{leftlVert#1rightrVert}
begin{document}
begin{equation*}
displaystylesumlimits_{mathclap{j in {1,2}}}~frac{q^{0} - q^{j}}{{left(norm{q^{0} - q^{j}}^{2} - d^{2}}right)^{2}}
end{equation*}
end{document}
but there is an error like Extra }, or forgotten right. ...orm{q^{0} - q^{j}}^{2} - d^{2}}right)^{2}}
. The code is seamlessly compiled without those left
and right
commands.
amsmath
New contributor
2
Replace it with:displaystylesumlimits_{mathclap{j in {1,2}}}~frac{q^{0} - q^{j}}{{left(norm{q^{0} - q^{j}}^{2} - d^{2}right)^{2}}}
. Simple rule: Respec the brackets ;)
– Raaja
Nov 28 at 9:39
3
You are enclosingleft
in a group leaving outright
:{left( ... } right)
.
– campa
Nov 28 at 9:41
add a comment |
up vote
3
down vote
favorite
up vote
3
down vote
favorite
I've a simple formula:
documentclass{article}
usepackage{mathtools}
newcommandnorm[1]{leftlVert#1rightrVert}
begin{document}
begin{equation*}
displaystylesumlimits_{mathclap{j in {1,2}}}~frac{q^{0} - q^{j}}{{(norm{q^{0} - q^{j}}^{2} - d^{2}})^{2}}
end{equation*}
end{document}
After adding left
and right
commands to make the parenthesis of the denominator bigger, LaTeX generates the output as follows:
documentclass{article}
usepackage{mathtools}
newcommandnorm[1]{leftlVert#1rightrVert}
begin{document}
begin{equation*}
displaystylesumlimits_{mathclap{j in {1,2}}}~frac{q^{0} - q^{j}}{{left(norm{q^{0} - q^{j}}^{2} - d^{2}}right)^{2}}
end{equation*}
end{document}
but there is an error like Extra }, or forgotten right. ...orm{q^{0} - q^{j}}^{2} - d^{2}}right)^{2}}
. The code is seamlessly compiled without those left
and right
commands.
amsmath
New contributor
I've a simple formula:
documentclass{article}
usepackage{mathtools}
newcommandnorm[1]{leftlVert#1rightrVert}
begin{document}
begin{equation*}
displaystylesumlimits_{mathclap{j in {1,2}}}~frac{q^{0} - q^{j}}{{(norm{q^{0} - q^{j}}^{2} - d^{2}})^{2}}
end{equation*}
end{document}
After adding left
and right
commands to make the parenthesis of the denominator bigger, LaTeX generates the output as follows:
documentclass{article}
usepackage{mathtools}
newcommandnorm[1]{leftlVert#1rightrVert}
begin{document}
begin{equation*}
displaystylesumlimits_{mathclap{j in {1,2}}}~frac{q^{0} - q^{j}}{{left(norm{q^{0} - q^{j}}^{2} - d^{2}}right)^{2}}
end{equation*}
end{document}
but there is an error like Extra }, or forgotten right. ...orm{q^{0} - q^{j}}^{2} - d^{2}}right)^{2}}
. The code is seamlessly compiled without those left
and right
commands.
amsmath
amsmath
New contributor
New contributor
New contributor
asked Nov 28 at 9:36
Pinton
183
183
New contributor
New contributor
2
Replace it with:displaystylesumlimits_{mathclap{j in {1,2}}}~frac{q^{0} - q^{j}}{{left(norm{q^{0} - q^{j}}^{2} - d^{2}right)^{2}}}
. Simple rule: Respec the brackets ;)
– Raaja
Nov 28 at 9:39
3
You are enclosingleft
in a group leaving outright
:{left( ... } right)
.
– campa
Nov 28 at 9:41
add a comment |
2
Replace it with:displaystylesumlimits_{mathclap{j in {1,2}}}~frac{q^{0} - q^{j}}{{left(norm{q^{0} - q^{j}}^{2} - d^{2}right)^{2}}}
. Simple rule: Respec the brackets ;)
– Raaja
Nov 28 at 9:39
3
You are enclosingleft
in a group leaving outright
:{left( ... } right)
.
– campa
Nov 28 at 9:41
2
2
Replace it with:
displaystylesumlimits_{mathclap{j in {1,2}}}~frac{q^{0} - q^{j}}{{left(norm{q^{0} - q^{j}}^{2} - d^{2}right)^{2}}}
. Simple rule: Respec the brackets ;)– Raaja
Nov 28 at 9:39
Replace it with:
displaystylesumlimits_{mathclap{j in {1,2}}}~frac{q^{0} - q^{j}}{{left(norm{q^{0} - q^{j}}^{2} - d^{2}right)^{2}}}
. Simple rule: Respec the brackets ;)– Raaja
Nov 28 at 9:39
3
3
You are enclosing
left
in a group leaving out right
: {left( ... } right)
.– campa
Nov 28 at 9:41
You are enclosing
left
in a group leaving out right
: {left( ... } right)
.– campa
Nov 28 at 9:41
add a comment |
2 Answers
2
active
oldest
votes
up vote
5
down vote
accepted
You have too many useless bits in your code
- inside
equation
,displaystyle
andlimits
are already in force - additional braces in the denominator can be disruptive of spacing
mathclap
is not needed (and is wrong, as the need for~
shows)
Here are my proposals (I'd go with the first one). Note that with my definition of norm
, norm*
is essentially the same as yours.
documentclass{article}
usepackage{mathtools}
%newcommandnorm[1]{leftlVert#1rightrVert}
DeclarePairedDelimiter{norm}{lVert}{rVert}
begin{document}
subsection*{Good}
begin{equation*}
sum_{j in {1,2}} frac{q^{0} - q^{j}}{(norm{q^{0} - q^{j}}^{2} - d^{2})^{2}}
end{equation*}
subsection*{Possibly preferable}
begin{equation*}
sum_{j in {1,2}} frac{q^{0} - q^{j}}{bigl(norm{q^{0} - q^{j}}^{2} - d^{2}bigr)^{2}}
end{equation*}
subsection*{Possibly preferable again}
begin{equation*}
sum_{j in {1,2}} frac{q^{0} - q^{j}}{bigl(norm{q^{0} - q^{j}}^{2} - d^{2}bigr)^{!2}}
end{equation*}
subsection*{Disputable}
begin{equation*}
sum_{j in {1,2}} frac{q^{0} - q^{j}}{left(norm*{q^{0} - q^{j}}^{2} - d^{2}right)^{2}}
end{equation*}
end{document}
add a comment |
up vote
4
down vote
Grouping error in your code, below is the updated code:
begin{equation*}
displaystylesumlimits_{mathclap{j in
{1,2}}}~frac{q^{0} - q^{j}}{{left(norm{q^{0} - q^{j}}^{2} - d^{2}right)}^{2}}
end{equation*}
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
5
down vote
accepted
You have too many useless bits in your code
- inside
equation
,displaystyle
andlimits
are already in force - additional braces in the denominator can be disruptive of spacing
mathclap
is not needed (and is wrong, as the need for~
shows)
Here are my proposals (I'd go with the first one). Note that with my definition of norm
, norm*
is essentially the same as yours.
documentclass{article}
usepackage{mathtools}
%newcommandnorm[1]{leftlVert#1rightrVert}
DeclarePairedDelimiter{norm}{lVert}{rVert}
begin{document}
subsection*{Good}
begin{equation*}
sum_{j in {1,2}} frac{q^{0} - q^{j}}{(norm{q^{0} - q^{j}}^{2} - d^{2})^{2}}
end{equation*}
subsection*{Possibly preferable}
begin{equation*}
sum_{j in {1,2}} frac{q^{0} - q^{j}}{bigl(norm{q^{0} - q^{j}}^{2} - d^{2}bigr)^{2}}
end{equation*}
subsection*{Possibly preferable again}
begin{equation*}
sum_{j in {1,2}} frac{q^{0} - q^{j}}{bigl(norm{q^{0} - q^{j}}^{2} - d^{2}bigr)^{!2}}
end{equation*}
subsection*{Disputable}
begin{equation*}
sum_{j in {1,2}} frac{q^{0} - q^{j}}{left(norm*{q^{0} - q^{j}}^{2} - d^{2}right)^{2}}
end{equation*}
end{document}
add a comment |
up vote
5
down vote
accepted
You have too many useless bits in your code
- inside
equation
,displaystyle
andlimits
are already in force - additional braces in the denominator can be disruptive of spacing
mathclap
is not needed (and is wrong, as the need for~
shows)
Here are my proposals (I'd go with the first one). Note that with my definition of norm
, norm*
is essentially the same as yours.
documentclass{article}
usepackage{mathtools}
%newcommandnorm[1]{leftlVert#1rightrVert}
DeclarePairedDelimiter{norm}{lVert}{rVert}
begin{document}
subsection*{Good}
begin{equation*}
sum_{j in {1,2}} frac{q^{0} - q^{j}}{(norm{q^{0} - q^{j}}^{2} - d^{2})^{2}}
end{equation*}
subsection*{Possibly preferable}
begin{equation*}
sum_{j in {1,2}} frac{q^{0} - q^{j}}{bigl(norm{q^{0} - q^{j}}^{2} - d^{2}bigr)^{2}}
end{equation*}
subsection*{Possibly preferable again}
begin{equation*}
sum_{j in {1,2}} frac{q^{0} - q^{j}}{bigl(norm{q^{0} - q^{j}}^{2} - d^{2}bigr)^{!2}}
end{equation*}
subsection*{Disputable}
begin{equation*}
sum_{j in {1,2}} frac{q^{0} - q^{j}}{left(norm*{q^{0} - q^{j}}^{2} - d^{2}right)^{2}}
end{equation*}
end{document}
add a comment |
up vote
5
down vote
accepted
up vote
5
down vote
accepted
You have too many useless bits in your code
- inside
equation
,displaystyle
andlimits
are already in force - additional braces in the denominator can be disruptive of spacing
mathclap
is not needed (and is wrong, as the need for~
shows)
Here are my proposals (I'd go with the first one). Note that with my definition of norm
, norm*
is essentially the same as yours.
documentclass{article}
usepackage{mathtools}
%newcommandnorm[1]{leftlVert#1rightrVert}
DeclarePairedDelimiter{norm}{lVert}{rVert}
begin{document}
subsection*{Good}
begin{equation*}
sum_{j in {1,2}} frac{q^{0} - q^{j}}{(norm{q^{0} - q^{j}}^{2} - d^{2})^{2}}
end{equation*}
subsection*{Possibly preferable}
begin{equation*}
sum_{j in {1,2}} frac{q^{0} - q^{j}}{bigl(norm{q^{0} - q^{j}}^{2} - d^{2}bigr)^{2}}
end{equation*}
subsection*{Possibly preferable again}
begin{equation*}
sum_{j in {1,2}} frac{q^{0} - q^{j}}{bigl(norm{q^{0} - q^{j}}^{2} - d^{2}bigr)^{!2}}
end{equation*}
subsection*{Disputable}
begin{equation*}
sum_{j in {1,2}} frac{q^{0} - q^{j}}{left(norm*{q^{0} - q^{j}}^{2} - d^{2}right)^{2}}
end{equation*}
end{document}
You have too many useless bits in your code
- inside
equation
,displaystyle
andlimits
are already in force - additional braces in the denominator can be disruptive of spacing
mathclap
is not needed (and is wrong, as the need for~
shows)
Here are my proposals (I'd go with the first one). Note that with my definition of norm
, norm*
is essentially the same as yours.
documentclass{article}
usepackage{mathtools}
%newcommandnorm[1]{leftlVert#1rightrVert}
DeclarePairedDelimiter{norm}{lVert}{rVert}
begin{document}
subsection*{Good}
begin{equation*}
sum_{j in {1,2}} frac{q^{0} - q^{j}}{(norm{q^{0} - q^{j}}^{2} - d^{2})^{2}}
end{equation*}
subsection*{Possibly preferable}
begin{equation*}
sum_{j in {1,2}} frac{q^{0} - q^{j}}{bigl(norm{q^{0} - q^{j}}^{2} - d^{2}bigr)^{2}}
end{equation*}
subsection*{Possibly preferable again}
begin{equation*}
sum_{j in {1,2}} frac{q^{0} - q^{j}}{bigl(norm{q^{0} - q^{j}}^{2} - d^{2}bigr)^{!2}}
end{equation*}
subsection*{Disputable}
begin{equation*}
sum_{j in {1,2}} frac{q^{0} - q^{j}}{left(norm*{q^{0} - q^{j}}^{2} - d^{2}right)^{2}}
end{equation*}
end{document}
answered Nov 28 at 9:49
egreg
701k8618693142
701k8618693142
add a comment |
add a comment |
up vote
4
down vote
Grouping error in your code, below is the updated code:
begin{equation*}
displaystylesumlimits_{mathclap{j in
{1,2}}}~frac{q^{0} - q^{j}}{{left(norm{q^{0} - q^{j}}^{2} - d^{2}right)}^{2}}
end{equation*}
add a comment |
up vote
4
down vote
Grouping error in your code, below is the updated code:
begin{equation*}
displaystylesumlimits_{mathclap{j in
{1,2}}}~frac{q^{0} - q^{j}}{{left(norm{q^{0} - q^{j}}^{2} - d^{2}right)}^{2}}
end{equation*}
add a comment |
up vote
4
down vote
up vote
4
down vote
Grouping error in your code, below is the updated code:
begin{equation*}
displaystylesumlimits_{mathclap{j in
{1,2}}}~frac{q^{0} - q^{j}}{{left(norm{q^{0} - q^{j}}^{2} - d^{2}right)}^{2}}
end{equation*}
Grouping error in your code, below is the updated code:
begin{equation*}
displaystylesumlimits_{mathclap{j in
{1,2}}}~frac{q^{0} - q^{j}}{{left(norm{q^{0} - q^{j}}^{2} - d^{2}right)}^{2}}
end{equation*}
answered Nov 28 at 9:40
MadyYuvi
2,066211
2,066211
add a comment |
add a comment |
Pinton is a new contributor. Be nice, and check out our Code of Conduct.
Pinton is a new contributor. Be nice, and check out our Code of Conduct.
Pinton is a new contributor. Be nice, and check out our Code of Conduct.
Pinton is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f462126%2fforgotten-brace-error-when-i-use-left-and-right%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
2
Replace it with:
displaystylesumlimits_{mathclap{j in {1,2}}}~frac{q^{0} - q^{j}}{{left(norm{q^{0} - q^{j}}^{2} - d^{2}right)^{2}}}
. Simple rule: Respec the brackets ;)– Raaja
Nov 28 at 9:39
3
You are enclosing
left
in a group leaving outright
:{left( ... } right)
.– campa
Nov 28 at 9:41