Prime in text modeHow to refer to labels in math mode from math modePossible bug in flexsymWhy isn't prime...
Is a piano played in the same way as a harmonium?
School performs periodic password audits. Is my password compromised?
Why do phishing e-mails use faked e-mail addresses instead of the real one?
The meaning of ‘otherwise’
How do we create new idioms and use them in a novel?
How to resolve: Reviewer #1 says remove section X vs. Reviewer #2 says expand section X
Giving a career talk in my old university, how prominently should I tell students my salary?
Plausibility of Mushroom Buildings
Possible to detect presence of nuclear bomb?
What are you allowed to do while using the Warlock's Eldritch Master feature?
Which classes are needed to have access to every spell in the PHB?
Confusion about Complex Continued Fraction
What will be the sign of work done?
When Schnorr signatures are part of Bitcoin will it be possible validate each block with only one signature validation?
Professor forcing me to attend a conference, I can't afford even with 50% funding
Outlet with 3 sets of wires
I can't die. Who am I?
Recommendation letter by significant other if you worked with them professionally?
QQ Plot and Shapiro Wilk Test Disagree
What is the generally accepted pronunciation of “topoi”?
Why restrict private health insurance?
Ballot RPC message
Why does Solve lock up when trying to solve the quadratic equation with large integers?
What sort of fish is this
Prime in text mode
How to refer to labels in math mode from math modePossible bug in flexsymWhy isn't prime automatically set to be a superscript?Create rotated prime symbolBetter way to produce Vllap{--}How do you get a scriptscriptstyle-sized prime?how to get the symbol like neq with straight line crossedA symbol for same order of magnitude in math modeMath symbols in text modeHow to define the symbol ¡ in math mode so that it behaves as expectedUsing Indian rupee symbol from tfrupee in math modeUse a superscript prime symbol in Bibtex
How do I produce the prime symbol in text mode? In math mode the prime symbol is produced by ' but in text mode it produces something else.
symbols
add a comment |
How do I produce the prime symbol in text mode? In math mode the prime symbol is produced by ' but in text mode it produces something else.
symbols
add a comment |
How do I produce the prime symbol in text mode? In math mode the prime symbol is produced by ' but in text mode it produces something else.
symbols
How do I produce the prime symbol in text mode? In math mode the prime symbol is produced by ' but in text mode it produces something else.
symbols
symbols
asked Nov 30 '11 at 13:55
N.N.N.N.
23.8k19116189
23.8k19116189
add a comment |
add a comment |
5 Answers
5
active
oldest
votes
If you really want the math prime symbol you may simply use $'$ or $prime$, or if you want to use it in text and math mode ensuremath{'} or ensuremath{prime}, e.g.:
documentclass{article}
newcommand*{everymodeprime}{ensuremath{prime}}
begin{document}
Prime in text mode: everymodeprime
Prime in math mode: $everymodeprime$
end{document}
I've used prime instead of ' to avoid typo mistakes.
ensuremath does only switch to math mode, if math mode it not already active. So it is often useful to define commands, that uses math mode commands and should work in text and math mode.
add a comment |
The flexisym package offers textprime which can be directly used in math or in text mode:
documentclass{article}
usepackage{flexisym}
begin{document}
atextprime
$atextprime$
end{document}

