Writing over fractions












5















I am trying to achieve this look:
enter image description here



documentclass{article}
usepackage{amsmath}
begin{document}
$dfrac{2x+7}{x-4}-dfrac{x+4}{x-2}$
end{document}
documentclass{article}
usepackage{amsmath}
usepackage{graphicx}

makeatletter
DeclareFontFamily{U}{tipa}{}
DeclareFontShape{U}{tipa}{m}{n}{<->tipa10}{}
newcommand{arc@char}{{usefont{U}{tipa}{m}{n}symbol{62}}}%

newcommand{arc}[1]{mathpalettearc@arc{#1}}

newcommand{arc@arc}[2]{%
sbox0{$m@th#1#2$}%
vbox{
hbox{resizebox{wd0}{height}{arc@char}}
nointerlineskip
box0
}%
}
makeatother

newcommand{stackAboveArc}[2]{begin{array}[b]{@{}c@{}}#1\ arc{#2}end{array}}

begin{document}
% $dfrac{2x+7}{x-4}-dfrac{x+4}{x-2}$
$dfrac{stackAboveArc{x-2}{2x+7}}{x-4}-dfrac{stackAboveArc{x-4}{x+4}}{x-2}$
end{document}


enter image description here



I don't need any color or font different from the defaults.



EDIT:
Well I and modified something which is scaling with the fractions which is great but I can't rotate the arc. How to rotate it? Picture above.










share|improve this question




















  • 1





    Here is a way to do that, I think. The perhaps most beautiful option might be this one, but this is opinion-based.

    – marmot
    2 hours ago













  • Why not overbrace?

    – Werner
    1 hour ago
















5















I am trying to achieve this look:
enter image description here



documentclass{article}
usepackage{amsmath}
begin{document}
$dfrac{2x+7}{x-4}-dfrac{x+4}{x-2}$
end{document}
documentclass{article}
usepackage{amsmath}
usepackage{graphicx}

makeatletter
DeclareFontFamily{U}{tipa}{}
DeclareFontShape{U}{tipa}{m}{n}{<->tipa10}{}
newcommand{arc@char}{{usefont{U}{tipa}{m}{n}symbol{62}}}%

newcommand{arc}[1]{mathpalettearc@arc{#1}}

newcommand{arc@arc}[2]{%
sbox0{$m@th#1#2$}%
vbox{
hbox{resizebox{wd0}{height}{arc@char}}
nointerlineskip
box0
}%
}
makeatother

newcommand{stackAboveArc}[2]{begin{array}[b]{@{}c@{}}#1\ arc{#2}end{array}}

begin{document}
% $dfrac{2x+7}{x-4}-dfrac{x+4}{x-2}$
$dfrac{stackAboveArc{x-2}{2x+7}}{x-4}-dfrac{stackAboveArc{x-4}{x+4}}{x-2}$
end{document}


enter image description here



I don't need any color or font different from the defaults.



EDIT:
Well I and modified something which is scaling with the fractions which is great but I can't rotate the arc. How to rotate it? Picture above.










share|improve this question




















  • 1





    Here is a way to do that, I think. The perhaps most beautiful option might be this one, but this is opinion-based.

    – marmot
    2 hours ago













  • Why not overbrace?

    – Werner
    1 hour ago














5












5








5


1






I am trying to achieve this look:
enter image description here



documentclass{article}
usepackage{amsmath}
begin{document}
$dfrac{2x+7}{x-4}-dfrac{x+4}{x-2}$
end{document}
documentclass{article}
usepackage{amsmath}
usepackage{graphicx}

makeatletter
DeclareFontFamily{U}{tipa}{}
DeclareFontShape{U}{tipa}{m}{n}{<->tipa10}{}
newcommand{arc@char}{{usefont{U}{tipa}{m}{n}symbol{62}}}%

newcommand{arc}[1]{mathpalettearc@arc{#1}}

newcommand{arc@arc}[2]{%
sbox0{$m@th#1#2$}%
vbox{
hbox{resizebox{wd0}{height}{arc@char}}
nointerlineskip
box0
}%
}
makeatother

newcommand{stackAboveArc}[2]{begin{array}[b]{@{}c@{}}#1\ arc{#2}end{array}}

begin{document}
% $dfrac{2x+7}{x-4}-dfrac{x+4}{x-2}$
$dfrac{stackAboveArc{x-2}{2x+7}}{x-4}-dfrac{stackAboveArc{x-4}{x+4}}{x-2}$
end{document}


enter image description here



I don't need any color or font different from the defaults.



EDIT:
Well I and modified something which is scaling with the fractions which is great but I can't rotate the arc. How to rotate it? Picture above.










share|improve this question
















I am trying to achieve this look:
enter image description here



documentclass{article}
usepackage{amsmath}
begin{document}
$dfrac{2x+7}{x-4}-dfrac{x+4}{x-2}$
end{document}
documentclass{article}
usepackage{amsmath}
usepackage{graphicx}

makeatletter
DeclareFontFamily{U}{tipa}{}
DeclareFontShape{U}{tipa}{m}{n}{<->tipa10}{}
newcommand{arc@char}{{usefont{U}{tipa}{m}{n}symbol{62}}}%

newcommand{arc}[1]{mathpalettearc@arc{#1}}

newcommand{arc@arc}[2]{%
sbox0{$m@th#1#2$}%
vbox{
hbox{resizebox{wd0}{height}{arc@char}}
nointerlineskip
box0
}%
}
makeatother

newcommand{stackAboveArc}[2]{begin{array}[b]{@{}c@{}}#1\ arc{#2}end{array}}

begin{document}
% $dfrac{2x+7}{x-4}-dfrac{x+4}{x-2}$
$dfrac{stackAboveArc{x-2}{2x+7}}{x-4}-dfrac{stackAboveArc{x-4}{x+4}}{x-2}$
end{document}


enter image description here



I don't need any color or font different from the defaults.



EDIT:
Well I and modified something which is scaling with the fractions which is great but I can't rotate the arc. How to rotate it? Picture above.







math-mode






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 1 hour ago







Simeon Simeonov

















asked 2 hours ago









Simeon SimeonovSimeon Simeonov

3626




3626








  • 1





    Here is a way to do that, I think. The perhaps most beautiful option might be this one, but this is opinion-based.

    – marmot
    2 hours ago













  • Why not overbrace?

    – Werner
    1 hour ago














  • 1





    Here is a way to do that, I think. The perhaps most beautiful option might be this one, but this is opinion-based.

    – marmot
    2 hours ago













  • Why not overbrace?

    – Werner
    1 hour ago








1




1





Here is a way to do that, I think. The perhaps most beautiful option might be this one, but this is opinion-based.

– marmot
2 hours ago







Here is a way to do that, I think. The perhaps most beautiful option might be this one, but this is opinion-based.

– marmot
2 hours ago















Why not overbrace?

– Werner
1 hour ago





Why not overbrace?

– Werner
1 hour ago










1 Answer
1






active

oldest

votes


















3














Here is a proposal that marries your command with this answer by egreg.



documentclass{article}
usepackage{amsmath}
makeatletter% based on https://tex.stackexchange.com/a/260580/121799
newcommandunderparenonly[1]{%
mathop{%
vtop{
m@th
ialign{%
##crcr
$hfildisplaystyle{#1}hfil$crcr
noalign{kern3p@nointerlineskip}%
upparenfillcrcr
}%
}%
}
}
newcommandupparenfill{%
$m@thsetboxz@hbox{$braceld$}%
braceluleadersvrule @heighthtz@ @depthz@hfillbraceru$%
}
makeatother
newcommand{stackAboveChar}[2]{begin{array}[b]{@{}c@{}}underparenonly{#1}\[1ex]{#2}end{array}}
begin{document}
$stackAboveChar{x-2}{dfrac{2x+7}{x-4}}-stackAboveChar{x-4}{dfrac{x+4}{x-2}}$
end{document}


enter image description here



As for the code in your question: as you are already using graphicx, you could just add a rotatebox to flip the parenthesis.



documentclass{article}
usepackage{amsmath}
usepackage{graphicx}

makeatletter
DeclareFontFamily{U}{tipa}{}
DeclareFontShape{U}{tipa}{m}{n}{<->tipa10}{}
newcommand{arc@char}{{usefont{U}{tipa}{m}{n}symbol{62}}}%

newcommand{arc}[1]{mathpalettearc@arc{#1}}

newcommand{arc@arc}[2]{%
sbox0{$m@th#1#2$}%
vbox{
hbox{resizebox{wd0}{height}{rotatebox[origin=bottom]{180}{arc@char}}}
nointerlineskip
box0
}%
}
makeatother

newcommand{stackAboveArc}[2]{begin{array}[b]{@{}c@{}}#1\ arc{#2}end{array}}

begin{document}
% $dfrac{2x+7}{x-4}-dfrac{x+4}{x-2}$
$dfrac{stackAboveArc{x-2}{2x+7}}{x-4}-dfrac{stackAboveArc{x-4}{x+4}}{x-2}$
end{document}


enter image description here






share|improve this answer





















  • 1





    It's working, but I need thin layer. I found something and updated my code, can you see it?

    – Simeon Simeonov
    1 hour ago











  • @SimeonSimeonov I rotated the parenthesis of your code. (Yet I must admit that I do not understand all details, not do I know whether or not there is a character code that avoids the rotation, yet since you are loading graphicx anyway that may be not so important.)

    – marmot
    1 hour 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
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f473265%2fwriting-over-fractions%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









3














Here is a proposal that marries your command with this answer by egreg.



documentclass{article}
usepackage{amsmath}
makeatletter% based on https://tex.stackexchange.com/a/260580/121799
newcommandunderparenonly[1]{%
mathop{%
vtop{
m@th
ialign{%
##crcr
$hfildisplaystyle{#1}hfil$crcr
noalign{kern3p@nointerlineskip}%
upparenfillcrcr
}%
}%
}
}
newcommandupparenfill{%
$m@thsetboxz@hbox{$braceld$}%
braceluleadersvrule @heighthtz@ @depthz@hfillbraceru$%
}
makeatother
newcommand{stackAboveChar}[2]{begin{array}[b]{@{}c@{}}underparenonly{#1}\[1ex]{#2}end{array}}
begin{document}
$stackAboveChar{x-2}{dfrac{2x+7}{x-4}}-stackAboveChar{x-4}{dfrac{x+4}{x-2}}$
end{document}


enter image description here



As for the code in your question: as you are already using graphicx, you could just add a rotatebox to flip the parenthesis.



documentclass{article}
usepackage{amsmath}
usepackage{graphicx}

makeatletter
DeclareFontFamily{U}{tipa}{}
DeclareFontShape{U}{tipa}{m}{n}{<->tipa10}{}
newcommand{arc@char}{{usefont{U}{tipa}{m}{n}symbol{62}}}%

newcommand{arc}[1]{mathpalettearc@arc{#1}}

newcommand{arc@arc}[2]{%
sbox0{$m@th#1#2$}%
vbox{
hbox{resizebox{wd0}{height}{rotatebox[origin=bottom]{180}{arc@char}}}
nointerlineskip
box0
}%
}
makeatother

newcommand{stackAboveArc}[2]{begin{array}[b]{@{}c@{}}#1\ arc{#2}end{array}}

begin{document}
% $dfrac{2x+7}{x-4}-dfrac{x+4}{x-2}$
$dfrac{stackAboveArc{x-2}{2x+7}}{x-4}-dfrac{stackAboveArc{x-4}{x+4}}{x-2}$
end{document}


enter image description here






share|improve this answer





















  • 1





    It's working, but I need thin layer. I found something and updated my code, can you see it?

    – Simeon Simeonov
    1 hour ago











  • @SimeonSimeonov I rotated the parenthesis of your code. (Yet I must admit that I do not understand all details, not do I know whether or not there is a character code that avoids the rotation, yet since you are loading graphicx anyway that may be not so important.)

    – marmot
    1 hour ago
















3














Here is a proposal that marries your command with this answer by egreg.



documentclass{article}
usepackage{amsmath}
makeatletter% based on https://tex.stackexchange.com/a/260580/121799
newcommandunderparenonly[1]{%
mathop{%
vtop{
m@th
ialign{%
##crcr
$hfildisplaystyle{#1}hfil$crcr
noalign{kern3p@nointerlineskip}%
upparenfillcrcr
}%
}%
}
}
newcommandupparenfill{%
$m@thsetboxz@hbox{$braceld$}%
braceluleadersvrule @heighthtz@ @depthz@hfillbraceru$%
}
makeatother
newcommand{stackAboveChar}[2]{begin{array}[b]{@{}c@{}}underparenonly{#1}\[1ex]{#2}end{array}}
begin{document}
$stackAboveChar{x-2}{dfrac{2x+7}{x-4}}-stackAboveChar{x-4}{dfrac{x+4}{x-2}}$
end{document}


enter image description here



As for the code in your question: as you are already using graphicx, you could just add a rotatebox to flip the parenthesis.



documentclass{article}
usepackage{amsmath}
usepackage{graphicx}

makeatletter
DeclareFontFamily{U}{tipa}{}
DeclareFontShape{U}{tipa}{m}{n}{<->tipa10}{}
newcommand{arc@char}{{usefont{U}{tipa}{m}{n}symbol{62}}}%

newcommand{arc}[1]{mathpalettearc@arc{#1}}

newcommand{arc@arc}[2]{%
sbox0{$m@th#1#2$}%
vbox{
hbox{resizebox{wd0}{height}{rotatebox[origin=bottom]{180}{arc@char}}}
nointerlineskip
box0
}%
}
makeatother

newcommand{stackAboveArc}[2]{begin{array}[b]{@{}c@{}}#1\ arc{#2}end{array}}

begin{document}
% $dfrac{2x+7}{x-4}-dfrac{x+4}{x-2}$
$dfrac{stackAboveArc{x-2}{2x+7}}{x-4}-dfrac{stackAboveArc{x-4}{x+4}}{x-2}$
end{document}


enter image description here






share|improve this answer





















  • 1





    It's working, but I need thin layer. I found something and updated my code, can you see it?

    – Simeon Simeonov
    1 hour ago











  • @SimeonSimeonov I rotated the parenthesis of your code. (Yet I must admit that I do not understand all details, not do I know whether or not there is a character code that avoids the rotation, yet since you are loading graphicx anyway that may be not so important.)

    – marmot
    1 hour ago














3












3








3







Here is a proposal that marries your command with this answer by egreg.



documentclass{article}
usepackage{amsmath}
makeatletter% based on https://tex.stackexchange.com/a/260580/121799
newcommandunderparenonly[1]{%
mathop{%
vtop{
m@th
ialign{%
##crcr
$hfildisplaystyle{#1}hfil$crcr
noalign{kern3p@nointerlineskip}%
upparenfillcrcr
}%
}%
}
}
newcommandupparenfill{%
$m@thsetboxz@hbox{$braceld$}%
braceluleadersvrule @heighthtz@ @depthz@hfillbraceru$%
}
makeatother
newcommand{stackAboveChar}[2]{begin{array}[b]{@{}c@{}}underparenonly{#1}\[1ex]{#2}end{array}}
begin{document}
$stackAboveChar{x-2}{dfrac{2x+7}{x-4}}-stackAboveChar{x-4}{dfrac{x+4}{x-2}}$
end{document}


enter image description here



As for the code in your question: as you are already using graphicx, you could just add a rotatebox to flip the parenthesis.



documentclass{article}
usepackage{amsmath}
usepackage{graphicx}

makeatletter
DeclareFontFamily{U}{tipa}{}
DeclareFontShape{U}{tipa}{m}{n}{<->tipa10}{}
newcommand{arc@char}{{usefont{U}{tipa}{m}{n}symbol{62}}}%

newcommand{arc}[1]{mathpalettearc@arc{#1}}

newcommand{arc@arc}[2]{%
sbox0{$m@th#1#2$}%
vbox{
hbox{resizebox{wd0}{height}{rotatebox[origin=bottom]{180}{arc@char}}}
nointerlineskip
box0
}%
}
makeatother

newcommand{stackAboveArc}[2]{begin{array}[b]{@{}c@{}}#1\ arc{#2}end{array}}

begin{document}
% $dfrac{2x+7}{x-4}-dfrac{x+4}{x-2}$
$dfrac{stackAboveArc{x-2}{2x+7}}{x-4}-dfrac{stackAboveArc{x-4}{x+4}}{x-2}$
end{document}


enter image description here






share|improve this answer















Here is a proposal that marries your command with this answer by egreg.



documentclass{article}
usepackage{amsmath}
makeatletter% based on https://tex.stackexchange.com/a/260580/121799
newcommandunderparenonly[1]{%
mathop{%
vtop{
m@th
ialign{%
##crcr
$hfildisplaystyle{#1}hfil$crcr
noalign{kern3p@nointerlineskip}%
upparenfillcrcr
}%
}%
}
}
newcommandupparenfill{%
$m@thsetboxz@hbox{$braceld$}%
braceluleadersvrule @heighthtz@ @depthz@hfillbraceru$%
}
makeatother
newcommand{stackAboveChar}[2]{begin{array}[b]{@{}c@{}}underparenonly{#1}\[1ex]{#2}end{array}}
begin{document}
$stackAboveChar{x-2}{dfrac{2x+7}{x-4}}-stackAboveChar{x-4}{dfrac{x+4}{x-2}}$
end{document}


enter image description here



As for the code in your question: as you are already using graphicx, you could just add a rotatebox to flip the parenthesis.



documentclass{article}
usepackage{amsmath}
usepackage{graphicx}

makeatletter
DeclareFontFamily{U}{tipa}{}
DeclareFontShape{U}{tipa}{m}{n}{<->tipa10}{}
newcommand{arc@char}{{usefont{U}{tipa}{m}{n}symbol{62}}}%

newcommand{arc}[1]{mathpalettearc@arc{#1}}

newcommand{arc@arc}[2]{%
sbox0{$m@th#1#2$}%
vbox{
hbox{resizebox{wd0}{height}{rotatebox[origin=bottom]{180}{arc@char}}}
nointerlineskip
box0
}%
}
makeatother

newcommand{stackAboveArc}[2]{begin{array}[b]{@{}c@{}}#1\ arc{#2}end{array}}

begin{document}
% $dfrac{2x+7}{x-4}-dfrac{x+4}{x-2}$
$dfrac{stackAboveArc{x-2}{2x+7}}{x-4}-dfrac{stackAboveArc{x-4}{x+4}}{x-2}$
end{document}


enter image description here







share|improve this answer














share|improve this answer



share|improve this answer








edited 1 hour ago

























answered 2 hours ago









marmotmarmot

97k4112213




97k4112213








  • 1





    It's working, but I need thin layer. I found something and updated my code, can you see it?

    – Simeon Simeonov
    1 hour ago











  • @SimeonSimeonov I rotated the parenthesis of your code. (Yet I must admit that I do not understand all details, not do I know whether or not there is a character code that avoids the rotation, yet since you are loading graphicx anyway that may be not so important.)

    – marmot
    1 hour ago














  • 1





    It's working, but I need thin layer. I found something and updated my code, can you see it?

    – Simeon Simeonov
    1 hour ago











  • @SimeonSimeonov I rotated the parenthesis of your code. (Yet I must admit that I do not understand all details, not do I know whether or not there is a character code that avoids the rotation, yet since you are loading graphicx anyway that may be not so important.)

    – marmot
    1 hour ago








1




1





It's working, but I need thin layer. I found something and updated my code, can you see it?

– Simeon Simeonov
1 hour ago





It's working, but I need thin layer. I found something and updated my code, can you see it?

– Simeon Simeonov
1 hour ago













@SimeonSimeonov I rotated the parenthesis of your code. (Yet I must admit that I do not understand all details, not do I know whether or not there is a character code that avoids the rotation, yet since you are loading graphicx anyway that may be not so important.)

– marmot
1 hour ago





@SimeonSimeonov I rotated the parenthesis of your code. (Yet I must admit that I do not understand all details, not do I know whether or not there is a character code that avoids the rotation, yet since you are loading graphicx anyway that may be not so important.)

– marmot
1 hour ago


















draft saved

draft discarded




















































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%2f473265%2fwriting-over-fractions%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

CARDNET

Boot-repair Failure: Unable to locate package grub-common:i386

濃尾地震