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

is it ok to reduce charging current for li ion 18650 battery?

Is it okay to majorly distort historical facts while writing a fiction story?

Is it my responsibility to learn a new technology in my own time my employer wants to implement?

Which one is the true statement?

What flight has the highest ratio of time difference to flight time?

Why did CATV standarize in 75 ohms and everyone else in 50?

RigExpert AA-35 - Interpreting The Information

Why don't programming languages automatically manage the synchronous/asynchronous problem?

Recycling old answers

Flying from Cape Town to England and return to another province

Should I tutor a student who I know has cheated on their homework?

What steps are necessary to read a Modern SSD in Medieval Europe?

How to count occurrences of text in a file?

What connection does MS Office have to Netscape Navigator?

Math-accent symbol over parentheses enclosing accented symbol (amsmath)

Why isn't the Mueller report being released completely and unredacted?

Won the lottery - how do I keep the money?

Why do airplanes bank sharply to the right after air-to-air refueling?

Why is my new battery behaving weirdly?

Reference request: Grassmannian and Plucker coordinates in type B, C, D

Do I need to write [sic] when a number is less than 10 but isn't written out?

Method for adding error messages to a dictionary given a key

What did we know about the Kessel run before the prequels?

Unclear about dynamic binding



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










5















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.










share|improve this question







