splitfrac producing extra '1' characters

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
2
down vote

favorite












I am having the exact same problem as this (closed) question - but I have ideas as to what might be causing the problem in my case



documentclass[12pt,a4paper]article
usepackagemathtools

begindocument
beginalign
mathcalB_x=fracsplitfracomega_x+delta=1, tau_inotin [x-delta, x)right)^mPrleft(tau_inotin[x, x+delta)splitfracomega_x+delta=0, tau_inotin [x-delta, x))^momega_x+delta=0, tau_inotin [x-delta, x)right)^k-m-1
endalign
enddocument


When I run the code as it is above, I get my desired output:
enter image description here



However, when I run it with the entire preamble that I am using for a longer document, I get extra "1" characters



documentclass[12pt,a4paper]article
usepackageamsmath,amsthm,amssymb,apacite,graphicx, verbatim,upref,paralist,indentfirst
usepackagesetspace
usepackagebreqn
allowdisplaybreaks
usepackagegraphicx
usepackagemathrsfs
usepackagemathtools
usepackageenumerate
graphicspath ./images/
onehalfspacing
usepackagefloat
setlengthparskip2pt%

begindocument
beginalign
mathcalB_x=fracsplitfracomega_x+delta=1, tau_inotin [x-delta, x)right)^mPrleft(tau_inotin[x, x+delta)splitfracomega_x+delta=0, tau_inotin [x-delta, x))^momega_x+delta=0, tau_inotin [x-delta, x)right)^k-m-1
endalign
enddocument


enter image description here



I am suspecting that there is some "contamination" from other packages in the preamble that are producing these unwanted "1" characters. Is there anything I can do to remove these unwanted "1"s? Is there a way I can do this without removing other packages from the preamble, as this may affect other formulae that I have in the document.



Edit:
I suspect it is this line in the preamble that is causing the "1" to appear:



 usepackagebreqn


When I remove it from the preamble, the 1's disappear. Is there a way to remove the 1's without removing this line from the preamble?










share|improve this question









New contributor




Elke is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.



















  • Related: How can I split and align this series of equations?
    – Werner
    3 hours ago














up vote
2
down vote

favorite












I am having the exact same problem as this (closed) question - but I have ideas as to what might be causing the problem in my case



documentclass[12pt,a4paper]article
usepackagemathtools

begindocument
beginalign
mathcalB_x=fracsplitfracomega_x+delta=1, tau_inotin [x-delta, x)right)^mPrleft(tau_inotin[x, x+delta)splitfracomega_x+delta=0, tau_inotin [x-delta, x))^momega_x+delta=0, tau_inotin [x-delta, x)right)^k-m-1
endalign
enddocument


When I run the code as it is above, I get my desired output:
enter image description here



However, when I run it with the entire preamble that I am using for a longer document, I get extra "1" characters



documentclass[12pt,a4paper]article
usepackageamsmath,amsthm,amssymb,apacite,graphicx, verbatim,upref,paralist,indentfirst
usepackagesetspace
usepackagebreqn
allowdisplaybreaks
usepackagegraphicx
usepackagemathrsfs
usepackagemathtools
usepackageenumerate
graphicspath ./images/
onehalfspacing
usepackagefloat
setlengthparskip2pt%

begindocument
beginalign
mathcalB_x=fracsplitfracomega_x+delta=1, tau_inotin [x-delta, x)right)^mPrleft(tau_inotin[x, x+delta)splitfracomega_x+delta=0, tau_inotin [x-delta, x))^momega_x+delta=0, tau_inotin [x-delta, x)right)^k-m-1
endalign
enddocument


enter image description here



I am suspecting that there is some "contamination" from other packages in the preamble that are producing these unwanted "1" characters. Is there anything I can do to remove these unwanted "1"s? Is there a way I can do this without removing other packages from the preamble, as this may affect other formulae that I have in the document.



Edit:
I suspect it is this line in the preamble that is causing the "1" to appear:



 usepackagebreqn


When I remove it from the preamble, the 1's disappear. Is there a way to remove the 1's without removing this line from the preamble?










