How to write a character overlapping another character
Clash Royale CLAN TAG#URR8PPP
How can I write two characters in the same place?
In particular, I want to write an arrow $rightarrow$
, and then write a letter such that the arrow strikes through the letter. I found some similar questions (Range symbol over character, Substitute a character by another one (Lualatex), etc.) but they are not exactly the same question.
symbols
add a comment |
How can I write two characters in the same place?
In particular, I want to write an arrow $rightarrow$
, and then write a letter such that the arrow strikes through the letter. I found some similar questions (Range symbol over character, Substitute a character by another one (Lualatex), etc.) but they are not exactly the same question.
symbols
5
Since an arrow is wider than almost every character, what do you plan to do with the excess?
– egreg
Feb 19 at 13:45
A simple but probably naive way isrlap$rightarrow$x
. Like egreg wrote, you need to figure out which way the excess should go. Note that theadjustbox
package give further ways to lap content to all directions.
– Martin Scharrer♦
Feb 19 at 14:45
add a comment |
How can I write two characters in the same place?
In particular, I want to write an arrow $rightarrow$
, and then write a letter such that the arrow strikes through the letter. I found some similar questions (Range symbol over character, Substitute a character by another one (Lualatex), etc.) but they are not exactly the same question.
symbols
How can I write two characters in the same place?
In particular, I want to write an arrow $rightarrow$
, and then write a letter such that the arrow strikes through the letter. I found some similar questions (Range symbol over character, Substitute a character by another one (Lualatex), etc.) but they are not exactly the same question.
symbols
symbols
edited Feb 19 at 19:22
Erel Segal-Halevi
asked Feb 19 at 13:26
Erel Segal-HaleviErel Segal-Halevi
2,45462342
2,45462342
5
Since an arrow is wider than almost every character, what do you plan to do with the excess?
– egreg
Feb 19 at 13:45
A simple but probably naive way isrlap$rightarrow$x
. Like egreg wrote, you need to figure out which way the excess should go. Note that theadjustbox
package give further ways to lap content to all directions.
– Martin Scharrer♦
Feb 19 at 14:45
add a comment |
5
Since an arrow is wider than almost every character, what do you plan to do with the excess?
– egreg
Feb 19 at 13:45
A simple but probably naive way isrlap$rightarrow$x
. Like egreg wrote, you need to figure out which way the excess should go. Note that theadjustbox
package give further ways to lap content to all directions.
– Martin Scharrer♦
Feb 19 at 14:45
5
5
Since an arrow is wider than almost every character, what do you plan to do with the excess?
– egreg
Feb 19 at 13:45
Since an arrow is wider than almost every character, what do you plan to do with the excess?
– egreg
Feb 19 at 13:45
A simple but probably naive way is
rlap$rightarrow$x
. Like egreg wrote, you need to figure out which way the excess should go. Note that the adjustbox
package give further ways to lap content to all directions.– Martin Scharrer♦
Feb 19 at 14:45
A simple but probably naive way is
rlap$rightarrow$x
. Like egreg wrote, you need to figure out which way the excess should go. Note that the adjustbox
package give further ways to lap content to all directions.– Martin Scharrer♦
Feb 19 at 14:45
add a comment |
4 Answers
4
active
oldest
votes
Not clear if you want it in text or math...
documentclassarticle
usepackagestackengine
begindocument
In testackengine0ptx$rightarrow$OcFTLt...
$ensurestackMathstackengine0ptyrightarrowOcFTL = mx + b$
enddocument
Also, it is not clear if you want the arrow's width to be accounted for:
documentclassarticle
usepackagestackengine
begindocument
In testackengine0ptx$rightarrow$OcFFLt...
$ensurestackMathstackengine0ptyrightarrow!OcFFL = mx + b$
enddocument
Other things that can be easily adjusted above include horizontal alignment (currently centered) as well as vertical height of arrow placement (currently placed at its natural height).
Once the specifics are decided on the use case, this can be easily encapsulated in a macro.
Below, keeping up with the egregs, I implement a macro version (overarrow
) for math that preserves the math style:
documentclassarticle
usepackagestackengine,scalerel
newcommandoverarrow[1]ThisStyleensurestackMath%
stackengine0ptSavedStyle#1SavedStylerightarrow!OcFFL
begindocument
$overarrowy = mx_overarrowz + b$
enddocument
add a comment |
A simple makebox[0pt]..
can achieve this. Depending on your real use case, this may require a bit of tuning.
documentclass[12pt,a4paper]article
begindocument
$makebox[0pt][l]$rightarrow$A$
enddocument
add a comment |
Here's for text in two versions:
documentclassarticle
DeclareRobustCommandasA[1]% arrow strike
leavevmodebegingroup
vphantom#1%
ooalignhidewidth$mathsurround0ptrightarrow$hidewidthcr#1cr%
endgroup
DeclareRobustCommandasB[1]% arrow strike
leavevmodebegingroup
vphantom#1%
ooalign$mathsurround0ptrightarrow$crhidewidth#1hidewidthcr%
endgroup
begindocument
stasAruck
stasBruck
enddocument
For math:
documentclassarticle
makeatletter
DeclareRobustCommandas[1]% arrow strike
vphantom#1mathpaletteerel@as#1%
newcommanderel@as[2]%
ooalignhfil$m@th#1rightarrow$hfilcrhfil$m@th#1#2$hfilcr%
makeatother
begindocument
$a+asb+c_asx$
enddocument
add a comment |
In case you want a bit of flexibility and the arrow to adjust to the width of the stuff it is running through, you may want to use tikzmark
.
documentclassarticle
usepackagetikz
usetikzlibrarytikzmark
newcounteratm
newcommandarrowthrough[2]stepcounteratmtikzmarknode[path picture=
draw[->,#1] (path picture bounding box.west) --
(path picture bounding box.east);]atm-theatm#2
begindocument
arrowthroughx
[ E=arrowthroughmc^2]
arrowthrough[red,-latex]Hello arrowthrough[latex-,thick,blue]World!
enddocument
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%2f475653%2fhow-to-write-a-character-overlapping-another-character%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
Not clear if you want it in text or math...
documentclassarticle
usepackagestackengine
begindocument
In testackengine0ptx$rightarrow$OcFTLt...
$ensurestackMathstackengine0ptyrightarrowOcFTL = mx + b$
enddocument
Also, it is not clear if you want the arrow's width to be accounted for:
documentclassarticle
usepackagestackengine
begindocument
In testackengine0ptx$rightarrow$OcFFLt...
$ensurestackMathstackengine0ptyrightarrow!OcFFL = mx + b$
enddocument
Other things that can be easily adjusted above include horizontal alignment (currently centered) as well as vertical height of arrow placement (currently placed at its natural height).
Once the specifics are decided on the use case, this can be easily encapsulated in a macro.
Below, keeping up with the egregs, I implement a macro version (overarrow
) for math that preserves the math style:
documentclassarticle
usepackagestackengine,scalerel
newcommandoverarrow[1]ThisStyleensurestackMath%
stackengine0ptSavedStyle#1SavedStylerightarrow!OcFFL
begindocument
$overarrowy = mx_overarrowz + b$
enddocument
add a comment |
Not clear if you want it in text or math...
documentclassarticle
usepackagestackengine
begindocument
In testackengine0ptx$rightarrow$OcFTLt...
$ensurestackMathstackengine0ptyrightarrowOcFTL = mx + b$
enddocument
Also, it is not clear if you want the arrow's width to be accounted for:
documentclassarticle
usepackagestackengine
begindocument
In testackengine0ptx$rightarrow$OcFFLt...
$ensurestackMathstackengine0ptyrightarrow!OcFFL = mx + b$
enddocument
Other things that can be easily adjusted above include horizontal alignment (currently centered) as well as vertical height of arrow placement (currently placed at its natural height).
Once the specifics are decided on the use case, this can be easily encapsulated in a macro.
Below, keeping up with the egregs, I implement a macro version (overarrow
) for math that preserves the math style:
documentclassarticle
usepackagestackengine,scalerel
newcommandoverarrow[1]ThisStyleensurestackMath%
stackengine0ptSavedStyle#1SavedStylerightarrow!OcFFL
begindocument
$overarrowy = mx_overarrowz + b$
enddocument
add a comment |
Not clear if you want it in text or math...
documentclassarticle
usepackagestackengine
begindocument
In testackengine0ptx$rightarrow$OcFTLt...
$ensurestackMathstackengine0ptyrightarrowOcFTL = mx + b$
enddocument
Also, it is not clear if you want the arrow's width to be accounted for:
documentclassarticle
usepackagestackengine
begindocument
In testackengine0ptx$rightarrow$OcFFLt...
$ensurestackMathstackengine0ptyrightarrow!OcFFL = mx + b$
enddocument
Other things that can be easily adjusted above include horizontal alignment (currently centered) as well as vertical height of arrow placement (currently placed at its natural height).
Once the specifics are decided on the use case, this can be easily encapsulated in a macro.
Below, keeping up with the egregs, I implement a macro version (overarrow
) for math that preserves the math style:
documentclassarticle
usepackagestackengine,scalerel
newcommandoverarrow[1]ThisStyleensurestackMath%
stackengine0ptSavedStyle#1SavedStylerightarrow!OcFFL
begindocument
$overarrowy = mx_overarrowz + b$
enddocument
Not clear if you want it in text or math...
documentclassarticle
usepackagestackengine
begindocument
In testackengine0ptx$rightarrow$OcFTLt...
$ensurestackMathstackengine0ptyrightarrowOcFTL = mx + b$
enddocument
Also, it is not clear if you want the arrow's width to be accounted for:
documentclassarticle
usepackagestackengine
begindocument
In testackengine0ptx$rightarrow$OcFFLt...
$ensurestackMathstackengine0ptyrightarrow!OcFFL = mx + b$
enddocument
Other things that can be easily adjusted above include horizontal alignment (currently centered) as well as vertical height of arrow placement (currently placed at its natural height).
Once the specifics are decided on the use case, this can be easily encapsulated in a macro.
Below, keeping up with the egregs, I implement a macro version (overarrow
) for math that preserves the math style:
documentclassarticle
usepackagestackengine,scalerel
newcommandoverarrow[1]ThisStyleensurestackMath%
stackengine0ptSavedStyle#1SavedStylerightarrow!OcFFL
begindocument
$overarrowy = mx_overarrowz + b$
enddocument
edited Feb 19 at 14:12
answered Feb 19 at 13:35
Steven B. SegletesSteven B. Segletes
158k9204411
158k9204411
add a comment |
add a comment |
A simple makebox[0pt]..
can achieve this. Depending on your real use case, this may require a bit of tuning.
documentclass[12pt,a4paper]article
begindocument
$makebox[0pt][l]$rightarrow$A$
enddocument
add a comment |
A simple makebox[0pt]..
can achieve this. Depending on your real use case, this may require a bit of tuning.
documentclass[12pt,a4paper]article
begindocument
$makebox[0pt][l]$rightarrow$A$
enddocument
add a comment |
A simple makebox[0pt]..
can achieve this. Depending on your real use case, this may require a bit of tuning.
documentclass[12pt,a4paper]article
begindocument
$makebox[0pt][l]$rightarrow$A$
enddocument
A simple makebox[0pt]..
can achieve this. Depending on your real use case, this may require a bit of tuning.
documentclass[12pt,a4paper]article
begindocument
$makebox[0pt][l]$rightarrow$A$
enddocument
answered Feb 19 at 13:40
AboAmmarAboAmmar
34.4k32985
34.4k32985
add a comment |
add a comment |
Here's for text in two versions:
documentclassarticle
DeclareRobustCommandasA[1]% arrow strike
leavevmodebegingroup
vphantom#1%
ooalignhidewidth$mathsurround0ptrightarrow$hidewidthcr#1cr%
endgroup
DeclareRobustCommandasB[1]% arrow strike
leavevmodebegingroup
vphantom#1%
ooalign$mathsurround0ptrightarrow$crhidewidth#1hidewidthcr%
endgroup
begindocument
stasAruck
stasBruck
enddocument
For math:
documentclassarticle
makeatletter
DeclareRobustCommandas[1]% arrow strike
vphantom#1mathpaletteerel@as#1%
newcommanderel@as[2]%
ooalignhfil$m@th#1rightarrow$hfilcrhfil$m@th#1#2$hfilcr%
makeatother
begindocument
$a+asb+c_asx$
enddocument
add a comment |
Here's for text in two versions:
documentclassarticle
DeclareRobustCommandasA[1]% arrow strike
leavevmodebegingroup
vphantom#1%
ooalignhidewidth$mathsurround0ptrightarrow$hidewidthcr#1cr%
endgroup
DeclareRobustCommandasB[1]% arrow strike
leavevmodebegingroup
vphantom#1%
ooalign$mathsurround0ptrightarrow$crhidewidth#1hidewidthcr%
endgroup
begindocument
stasAruck
stasBruck
enddocument
For math:
documentclassarticle
makeatletter
DeclareRobustCommandas[1]% arrow strike
vphantom#1mathpaletteerel@as#1%
newcommanderel@as[2]%
ooalignhfil$m@th#1rightarrow$hfilcrhfil$m@th#1#2$hfilcr%
makeatother
begindocument
$a+asb+c_asx$
enddocument
add a comment |
Here's for text in two versions:
documentclassarticle
DeclareRobustCommandasA[1]% arrow strike
leavevmodebegingroup
vphantom#1%
ooalignhidewidth$mathsurround0ptrightarrow$hidewidthcr#1cr%
endgroup
DeclareRobustCommandasB[1]% arrow strike
leavevmodebegingroup
vphantom#1%
ooalign$mathsurround0ptrightarrow$crhidewidth#1hidewidthcr%
endgroup
begindocument
stasAruck
stasBruck
enddocument
For math:
documentclassarticle
makeatletter
DeclareRobustCommandas[1]% arrow strike
vphantom#1mathpaletteerel@as#1%
newcommanderel@as[2]%
ooalignhfil$m@th#1rightarrow$hfilcrhfil$m@th#1#2$hfilcr%
makeatother
begindocument
$a+asb+c_asx$
enddocument
Here's for text in two versions:
documentclassarticle
DeclareRobustCommandasA[1]% arrow strike
leavevmodebegingroup
vphantom#1%
ooalignhidewidth$mathsurround0ptrightarrow$hidewidthcr#1cr%
endgroup
DeclareRobustCommandasB[1]% arrow strike
leavevmodebegingroup
vphantom#1%
ooalign$mathsurround0ptrightarrow$crhidewidth#1hidewidthcr%
endgroup
begindocument
stasAruck
stasBruck
enddocument
For math:
documentclassarticle
makeatletter
DeclareRobustCommandas[1]% arrow strike
vphantom#1mathpaletteerel@as#1%
newcommanderel@as[2]%
ooalignhfil$m@th#1rightarrow$hfilcrhfil$m@th#1#2$hfilcr%
makeatother
begindocument
$a+asb+c_asx$
enddocument
answered Feb 19 at 14:00
egregegreg
726k8819223230
726k8819223230
add a comment |
add a comment |
In case you want a bit of flexibility and the arrow to adjust to the width of the stuff it is running through, you may want to use tikzmark
.
documentclassarticle
usepackagetikz
usetikzlibrarytikzmark
newcounteratm
newcommandarrowthrough[2]stepcounteratmtikzmarknode[path picture=
draw[->,#1] (path picture bounding box.west) --
(path picture bounding box.east);]atm-theatm#2
begindocument
arrowthroughx
[ E=arrowthroughmc^2]
arrowthrough[red,-latex]Hello arrowthrough[latex-,thick,blue]World!
enddocument
add a comment |
In case you want a bit of flexibility and the arrow to adjust to the width of the stuff it is running through, you may want to use tikzmark
.
documentclassarticle
usepackagetikz
usetikzlibrarytikzmark
newcounteratm
newcommandarrowthrough[2]stepcounteratmtikzmarknode[path picture=
draw[->,#1] (path picture bounding box.west) --
(path picture bounding box.east);]atm-theatm#2
begindocument
arrowthroughx
[ E=arrowthroughmc^2]
arrowthrough[red,-latex]Hello arrowthrough[latex-,thick,blue]World!
enddocument
add a comment |
In case you want a bit of flexibility and the arrow to adjust to the width of the stuff it is running through, you may want to use tikzmark
.
documentclassarticle
usepackagetikz
usetikzlibrarytikzmark
newcounteratm
newcommandarrowthrough[2]stepcounteratmtikzmarknode[path picture=
draw[->,#1] (path picture bounding box.west) --
(path picture bounding box.east);]atm-theatm#2
begindocument
arrowthroughx
[ E=arrowthroughmc^2]
arrowthrough[red,-latex]Hello arrowthrough[latex-,thick,blue]World!
enddocument
In case you want a bit of flexibility and the arrow to adjust to the width of the stuff it is running through, you may want to use tikzmark
.
documentclassarticle
usepackagetikz
usetikzlibrarytikzmark
newcounteratm
newcommandarrowthrough[2]stepcounteratmtikzmarknode[path picture=
draw[->,#1] (path picture bounding box.west) --
(path picture bounding box.east);]atm-theatm#2
begindocument
arrowthroughx
[ E=arrowthroughmc^2]
arrowthrough[red,-latex]Hello arrowthrough[latex-,thick,blue]World!
enddocument
answered Feb 19 at 15:57
marmotmarmot
108k5133251
108k5133251
add a comment |
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%2f475653%2fhow-to-write-a-character-overlapping-another-character%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
5
Since an arrow is wider than almost every character, what do you plan to do with the excess?
– egreg
Feb 19 at 13:45
A simple but probably naive way is
rlap$rightarrow$x
. Like egreg wrote, you need to figure out which way the excess should go. Note that theadjustbox
package give further ways to lap content to all directions.– Martin Scharrer♦
Feb 19 at 14:45