How to typeset an invisible paired delimiter, preferably using MathTools?
Clash Royale CLAN TAG#URR8PPP
up vote
2
down vote
favorite
I'm trying to typeset the simplification/expansion of a fraction using the notation below, but I would like the numerator to be centered and the 5cdot 4)
to be to the left and above of the entire fraction without the division line being distorted or stretched in any way by it.
I figured that if I could declare a set of invisible delimiters using DeclarePairedDelimiter<command><left delimiter><right delimiter>
the task would be simple, since I could simply place the fraction inside the delimiters and place the 5cdot 4)
relative to the entire block, but I'm not sure if this is possible. Using DeclarePairedDelimiterinvis..
didn't work.
I'm open to other solutions, but if someone has a solution using this particular method, it would make my life a lot simpler.
delimiters fractions mathtools
add a comment |Â
up vote
2
down vote
favorite
I'm trying to typeset the simplification/expansion of a fraction using the notation below, but I would like the numerator to be centered and the 5cdot 4)
to be to the left and above of the entire fraction without the division line being distorted or stretched in any way by it.
I figured that if I could declare a set of invisible delimiters using DeclarePairedDelimiter<command><left delimiter><right delimiter>
the task would be simple, since I could simply place the fraction inside the delimiters and place the 5cdot 4)
relative to the entire block, but I'm not sure if this is possible. Using DeclarePairedDelimiterinvis..
didn't work.
I'm open to other solutions, but if someone has a solution using this particular method, it would make my life a lot simpler.
delimiters fractions mathtools
add a comment |Â
up vote
2
down vote
favorite
up vote
2
down vote
favorite
I'm trying to typeset the simplification/expansion of a fraction using the notation below, but I would like the numerator to be centered and the 5cdot 4)
to be to the left and above of the entire fraction without the division line being distorted or stretched in any way by it.
I figured that if I could declare a set of invisible delimiters using DeclarePairedDelimiter<command><left delimiter><right delimiter>
the task would be simple, since I could simply place the fraction inside the delimiters and place the 5cdot 4)
relative to the entire block, but I'm not sure if this is possible. Using DeclarePairedDelimiterinvis..
didn't work.
I'm open to other solutions, but if someone has a solution using this particular method, it would make my life a lot simpler.
delimiters fractions mathtools
I'm trying to typeset the simplification/expansion of a fraction using the notation below, but I would like the numerator to be centered and the 5cdot 4)
to be to the left and above of the entire fraction without the division line being distorted or stretched in any way by it.
I figured that if I could declare a set of invisible delimiters using DeclarePairedDelimiter<command><left delimiter><right delimiter>
the task would be simple, since I could simply place the fraction inside the delimiters and place the 5cdot 4)
relative to the entire block, but I'm not sure if this is possible. Using DeclarePairedDelimiterinvis..
didn't work.
I'm open to other solutions, but if someone has a solution using this particular method, it would make my life a lot simpler.
delimiters fractions mathtools
delimiters fractions mathtools
edited 1 hour ago
asked 1 hour ago


