Writing over fractions
I am trying to achieve this look:
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}
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
add a comment |
I am trying to achieve this look:
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}
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
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 notoverbrace
?
– Werner
1 hour ago
add a comment |
I am trying to achieve this look:
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}
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
I am trying to achieve this look:
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}
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
math-mode
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 notoverbrace
?
– Werner
1 hour ago
add a comment |
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 notoverbrace
?
– 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
add a comment |
1 Answer
1
active
oldest
votes
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}
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}
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
add a comment |
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
});
}
});
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%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
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}
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}
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
add a comment |
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}
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}
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
add a comment |
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}
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}
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}
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}
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
add a comment |
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
add a comment |
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%2f473265%2fwriting-over-fractions%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
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