New contributor




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




















  • I guess this is rather related to tex.stackexchange.com/q/30327/4427. On the other hand, (vec{dotx) seems better syntax.

    – egreg
    7 hours 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
    7 hours 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
    7 hours 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
    7 hours 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
    5 hours ago















5















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.










share|improve this question







New contributor




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




















  • I guess this is rather related to tex.stackexchange.com/q/30327/4427. On the other hand, (vec{dotx) seems better syntax.

    – egreg
    7 hours 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
    7 hours 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
    7 hours 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
    7 hours 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
    5 hours ago













5












5








5








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.










share|improve this question







New contributor




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












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






share|improve this question







New contributor




RLH 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




RLH 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






New contributor




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









asked 7 hours ago









RLHRLH

1262




1262




New contributor




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





New contributor





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






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












  • I guess this is rather related to tex.stackexchange.com/q/30327/4427. On the other hand, (vec{dotx) seems better syntax.

    – egreg
    7 hours 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
    7 hours 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
    7 hours 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
    7 hours 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
    5 hours ago

















  • I guess this is rather related to tex.stackexchange.com/q/30327/4427. On the other hand, (vec{dotx) seems better syntax.

    – egreg
    7 hours 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
    7 hours 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
    7 hours 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
    7 hours 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
    5 hours ago
















I guess this is rather related to tex.stackexchange.com/q/30327/4427. On the other hand, (vec{dotx) seems better syntax.

– egreg
7 hours ago





I guess this is rather related to tex.stackexchange.com/q/30327/4427. On the other hand, (vec{dotx) seems better syntax.

– egreg
7 hours 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
7 hours 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
7 hours 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
7 hours 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
7 hours 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
7 hours 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
7 hours 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
5 hours 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
5 hours ago










2 Answers
2






active

oldest

votes


















4














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


enter image description here






share|improve this answer























  • Thanks very much. Is there something fundamental about the accents package that breaks solutions of the kind that you and egreg suggested?

    – RLH
    4 hours 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
    4 hours ago












  • Thanks again for your help!

    – RLH
    4 hours 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
    4 hours 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
    4 hours ago


















3














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


enter image description here



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





share|improve this answer

























  • 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
    6 hours ago











  • @RLH newcommandmyaccent[1]accentset<accent>#1 and dblaccmyaccentwhatever should work

    – egreg
    5 hours 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
    5 hours ago











  • @RLH Problem solved. :-D

    – egreg
    2 hours 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',
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.









draft saved

draft discarded


















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









4














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


enter image description here






share|improve this answer























  • Thanks very much. Is there something fundamental about the accents package that breaks solutions of the kind that you and egreg suggested?

    – RLH
    4 hours 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
    4 hours ago












  • Thanks again for your help!

    – RLH
    4 hours 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
    4 hours 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
    4 hours ago















4














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


enter image description here






share|improve this answer























  • Thanks very much. Is there something fundamental about the accents package that breaks solutions of the kind that you and egreg suggested?

    – RLH
    4 hours 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
    4 hours ago












  • Thanks again for your help!

    – RLH
    4 hours 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
    4 hours 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
    4 hours ago













4












4








4







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


enter image description here






share|improve this answer













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


enter image description here







share|improve this answer












share|improve this answer



share|improve this answer










answered 4 hours 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
    4 hours 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
    4 hours ago












  • Thanks again for your help!

    – RLH
    4 hours 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
    4 hours 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
    4 hours ago

















  • Thanks very much. Is there something fundamental about the accents package that breaks solutions of the kind that you and egreg suggested?

    – RLH
    4 hours 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
    4 hours ago












  • Thanks again for your help!

    – RLH
    4 hours 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
    4 hours 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
    4 hours ago
















Thanks very much. Is there something fundamental about the accents package that breaks solutions of the kind that you and egreg suggested?

– RLH
4 hours ago





Thanks very much. Is there something fundamental about the accents package that breaks solutions of the kind that you and egreg suggested?

– RLH
4 hours 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
4 hours 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
4 hours ago














Thanks again for your help!

– RLH
4 hours ago





Thanks again for your help!

– RLH
4 hours 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
4 hours 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
4 hours 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
4 hours 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
4 hours ago











3














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


enter image description here



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





share|improve this answer

























  • 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
    6 hours ago











  • @RLH newcommandmyaccent[1]accentset<accent>#1 and dblaccmyaccentwhatever should work

    – egreg
    5 hours 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
    5 hours ago











  • @RLH Problem solved. :-D

    – egreg
    2 hours ago















3














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


enter image description here



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





share|improve this answer

























  • 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
    6 hours ago











  • @RLH newcommandmyaccent[1]accentset<accent>#1 and dblaccmyaccentwhatever should work

    – egreg
    5 hours 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
    5 hours ago











  • @RLH Problem solved. :-D

    – egreg
    2 hours ago













3












3








3







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


enter image description here



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





share|improve this answer















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


enter image description here



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






share|improve this answer














share|improve this answer



share|improve this answer








edited 2 hours ago

























answered 6 hours ago









egregegreg

730k8819283242




730k8819283242












  • 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
    6 hours ago











  • @RLH newcommandmyaccent[1]accentset<accent>#1 and dblaccmyaccentwhatever should work

    – egreg
    5 hours 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
    5 hours ago











  • @RLH Problem solved. :-D

    – egreg
    2 hours 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
    6 hours ago











  • @RLH newcommandmyaccent[1]accentset<accent>#1 and dblaccmyaccentwhatever should work

    – egreg
    5 hours 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
    5 hours ago











  • @RLH Problem solved. :-D

    – egreg
    2 hours 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
6 hours 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
6 hours ago













@RLH newcommandmyaccent[1]accentset<accent>#1 and dblaccmyaccentwhatever should work

– egreg
5 hours ago





@RLH newcommandmyaccent[1]accentset<accent>#1 and dblaccmyaccentwhatever should work

– egreg
5 hours 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
5 hours 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
5 hours ago













@RLH Problem solved. :-D

– egreg
2 hours ago





@RLH Problem solved. :-D

– egreg
2 hours ago










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









draft saved

draft discarded


















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.




draft saved


draft discarded














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





















































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







Popular posts from this blog

Tórshavn Kliima | Partnerstääden | Luke uk diar | Nawigatsjuun62° 1′ N, 6° 46′ W62° 1′ 0″ N, 6° 46′ 0″ WWMOTórshavn

南部首創開放式體驗廚房 用智慧廚具做出好料理

大學姐愛和弟洗澡 突襲浴室求共浴