TheSodesa
726
726
add a comment |Â
add a comment |Â
3 Answers
3
active
oldest
votes
up vote
2
down vote
accepted
I would like the numerator to be centered and the 5cdot 4) to be to the left and above of the entire fraction without the division line being distorted or stretched in any way by it.
APPROACH 1
In this approach, the superscript will precede the full fraction, rather than just the numerator. It will also take up horizontal space, rather than be a lapped quantity.
EDITED to allow [l]
eft or [r]
ight positioning with use of optional argument.
documentclassarticle
usepackagestackengine
newcommandsimpex[3][l]%
savestackthefrac$displaystyle#3$
ifx l#1rule0pthtthefraccontent^#2)!fi
#3
ifx r#1rule0pthtthefraccontent^!(#2fi
begindocument
[
simpex5cdot 4frac117
textrm versus
simpex[r]5cdot 4frac117
]
enddocument
APPROACH 2
Being a mathllap
, there could be spacing issues with adjacent material. However, without more information on the use cases, it is hard to develop a remedy for that in the blind.
For example, will it always lead a line? Will it always be part of a fraction? If so, will it always be in the numerator? etc.
documentclassarticle
usepackagemathtools
begindocument
[
fracmathllap^5cdot 4)117
]
enddocument
What if I wanted achieve the same thing, but on the right side of the fraction? So instead of5 cdot 4)
being on the above left, I would have(5 cdot 4
on the above right side of the fraction.
– TheSodesa
32 mins ago
@TheSodesa See my edit. I introduce an optional argument to handle left or right positioning.
– Steven B. Segletes
21 mins ago
add a comment |Â
up vote
2
down vote
Here's a solution that employs just the TeX primitives raise
and hbox
. The macro mysimp
is defined to take three arguments, one of which is optional. The optional argument sets the vertical displacement by which the first mandatory argument must be raised. The default value of the vertical displacement is 3ex
, which seems about right if the final argument contains a display-style fractional term.
Remove the scriptstyle
directive if the left-superscript term should be typeset in text-style and not in scriptstyle
.
documentclassarticle
newcommandmysimp[3][3ex]raise#1hbox$scriptstyle #2$ ! #3
begindocument
[
mysimp5cdot4)frac117 qquad mysimp[1.25ex]uvabc
]
enddocument
1
@PhelypeOleinik - Thanks for the edit!
– Mico
21 mins ago
add a comment |Â
up vote
2
down vote
Is it one of these you want? They use stackengine
:
documentclassarticle
usepackagemathtools
usepackage[usestackEOL]stackengine
setstackgapS1pt
begindocument
[ A = stackMathShortstackmathllapscriptstyle 5cdot 4)\dfrac117 ]%
[ A = stackMath
setstackgapS-1exShortstackmathllapscriptstyle 5cdot 4):\dfrac117 ]%
enddocument
Edit: This code uses only mathtools
:
[ A = prescriptmathllap5cdot 4)mkern-8mufrac117 ]%
add a comment |Â
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
accepted
I would like the numerator to be centered and the 5cdot 4) to be to the left and above of the entire fraction without the division line being distorted or stretched in any way by it.
APPROACH 1
In this approach, the superscript will precede the full fraction, rather than just the numerator. It will also take up horizontal space, rather than be a lapped quantity.
EDITED to allow [l]
eft or [r]
ight positioning with use of optional argument.
documentclassarticle
usepackagestackengine
newcommandsimpex[3][l]%
savestackthefrac$displaystyle#3$
ifx l#1rule0pthtthefraccontent^#2)!fi
#3
ifx r#1rule0pthtthefraccontent^!(#2fi
begindocument
[
simpex5cdot 4frac117
textrm versus
simpex[r]5cdot 4frac117
]
enddocument
APPROACH 2
Being a mathllap
, there could be spacing issues with adjacent material. However, without more information on the use cases, it is hard to develop a remedy for that in the blind.
For example, will it always lead a line? Will it always be part of a fraction? If so, will it always be in the numerator? etc.
documentclassarticle
usepackagemathtools
begindocument
[
fracmathllap^5cdot 4)117
]
enddocument
What if I wanted achieve the same thing, but on the right side of the fraction? So instead of5 cdot 4)
being on the above left, I would have(5 cdot 4
on the above right side of the fraction.
– TheSodesa
32 mins ago
@TheSodesa See my edit. I introduce an optional argument to handle left or right positioning.
– Steven B. Segletes
21 mins ago
add a comment |Â
up vote
2
down vote
accepted
I would like the numerator to be centered and the 5cdot 4) to be to the left and above of the entire fraction without the division line being distorted or stretched in any way by it.
APPROACH 1
In this approach, the superscript will precede the full fraction, rather than just the numerator. It will also take up horizontal space, rather than be a lapped quantity.
EDITED to allow [l]
eft or [r]
ight positioning with use of optional argument.
documentclassarticle
usepackagestackengine
newcommandsimpex[3][l]%
savestackthefrac$displaystyle#3$
ifx l#1rule0pthtthefraccontent^#2)!fi
#3
ifx r#1rule0pthtthefraccontent^!(#2fi
begindocument
[
simpex5cdot 4frac117
textrm versus
simpex[r]5cdot 4frac117
]
enddocument
APPROACH 2
Being a mathllap
, there could be spacing issues with adjacent material. However, without more information on the use cases, it is hard to develop a remedy for that in the blind.
For example, will it always lead a line? Will it always be part of a fraction? If so, will it always be in the numerator? etc.
documentclassarticle
usepackagemathtools
begindocument
[
fracmathllap^5cdot 4)117
]
enddocument
What if I wanted achieve the same thing, but on the right side of the fraction? So instead of5 cdot 4)
being on the above left, I would have(5 cdot 4
on the above right side of the fraction.
– TheSodesa
32 mins ago
@TheSodesa See my edit. I introduce an optional argument to handle left or right positioning.
– Steven B. Segletes
21 mins ago
add a comment |Â
up vote
2
down vote
accepted
up vote
2
down vote
accepted
I would like the numerator to be centered and the 5cdot 4) to be to the left and above of the entire fraction without the division line being distorted or stretched in any way by it.
APPROACH 1
In this approach, the superscript will precede the full fraction, rather than just the numerator. It will also take up horizontal space, rather than be a lapped quantity.
EDITED to allow [l]
eft or [r]
ight positioning with use of optional argument.
documentclassarticle
usepackagestackengine
newcommandsimpex[3][l]%
savestackthefrac$displaystyle#3$
ifx l#1rule0pthtthefraccontent^#2)!fi
#3
ifx r#1rule0pthtthefraccontent^!(#2fi
begindocument
[
simpex5cdot 4frac117
textrm versus
simpex[r]5cdot 4frac117
]
enddocument
APPROACH 2
Being a mathllap
, there could be spacing issues with adjacent material. However, without more information on the use cases, it is hard to develop a remedy for that in the blind.
For example, will it always lead a line? Will it always be part of a fraction? If so, will it always be in the numerator? etc.
documentclassarticle
usepackagemathtools
begindocument
[
fracmathllap^5cdot 4)117
]
enddocument
I would like the numerator to be centered and the 5cdot 4) to be to the left and above of the entire fraction without the division line being distorted or stretched in any way by it.
APPROACH 1
In this approach, the superscript will precede the full fraction, rather than just the numerator. It will also take up horizontal space, rather than be a lapped quantity.
EDITED to allow [l]
eft or [r]
ight positioning with use of optional argument.
documentclassarticle
usepackagestackengine
newcommandsimpex[3][l]%
savestackthefrac$displaystyle#3$
ifx l#1rule0pthtthefraccontent^#2)!fi
#3
ifx r#1rule0pthtthefraccontent^!(#2fi
begindocument
[
simpex5cdot 4frac117
textrm versus
simpex[r]5cdot 4frac117
]
enddocument
APPROACH 2
Being a mathllap
, there could be spacing issues with adjacent material. However, without more information on the use cases, it is hard to develop a remedy for that in the blind.
For example, will it always lead a line? Will it always be part of a fraction? If so, will it always be in the numerator? etc.
documentclassarticle
usepackagemathtools
begindocument
[
fracmathllap^5cdot 4)117
]
enddocument
edited 22 mins ago
answered 1 hour ago