add a comment |
I don't think there's a prime character in text mode. If you want an upright single quote, you can use textquotesingle defined in the textcomp package; alternatively if you actually want a prime, then you can just use $'$ in text mode.
I want an actual prime but I don't want to go via inline math mode.
– N.N.
Nov 30 '11 at 14:12
1
N.N.: Why not, if this is the character you want, buttextquotesingle,textquoteleft, andtextquoterightaren't?
– Schweinebacke
Nov 30 '11 at 14:22
@Schweinebacke I want to use prime in list labels and then refer to the list items from math mode but that seems to force me to nest math modes which leads to errors, see tex.stackexchange.com/questions/36658/….
– N.N.
Nov 30 '11 at 14:27
1
Theflexisympackage defines textprime:DeclareRobustCommandtextprime{leavevmode raise.8exhbox{text@charscriptfontprime}% }
– Gonzalo Medina
Nov 30 '11 at 14:35
2
N.N.:ensuremath{'}may be used to nest math, because it switchs to math only if your are not in math mode already.
– Schweinebacke
Nov 30 '11 at 15:15
|
show 2 more comments
Using flexisym requires subduing to its weird decision about several symbols.
It's much simpler to use
documentclass{article}
makeatletter
DeclareTextCommand{textprime}{encodingdefault}{%
mbox{$m@th'kern-scriptspace$}%
}
makeatother
begin{document}
atextprime{} b
$atextprime$
end{document}
With DeclareTextCommand we disallow using the symbol in math mode (a warning will be produced); with mbox we avoid an error, if textprime is issued in math mode nonetheless; with m@th we nullify a possible nonzero value of mathsurround; with kern-scriptspace we remove the kerning that's added after subscripted or superscripted math atoms.

add a comment |
$A"= S_A' (H) $
How to write the prime in A not in S in laTeX !!
New contributor
Golden Mind is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Welcome to TeX.SX! This space is reserved for answers, not for new questions. Anyway, the input is$A''=S_{A'}(H)$.
– egreg
41 secs 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%2f36655%2fprime-in-text-mode%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
5 Answers
5
active
oldest
votes
5 Answers
5
active
oldest
votes
active
oldest
votes
active
oldest
votes
If you really want the math prime symbol you may simply use $'$ or $prime$, or if you want to use it in text and math mode ensuremath{'} or ensuremath{prime}, e.g.:
documentclass{article}
newcommand*{everymodeprime}{ensuremath{prime}}
begin{document}
Prime in text mode: everymodeprime
Prime in math mode: $everymodeprime$
end{document}
I've used prime instead of ' to avoid typo mistakes.
ensuremath does only switch to math mode, if math mode it not already active. So it is often useful to define commands, that uses math mode commands and should work in text and math mode.
add a comment |
If you really want the math prime symbol you may simply use $'$ or $prime$, or if you want to use it in text and math mode ensuremath{'} or ensuremath{prime}, e.g.:
documentclass{article}
newcommand*{everymodeprime}{ensuremath{prime}}
begin{document}
Prime in text mode: everymodeprime
Prime in math mode: $everymodeprime$
end{document}
I've used prime instead of ' to avoid typo mistakes.
ensuremath does only switch to math mode, if math mode it not already active. So it is often useful to define commands, that uses math mode commands and should work in text and math mode.
add a comment |
If you really want the math prime symbol you may simply use $'$ or $prime$, or if you want to use it in text and math mode ensuremath{'} or ensuremath{prime}, e.g.:
documentclass{article}
newcommand*{everymodeprime}{ensuremath{prime}}
begin{document}
Prime in text mode: everymodeprime
Prime in math mode: $everymodeprime$
end{document}
I've used prime instead of ' to avoid typo mistakes.
ensuremath does only switch to math mode, if math mode it not already active. So it is often useful to define commands, that uses math mode commands and should work in text and math mode.
If you really want the math prime symbol you may simply use $'$ or $prime$, or if you want to use it in text and math mode ensuremath{'} or ensuremath{prime}, e.g.:
documentclass{article}
newcommand*{everymodeprime}{ensuremath{prime}}
begin{document}
Prime in text mode: everymodeprime
Prime in math mode: $everymodeprime$
end{document}
I've used prime instead of ' to avoid typo mistakes.
ensuremath does only switch to math mode, if math mode it not already active. So it is often useful to define commands, that uses math mode commands and should work in text and math mode.
answered Nov 30 '11 at 19:01
SchweinebackeSchweinebacke
21.8k4577
21.8k4577
add a comment |
add a comment |
The flexisym package offers textprime which can be directly used in math or in text mode:
documentclass{article}
usepackage{flexisym}
begin{document}
atextprime
$atextprime$
end{document}

add a comment |
The flexisym package offers textprime which can be directly used in math or in text mode:
documentclass{article}
usepackage{flexisym}
begin{document}
atextprime
$atextprime$
end{document}

add a comment |
The flexisym package offers textprime which can be directly used in math or in text mode:
documentclass{article}
usepackage{flexisym}
begin{document}
atextprime
$atextprime$
end{document}

The flexisym package offers textprime which can be directly used in math or in text mode:
documentclass{article}
usepackage{flexisym}
begin{document}
atextprime
$atextprime$
end{document}