share|improve this question









New contributor




Elke is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.



















  • Related: How can I split and align this series of equations?
    – Werner
    3 hours ago












up vote
2
down vote

favorite









up vote
2
down vote

favorite











I am having the exact same problem as this (closed) question - but I have ideas as to what might be causing the problem in my case



documentclass[12pt,a4paper]article
usepackagemathtools

begindocument
beginalign
mathcalB_x=fracsplitfracomega_x+delta=1, tau_inotin [x-delta, x)right)^mPrleft(tau_inotin[x, x+delta)splitfracomega_x+delta=0, tau_inotin [x-delta, x))^momega_x+delta=0, tau_inotin [x-delta, x)right)^k-m-1
endalign
enddocument


When I run the code as it is above, I get my desired output:
enter image description here



However, when I run it with the entire preamble that I am using for a longer document, I get extra "1" characters



documentclass[12pt,a4paper]article
usepackageamsmath,amsthm,amssymb,apacite,graphicx, verbatim,upref,paralist,indentfirst
usepackagesetspace
usepackagebreqn
allowdisplaybreaks
usepackagegraphicx
usepackagemathrsfs
usepackagemathtools
usepackageenumerate
graphicspath ./images/
onehalfspacing
usepackagefloat
setlengthparskip2pt%

begindocument
beginalign
mathcalB_x=fracsplitfracomega_x+delta=1, tau_inotin [x-delta, x)right)^mPrleft(tau_inotin[x, x+delta)splitfracomega_x+delta=0, tau_inotin [x-delta, x))^momega_x+delta=0, tau_inotin [x-delta, x)right)^k-m-1
endalign
enddocument


enter image description here



I am suspecting that there is some "contamination" from other packages in the preamble that are producing these unwanted "1" characters. Is there anything I can do to remove these unwanted "1"s? Is there a way I can do this without removing other packages from the preamble, as this may affect other formulae that I have in the document.



Edit:
I suspect it is this line in the preamble that is causing the "1" to appear:



 usepackagebreqn


When I remove it from the preamble, the 1's disappear. Is there a way to remove the 1's without removing this line from the preamble?










share|improve this question









New contributor




Elke is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











I am having the exact same problem as this (closed) question - but I have ideas as to what might be causing the problem in my case



documentclass[12pt,a4paper]article
usepackagemathtools

begindocument
beginalign
mathcalB_x=fracsplitfracomega_x+delta=1, tau_inotin [x-delta, x)right)^mPrleft(tau_inotin[x, x+delta)splitfracomega_x+delta=0, tau_inotin [x-delta, x))^momega_x+delta=0, tau_inotin [x-delta, x)right)^k-m-1
endalign
enddocument


When I run the code as it is above, I get my desired output:
enter image description here



However, when I run it with the entire preamble that I am using for a longer document, I get extra "1" characters



documentclass[12pt,a4paper]article
usepackageamsmath,amsthm,amssymb,apacite,graphicx, verbatim,upref,paralist,indentfirst
usepackagesetspace
usepackagebreqn
allowdisplaybreaks
usepackagegraphicx
usepackagemathrsfs
usepackagemathtools
usepackageenumerate
graphicspath ./images/
onehalfspacing
usepackagefloat
setlengthparskip2pt%

begindocument
beginalign
mathcalB_x=fracsplitfracomega_x+delta=1, tau_inotin [x-delta, x)right)^mPrleft(tau_inotin[x, x+delta)splitfracomega_x+delta=0, tau_inotin [x-delta, x))^momega_x+delta=0, tau_inotin [x-delta, x)right)^k-m-1
endalign
enddocument


enter image description here



I am suspecting that there is some "contamination" from other packages in the preamble that are producing these unwanted "1" characters. Is there anything I can do to remove these unwanted "1"s? Is there a way I can do this without removing other packages from the preamble, as this may affect other formulae that I have in the document.



Edit:
I suspect it is this line in the preamble that is causing the "1" to appear:



 usepackagebreqn


