Keep at all times, the minus sign above aligned with minus sign below Announcing the arrival...

Adapting the Chinese Remainder Theorem (CRT) for integers to polynomials

Did John Wesley plagiarize Matthew Henry...?

How to make an animal which can only breed for a certain number of generations?

Does the main washing effect of soap come from foam?

Is there a verb for listening stealthily?

As a dual citizen, my US passport will expire one day after traveling to the US. Will this work?

How does the body cool itself in a stillsuit?

Inverse square law not accurate for non-point masses?

My mentor says to set image to Fine instead of RAW — how is this different from JPG?

Vertical ranges of Column Plots in 12

newbie Q : How to read an output file in one command line

How could a hydrazine and N2O4 cloud (or it's reactants) show up in weather radar?

The test team as an enemy of development? And how can this be avoided?

Can two people see the same photon?

By what mechanism was the 2017 UK General Election called?

How do you write "wild blueberries flavored"?

How can I list files in reverse time order by a command and pass them as arguments to another command?

Why can't fire hurt Daenerys but it did to Jon Snow in season 1?

Noise in Eigenvalues plot

Does a random sequence of vectors span a Hilbert space?

Does the universe have a fixed centre of mass?

One-one communication

An isoperimetric-type inequality inside a cube

Is there a spell that can create a permanent fire?



Keep at all times, the minus sign above aligned with minus sign below



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)Force aligned equation (all the way) to the left?Passing an argument with the alignment operator (&) to a macro within another aligned environmentAligned Equation Resizing? (Above or Below textwidth)Why is the space below the numerator different to the space above the denominator?Align Equations with the equals signCall macro several times, output all the entriesAligning main (parent) equation along with all its associated sub-equations at the = signAlign the column with minus in in bmatrixNumbers with a minus sign in a matrix not aligned with the numbers without minus signTypeset equation with multiple aligned conditions on the right












2















How can I change the frg command such that I can create and maintain at all times the minus sign above aligned with minus sign below?
PS: If you can show how to include a font setting for the whole macro, I'll consider it a good additional contribution to this answer.



keep minus above align with minus below