Steven B. Segletes
148k9186390
148k9186390
What if I wanted achieve the same thing, but on the right side of the fraction? So instead of5 cdot 4)
being on the above left, I would have(5 cdot 4
on the above right side of the fraction.
– TheSodesa
32 mins ago
@TheSodesa See my edit. I introduce an optional argument to handle left or right positioning.
– Steven B. Segletes
21 mins ago
add a comment |Â
What if I wanted achieve the same thing, but on the right side of the fraction? So instead of5 cdot 4)
being on the above left, I would have(5 cdot 4
on the above right side of the fraction.
– TheSodesa
32 mins ago
@TheSodesa See my edit. I introduce an optional argument to handle left or right positioning.
– Steven B. Segletes
21 mins ago
What if I wanted achieve the same thing, but on the right side of the fraction? So instead of
5 cdot 4)
being on the above left, I would have (5 cdot 4
on the above right side of the fraction.– TheSodesa
32 mins ago
What if I wanted achieve the same thing, but on the right side of the fraction? So instead of
5 cdot 4)
being on the above left, I would have (5 cdot 4
on the above right side of the fraction.– TheSodesa
32 mins ago
@TheSodesa See my edit. I introduce an optional argument to handle left or right positioning.
– Steven B. Segletes
21 mins ago
@TheSodesa See my edit. I introduce an optional argument to handle left or right positioning.
– Steven B. Segletes
21 mins ago
add a comment |Â
up vote
2
down vote
Here's a solution that employs just the TeX primitives raise
and hbox
. The macro mysimp
is defined to take three arguments, one of which is optional. The optional argument sets the vertical displacement by which the first mandatory argument must be raised. The default value of the vertical displacement is 3ex
, which seems about right if the final argument contains a display-style fractional term.
Remove the scriptstyle
directive if the left-superscript term should be typeset in text-style and not in scriptstyle
.
documentclassarticle
newcommandmysimp[3][3ex]raise#1hbox$scriptstyle #2$ ! #3
begindocument
[
mysimp5cdot4)frac117 qquad mysimp[1.25ex]uvabc
]
enddocument
1
@PhelypeOleinik - Thanks for the edit!
– Mico
21 mins ago
add a comment |Â
up vote
2
down vote
Here's a solution that employs just the TeX primitives raise
and hbox
. The macro mysimp
is defined to take three arguments, one of which is optional. The optional argument sets the vertical displacement by which the first mandatory argument must be raised. The default value of the vertical displacement is 3ex
, which seems about right if the final argument contains a display-style fractional term.
Remove the scriptstyle
directive if the left-superscript term should be typeset in text-style and not in scriptstyle
.
documentclassarticle
newcommandmysimp[3][3ex]raise#1hbox$scriptstyle #2$ ! #3
begindocument
[
mysimp5cdot4)frac117 qquad mysimp[1.25ex]uvabc
]
enddocument
1
@PhelypeOleinik - Thanks for the edit!
– Mico
21 mins ago
add a comment |Â
up vote
2
down vote
up vote
2
down vote
Here's a solution that employs just the TeX primitives raise
and hbox
. The macro mysimp
is defined to take three arguments, one of which is optional. The optional argument sets the vertical displacement by which the first mandatory argument must be raised. The default value of the vertical displacement is 3ex
, which seems about right if the final argument contains a display-style fractional term.
Remove the scriptstyle
directive if the left-superscript term should be typeset in text-style and not in scriptstyle
.
documentclassarticle
newcommandmysimp[3][3ex]raise#1hbox$scriptstyle #2$ ! #3
begindocument
[
mysimp5cdot4)frac117 qquad mysimp[1.25ex]uvabc
]
enddocument
Here's a solution that employs just the TeX primitives raise
and hbox
. The macro mysimp
is defined to take three arguments, one of which is optional. The optional argument sets the vertical displacement by which the first mandatory argument must be raised. The default value of the vertical displacement is 3ex
, which seems about right if the final argument contains a display-style fractional term.
Remove the scriptstyle
directive if the left-superscript term should be typeset in text-style and not in scriptstyle
.
documentclassarticle
newcommandmysimp[3][3ex]raise#1hbox$scriptstyle #2$ ! #3
begindocument
[
mysimp5cdot4)frac117 qquad mysimp[1.25ex]uvabc
]
enddocument
edited 43 mins ago