When I remove it from the preamble, the 1's disappear. Is there a way to remove the 1's without removing this line from the preamble?







mathtools






share|improve this question









New contributor




Elke is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




Elke is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited 15 mins ago





















New contributor




Elke is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 3 hours ago









Elke

133




133




New contributor




Elke is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Elke is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Elke is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











  • Related: How can I split and align this series of equations?
    – Werner
    3 hours ago
















  • Related: How can I split and align this series of equations?
    – Werner
    3 hours ago















Related: How can I split and align this series of equations?
– Werner
3 hours ago




Related: How can I split and align this series of equations?
– Werner
3 hours ago










1 Answer
1






active

oldest

votes

















up vote
2
down vote



accepted










A really minimal example is



documentclassarticle
usepackagebreqn

begindocument
[
genfrac0pt1AB
]
enddocument


that typesets



enter image description here



whereas it typesets as expected if breqn is changed into amsmath. Note that splitfrac is just a thin layer around genfrac.



Oh, wait! How does the minimal example compile? Isn't genfrac defined by amsmath that isn't loaded? Yes, that's true. Besides other damages, breqn seizes the initiative to define (or redefine) genfrac. But it does it wrong. The definition is in mathstyle.sty



 145 │ DeclareRobustCommandgenfrac[6]%
146 │ #1fracstyle
147 │ begingroup #5endgroup
148 │ csname @@ifxmaxdimen#4maxdimen overelse abovefi
149 │ if @#2@else withdelimsfiendcsname #2#3#4relax
150 │ #6%
151 │ %
152 │


and #2#3#4relax should be #2#3relax. The modified macro gives the expected result:



documentclassarticle
usepackagebreqn
usepackageregexpatch

makeatletter
xpatchcmdgenfrac#4relaxrelax
makeatother

begindocument
[
genfrac0pt1AB
]
enddocument


Without regexpatch, your document should look as follows:



documentclassarticle
usepackagemathtools
usepackagebreqn

makeatletter
DeclareRobustCommandgenfrac[6]%
#1fracstyle
begingroup #5endgroup
csname @@ifxmaxdimen#4maxdimen overelse abovefi
if @#2@else withdelimsfiendcsname #2#3relax
#6%
%

makeatother

begindocument

beginequation
mathcalB_x=
frac
splitfracomega_x+delta=1,
tau_inotin [x-delta, x)right)^m
omega_x+delta=1,
tau_inotin [x-delta, x)right)^k-m-1


splitfracomega_x+delta=0,
tau_inotin [x-delta, x))^m

Prleft(tau_inotin[x, x+delta)

endequation

enddocument


enter image description here






share|improve this answer




















  • Bug report filed: github.com/wspr/breqn/issues/25
    – egreg
    42 mins ago










Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "85"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);






Elke is a new contributor. Be nice, and check out our Code of Conduct.









 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f456197%2fsplitfrac-producing-extra-1-characters%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
2
down vote



accepted










A really minimal example is



documentclassarticle
usepackagebreqn

begindocument
[
genfrac0pt1AB
]
enddocument


that typesets



enter image description here



whereas it typesets as expected if breqn is changed into amsmath. Note that splitfrac is just a thin layer around genfrac.



Oh, wait! How does the minimal example compile? Isn't genfrac defined by amsmath that isn't loaded? Yes, that's true. Besides other damages, breqn seizes the initiative to define (or redefine) genfrac. But it does it wrong. The definition is in mathstyle.sty



 145 │ DeclareRobustCommandgenfrac[6]%
146 │ #1fracstyle
147 │ begingroup #5endgroup
148 │ csname @@ifxmaxdimen#4maxdimen overelse abovefi
149 │ if @#2@else withdelimsfiendcsname #2#3#4relax
150 │ #6%
151 │ %
152 │


and #2#3#4relax should be #2#3relax. The modified macro gives the expected result:



documentclassarticle
usepackagebreqn
usepackageregexpatch

makeatletter
xpatchcmdgenfrac#4relaxrelax
makeatother