answered Dec 1 '11 at 2:43
Gonzalo MedinaGonzalo Medina
401k4113081576
401k4113081576
add a comment |
add a comment |
I don't think there's a prime character in text mode. If you want an upright single quote, you can use textquotesingle defined in the textcomp package; alternatively if you actually want a prime, then you can just use $'$ in text mode.
I want an actual prime but I don't want to go via inline math mode.
– N.N.
Nov 30 '11 at 14:12
1
N.N.: Why not, if this is the character you want, buttextquotesingle,textquoteleft, andtextquoterightaren't?
– Schweinebacke
Nov 30 '11 at 14:22
@Schweinebacke I want to use prime in list labels and then refer to the list items from math mode but that seems to force me to nest math modes which leads to errors, see tex.stackexchange.com/questions/36658/….
– N.N.
Nov 30 '11 at 14:27
1
Theflexisympackage defines textprime:DeclareRobustCommandtextprime{leavevmode raise.8exhbox{text@charscriptfontprime}% }
– Gonzalo Medina
Nov 30 '11 at 14:35
2
N.N.:ensuremath{'}may be used to nest math, because it switchs to math only if your are not in math mode already.
– Schweinebacke
Nov 30 '11 at 15:15
|
show 2 more comments
I don't think there's a prime character in text mode. If you want an upright single quote, you can use textquotesingle defined in the textcomp package; alternatively if you actually want a prime, then you can just use $'$ in text mode.
I want an actual prime but I don't want to go via inline math mode.
– N.N.
Nov 30 '11 at 14:12
1
N.N.: Why not, if this is the character you want, buttextquotesingle,textquoteleft, andtextquoterightaren't?
– Schweinebacke
Nov 30 '11 at 14:22
@Schweinebacke I want to use prime in list labels and then refer to the list items from math mode but that seems to force me to nest math modes which leads to errors, see tex.stackexchange.com/questions/36658/….
– N.N.
Nov 30 '11 at 14:27
1
Theflexisympackage defines textprime:DeclareRobustCommandtextprime{leavevmode raise.8exhbox{text@charscriptfontprime}% }
– Gonzalo Medina
Nov 30 '11 at 14:35
2
N.N.:ensuremath{'}may be used to nest math, because it switchs to math only if your are not in math mode already.
– Schweinebacke
Nov 30 '11 at 15:15
|
show 2 more comments
I don't think there's a prime character in text mode. If you want an upright single quote, you can use textquotesingle defined in the textcomp package; alternatively if you actually want a prime, then you can just use $'$ in text mode.
I don't think there's a prime character in text mode. If you want an upright single quote, you can use textquotesingle defined in the textcomp package; alternatively if you actually want a prime, then you can just use $'$ in text mode.
answered Nov 30 '11 at 14:10
Alan MunnAlan Munn
162k28432707
162k28432707
I want an actual prime but I don't want to go via inline math mode.
– N.N.
Nov 30 '11 at 14:12
1
N.N.: Why not, if this is the character you want, buttextquotesingle,textquoteleft, andtextquoterightaren't?
– Schweinebacke
Nov 30 '11 at 14:22
@Schweinebacke I want to use prime in list labels and then refer to the list items from math mode but that seems to force me to nest math modes which leads to errors, see tex.stackexchange.com/questions/36658/….
– N.N.
Nov 30 '11 at 14:27
1
Theflexisympackage defines textprime:DeclareRobustCommandtextprime{leavevmode raise.8exhbox{text@charscriptfontprime}% }
– Gonzalo Medina
Nov 30 '11 at 14:35
2
N.N.:ensuremath{'}may be used to nest math, because it switchs to math only if your are not in math mode already.
– Schweinebacke
Nov 30 '11 at 15:15
|
show 2 more comments
I want an actual prime but I don't want to go via inline math mode.
– N.N.
Nov 30 '11 at 14:12
1
N.N.: Why not, if this is the character you want, buttextquotesingle,textquoteleft, andtextquoterightaren't?
– Schweinebacke
Nov 30 '11 at 14:22
@Schweinebacke I want to use prime in list labels and then refer to the list items from math mode but that seems to force me to nest math modes which leads to errors, see tex.stackexchange.com/questions/36658/….
– N.N.
Nov 30 '11 at 14:27
1
Theflexisympackage defines textprime:DeclareRobustCommandtextprime{leavevmode raise.8exhbox{text@charscriptfontprime}% }
– Gonzalo Medina
Nov 30 '11 at 14:35
2
N.N.:ensuremath{'}may be used to nest math, because it switchs to math only if your are not in math mode already.
– Schweinebacke
Nov 30 '11 at 15:15
I want an actual prime but I don't want to go via inline math mode.
– N.N.
Nov 30 '11 at 14:12
I want an actual prime but I don't want to go via inline math mode.
– N.N.
Nov 30 '11 at 14:12
1
1
N.N.: Why not, if this is the character you want, but
textquotesingle, textquoteleft, and textquoteright aren't?– Schweinebacke
Nov 30 '11 at 14:22
N.N.: Why not, if this is the character you want, but
textquotesingle, textquoteleft, and textquoteright aren't?– Schweinebacke
Nov 30 '11 at 14:22
@Schweinebacke I want to use prime in list labels and then refer to the list items from math mode but that seems to force me to nest math modes which leads to errors, see tex.stackexchange.com/questions/36658/….
– N.N.
Nov 30 '11 at 14:27
@Schweinebacke I want to use prime in list labels and then refer to the list items from math mode but that seems to force me to nest math modes which leads to errors, see tex.stackexchange.com/questions/36658/….
– N.N.
Nov 30 '11 at 14:27
1
1
The
flexisym package defines textprime: DeclareRobustCommandtextprime{leavevmode raise.8exhbox{text@charscriptfontprime}% }– Gonzalo Medina
Nov 30 '11 at 14:35
The
flexisym package defines textprime: DeclareRobustCommandtextprime{leavevmode raise.8exhbox{text@charscriptfontprime}% }– Gonzalo Medina
Nov 30 '11 at 14:35
2
2
N.N.:
ensuremath{'} may be used to nest math, because it switchs to math only if your are not in math mode already.– Schweinebacke
Nov 30 '11 at 15:15
N.N.:
ensuremath{'} may be used to nest math, because it switchs to math only if your are not in math mode already.– Schweinebacke
Nov 30 '11 at 15:15
|
show 2 more comments
Using flexisym requires subduing to its weird decision about several symbols.
It's much simpler to use
documentclass{article}
makeatletter
DeclareTextCommand{textprime}{encodingdefault}{%
mbox{$m@th'kern-scriptspace$}%
}
makeatother
begin{document}
atextprime{} b
$atextprime$
end{document}
With DeclareTextCommand we disallow using the symbol in math mode (a warning will be produced); with mbox we avoid an error, if textprime is issued in math mode nonetheless; with m@th we nullify a possible nonzero value of mathsurround; with kern-scriptspace we remove the kerning that's added after subscripted or superscripted math atoms.

add a comment |
Using flexisym requires subduing to its weird decision about several symbols.
It's much simpler to use
documentclass{article}
makeatletter
DeclareTextCommand{textprime}{encodingdefault}{%
mbox{$m@th'kern-scriptspace$}%
}
makeatother
begin{document}
atextprime{} b
$atextprime$
end{document}
With DeclareTextCommand we disallow using the symbol in math mode (a warning will be produced); with mbox we avoid an error, if textprime is issued in math mode nonetheless; with m@th we nullify a possible nonzero value of mathsurround; with kern-scriptspace we remove the kerning that's added after subscripted or superscripted math atoms.

add a comment |
Using flexisym requires subduing to its weird decision about several symbols.
It's much simpler to use
documentclass{article}
makeatletter
DeclareTextCommand{textprime}{encodingdefault}{%
mbox{$m@th'kern-scriptspace$}%
}
makeatother
begin{document}
atextprime{} b
$atextprime$
end{document}
With DeclareTextCommand we disallow using the symbol in math mode (a warning will be produced); with mbox we avoid an error, if textprime is issued in math mode nonetheless; with m@th we nullify a possible nonzero value of mathsurround; with kern-scriptspace we remove the kerning that's added after subscripted or superscripted math atoms.

Using flexisym requires subduing to its weird decision about several symbols.
It's much simpler to use
documentclass{article}
makeatletter
DeclareTextCommand{textprime}{encodingdefault}{%
mbox{$m@th'kern-scriptspace$}%
}
makeatother
begin{document}
atextprime{} b
$atextprime$
end{document}
With DeclareTextCommand we disallow using the symbol in math mode (a warning will be produced); with mbox we avoid an error, if textprime is issued in math mode nonetheless; with m@th we nullify a possible nonzero value of mathsurround; with kern-scriptspace we remove the kerning that's added after subscripted or superscripted math atoms.

answered Dec 20 '18 at 18:22
egregegreg
725k8819193224
725k8819193224
add a comment |
add a comment |
$A"= S_A' (H) $
How to write the prime in A not in S in laTeX !!
New contributor
Golden Mind is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Welcome to TeX.SX! This space is reserved for answers, not for new questions. Anyway, the input is$A''=S_{A'}(H)$.
– egreg
41 secs ago
add a comment |
$A"= S_A' (H) $
How to write the prime in A not in S in laTeX !!
New contributor
Golden Mind is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Welcome to TeX.SX! This space is reserved for answers, not for new questions. Anyway, the input is$A''=S_{A'}(H)$.
– egreg
41 secs ago
add a comment |
$A"= S_A' (H) $
How to write the prime in A not in S in laTeX !!
New contributor
Golden Mind is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
$A"= S_A' (H) $
How to write the prime in A not in S in laTeX !!
New contributor
Golden Mind is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Golden Mind is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
answered 11 mins ago
Golden MindGolden Mind
11
11
New contributor
Golden Mind is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Golden Mind is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Golden Mind is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Welcome to TeX.SX! This space is reserved for answers, not for new questions. Anyway, the input is$A''=S_{A'}(H)$.
– egreg
41 secs ago
add a comment |
Welcome to TeX.SX! This space is reserved for answers, not for new questions. Anyway, the input is$A''=S_{A'}(H)$.
– egreg
41 secs ago
Welcome to TeX.SX! This space is reserved for answers, not for new questions. Anyway, the input is
$A''=S_{A'}(H)$.– egreg
41 secs ago
Welcome to TeX.SX! This space is reserved for answers, not for new questions. Anyway, the input is
$A''=S_{A'}(H)$.– egreg
41 secs 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%2f36655%2fprime-in-text-mode%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