documentclass{article}
newcommand{minus}{raisebox{.1in}{$-$ }}
newcommand{eq}{textbf{fontsize{45}{6}selectfontraisebox{-.16in}{scalebox{.5}[1.1]{= vspace{.03in}}}}}
usepackage{stackengine,scalerel}
defover{abovewithdelims...32em}
makeatletter
newcommand*{frg}[1]{%
frg@aux#1,,@nil
}
deffrg@aux#1,#2,#3@nil{%
ensuremath{ eq {{raisebox{.069in}{ centering mbox{fontsize{45}{6}selectfonttextbf{#1}} }}
over {raisebox{-.275in}{ centeringmbox{fontsize{45}{6}selectfonttextbf{#2}}}} }}
}
makeatother

begin{document}
frg{4 minus 3, 3 minus 1 }
end{document}









share|improve this question




















  • 1





    These are not minus signs, but hyphen dashes. I don't see what exactly you're trying to achieve.

    – Bernard
    3 hours ago






  • 1





    you don't give many hints of the intention of this construct, it looks like math but you are using text mode constructs, centering is doing nothing in a raisebox as that is set in horizontal mode, you have redefined over so this will change frac and buildrel which are defined in terms of `over.

    – David Carlisle
    3 hours ago








  • 2





    your example uses single digits so everything aligns naturally, but does your question mean you want frac{123-1}{1-123} with the - aligned?

    – David Carlisle
    2 hours ago






  • 1





    Exactly @DavidCarlisle, I imagine it is a sufficient condition to keep the two minus signs aligned. As for mixing text mode with mathematical mode in addition to the likely inefficient use of centering is by lack of experience, I would be grateful for your answer to this my adding issue to the fixes and enhancements to fix what was unnecessary to use in my code so that I can learn.

    – Diego Bnei Noah
    2 hours ago






  • 1





    I think marmot's answer does what you want. Not sure what else I could add.

    – David Carlisle
    2 hours ago
















2















How can I change the frg command such that I can create and maintain at all times the minus sign above aligned with minus sign below?
PS: If you can show how to include a font setting for the whole macro, I'll consider it a good additional contribution to this answer.



keep minus above align with minus below



documentclass{article}
newcommand{minus}{raisebox{.1in}{$-$ }}
newcommand{eq}{textbf{fontsize{45}{6}selectfontraisebox{-.16in}{scalebox{.5}[1.1]{= vspace{.03in}}}}}
usepackage{stackengine,scalerel}
defover{abovewithdelims...32em}
makeatletter
newcommand*{frg}[1]{%
frg@aux#1,,@nil
}
deffrg@aux#1,#2,#3@nil{%
ensuremath{ eq {{raisebox{.069in}{ centering mbox{fontsize{45}{6}selectfonttextbf{#1}} }}
over {raisebox{-.275in}{ centeringmbox{fontsize{45}{6}selectfonttextbf{#2}}}} }}
}
makeatother

begin{document}
frg{4 minus 3, 3 minus 1 }
end{document}









share|improve this question




















  • 1





    These are not minus signs, but hyphen dashes. I don't see what exactly you're trying to achieve.

    – Bernard
    3 hours ago






  • 1





    you don't give many hints of the intention of this construct, it looks like math but you are using text mode constructs, centering is doing nothing in a raisebox as that is set in horizontal mode, you have redefined over so this will change frac and buildrel which are defined in terms of `over.

    – David Carlisle
    3 hours ago








  • 2





    your example uses single digits so everything aligns naturally, but does your question mean you want frac{123-1}{1-123} with the - aligned?

    – David Carlisle
    2 hours ago






  • 1





    Exactly @DavidCarlisle, I imagine it is a sufficient condition to keep the two minus signs aligned. As for mixing text mode with mathematical mode in addition to the likely inefficient use of centering is by lack of experience, I would be grateful for your answer to this my adding issue to the fixes and enhancements to fix what was unnecessary to use in my code so that I can learn.

    – Diego Bnei Noah
    2 hours ago






  • 1





    I think marmot's answer does what you want. Not sure what else I could add.

    – David Carlisle
    2 hours ago














2












2








2


1






How can I change the frg command such that I can create and maintain at all times the minus sign above aligned with minus sign below?
PS: If you can show how to include a font setting for the whole macro, I'll consider it a good additional contribution to this answer.



keep minus above align with minus below



documentclass{article}
newcommand{minus}{raisebox{.1in}{$-$ }}
newcommand{eq}{textbf{fontsize{45}{6}selectfontraisebox{-.16in}{scalebox{.5}[1.1]{= vspace{.03in}}}}}
usepackage{stackengine,scalerel}
defover{abovewithdelims...32em}
makeatletter
newcommand*{frg}[1]{%
frg@aux#1,,@nil
}
deffrg@aux#1,#2,#3@nil{%
ensuremath{ eq {{raisebox{.069in}{ centering mbox{fontsize{45}{6}selectfonttextbf{#1}} }}
over {raisebox{-.275in}{ centeringmbox{fontsize{45}{6}selectfonttextbf{#2}}}} }}
}
makeatother

begin{document}
frg{4 minus 3, 3 minus 1 }
end{document}









share|improve this question
















How can I change the frg command such that I can create and maintain at all times the minus sign above aligned with minus sign below?
PS: If you can show how to include a font setting for the whole macro, I'll consider it a good additional contribution to this answer.



keep minus above align with minus below



documentclass{article}
newcommand{minus}{raisebox{.1in}{$-$ }}
newcommand{eq}{textbf{fontsize{45}{6}selectfontraisebox{-.16in}{scalebox{.5}[1.1]{= vspace{.03in}}}}}
usepackage{stackengine,scalerel}
defover{abovewithdelims...32em}
makeatletter
newcommand*{frg}[1]{%
frg@aux#1,,@nil
}
deffrg@aux#1,#2,#3@nil{%
ensuremath{ eq {{raisebox{.069in}{ centering mbox{fontsize{45}{6}selectfonttextbf{#1}} }}
over {raisebox{-.275in}{ centeringmbox{fontsize{45}{6}selectfonttextbf{#2}}}} }}
}
makeatother

begin{document}
frg{4 minus 3, 3 minus 1 }
end{document}






macros align fractions






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 27 mins ago







Diego Bnei Noah

















asked 3 hours ago









Diego Bnei NoahDiego Bnei Noah

1669




1669








  • 1





    These are not minus signs, but hyphen dashes. I don't see what exactly you're trying to achieve.

    – Bernard
    3 hours ago






  • 1





    you don't give many hints of the intention of this construct, it looks like math but you are using text mode constructs, centering is doing nothing in a raisebox as that is set in horizontal mode, you have redefined over so this will change frac and buildrel which are defined in terms of `over.

    – David Carlisle
    3 hours ago








  • 2





    your example uses single digits so everything aligns naturally, but does your question mean you want frac{123-1}{1-123} with the - aligned?

    – David Carlisle
    2 hours ago






  • 1





    Exactly @DavidCarlisle, I imagine it is a sufficient condition to keep the two minus signs aligned. As for mixing text mode with mathematical mode in addition to the likely inefficient use of centering is by lack of experience, I would be grateful for your answer to this my adding issue to the fixes and enhancements to fix what was unnecessary to use in my code so that I can learn.

    – Diego Bnei Noah
    2 hours ago






  • 1





    I think marmot's answer does what you want. Not sure what else I could add.

    – David Carlisle
    2 hours ago














  • 1





    These are not minus signs, but hyphen dashes. I don't see what exactly you're trying to achieve.

    – Bernard
    3 hours ago






  • 1





    you don't give many hints of the intention of this construct, it looks like math but you are using text mode constructs, centering is doing nothing in a raisebox as that is set in horizontal mode, you have redefined over so this will change frac and buildrel which are defined in terms of `over.

    – David Carlisle
    3 hours ago








  • 2





    your example uses single digits so everything aligns naturally, but does your question mean you want frac{123-1}{1-123} with the - aligned?

    – David Carlisle
    2 hours ago






  • 1





    Exactly @DavidCarlisle, I imagine it is a sufficient condition to keep the two minus signs aligned. As for mixing text mode with mathematical mode in addition to the likely inefficient use of centering is by lack of experience, I would be grateful for your answer to this my adding issue to the fixes and enhancements to fix what was unnecessary to use in my code so that I can learn.

    – Diego Bnei Noah
    2 hours ago






  • 1





    I think marmot's answer does what you want. Not sure what else I could add.

    – David Carlisle
    2 hours ago








1




1





These are not minus signs, but hyphen dashes. I don't see what exactly you're trying to achieve.

– Bernard
3 hours ago





These are not minus signs, but hyphen dashes. I don't see what exactly you're trying to achieve.

– Bernard
3 hours ago




1




1





you don't give many hints of the intention of this construct, it looks like math but you are using text mode constructs, centering is doing nothing in a raisebox as that is set in horizontal mode, you have redefined over so this will change frac and buildrel which are defined in terms of `over.

– David Carlisle
3 hours ago







you don't give many hints of the intention of this construct, it looks like math but you are using text mode constructs, centering is doing nothing in a raisebox as that is set in horizontal mode, you have redefined over so this will change frac and buildrel which are defined in terms of `over.

– David Carlisle
3 hours ago






2




2





your example uses single digits so everything aligns naturally, but does your question mean you want frac{123-1}{1-123} with the - aligned?

– David Carlisle
2 hours ago





your example uses single digits so everything aligns naturally, but does your question mean you want frac{123-1}{1-123} with the - aligned?

– David Carlisle
2 hours ago




1




1





Exactly @DavidCarlisle, I imagine it is a sufficient condition to keep the two minus signs aligned. As for mixing text mode with mathematical mode in addition to the likely inefficient use of centering is by lack of experience, I would be grateful for your answer to this my adding issue to the fixes and enhancements to fix what was unnecessary to use in my code so that I can learn.

– Diego Bnei Noah
2 hours ago





Exactly @DavidCarlisle, I imagine it is a sufficient condition to keep the two minus signs aligned. As for mixing text mode with mathematical mode in addition to the likely inefficient use of centering is by lack of experience, I would be grateful for your answer to this my adding issue to the fixes and enhancements to fix what was unnecessary to use in my code so that I can learn.

– Diego Bnei Noah
2 hours ago




1




1





I think marmot's answer does what you want. Not sure what else I could add.

– David Carlisle
2 hours ago





I think marmot's answer does what you want. Not sure what else I could add.

– David Carlisle
2 hours ago










2 Answers
2






active

oldest

votes


















3














I do not know what the purpose of this exercise is but alignment can e.g. achieved with an array. Notice that I didn't pay any attention to spacing, bold and etc. because I do not know the purpose.



documentclass{article}
makeatletter
deffrg@aux#1-#2,#3-#4@nil{begin{array}{@{,}r@{}c@{}l@{,}}
#1&-&#2\
hline
#3&-&#4
end{array}}
deffrg#1{frg@aux#1@nil}
makeatother

begin{document}
[ a=frg{4 - 3, 3 - 1 }]
end{document}


enter image description here






share|improve this answer



















  • 1





    Really @marmot, for academic use it is indifferent most often the alignment of operators within a fraction. But the need to specify the position of the operators in this case refers to the fate that I intend to give inside in the education of very small children in order to facilitate the visual reading. I have used very little array command, I have tried a few different modes such as begin {align *} ... end {align *} but always with errors. I am still learning, grateful for your help and all who have made further comments.

    – Diego Bnei Noah
    2 hours ago



















4














Do you mean like this?



documentclass{article}
usepackage{xparse,array}

ExplSyntaxOn

NewDocumentCommand{frg}{mm}
{
dbn_frg:nn { #1 } { #2 }
}

tl_new:N l__dbn_frg_num_tl
tl_new:N l__dbn_frg_den_tl

cs_new_protected:Nn dbn_frg:nn
{
tl_set:Nn l__dbn_frg_num_tl { #1 }
tl_set:Nn l__dbn_frg_den_tl { #2 }
regex_replace_once:nnN { (+|-) } { cT& 1 cT& } l__dbn_frg_num_tl
regex_replace_once:nnN { (+|-) } { cT& 1 cT& } l__dbn_frg_den_tl
begin{array}{@{} r @{} >{{}}c<{{}} @{} l @{} }
l__dbn_frg_num_tl \
hline
l__dbn_frg_den_tl
end{array}
}

ExplSyntaxOff

begin{document}

[
frg{4-3}{4-1}qquad frg{4+3}{4+11} qquad frg{15-2}{6+12}
]

end{document}


enter image description here






share|improve this answer
























  • Yes, just as @marmot's answer to yours is also appropriate because you agree to increase the fraction bar thickness using hline [number] and also to decrease or increase the space between the denominator, bar, and numerator using vspace { number} or something. Now I'm looking for a way to apply a font type in a single command to the whole macro set if you have any suggestions. Thank you for your response.

    – Diego Bnei Noah
    38 mins ago












Your Answer








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

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

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
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%2f485948%2fkeep-at-all-times-the-minus-sign-above-aligned-with-minus-sign-below%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









3














I do not know what the purpose of this exercise is but alignment can e.g. achieved with an array. Notice that I didn't pay any attention to spacing, bold and etc. because I do not know the purpose.



documentclass{article}
makeatletter
deffrg@aux#1-#2,#3-#4@nil{begin{array}{@{,}r@{}c@{}l@{,}}
#1&-&#2\
hline
#3&-&#4
end{array}}
deffrg#1{frg@aux#1@nil}
makeatother

begin{document}
[ a=frg{4 - 3, 3 - 1 }]
end{document}


enter image description here






share|improve this answer



















  • 1





    Really @marmot, for academic use it is indifferent most often the alignment of operators within a fraction. But the need to specify the position of the operators in this case refers to the fate that I intend to give inside in the education of very small children in order to facilitate the visual reading. I have used very little array command, I have tried a few different modes such as begin {align *} ... end {align *} but always with errors. I am still learning, grateful for your help and all who have made further comments.

    – Diego Bnei Noah
    2 hours ago
















3














I do not know what the purpose of this exercise is but alignment can e.g. achieved with an array. Notice that I didn't pay any attention to spacing, bold and etc. because I do not know the purpose.



documentclass{article}
makeatletter
deffrg@aux#1-#2,#3-#4@nil{begin{array}{@{,}r@{}c@{}l@{,}}
#1&-&#2\
hline
#3&-&#4
end{array}}
deffrg#1{frg@aux#1@nil}
makeatother

begin{document}
[ a=frg{4 - 3, 3 - 1 }]
end{document}


enter image description here






share|improve this answer



















  • 1





    Really @marmot, for academic use it is indifferent most often the alignment of operators within a fraction. But the need to specify the position of the operators in this case refers to the fate that I intend to give inside in the education of very small children in order to facilitate the visual reading. I have used very little array command, I have tried a few different modes such as begin {align *} ... end {align *} but always with errors. I am still learning, grateful for your help and all who have made further comments.

    – Diego Bnei Noah
    2 hours ago














3












3








3







I do not know what the purpose of this exercise is but alignment can e.g. achieved with an array. Notice that I didn't pay any attention to spacing, bold and etc. because I do not know the purpose.



documentclass{article}
makeatletter
deffrg@aux#1-#2,#3-#4@nil{begin{array}{@{,}r@{}c@{}l@{,}}
#1&-&#2\
hline
#3&-&#4
end{array}}
deffrg#1{frg@aux#1@nil}
makeatother

begin{document}
[ a=frg{4 - 3, 3 - 1 }]
end{document}


enter image description here






share|improve this answer













I do not know what the purpose of this exercise is but alignment can e.g. achieved with an array. Notice that I didn't pay any attention to spacing, bold and etc. because I do not know the purpose.



documentclass{article}
makeatletter
deffrg@aux#1-#2,#3-#4@nil{begin{array}{@{,}r@{}c@{}l@{,}}
#1&-&#2\
hline
#3&-&#4
end{array}}
deffrg#1{frg@aux#1@nil}
makeatother

begin{document}
[ a=frg{4 - 3, 3 - 1 }]
end{document}


enter image description here







share|improve this answer












share|improve this answer



share|improve this answer










answered 3 hours ago









marmotmarmot

120k6156292




120k6156292








  • 1





    Really @marmot, for academic use it is indifferent most often the alignment of operators within a fraction. But the need to specify the position of the operators in this case refers to the fate that I intend to give inside in the education of very small children in order to facilitate the visual reading. I have used very little array command, I have tried a few different modes such as begin {align *} ... end {align *} but always with errors. I am still learning, grateful for your help and all who have made further comments.

    – Diego Bnei Noah
    2 hours ago














  • 1





    Really @marmot, for academic use it is indifferent most often the alignment of operators within a fraction. But the need to specify the position of the operators in this case refers to the fate that I intend to give inside in the education of very small children in order to facilitate the visual reading. I have used very little array command, I have tried a few different modes such as begin {align *} ... end {align *} but always with errors. I am still learning, grateful for your help and all who have made further comments.

    – Diego Bnei Noah
    2 hours ago








1




1





Really @marmot, for academic use it is indifferent most often the alignment of operators within a fraction. But the need to specify the position of the operators in this case refers to the fate that I intend to give inside in the education of very small children in order to facilitate the visual reading. I have used very little array command, I have tried a few different modes such as begin {align *} ... end {align *} but always with errors. I am still learning, grateful for your help and all who have made further comments.

– Diego Bnei Noah
2 hours ago





Really @marmot, for academic use it is indifferent most often the alignment of operators within a fraction. But the need to specify the position of the operators in this case refers to the fate that I intend to give inside in the education of very small children in order to facilitate the visual reading. I have used very little array command, I have tried a few different modes such as begin {align *} ... end {align *} but always with errors. I am still learning, grateful for your help and all who have made further comments.

– Diego Bnei Noah
2 hours ago











4














Do you mean like this?



documentclass{article}
usepackage{xparse,array}

ExplSyntaxOn

NewDocumentCommand{frg}{mm}
{
dbn_frg:nn { #1 } { #2 }
}

tl_new:N l__dbn_frg_num_tl
tl_new:N l__dbn_frg_den_tl

cs_new_protected:Nn dbn_frg:nn
{
tl_set:Nn l__dbn_frg_num_tl { #1 }
tl_set:Nn l__dbn_frg_den_tl { #2 }
regex_replace_once:nnN { (+|-) } { cT& 1 cT& } l__dbn_frg_num_tl
regex_replace_once:nnN { (+|-) } { cT& 1 cT& } l__dbn_frg_den_tl
begin{array}{@{} r @{} >{{}}c<{{}} @{} l @{} }
l__dbn_frg_num_tl \
hline
l__dbn_frg_den_tl
end{array}
}

ExplSyntaxOff

begin{document}

[
frg{4-3}{4-1}qquad frg{4+3}{4+11} qquad frg{15-2}{6+12}
]

end{document}


enter image description here






share|improve this answer
























  • Yes, just as @marmot's answer to yours is also appropriate because you agree to increase the fraction bar thickness using hline [number] and also to decrease or increase the space between the denominator, bar, and numerator using vspace { number} or something. Now I'm looking for a way to apply a font type in a single command to the whole macro set if you have any suggestions. Thank you for your response.

    – Diego Bnei Noah
    38 mins ago
















4














Do you mean like this?



documentclass{article}
usepackage{xparse,array}

ExplSyntaxOn

NewDocumentCommand{frg}{mm}
{
dbn_frg:nn { #1 } { #2 }
}

tl_new:N l__dbn_frg_num_tl
tl_new:N l__dbn_frg_den_tl

cs_new_protected:Nn dbn_frg:nn
{
tl_set:Nn l__dbn_frg_num_tl { #1 }
tl_set:Nn l__dbn_frg_den_tl { #2 }
regex_replace_once:nnN { (+|-) } { cT& 1 cT& } l__dbn_frg_num_tl
regex_replace_once:nnN { (+|-) } { cT& 1 cT& } l__dbn_frg_den_tl
begin{array}{@{} r @{} >{{}}c<{{}} @{} l @{} }
l__dbn_frg_num_tl \
hline
l__dbn_frg_den_tl
end{array}
}

ExplSyntaxOff

begin{document}

[
frg{4-3}{4-1}qquad frg{4+3}{4+11} qquad frg{15-2}{6+12}
]

end{document}


enter image description here






share|improve this answer
























  • Yes, just as @marmot's answer to yours is also appropriate because you agree to increase the fraction bar thickness using hline [number] and also to decrease or increase the space between the denominator, bar, and numerator using vspace { number} or something. Now I'm looking for a way to apply a font type in a single command to the whole macro set if you have any suggestions. Thank you for your response.

    – Diego Bnei Noah
    38 mins ago














4












4








4







Do you mean like this?



documentclass{article}
usepackage{xparse,array}

ExplSyntaxOn

NewDocumentCommand{frg}{mm}
{
dbn_frg:nn { #1 } { #2 }
}

tl_new:N l__dbn_frg_num_tl
tl_new:N l__dbn_frg_den_tl

cs_new_protected:Nn dbn_frg:nn
{
tl_set:Nn l__dbn_frg_num_tl { #1 }
tl_set:Nn l__dbn_frg_den_tl { #2 }
regex_replace_once:nnN { (+|-) } { cT& 1 cT& } l__dbn_frg_num_tl
regex_replace_once:nnN { (+|-) } { cT& 1 cT& } l__dbn_frg_den_tl
begin{array}{@{} r @{} >{{}}c<{{}} @{} l @{} }
l__dbn_frg_num_tl \
hline
l__dbn_frg_den_tl
end{array}
}

ExplSyntaxOff

begin{document}

[
frg{4-3}{4-1}qquad frg{4+3}{4+11} qquad frg{15-2}{6+12}
]

end{document}


enter image description here






share|improve this answer













Do you mean like this?



documentclass{article}
usepackage{xparse,array}

ExplSyntaxOn

NewDocumentCommand{frg}{mm}
{
dbn_frg:nn { #1 } { #2 }
}

tl_new:N l__dbn_frg_num_tl
tl_new:N l__dbn_frg_den_tl

cs_new_protected:Nn dbn_frg:nn
{
tl_set:Nn l__dbn_frg_num_tl { #1 }
tl_set:Nn l__dbn_frg_den_tl { #2 }
regex_replace_once:nnN { (+|-) } { cT& 1 cT& } l__dbn_frg_num_tl
regex_replace_once:nnN { (+|-) } { cT& 1 cT& } l__dbn_frg_den_tl
begin{array}{@{} r @{} >{{}}c<{{}} @{} l @{} }
l__dbn_frg_num_tl \
hline
l__dbn_frg_den_tl
end{array}
}

ExplSyntaxOff

begin{document}

[
frg{4-3}{4-1}qquad frg{4+3}{4+11} qquad frg{15-2}{6+12}
]

end{document}


enter image description here







share|improve this answer












share|improve this answer



share|improve this answer










answered 54 mins ago









egregegreg

736k8919353261




736k8919353261













  • Yes, just as @marmot's answer to yours is also appropriate because you agree to increase the fraction bar thickness using hline [number] and also to decrease or increase the space between the denominator, bar, and numerator using vspace { number} or something. Now I'm looking for a way to apply a font type in a single command to the whole macro set if you have any suggestions. Thank you for your response.

    – Diego Bnei Noah
    38 mins ago



















  • Yes, just as @marmot's answer to yours is also appropriate because you agree to increase the fraction bar thickness using hline [number] and also to decrease or increase the space between the denominator, bar, and numerator using vspace { number} or something. Now I'm looking for a way to apply a font type in a single command to the whole macro set if you have any suggestions. Thank you for your response.

    – Diego Bnei Noah
    38 mins ago

















Yes, just as @marmot's answer to yours is also appropriate because you agree to increase the fraction bar thickness using hline [number] and also to decrease or increase the space between the denominator, bar, and numerator using vspace { number} or something. Now I'm looking for a way to apply a font type in a single command to the whole macro set if you have any suggestions. Thank you for your response.

– Diego Bnei Noah
38 mins ago





Yes, just as @marmot's answer to yours is also appropriate because you agree to increase the fraction bar thickness using hline [number] and also to decrease or increase the space between the denominator, bar, and numerator using vspace { number} or something. Now I'm looking for a way to apply a font type in a single command to the whole macro set if you have any suggestions. Thank you for your response.

– Diego Bnei Noah
38 mins 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%2f485948%2fkeep-at-all-times-the-minus-sign-above-aligned-with-minus-sign-below%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

“%fieldName is a required field.”, in Magento2 REST API Call for GET Method Type The Next...

How to change City field to a dropdown in Checkout step Magento 2Magento 2 : How to change UI field(s)...

變成蝙蝠會怎樣? 參考資料 外部連結 导航菜单Thomas Nagel, "What is it like to be a...