Math-accent symbol over parentheses enclosing accented symbol (amsmath) The Next CEO of Stack OverflowWhy do arguments to nested tilde or breve commands reappear when amsmath is used?dot over vec over : amsmath bug/feature?amsmath possible bug: dot over bracketed dotxdot over vec over : amsmath bug/feature?How can I draw a straight vertical accent (like textvbaraccent) over a symbol in math mode?Unusual custom math accentEquation number enclosing parentheses misplaced with Polyglossia+Hebrew+amsmathConfigurable and Extensible Accents (Arrows, Dots, Vectors)Accented math operatorAccent in letters over a Lettermath accent before starred macro, with unicode-math or without amsmathCannot put accent over letter 'a'Unusual Accented Letter: umlaut + accent
A hang glider, sudden unexpected lift to 25,000 feet altitude, what could do this?
How badly should I try to prevent a user from XSSing themselves?
Could a dragon use its wings to swim?
How do I secure a TV wall mount?
How can I replace x-axis labels with pre-determined symbols?
How does a dynamic QR code work?
Is it OK to decorate a log book cover?
What difference does it make matching a word with/without a trailing whitespace?
How to implement Comparable so it is consistent with identity-equality
Man transported from Alternate World into ours by a Neutrino Detector
Salesforce opportunity stages
Gödel's incompleteness theorems - what are the religious implications?
Are British MPs missing the point, with these 'Indicative Votes'?
Car headlights in a world without electricity
Finitely generated matrix groups whose eigenvalues are all algebraic
Is it possible to create a QR code using text?
Is the offspring between a demon and a celestial possible? If so what is it called and is it in a book somewhere?
Why doesn't Shulchan Aruch include the laws of destroying fruit trees?
Is it a bad idea to plug the other end of ESD strap to wall ground?
How to pronounce fünf in 45
Ising model simulation
"Eavesdropping" vs "Listen in on"
My ex-girlfriend uses my Apple ID to login to her iPad, do I have to give her my Apple ID password to reset it?
Prodigo = pro + ago?
Math-accent symbol over parentheses enclosing accented symbol (amsmath)
The Next CEO of Stack OverflowWhy do arguments to nested tilde or breve commands reappear when amsmath is used?dot over vec over : amsmath bug/feature?amsmath possible bug: dot over bracketed dotxdot over vec over : amsmath bug/feature?How can I draw a straight vertical accent (like textvbaraccent) over a symbol in math mode?Unusual custom math accentEquation number enclosing parentheses misplaced with Polyglossia+Hebrew+amsmathConfigurable and Extensible Accents (Arrows, Dots, Vectors)Accented math operatorAccent in letters over a Lettermath accent before starred macro, with unicode-math or without amsmathCannot put accent over letter 'a'Unusual Accented Letter: umlaut + accent
I'm trying to write an expression in which an accented expression enclosed by parentheses has an accent over the parentheses. For example,
vec(dotx)
This typesets fine when amsmath is not loaded, but with amsmath present, the x is typeset to the right of the dot, as if the inner expression is being treated as
dotx
This behavior only happens when a closing parentheses (or bracket or brace) is part of the argument to the outer accent.
The best workaround I've been able to find is to use overset for the outer accent instead of the actual accent command (or accentset).
Is this behavior expected/documented anywhere?
I believe that this question was previously asked at
amsmath possible bug: dot over bracketed dotx, but was incorrectly marked as a duplicate of dot over vec over : amsmath bug/feature?. The latter question was about the differences in typesetting between dotting a subscripted character and subscripting a dotted character.
amsmath accents
New contributor
add a comment |
I'm trying to write an expression in which an accented expression enclosed by parentheses has an accent over the parentheses. For example,
vec(dotx)
This typesets fine when amsmath is not loaded, but with amsmath present, the x is typeset to the right of the dot, as if the inner expression is being treated as
dotx
This behavior only happens when a closing parentheses (or bracket or brace) is part of the argument to the outer accent.
The best workaround I've been able to find is to use overset for the outer accent instead of the actual accent command (or accentset).
Is this behavior expected/documented anywhere?
I believe that this question was previously asked at
amsmath possible bug: dot over bracketed dotx, but was incorrectly marked as a duplicate of dot over vec over : amsmath bug/feature?. The latter question was about the differences in typesetting between dotting a subscripted character and subscripting a dotted character.
amsmath accents
New contributor
I guess this is rather related to tex.stackexchange.com/q/30327/4427. On the other hand,(vec{dotx)
seems better syntax.
– egreg
2 days ago
Thanks. On the syntax question, putting the parentheses outside the vec command is semantically different from applying the vec to the whole contents of the parentheses. My vec(dotx) minimal example probably would not be used in practice, but applying accents to parenthetically-delimited expressions or to matrices has multiple use-cases.
– RLH
2 days ago
How's the reader supposed to know the difference betweenvec(dotx)
and(vecdotx)
? And, if you havevec(blahblah)
the problem is even worse.
– egreg
2 days ago
As I said, I don't think that my minimal example will be used in practice. An expression like dotbeginbmatrix x \ dotx endbmatrix has a use-case (in explaining basic controls systems principles), and gets mangled by this bug. As a second example, in vec(exp dotx) vs (vecexp dotx), the vec is set higher on the first expression, clearly indicating that it applies to the contents of the parentheses.
– RLH
2 days ago
Funny thing, I wrote a package to shift the accents ofmathaccentV
(the macroamsmath
uses internally fordot
, etc.), which doesn't suffer from this issue. I'll try to provide a patch from that.
– Skillmon
2 days ago
add a comment |
I'm trying to write an expression in which an accented expression enclosed by parentheses has an accent over the parentheses. For example,
vec(dotx)
This typesets fine when amsmath is not loaded, but with amsmath present, the x is typeset to the right of the dot, as if the inner expression is being treated as
dotx
This behavior only happens when a closing parentheses (or bracket or brace) is part of the argument to the outer accent.
The best workaround I've been able to find is to use overset for the outer accent instead of the actual accent command (or accentset).
Is this behavior expected/documented anywhere?
I believe that this question was previously asked at
amsmath possible bug: dot over bracketed dotx, but was incorrectly marked as a duplicate of dot over vec over : amsmath bug/feature?. The latter question was about the differences in typesetting between dotting a subscripted character and subscripting a dotted character.
amsmath accents
New contributor
I'm trying to write an expression in which an accented expression enclosed by parentheses has an accent over the parentheses. For example,
vec(dotx)
This typesets fine when amsmath is not loaded, but with amsmath present, the x is typeset to the right of the dot, as if the inner expression is being treated as
dotx
This behavior only happens when a closing parentheses (or bracket or brace) is part of the argument to the outer accent.
The best workaround I've been able to find is to use overset for the outer accent instead of the actual accent command (or accentset).
Is this behavior expected/documented anywhere?
I believe that this question was previously asked at
amsmath possible bug: dot over bracketed dotx, but was incorrectly marked as a duplicate of dot over vec over : amsmath bug/feature?. The latter question was about the differences in typesetting between dotting a subscripted character and subscripting a dotted character.
amsmath accents
amsmath accents
New contributor
New contributor
New contributor
asked 2 days ago
RLHRLH
1283
1283
New contributor
New contributor
I guess this is rather related to tex.stackexchange.com/q/30327/4427. On the other hand,(vec{dotx)
seems better syntax.
– egreg
2 days ago
Thanks. On the syntax question, putting the parentheses outside the vec command is semantically different from applying the vec to the whole contents of the parentheses. My vec(dotx) minimal example probably would not be used in practice, but applying accents to parenthetically-delimited expressions or to matrices has multiple use-cases.
– RLH
2 days ago
How's the reader supposed to know the difference betweenvec(dotx)
and(vecdotx)
? And, if you havevec(blahblah)
the problem is even worse.
– egreg
2 days ago
As I said, I don't think that my minimal example will be used in practice. An expression like dotbeginbmatrix x \ dotx endbmatrix has a use-case (in explaining basic controls systems principles), and gets mangled by this bug. As a second example, in vec(exp dotx) vs (vecexp dotx), the vec is set higher on the first expression, clearly indicating that it applies to the contents of the parentheses.
– RLH
2 days ago
Funny thing, I wrote a package to shift the accents ofmathaccentV
(the macroamsmath
uses internally fordot
, etc.), which doesn't suffer from this issue. I'll try to provide a patch from that.
– Skillmon
2 days ago
add a comment |
I guess this is rather related to tex.stackexchange.com/q/30327/4427. On the other hand,(vec{dotx)
seems better syntax.
– egreg
2 days ago
Thanks. On the syntax question, putting the parentheses outside the vec command is semantically different from applying the vec to the whole contents of the parentheses. My vec(dotx) minimal example probably would not be used in practice, but applying accents to parenthetically-delimited expressions or to matrices has multiple use-cases.
– RLH
2 days ago
How's the reader supposed to know the difference betweenvec(dotx)
and(vecdotx)
? And, if you havevec(blahblah)
the problem is even worse.
– egreg
2 days ago
As I said, I don't think that my minimal example will be used in practice. An expression like dotbeginbmatrix x \ dotx endbmatrix has a use-case (in explaining basic controls systems principles), and gets mangled by this bug. As a second example, in vec(exp dotx) vs (vecexp dotx), the vec is set higher on the first expression, clearly indicating that it applies to the contents of the parentheses.
– RLH
2 days ago
Funny thing, I wrote a package to shift the accents ofmathaccentV
(the macroamsmath
uses internally fordot
, etc.), which doesn't suffer from this issue. I'll try to provide a patch from that.
– Skillmon
2 days ago
I guess this is rather related to tex.stackexchange.com/q/30327/4427. On the other hand,
(vec{dotx)
seems better syntax.– egreg
2 days ago
I guess this is rather related to tex.stackexchange.com/q/30327/4427. On the other hand,
(vec{dotx)
seems better syntax.– egreg
2 days ago
Thanks. On the syntax question, putting the parentheses outside the vec command is semantically different from applying the vec to the whole contents of the parentheses. My vec(dotx) minimal example probably would not be used in practice, but applying accents to parenthetically-delimited expressions or to matrices has multiple use-cases.
– RLH
2 days ago
Thanks. On the syntax question, putting the parentheses outside the vec command is semantically different from applying the vec to the whole contents of the parentheses. My vec(dotx) minimal example probably would not be used in practice, but applying accents to parenthetically-delimited expressions or to matrices has multiple use-cases.
– RLH
2 days ago
How's the reader supposed to know the difference between
vec(dotx)
and (vecdotx)
? And, if you have vec(blahblah)
the problem is even worse.– egreg
2 days ago
How's the reader supposed to know the difference between
vec(dotx)
and (vecdotx)
? And, if you have vec(blahblah)
the problem is even worse.– egreg
2 days ago
As I said, I don't think that my minimal example will be used in practice. An expression like dotbeginbmatrix x \ dotx endbmatrix has a use-case (in explaining basic controls systems principles), and gets mangled by this bug. As a second example, in vec(exp dotx) vs (vecexp dotx), the vec is set higher on the first expression, clearly indicating that it applies to the contents of the parentheses.
– RLH
2 days ago
As I said, I don't think that my minimal example will be used in practice. An expression like dotbeginbmatrix x \ dotx endbmatrix has a use-case (in explaining basic controls systems principles), and gets mangled by this bug. As a second example, in vec(exp dotx) vs (vecexp dotx), the vec is set higher on the first expression, clearly indicating that it applies to the contents of the parentheses.
– RLH
2 days ago
Funny thing, I wrote a package to shift the accents of
mathaccentV
(the macro amsmath
uses internally for dot
, etc.), which doesn't suffer from this issue. I'll try to provide a patch from that.– Skillmon
2 days ago
Funny thing, I wrote a package to shift the accents of
mathaccentV
(the macro amsmath
uses internally for dot
, etc.), which doesn't suffer from this issue. I'll try to provide a patch from that.– Skillmon
2 days ago
add a comment |
2 Answers
2
active
oldest
votes
This has to do with a long-standing amsmath
issue, see Why do arguments to nested tilde or breve commands reappear when amsmath is used?
I can offer a workaround.
documentclassarticle
usepackageamsmath
makeatletter
newcommanddblacc[2]mathpalettedblacc@#1#2
newcommanddblacc@[2]dblacc@@#1#2
newcommanddblacc@@[3]%
begingroup
sboxz@$m@th#1#3$%
#2boxz@%
endgroup
makeatother
begindocument
begingather*
dblaccvec(dotx)
\
dblaccdotbeginbmatrix x \ dotx endbmatrix
\
dblaccvec(exp dotx)
endgather*
enddocument
A version that works also with accents
:
documentclassarticle
usepackageamsmath
usepackageaccents
makeatletter
newsaveboxdblacc@boxa
newsaveboxdblacc@boxb
DeclareRobustCommanddblacc[2]mathpalettedblacc@#1#2
newcommanddblacc@[2]dblacc@@#1#2
newcommanddblacc@@[3]%
begingroup
sboxdblacc@boxa$m@th#1#3$%
sboxdblacc@boxb$m@th#1#2copydblacc@boxa$%
boxdblacc@boxb
endgroup
makeatother
begindocument
begingather*
dblaccvec(dotx)quadscriptscriptstyledblaccvec(dotx)
\
dblaccdotbeginbmatrix x \ dotx endbmatrix
\
dblaccvec(exp dotx)
endgather*
enddocument
Thanks very much. If it's not too much trouble, is there a way to make this compatible with the accents package? I'm using the accentset command in my document for a custom accent, and with the accents package turned on, the arguments to the outer accent all disappear.
– RLH
2 days ago
@RLHnewcommandmyaccent[1]accentset<accent>#1
anddblaccmyaccentwhatever
should work
– egreg
2 days ago
Sorry for the miscommunication: The problem I'm running into is that if I add usepackageaccents to the preamble of the example document you posted, only the outer accent character appears -- the rest of the expression is not typeset.
– RLH
2 days ago
@RLH Problem solved.:-D
– egreg
2 days ago
add a comment |
The following redefines an internal of amsmath
. After that the output of your example looks good. I don't know whether this has any possibility of breaking other stuff. I've added every test case egreg used in his answer and the output looks good. It doesn't work with the accents
package, though.
documentclass[]article
usepackage[]amsmath
makeatletter
protecteddefmathaccentV#1#2#3#4#5%
%
ifmmode
mathaccentV@do#2#3#4#5%
else
@xpnonmatherr@csname #1endcsname
fi
defmathaccentV@do#1#2#3#4%
%
globalletmacc@nucleus@empty
mathaccent"accentclass@#1#2#3#4macc@nucleus
makeatother
begindocument
begingather*
vec(dotx)
\
dotbeginbmatrix x \ dotx endbmatrix
\
vec(exp dotx)
endgather*
enddocument
Thanks very much. Is there something fundamental about the accents package that breaks solutions of the kind that you and egreg suggested?
– RLH
2 days ago
@RLHaccents
redefines all those accents macros to no longer usemathaccentV
, so my fix is bound to not work there. I didn't dig too deep into why theaccents
package fails to do the alignment right, so I can't really state anything else about the issue.
– Skillmon
2 days ago
Thanks again for your help!
– RLH
2 days ago
@RLH note that this patch changes the wayvecdotx
would be typeset (the arrow is moved slightly to the right which yields imperfect placement, but not severely misplacement). In the original use case of my package where something like this is done, that is not that bad, because the default placement of the accents would be very bad there.
– Skillmon
2 days ago
@RLH if you only useaccents
foraccentset
, you can use the package optionsingle
. That way my fix above will still be applied.
– Skillmon
2 days ago
|
show 2 more comments
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',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
RLH is a new contributor. Be nice, and check out our Code of Conduct.
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%2f482281%2fmath-accent-symbol-over-parentheses-enclosing-accented-symbol-amsmath%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
This has to do with a long-standing amsmath
issue, see Why do arguments to nested tilde or breve commands reappear when amsmath is used?
I can offer a workaround.
documentclassarticle
usepackageamsmath
makeatletter
newcommanddblacc[2]mathpalettedblacc@#1#2
newcommanddblacc@[2]dblacc@@#1#2
newcommanddblacc@@[3]%
begingroup
sboxz@$m@th#1#3$%
#2boxz@%
endgroup
makeatother
begindocument
begingather*
dblaccvec(dotx)
\
dblaccdotbeginbmatrix x \ dotx endbmatrix
\
dblaccvec(exp dotx)
endgather*
enddocument
A version that works also with accents
:
documentclassarticle
usepackageamsmath
usepackageaccents
makeatletter
newsaveboxdblacc@boxa
newsaveboxdblacc@boxb
DeclareRobustCommanddblacc[2]mathpalettedblacc@#1#2
newcommanddblacc@[2]dblacc@@#1#2
newcommanddblacc@@[3]%
begingroup
sboxdblacc@boxa$m@th#1#3$%
sboxdblacc@boxb$m@th#1#2copydblacc@boxa$%
boxdblacc@boxb
endgroup
makeatother
begindocument
begingather*
dblaccvec(dotx)quadscriptscriptstyledblaccvec(dotx)
\
dblaccdotbeginbmatrix x \ dotx endbmatrix
\
dblaccvec(exp dotx)
endgather*
enddocument
Thanks very much. If it's not too much trouble, is there a way to make this compatible with the accents package? I'm using the accentset command in my document for a custom accent, and with the accents package turned on, the arguments to the outer accent all disappear.
– RLH
2 days ago
@RLHnewcommandmyaccent[1]accentset<accent>#1
anddblaccmyaccentwhatever
should work
– egreg
2 days ago
Sorry for the miscommunication: The problem I'm running into is that if I add usepackageaccents to the preamble of the example document you posted, only the outer accent character appears -- the rest of the expression is not typeset.
– RLH
2 days ago
@RLH Problem solved.:-D
– egreg
2 days ago
add a comment |
This has to do with a long-standing amsmath
issue, see Why do arguments to nested tilde or breve commands reappear when amsmath is used?
I can offer a workaround.
documentclassarticle
usepackageamsmath
makeatletter
newcommanddblacc[2]mathpalettedblacc@#1#2
newcommanddblacc@[2]dblacc@@#1#2
newcommanddblacc@@[3]%
begingroup
sboxz@$m@th#1#3$%
#2boxz@%
endgroup
makeatother
begindocument
begingather*
dblaccvec(dotx)
\
dblaccdotbeginbmatrix x \ dotx endbmatrix
\
dblaccvec(exp dotx)
endgather*
enddocument
A version that works also with accents
:
documentclassarticle
usepackageamsmath
usepackageaccents
makeatletter
newsaveboxdblacc@boxa
newsaveboxdblacc@boxb
DeclareRobustCommanddblacc[2]mathpalettedblacc@#1#2
newcommanddblacc@[2]dblacc@@#1#2
newcommanddblacc@@[3]%
begingroup
sboxdblacc@boxa$m@th#1#3$%
sboxdblacc@boxb$m@th#1#2copydblacc@boxa$%
boxdblacc@boxb
endgroup
makeatother
begindocument
begingather*
dblaccvec(dotx)quadscriptscriptstyledblaccvec(dotx)
\
dblaccdotbeginbmatrix x \ dotx endbmatrix
\
dblaccvec(exp dotx)
endgather*
enddocument
Thanks very much. If it's not too much trouble, is there a way to make this compatible with the accents package? I'm using the accentset command in my document for a custom accent, and with the accents package turned on, the arguments to the outer accent all disappear.
– RLH
2 days ago
@RLHnewcommandmyaccent[1]accentset<accent>#1
anddblaccmyaccentwhatever
should work
– egreg
2 days ago
Sorry for the miscommunication: The problem I'm running into is that if I add usepackageaccents to the preamble of the example document you posted, only the outer accent character appears -- the rest of the expression is not typeset.
– RLH
2 days ago
@RLH Problem solved.:-D
– egreg
2 days ago
add a comment |
This has to do with a long-standing amsmath
issue, see Why do arguments to nested tilde or breve commands reappear when amsmath is used?
I can offer a workaround.
documentclassarticle
usepackageamsmath
makeatletter
newcommanddblacc[2]mathpalettedblacc@#1#2
newcommanddblacc@[2]dblacc@@#1#2
newcommanddblacc@@[3]%
begingroup
sboxz@$m@th#1#3$%
#2boxz@%
endgroup
makeatother
begindocument
begingather*
dblaccvec(dotx)
\
dblaccdotbeginbmatrix x \ dotx endbmatrix
\
dblaccvec(exp dotx)
endgather*
enddocument
A version that works also with accents
:
documentclassarticle
usepackageamsmath
usepackageaccents
makeatletter
newsaveboxdblacc@boxa
newsaveboxdblacc@boxb
DeclareRobustCommanddblacc[2]mathpalettedblacc@#1#2
newcommanddblacc@[2]dblacc@@#1#2
newcommanddblacc@@[3]%
begingroup
sboxdblacc@boxa$m@th#1#3$%
sboxdblacc@boxb$m@th#1#2copydblacc@boxa$%
boxdblacc@boxb
endgroup
makeatother
begindocument
begingather*
dblaccvec(dotx)quadscriptscriptstyledblaccvec(dotx)
\
dblaccdotbeginbmatrix x \ dotx endbmatrix
\
dblaccvec(exp dotx)
endgather*
enddocument
This has to do with a long-standing amsmath
issue, see Why do arguments to nested tilde or breve commands reappear when amsmath is used?
I can offer a workaround.
documentclassarticle
usepackageamsmath
makeatletter
newcommanddblacc[2]mathpalettedblacc@#1#2
newcommanddblacc@[2]dblacc@@#1#2
newcommanddblacc@@[3]%
begingroup
sboxz@$m@th#1#3$%
#2boxz@%
endgroup
makeatother
begindocument
begingather*
dblaccvec(dotx)
\
dblaccdotbeginbmatrix x \ dotx endbmatrix
\
dblaccvec(exp dotx)
endgather*
enddocument
A version that works also with accents
:
documentclassarticle
usepackageamsmath
usepackageaccents
makeatletter
newsaveboxdblacc@boxa
newsaveboxdblacc@boxb
DeclareRobustCommanddblacc[2]mathpalettedblacc@#1#2
newcommanddblacc@[2]dblacc@@#1#2
newcommanddblacc@@[3]%
begingroup
sboxdblacc@boxa$m@th#1#3$%
sboxdblacc@boxb$m@th#1#2copydblacc@boxa$%
boxdblacc@boxb
endgroup
makeatother
begindocument
begingather*
dblaccvec(dotx)quadscriptscriptstyledblaccvec(dotx)
\
dblaccdotbeginbmatrix x \ dotx endbmatrix
\
dblaccvec(exp dotx)
endgather*
enddocument
edited 2 days ago
answered 2 days ago
egregegreg
731k8819293246
731k8819293246
Thanks very much. If it's not too much trouble, is there a way to make this compatible with the accents package? I'm using the accentset command in my document for a custom accent, and with the accents package turned on, the arguments to the outer accent all disappear.
– RLH
2 days ago
@RLHnewcommandmyaccent[1]accentset<accent>#1
anddblaccmyaccentwhatever
should work
– egreg
2 days ago
Sorry for the miscommunication: The problem I'm running into is that if I add usepackageaccents to the preamble of the example document you posted, only the outer accent character appears -- the rest of the expression is not typeset.
– RLH
2 days ago
@RLH Problem solved.:-D
– egreg
2 days ago
add a comment |
Thanks very much. If it's not too much trouble, is there a way to make this compatible with the accents package? I'm using the accentset command in my document for a custom accent, and with the accents package turned on, the arguments to the outer accent all disappear.
– RLH
2 days ago
@RLHnewcommandmyaccent[1]accentset<accent>#1
anddblaccmyaccentwhatever
should work
– egreg
2 days ago
Sorry for the miscommunication: The problem I'm running into is that if I add usepackageaccents to the preamble of the example document you posted, only the outer accent character appears -- the rest of the expression is not typeset.
– RLH
2 days ago
@RLH Problem solved.:-D
– egreg
2 days ago
Thanks very much. If it's not too much trouble, is there a way to make this compatible with the accents package? I'm using the accentset command in my document for a custom accent, and with the accents package turned on, the arguments to the outer accent all disappear.
– RLH
2 days ago
Thanks very much. If it's not too much trouble, is there a way to make this compatible with the accents package? I'm using the accentset command in my document for a custom accent, and with the accents package turned on, the arguments to the outer accent all disappear.
– RLH
2 days ago
@RLH
newcommandmyaccent[1]accentset<accent>#1
and dblaccmyaccentwhatever
should work– egreg
2 days ago
@RLH
newcommandmyaccent[1]accentset<accent>#1
and dblaccmyaccentwhatever
should work– egreg
2 days ago
Sorry for the miscommunication: The problem I'm running into is that if I add usepackageaccents to the preamble of the example document you posted, only the outer accent character appears -- the rest of the expression is not typeset.
– RLH
2 days ago
Sorry for the miscommunication: The problem I'm running into is that if I add usepackageaccents to the preamble of the example document you posted, only the outer accent character appears -- the rest of the expression is not typeset.
– RLH
2 days ago
@RLH Problem solved.
:-D
– egreg
2 days ago
@RLH Problem solved.
:-D
– egreg
2 days ago
add a comment |
The following redefines an internal of amsmath
. After that the output of your example looks good. I don't know whether this has any possibility of breaking other stuff. I've added every test case egreg used in his answer and the output looks good. It doesn't work with the accents
package, though.
documentclass[]article
usepackage[]amsmath
makeatletter
protecteddefmathaccentV#1#2#3#4#5%
%
ifmmode
mathaccentV@do#2#3#4#5%
else
@xpnonmatherr@csname #1endcsname
fi
defmathaccentV@do#1#2#3#4%
%
globalletmacc@nucleus@empty
mathaccent"accentclass@#1#2#3#4macc@nucleus
makeatother
begindocument
begingather*
vec(dotx)
\
dotbeginbmatrix x \ dotx endbmatrix
\
vec(exp dotx)
endgather*
enddocument
Thanks very much. Is there something fundamental about the accents package that breaks solutions of the kind that you and egreg suggested?
– RLH
2 days ago
@RLHaccents
redefines all those accents macros to no longer usemathaccentV
, so my fix is bound to not work there. I didn't dig too deep into why theaccents
package fails to do the alignment right, so I can't really state anything else about the issue.
– Skillmon
2 days ago
Thanks again for your help!
– RLH
2 days ago
@RLH note that this patch changes the wayvecdotx
would be typeset (the arrow is moved slightly to the right which yields imperfect placement, but not severely misplacement). In the original use case of my package where something like this is done, that is not that bad, because the default placement of the accents would be very bad there.
– Skillmon
2 days ago
@RLH if you only useaccents
foraccentset
, you can use the package optionsingle
. That way my fix above will still be applied.
– Skillmon
2 days ago
|
show 2 more comments
The following redefines an internal of amsmath
. After that the output of your example looks good. I don't know whether this has any possibility of breaking other stuff. I've added every test case egreg used in his answer and the output looks good. It doesn't work with the accents
package, though.
documentclass[]article
usepackage[]amsmath
makeatletter
protecteddefmathaccentV#1#2#3#4#5%
%
ifmmode
mathaccentV@do#2#3#4#5%
else
@xpnonmatherr@csname #1endcsname
fi
defmathaccentV@do#1#2#3#4%
%
globalletmacc@nucleus@empty
mathaccent"accentclass@#1#2#3#4macc@nucleus
makeatother
begindocument
begingather*
vec(dotx)
\
dotbeginbmatrix x \ dotx endbmatrix
\
vec(exp dotx)
endgather*
enddocument
Thanks very much. Is there something fundamental about the accents package that breaks solutions of the kind that you and egreg suggested?
– RLH
2 days ago
@RLHaccents
redefines all those accents macros to no longer usemathaccentV
, so my fix is bound to not work there. I didn't dig too deep into why theaccents
package fails to do the alignment right, so I can't really state anything else about the issue.
– Skillmon
2 days ago
Thanks again for your help!
– RLH
2 days ago
@RLH note that this patch changes the wayvecdotx
would be typeset (the arrow is moved slightly to the right which yields imperfect placement, but not severely misplacement). In the original use case of my package where something like this is done, that is not that bad, because the default placement of the accents would be very bad there.
– Skillmon
2 days ago
@RLH if you only useaccents
foraccentset
, you can use the package optionsingle
. That way my fix above will still be applied.
– Skillmon
2 days ago
|
show 2 more comments
The following redefines an internal of amsmath
. After that the output of your example looks good. I don't know whether this has any possibility of breaking other stuff. I've added every test case egreg used in his answer and the output looks good. It doesn't work with the accents
package, though.
documentclass[]article
usepackage[]amsmath
makeatletter
protecteddefmathaccentV#1#2#3#4#5%
%
ifmmode
mathaccentV@do#2#3#4#5%
else
@xpnonmatherr@csname #1endcsname
fi
defmathaccentV@do#1#2#3#4%
%
globalletmacc@nucleus@empty
mathaccent"accentclass@#1#2#3#4macc@nucleus
makeatother
begindocument
begingather*
vec(dotx)
\
dotbeginbmatrix x \ dotx endbmatrix
\
vec(exp dotx)
endgather*
enddocument
The following redefines an internal of amsmath
. After that the output of your example looks good. I don't know whether this has any possibility of breaking other stuff. I've added every test case egreg used in his answer and the output looks good. It doesn't work with the accents
package, though.
documentclass[]article
usepackage[]amsmath
makeatletter
protecteddefmathaccentV#1#2#3#4#5%
%
ifmmode
mathaccentV@do#2#3#4#5%
else
@xpnonmatherr@csname #1endcsname
fi
defmathaccentV@do#1#2#3#4%
%
globalletmacc@nucleus@empty
mathaccent"accentclass@#1#2#3#4macc@nucleus
makeatother
begindocument
begingather*
vec(dotx)
\
dotbeginbmatrix x \ dotx endbmatrix
\
vec(exp dotx)
endgather*
enddocument
answered 2 days ago
SkillmonSkillmon
24.1k12249
24.1k12249
Thanks very much. Is there something fundamental about the accents package that breaks solutions of the kind that you and egreg suggested?
– RLH
2 days ago
@RLHaccents
redefines all those accents macros to no longer usemathaccentV
, so my fix is bound to not work there. I didn't dig too deep into why theaccents
package fails to do the alignment right, so I can't really state anything else about the issue.
– Skillmon
2 days ago
Thanks again for your help!
– RLH
2 days ago
@RLH note that this patch changes the wayvecdotx
would be typeset (the arrow is moved slightly to the right which yields imperfect placement, but not severely misplacement). In the original use case of my package where something like this is done, that is not that bad, because the default placement of the accents would be very bad there.
– Skillmon
2 days ago
@RLH if you only useaccents
foraccentset
, you can use the package optionsingle
. That way my fix above will still be applied.
– Skillmon
2 days ago
|
show 2 more comments
Thanks very much. Is there something fundamental about the accents package that breaks solutions of the kind that you and egreg suggested?
– RLH
2 days ago
@RLHaccents
redefines all those accents macros to no longer usemathaccentV
, so my fix is bound to not work there. I didn't dig too deep into why theaccents
package fails to do the alignment right, so I can't really state anything else about the issue.
– Skillmon
2 days ago
Thanks again for your help!
– RLH
2 days ago
@RLH note that this patch changes the wayvecdotx
would be typeset (the arrow is moved slightly to the right which yields imperfect placement, but not severely misplacement). In the original use case of my package where something like this is done, that is not that bad, because the default placement of the accents would be very bad there.
– Skillmon
2 days ago
@RLH if you only useaccents
foraccentset
, you can use the package optionsingle
. That way my fix above will still be applied.
– Skillmon
2 days ago
Thanks very much. Is there something fundamental about the accents package that breaks solutions of the kind that you and egreg suggested?
– RLH
2 days ago
Thanks very much. Is there something fundamental about the accents package that breaks solutions of the kind that you and egreg suggested?
– RLH
2 days ago
@RLH
accents
redefines all those accents macros to no longer use mathaccentV
, so my fix is bound to not work there. I didn't dig too deep into why the accents
package fails to do the alignment right, so I can't really state anything else about the issue.– Skillmon
2 days ago
@RLH
accents
redefines all those accents macros to no longer use mathaccentV
, so my fix is bound to not work there. I didn't dig too deep into why the accents
package fails to do the alignment right, so I can't really state anything else about the issue.– Skillmon
2 days ago
Thanks again for your help!
– RLH
2 days ago
Thanks again for your help!
– RLH
2 days ago
@RLH note that this patch changes the way
vecdotx
would be typeset (the arrow is moved slightly to the right which yields imperfect placement, but not severely misplacement). In the original use case of my package where something like this is done, that is not that bad, because the default placement of the accents would be very bad there.– Skillmon
2 days ago
@RLH note that this patch changes the way
vecdotx
would be typeset (the arrow is moved slightly to the right which yields imperfect placement, but not severely misplacement). In the original use case of my package where something like this is done, that is not that bad, because the default placement of the accents would be very bad there.– Skillmon
2 days ago
@RLH if you only use
accents
for accentset
, you can use the package option single
. That way my fix above will still be applied.– Skillmon
2 days ago
@RLH if you only use
accents
for accentset
, you can use the package option single
. That way my fix above will still be applied.– Skillmon
2 days ago
|
show 2 more comments
RLH is a new contributor. Be nice, and check out our Code of Conduct.
RLH is a new contributor. Be nice, and check out our Code of Conduct.
RLH is a new contributor. Be nice, and check out our Code of Conduct.
RLH 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.
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%2f482281%2fmath-accent-symbol-over-parentheses-enclosing-accented-symbol-amsmath%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
I guess this is rather related to tex.stackexchange.com/q/30327/4427. On the other hand,
(vec{dotx)
seems better syntax.– egreg
2 days ago
Thanks. On the syntax question, putting the parentheses outside the vec command is semantically different from applying the vec to the whole contents of the parentheses. My vec(dotx) minimal example probably would not be used in practice, but applying accents to parenthetically-delimited expressions or to matrices has multiple use-cases.
– RLH
2 days ago
How's the reader supposed to know the difference between
vec(dotx)
and(vecdotx)
? And, if you havevec(blahblah)
the problem is even worse.– egreg
2 days ago
As I said, I don't think that my minimal example will be used in practice. An expression like dotbeginbmatrix x \ dotx endbmatrix has a use-case (in explaining basic controls systems principles), and gets mangled by this bug. As a second example, in vec(exp dotx) vs (vecexp dotx), the vec is set higher on the first expression, clearly indicating that it applies to the contents of the parentheses.
– RLH
2 days ago
Funny thing, I wrote a package to shift the accents of
mathaccentV
(the macroamsmath
uses internally fordot
, etc.), which doesn't suffer from this issue. I'll try to provide a patch from that.– Skillmon
2 days ago