begindocument
[
genfrac0pt1AB
]
enddocument


Without regexpatch, your document should look as follows:



documentclassarticle
usepackagemathtools
usepackagebreqn

makeatletter
DeclareRobustCommandgenfrac[6]%
#1fracstyle
begingroup #5endgroup
csname @@ifxmaxdimen#4maxdimen overelse abovefi
if @#2@else withdelimsfiendcsname #2#3relax
#6%
%

makeatother

begindocument

beginequation
mathcalB_x=
frac
splitfracomega_x+delta=1,
tau_inotin [x-delta, x)right)^m
omega_x+delta=1,
tau_inotin [x-delta, x)right)^k-m-1


splitfracomega_x+delta=0,
tau_inotin [x-delta, x))^m

Prleft(tau_inotin[x, x+delta)

endequation

enddocument


enter image description here






share|improve this answer




















  • Bug report filed: github.com/wspr/breqn/issues/25
    – egreg
    42 mins ago














up vote
2
down vote



accepted










A really minimal example is



documentclassarticle
usepackagebreqn

begindocument
[
genfrac0pt1AB
]
enddocument


that typesets



enter image description here



whereas it typesets as expected if breqn is changed into amsmath. Note that splitfrac is just a thin layer around genfrac.



Oh, wait! How does the minimal example compile? Isn't genfrac defined by amsmath that isn't loaded? Yes, that's true. Besides other damages, breqn seizes the initiative to define (or redefine) genfrac. But it does it wrong. The definition is in mathstyle.sty



 145 │ DeclareRobustCommandgenfrac[6]%
146 │ #1fracstyle
147 │ begingroup #5endgroup
148 │ csname @@ifxmaxdimen#4maxdimen overelse abovefi
149 │ if @#2@else withdelimsfiendcsname #2#3#4relax
150 │ #6%
151 │ %
152 │


and #2#3#4relax should be #2#3relax. The modified macro gives the expected result:



documentclassarticle
usepackagebreqn
usepackageregexpatch

makeatletter
xpatchcmdgenfrac#4relaxrelax
makeatother

begindocument
[
genfrac0pt1AB
]
enddocument


Without regexpatch, your document should look as follows:



documentclassarticle
usepackagemathtools
usepackagebreqn

makeatletter
DeclareRobustCommandgenfrac[6]%
#1fracstyle
begingroup #5endgroup
csname @@ifxmaxdimen#4maxdimen overelse abovefi
if @#2@else withdelimsfiendcsname #2#3relax
#6%
%

makeatother

begindocument

beginequation
mathcalB_x=
frac
splitfracomega_x+delta=1,
tau_inotin [x-delta, x)right)^m
omega_x+delta=1,
tau_inotin [x-delta, x)right)^k-m-1


splitfracomega_x+delta=0,
tau_inotin [x-delta, x))^m

Prleft(tau_inotin[x, x+delta)

endequation

enddocument


enter image description here






share|improve this answer




















  • Bug report filed: github.com/wspr/breqn/issues/25
    – egreg
    42 mins ago












up vote
2
down vote



accepted







up vote
2
down vote



accepted






A really minimal example is



documentclassarticle
usepackagebreqn

begindocument
[
genfrac0pt1AB
]
enddocument


that typesets



enter image description here



whereas it typesets as expected if breqn is changed into amsmath. Note that splitfrac is just a thin layer around genfrac.



Oh, wait! How does the minimal example compile? Isn't genfrac defined by amsmath that isn't loaded? Yes, that's true. Besides other damages, breqn seizes the initiative to define (or redefine) genfrac. But it does it wrong. The definition is in mathstyle.sty



 145 │ DeclareRobustCommandgenfrac[6]%
146 │ #1fracstyle
147 │ begingroup #5endgroup
148 │ csname @@ifxmaxdimen#4maxdimen overelse abovefi
149 │ if @#2@else withdelimsfiendcsname #2#3#4relax
150 │ #6%
151 │ %
152 │


and #2#3#4relax should be #2#3relax. The modified macro gives the expected result:



documentclassarticle
usepackagebreqn
usepackageregexpatch

makeatletter
xpatchcmdgenfrac#4relaxrelax
makeatother

begindocument
[
genfrac0pt1AB
]
enddocument


Without regexpatch, your document should look as follows:



documentclassarticle
usepackagemathtools
usepackagebreqn

makeatletter
DeclareRobustCommandgenfrac[6]%
#1fracstyle
begingroup #5endgroup
csname @@ifxmaxdimen#4maxdimen overelse abovefi
if @#2@else withdelimsfiendcsname #2#3relax
#6%
%

makeatother

begindocument

beginequation
mathcalB_x=
frac
splitfracomega_x+delta=1,
tau_inotin [x-delta, x)right)^m
omega_x+delta=1,
tau_inotin [x-delta, x)right)^k-m-1