Phelype Oleinik
17.4k43771
17.4k43771
answered 48 mins ago


Mico
265k30356736
265k30356736
1
@PhelypeOleinik - Thanks for the edit!
– Mico
21 mins ago
add a comment |Â
1
@PhelypeOleinik - Thanks for the edit!
– Mico
21 mins ago
1
1
@PhelypeOleinik - Thanks for the edit!
– Mico
21 mins ago
@PhelypeOleinik - Thanks for the edit!
– Mico
21 mins ago
add a comment |Â
up vote
2
down vote
Is it one of these you want? They use stackengine
:
documentclassarticle
usepackagemathtools
usepackage[usestackEOL]stackengine
setstackgapS1pt
begindocument
[ A = stackMathShortstackmathllapscriptstyle 5cdot 4)\dfrac117 ]%
[ A = stackMath
setstackgapS-1exShortstackmathllapscriptstyle 5cdot 4):\dfrac117 ]%
enddocument
Edit: This code uses only mathtools
:
[ A = prescriptmathllap5cdot 4)mkern-8mufrac117 ]%
add a comment |Â
up vote
2
down vote
Is it one of these you want? They use stackengine
:
documentclassarticle
usepackagemathtools
usepackage[usestackEOL]stackengine
setstackgapS1pt
begindocument
[ A = stackMathShortstackmathllapscriptstyle 5cdot 4)\dfrac117 ]%
[ A = stackMath
setstackgapS-1exShortstackmathllapscriptstyle 5cdot 4):\dfrac117 ]%
enddocument
Edit: This code uses only mathtools
:
[ A = prescriptmathllap5cdot 4)mkern-8mufrac117 ]%
add a comment |Â
up vote
2
down vote
up vote
2
down vote
Is it one of these you want? They use stackengine
:
documentclassarticle
usepackagemathtools
usepackage[usestackEOL]stackengine
setstackgapS1pt
begindocument
[ A = stackMathShortstackmathllapscriptstyle 5cdot 4)\dfrac117 ]%
[ A = stackMath
setstackgapS-1exShortstackmathllapscriptstyle 5cdot 4):\dfrac117 ]%
enddocument
Edit: This code uses only mathtools
:
[ A = prescriptmathllap5cdot 4)mkern-8mufrac117 ]%
Is it one of these you want? They use stackengine
:
documentclassarticle
usepackagemathtools
usepackage[usestackEOL]stackengine
setstackgapS1pt
begindocument
[ A = stackMathShortstackmathllapscriptstyle 5cdot 4)\dfrac117 ]%
[ A = stackMath
setstackgapS-1exShortstackmathllapscriptstyle 5cdot 4):\dfrac117 ]%
enddocument
Edit: This code uses only mathtools
:
[ A = prescriptmathllap5cdot 4)mkern-8mufrac117 ]%
edited 29 mins ago
answered 42 mins ago
Bernard
157k764190
157k764190
add a comment |Â
add a comment |Â
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
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f453627%2fhow-to-typeset-an-invisible-paired-delimiter-preferably-using-mathtools%23new-answer', 'question_page');
);
Post as a guest
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
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
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