splitfracomega_x+delta=0,
tau_inotin [x-delta, x))^m

Prleft(tau_inotin[x, x+delta)

endequation

enddocument


enter image description here






share|improve this answer












A really minimal example is



documentclassarticle
usepackagebreqn

begindocument
[
genfrac0pt1AB
]
enddocument


that typesets



enter image description here



whereas it typesets as expected if breqn is changed into amsmath. Note that splitfrac is just a thin layer around genfrac.



Oh, wait! How does the minimal example compile? Isn't genfrac defined by amsmath that isn't loaded? Yes, that's true. Besides other damages, breqn seizes the initiative to define (or redefine) genfrac. But it does it wrong. The definition is in mathstyle.sty



 145 │ DeclareRobustCommandgenfrac[6]%
146 │ #1fracstyle
147 │ begingroup #5endgroup
148 │ csname @@ifxmaxdimen#4maxdimen overelse abovefi
149 │ if @#2@else withdelimsfiendcsname #2#3#4relax
150 │ #6%
151 │ %
152 │


and #2#3#4relax should be #2#3relax. The modified macro gives the expected result:



documentclassarticle
usepackagebreqn
usepackageregexpatch

makeatletter
xpatchcmdgenfrac#4relaxrelax
makeatother

begindocument
[
genfrac0pt1AB
]
enddocument


Without regexpatch, your document should look as follows:



documentclassarticle
usepackagemathtools
usepackagebreqn

makeatletter
DeclareRobustCommandgenfrac[6]%
#1fracstyle
begingroup #5endgroup
csname @@ifxmaxdimen#4maxdimen overelse abovefi
if @#2@else withdelimsfiendcsname #2#3relax
#6%
%

makeatother

begindocument

beginequation
mathcalB_x=
frac
splitfracomega_x+delta=1,
tau_inotin [x-delta, x)right)^m
omega_x+delta=1,
tau_inotin [x-delta, x)right)^k-m-1


splitfracomega_x+delta=0,
tau_inotin [x-delta, x))^m

Prleft(tau_inotin[x, x+delta)

endequation

enddocument


enter image description here







share|improve this answer












share|improve this answer



share|improve this answer










answered 45 mins ago









egreg

691k8518383086




691k8518383086











  • Bug report filed: github.com/wspr/breqn/issues/25
    – egreg
    42 mins ago
















  • Bug report filed: github.com/wspr/breqn/issues/25
    – egreg
    42 mins ago















Bug report filed: github.com/wspr/breqn/issues/25
– egreg
42 mins ago




Bug report filed: github.com/wspr/breqn/issues/25
– egreg
42 mins ago










Elke is a new contributor. Be nice, and check out our Code of Conduct.









 

draft saved


draft discarded


















Elke is a new contributor. Be nice, and check out our Code of Conduct.












Elke is a new contributor. Be nice, and check out our Code of Conduct.











Elke is a new contributor. Be nice, and check out our Code of Conduct.













 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f456197%2fsplitfrac-producing-extra-1-characters%23new-answer', 'question_page');

);

Post as a guest













































































Comments

Popular posts from this blog

What does second last employer means? [closed]

List of Gilmore Girls characters

Confectionery