Trying to use “~” to generate tilde symbol in math mode












15















$$ = sum_{e in A} w(e)
= sum_{e in A} w(e)+ sum_{e in {(r,v)| v in V(G)}} w(e)
= w( ~{A} ) $$


I get the following error message:




Error: Please use mathaccent for accents in math mode for the following code




I'm not sure what's wrong with it. I'm in math mode by using $$ $$, am I not?










share|improve this question

























  • Welcome to TeX.SE!

    – Mico
    Dec 7 '15 at 10:59






  • 2





    Are you using Plain TeX or LaTeX?

    – egreg
    Dec 7 '15 at 12:59
















15















$$ = sum_{e in A} w(e)
= sum_{e in A} w(e)+ sum_{e in {(r,v)| v in V(G)}} w(e)
= w( ~{A} ) $$


I get the following error message:




Error: Please use mathaccent for accents in math mode for the following code




I'm not sure what's wrong with it. I'm in math mode by using $$ $$, am I not?










share|improve this question

























  • Welcome to TeX.SE!

    – Mico
    Dec 7 '15 at 10:59






  • 2





    Are you using Plain TeX or LaTeX?

    – egreg
    Dec 7 '15 at 12:59














15












15








15


5






$$ = sum_{e in A} w(e)
= sum_{e in A} w(e)+ sum_{e in {(r,v)| v in V(G)}} w(e)
= w( ~{A} ) $$


I get the following error message:




Error: Please use mathaccent for accents in math mode for the following code




I'm not sure what's wrong with it. I'm in math mode by using $$ $$, am I not?










share|improve this question
















$$ = sum_{e in A} w(e)
= sum_{e in A} w(e)+ sum_{e in {(r,v)| v in V(G)}} w(e)
= w( ~{A} ) $$


I get the following error message:




Error: Please use mathaccent for accents in math mode for the following code




I'm not sure what's wrong with it. I'm in math mode by using $$ $$, am I not?







math-mode accents






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 23 '18 at 0:47









Mico

285k31388778




285k31388778










asked Dec 7 '15 at 4:32









ChristinChristin

78115




78115













  • Welcome to TeX.SE!

    – Mico
    Dec 7 '15 at 10:59






  • 2





    Are you using Plain TeX or LaTeX?

    – egreg
    Dec 7 '15 at 12:59



















  • Welcome to TeX.SE!

    – Mico
    Dec 7 '15 at 10:59






  • 2





    Are you using Plain TeX or LaTeX?

    – egreg
    Dec 7 '15 at 12:59

















Welcome to TeX.SE!

– Mico
Dec 7 '15 at 10:59





Welcome to TeX.SE!

– Mico
Dec 7 '15 at 10:59




2




2





Are you using Plain TeX or LaTeX?

– egreg
Dec 7 '15 at 12:59





Are you using Plain TeX or LaTeX?

– egreg
Dec 7 '15 at 12:59










4 Answers
4






active

oldest

votes


















21














The immediate problem is solved by replacing the text-mode instruction ~{A} with the math-mode directive tilde{A}.



In addition, you may want to make the equation both more compact and more readable by (a) introducing a line break in the material set below the third sum symbol (via a substack instruction) and (b) eliminating the whitespace that's otherwise inserted to the left and right of that summation symbol (via a mathclap instruction).



enter image description here





Addendum: For completeness/reference, here's a list of common accents and how they should be produced in text and math mode, respectively. Note that the positions and, in the case of text-upright versus text-italic font shapes, even the shapes of the accents can differ between text and math modes. In math mode, the shapes of the math-accent characters are the same regardless of whether mathrm ("math roman") or mathit ("math italics" -- the default) is in effect.



enter image description here





documentclass{article}
usepackage{mathtools} % for "mathclap" macro; loads "amsmath" package
begin{document}
[
= sum_{e in A} w(e)
= sum_{e in A} w(e) +
sum_{mathclap{substack{e in {(r,v)} \ text{s.t.}, v in V(G)}}} w(e)
= w(tilde{A})
]
end{document}




documentclass{article}
usepackage[T1]{fontenc}
usepackage{booktabs,array,lmodern}
newcolumntype{C}{>{$}c<{$}} % automatic-math version of "c" column type
begin{document}
noindent
begin{tabular}{@{} l cc>{itshape}c lCC @{}}
toprule
Accent name & multicolumn{3}{c}{Text mode}
& multicolumn{3}{c@{}}{Math mode} \
cmidrule(lr){2-4} cmidrule(l){5-7}
& how to & multicolumn{2}{c}{result}
& how to & multicolumn{2}{c@{}}{result} \
midrule
acute & verb|'| & 'A & 'A & verb|acute| & acute{mathrm{A}} & acute{A} \
grave & verb|`| & `A & `A & verb|grave| & grave{mathrm{A}} & grave{A} \
circumflex & verb|^| & ^A & ^A & verb|hat| & hat{mathrm{A}} & hat{A} \
squiggle, tilde & verb|~| & ~A & ~A & verb|tilde| & tilde{mathrm{A}} & tilde{A} \
macron, bar & verb|=| & =A & =A & verb|bar| & bar{mathrm{A}} & bar{A} \
dot accent & verb|.| & .A & .A & verb|dot| & dot{mathrm{A}} & dot{A} \
diereris (Umlaut) & verb|"| & "A & "A & verb|ddot| & ddot{mathrm{A}} & ddot{A} \
bottomrule
end{tabular}
end{document}





share|improve this answer


























  • Thank you for the answer. It's very helpful. May I ask a separate question about Tex code you give for the table? What does @{} do? How do you align "Math Mode" with second "How to"?

    – Christin
    Sep 15 '16 at 23:07











  • @Christin - The @{} directives serve to suppress the vertical whitespace (in the amount of tabcolsep) that would otherwise be inserted at the left-hand and right-hand edges of the tabular environment. To left-align the "Math mode" header with the right-hand "how to" header, change multicolumn{2}{c@{}}{Math mode} to multicolumn{2}{l@{}}{Math mode}.

    – Mico
    Sep 16 '16 at 0:33





















8














Text accents and math accents have different syntax in LaTeX: to get Ã, you would use ~{A} in textmode, but tilde A or widetilde A (the latter for a wider version) in mathmode.



Here is a table showing how to get different kinds of accents in textmode and mathmode.



Thus, your corrected code is



= sum_{e in A} w(e) = sum_{e in A} w(e)+ sum_{e in {(r,v)| v in V(G)}} w(e) = w( tilde A )





share|improve this answer
























  • While you're at it, you should also replace | with mid. The spacing around the two symbols is quite different.

    – Mico
    Dec 7 '15 at 6:16













  • Or use a better construction for set syntax. mid is not the proper symbol to use in general as it cannot be scaled (when needed). But useful as a one of.

    – daleif
    Dec 7 '15 at 6:26











  • @daleif: a bar in the middle is the way I generally denote set syntax in writing, and I try to keep that notation in LaTeX. What would I use to make it scale when needed?

    – Arun Debray
    Dec 7 '15 at 16:55






  • 1





    These days I tend to use this construction: tex.stackexchange.com/a/150516/3929, the idea behind it is (1) if I choose to use a bar syntax, I'd like it to be scalable along with the braces. (2) the spacing should be fully configurable from the preamble, not something that is manually inserted each time. (3) the input syntax should not be dependent on the choice for "given" symbol (here a bar), the syntax should make sense no matter the output symbol. (4) I want to get the scaller macros out of the way. In this construction "*" means autoscalling, and [big] us manually scaled.

    – daleif
    Dec 7 '15 at 18:39



















2














I solved the issue by replacing ~{A} with tilde{A}.






share|improve this answer





















  • 3





    Your answer has already been provided by Mico, hasn't it?

    – Stefan Pinnow
    Jul 12 '16 at 10:13



















0














Just use the package lmodern.



documentclass{article}
usepackage{amsmath,amssymb}
usepackage[utf8]{inputenc}
usepackage[T1]{fontenc}
usepackage{verbatim}

usepackage{lmodern}

begin{document}

$$ y = w( ~{A} ) $$

You can also disregard the use of verb=~{A}= and use à directly, like the example below:

$$ y = w( Ã ) $$

end{document}


enter image description here






share|improve this answer








New contributor




Roberto de Freitas Cabral 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.SE! That is already mentioned in the answer of @mico, I guess?

    – Kurt
    14 hours ago











  • You get LaTeX Warning: Command ~ invalid in math mode and moreover the A is not in math italic. Is it so difficult to use tilde{A}, which is the proper markup?

    – egreg
    13 hours 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%2f281881%2ftrying-to-use-to-generate-tilde-symbol-in-math-mode%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









21














The immediate problem is solved by replacing the text-mode instruction ~{A} with the math-mode directive tilde{A}.



In addition, you may want to make the equation both more compact and more readable by (a) introducing a line break in the material set below the third sum symbol (via a substack instruction) and (b) eliminating the whitespace that's otherwise inserted to the left and right of that summation symbol (via a mathclap instruction).



enter image description here





Addendum: For completeness/reference, here's a list of common accents and how they should be produced in text and math mode, respectively. Note that the positions and, in the case of text-upright versus text-italic font shapes, even the shapes of the accents can differ between text and math modes. In math mode, the shapes of the math-accent characters are the same regardless of whether mathrm ("math roman") or mathit ("math italics" -- the default) is in effect.



enter image description here





documentclass{article}
usepackage{mathtools} % for "mathclap" macro; loads "amsmath" package
begin{document}
[
= sum_{e in A} w(e)
= sum_{e in A} w(e) +
sum_{mathclap{substack{e in {(r,v)} \ text{s.t.}, v in V(G)}}} w(e)
= w(tilde{A})
]
end{document}




documentclass{article}
usepackage[T1]{fontenc}
usepackage{booktabs,array,lmodern}
newcolumntype{C}{>{$}c<{$}} % automatic-math version of "c" column type
begin{document}
noindent
begin{tabular}{@{} l cc>{itshape}c lCC @{}}
toprule
Accent name & multicolumn{3}{c}{Text mode}
& multicolumn{3}{c@{}}{Math mode} \
cmidrule(lr){2-4} cmidrule(l){5-7}
& how to & multicolumn{2}{c}{result}
& how to & multicolumn{2}{c@{}}{result} \
midrule
acute & verb|'| & 'A & 'A & verb|acute| & acute{mathrm{A}} & acute{A} \
grave & verb|`| & `A & `A & verb|grave| & grave{mathrm{A}} & grave{A} \
circumflex & verb|^| & ^A & ^A & verb|hat| & hat{mathrm{A}} & hat{A} \
squiggle, tilde & verb|~| & ~A & ~A & verb|tilde| & tilde{mathrm{A}} & tilde{A} \
macron, bar & verb|=| & =A & =A & verb|bar| & bar{mathrm{A}} & bar{A} \
dot accent & verb|.| & .A & .A & verb|dot| & dot{mathrm{A}} & dot{A} \
diereris (Umlaut) & verb|"| & "A & "A & verb|ddot| & ddot{mathrm{A}} & ddot{A} \
bottomrule
end{tabular}
end{document}





share|improve this answer


























  • Thank you for the answer. It's very helpful. May I ask a separate question about Tex code you give for the table? What does @{} do? How do you align "Math Mode" with second "How to"?

    – Christin
    Sep 15 '16 at 23:07











  • @Christin - The @{} directives serve to suppress the vertical whitespace (in the amount of tabcolsep) that would otherwise be inserted at the left-hand and right-hand edges of the tabular environment. To left-align the "Math mode" header with the right-hand "how to" header, change multicolumn{2}{c@{}}{Math mode} to multicolumn{2}{l@{}}{Math mode}.

    – Mico
    Sep 16 '16 at 0:33


















21














The immediate problem is solved by replacing the text-mode instruction ~{A} with the math-mode directive tilde{A}.



In addition, you may want to make the equation both more compact and more readable by (a) introducing a line break in the material set below the third sum symbol (via a substack instruction) and (b) eliminating the whitespace that's otherwise inserted to the left and right of that summation symbol (via a mathclap instruction).



enter image description here





Addendum: For completeness/reference, here's a list of common accents and how they should be produced in text and math mode, respectively. Note that the positions and, in the case of text-upright versus text-italic font shapes, even the shapes of the accents can differ between text and math modes. In math mode, the shapes of the math-accent characters are the same regardless of whether mathrm ("math roman") or mathit ("math italics" -- the default) is in effect.



enter image description here





documentclass{article}
usepackage{mathtools} % for "mathclap" macro; loads "amsmath" package
begin{document}
[
= sum_{e in A} w(e)
= sum_{e in A} w(e) +
sum_{mathclap{substack{e in {(r,v)} \ text{s.t.}, v in V(G)}}} w(e)
= w(tilde{A})
]
end{document}




documentclass{article}
usepackage[T1]{fontenc}
usepackage{booktabs,array,lmodern}
newcolumntype{C}{>{$}c<{$}} % automatic-math version of "c" column type
begin{document}
noindent
begin{tabular}{@{} l cc>{itshape}c lCC @{}}
toprule
Accent name & multicolumn{3}{c}{Text mode}
& multicolumn{3}{c@{}}{Math mode} \
cmidrule(lr){2-4} cmidrule(l){5-7}
& how to & multicolumn{2}{c}{result}
& how to & multicolumn{2}{c@{}}{result} \
midrule
acute & verb|'| & 'A & 'A & verb|acute| & acute{mathrm{A}} & acute{A} \
grave & verb|`| & `A & `A & verb|grave| & grave{mathrm{A}} & grave{A} \
circumflex & verb|^| & ^A & ^A & verb|hat| & hat{mathrm{A}} & hat{A} \
squiggle, tilde & verb|~| & ~A & ~A & verb|tilde| & tilde{mathrm{A}} & tilde{A} \
macron, bar & verb|=| & =A & =A & verb|bar| & bar{mathrm{A}} & bar{A} \
dot accent & verb|.| & .A & .A & verb|dot| & dot{mathrm{A}} & dot{A} \
diereris (Umlaut) & verb|"| & "A & "A & verb|ddot| & ddot{mathrm{A}} & ddot{A} \
bottomrule
end{tabular}
end{document}





share|improve this answer


























  • Thank you for the answer. It's very helpful. May I ask a separate question about Tex code you give for the table? What does @{} do? How do you align "Math Mode" with second "How to"?

    – Christin
    Sep 15 '16 at 23:07











  • @Christin - The @{} directives serve to suppress the vertical whitespace (in the amount of tabcolsep) that would otherwise be inserted at the left-hand and right-hand edges of the tabular environment. To left-align the "Math mode" header with the right-hand "how to" header, change multicolumn{2}{c@{}}{Math mode} to multicolumn{2}{l@{}}{Math mode}.

    – Mico
    Sep 16 '16 at 0:33
















21












21








21







The immediate problem is solved by replacing the text-mode instruction ~{A} with the math-mode directive tilde{A}.



In addition, you may want to make the equation both more compact and more readable by (a) introducing a line break in the material set below the third sum symbol (via a substack instruction) and (b) eliminating the whitespace that's otherwise inserted to the left and right of that summation symbol (via a mathclap instruction).



enter image description here





Addendum: For completeness/reference, here's a list of common accents and how they should be produced in text and math mode, respectively. Note that the positions and, in the case of text-upright versus text-italic font shapes, even the shapes of the accents can differ between text and math modes. In math mode, the shapes of the math-accent characters are the same regardless of whether mathrm ("math roman") or mathit ("math italics" -- the default) is in effect.



enter image description here





documentclass{article}
usepackage{mathtools} % for "mathclap" macro; loads "amsmath" package
begin{document}
[
= sum_{e in A} w(e)
= sum_{e in A} w(e) +
sum_{mathclap{substack{e in {(r,v)} \ text{s.t.}, v in V(G)}}} w(e)
= w(tilde{A})
]
end{document}




documentclass{article}
usepackage[T1]{fontenc}
usepackage{booktabs,array,lmodern}
newcolumntype{C}{>{$}c<{$}} % automatic-math version of "c" column type
begin{document}
noindent
begin{tabular}{@{} l cc>{itshape}c lCC @{}}
toprule
Accent name & multicolumn{3}{c}{Text mode}
& multicolumn{3}{c@{}}{Math mode} \
cmidrule(lr){2-4} cmidrule(l){5-7}
& how to & multicolumn{2}{c}{result}
& how to & multicolumn{2}{c@{}}{result} \
midrule
acute & verb|'| & 'A & 'A & verb|acute| & acute{mathrm{A}} & acute{A} \
grave & verb|`| & `A & `A & verb|grave| & grave{mathrm{A}} & grave{A} \
circumflex & verb|^| & ^A & ^A & verb|hat| & hat{mathrm{A}} & hat{A} \
squiggle, tilde & verb|~| & ~A & ~A & verb|tilde| & tilde{mathrm{A}} & tilde{A} \
macron, bar & verb|=| & =A & =A & verb|bar| & bar{mathrm{A}} & bar{A} \
dot accent & verb|.| & .A & .A & verb|dot| & dot{mathrm{A}} & dot{A} \
diereris (Umlaut) & verb|"| & "A & "A & verb|ddot| & ddot{mathrm{A}} & ddot{A} \
bottomrule
end{tabular}
end{document}





share|improve this answer















The immediate problem is solved by replacing the text-mode instruction ~{A} with the math-mode directive tilde{A}.



In addition, you may want to make the equation both more compact and more readable by (a) introducing a line break in the material set below the third sum symbol (via a substack instruction) and (b) eliminating the whitespace that's otherwise inserted to the left and right of that summation symbol (via a mathclap instruction).



enter image description here





Addendum: For completeness/reference, here's a list of common accents and how they should be produced in text and math mode, respectively. Note that the positions and, in the case of text-upright versus text-italic font shapes, even the shapes of the accents can differ between text and math modes. In math mode, the shapes of the math-accent characters are the same regardless of whether mathrm ("math roman") or mathit ("math italics" -- the default) is in effect.



enter image description here





documentclass{article}
usepackage{mathtools} % for "mathclap" macro; loads "amsmath" package
begin{document}
[
= sum_{e in A} w(e)
= sum_{e in A} w(e) +
sum_{mathclap{substack{e in {(r,v)} \ text{s.t.}, v in V(G)}}} w(e)
= w(tilde{A})
]
end{document}




documentclass{article}
usepackage[T1]{fontenc}
usepackage{booktabs,array,lmodern}
newcolumntype{C}{>{$}c<{$}} % automatic-math version of "c" column type
begin{document}
noindent
begin{tabular}{@{} l cc>{itshape}c lCC @{}}
toprule
Accent name & multicolumn{3}{c}{Text mode}
& multicolumn{3}{c@{}}{Math mode} \
cmidrule(lr){2-4} cmidrule(l){5-7}
& how to & multicolumn{2}{c}{result}
& how to & multicolumn{2}{c@{}}{result} \
midrule
acute & verb|'| & 'A & 'A & verb|acute| & acute{mathrm{A}} & acute{A} \
grave & verb|`| & `A & `A & verb|grave| & grave{mathrm{A}} & grave{A} \
circumflex & verb|^| & ^A & ^A & verb|hat| & hat{mathrm{A}} & hat{A} \
squiggle, tilde & verb|~| & ~A & ~A & verb|tilde| & tilde{mathrm{A}} & tilde{A} \
macron, bar & verb|=| & =A & =A & verb|bar| & bar{mathrm{A}} & bar{A} \
dot accent & verb|.| & .A & .A & verb|dot| & dot{mathrm{A}} & dot{A} \
diereris (Umlaut) & verb|"| & "A & "A & verb|ddot| & ddot{mathrm{A}} & ddot{A} \
bottomrule
end{tabular}
end{document}






share|improve this answer














share|improve this answer



share|improve this answer








edited Jan 23 '18 at 0:49

























answered Dec 7 '15 at 6:29









MicoMico

285k31388778




285k31388778













  • Thank you for the answer. It's very helpful. May I ask a separate question about Tex code you give for the table? What does @{} do? How do you align "Math Mode" with second "How to"?

    – Christin
    Sep 15 '16 at 23:07











  • @Christin - The @{} directives serve to suppress the vertical whitespace (in the amount of tabcolsep) that would otherwise be inserted at the left-hand and right-hand edges of the tabular environment. To left-align the "Math mode" header with the right-hand "how to" header, change multicolumn{2}{c@{}}{Math mode} to multicolumn{2}{l@{}}{Math mode}.

    – Mico
    Sep 16 '16 at 0:33





















  • Thank you for the answer. It's very helpful. May I ask a separate question about Tex code you give for the table? What does @{} do? How do you align "Math Mode" with second "How to"?

    – Christin
    Sep 15 '16 at 23:07











  • @Christin - The @{} directives serve to suppress the vertical whitespace (in the amount of tabcolsep) that would otherwise be inserted at the left-hand and right-hand edges of the tabular environment. To left-align the "Math mode" header with the right-hand "how to" header, change multicolumn{2}{c@{}}{Math mode} to multicolumn{2}{l@{}}{Math mode}.

    – Mico
    Sep 16 '16 at 0:33



















Thank you for the answer. It's very helpful. May I ask a separate question about Tex code you give for the table? What does @{} do? How do you align "Math Mode" with second "How to"?

– Christin
Sep 15 '16 at 23:07





Thank you for the answer. It's very helpful. May I ask a separate question about Tex code you give for the table? What does @{} do? How do you align "Math Mode" with second "How to"?

– Christin
Sep 15 '16 at 23:07













@Christin - The @{} directives serve to suppress the vertical whitespace (in the amount of tabcolsep) that would otherwise be inserted at the left-hand and right-hand edges of the tabular environment. To left-align the "Math mode" header with the right-hand "how to" header, change multicolumn{2}{c@{}}{Math mode} to multicolumn{2}{l@{}}{Math mode}.

– Mico
Sep 16 '16 at 0:33







@Christin - The @{} directives serve to suppress the vertical whitespace (in the amount of tabcolsep) that would otherwise be inserted at the left-hand and right-hand edges of the tabular environment. To left-align the "Math mode" header with the right-hand "how to" header, change multicolumn{2}{c@{}}{Math mode} to multicolumn{2}{l@{}}{Math mode}.

– Mico
Sep 16 '16 at 0:33













8














Text accents and math accents have different syntax in LaTeX: to get Ã, you would use ~{A} in textmode, but tilde A or widetilde A (the latter for a wider version) in mathmode.



Here is a table showing how to get different kinds of accents in textmode and mathmode.



Thus, your corrected code is



= sum_{e in A} w(e) = sum_{e in A} w(e)+ sum_{e in {(r,v)| v in V(G)}} w(e) = w( tilde A )





share|improve this answer
























  • While you're at it, you should also replace | with mid. The spacing around the two symbols is quite different.

    – Mico
    Dec 7 '15 at 6:16













  • Or use a better construction for set syntax. mid is not the proper symbol to use in general as it cannot be scaled (when needed). But useful as a one of.

    – daleif
    Dec 7 '15 at 6:26











  • @daleif: a bar in the middle is the way I generally denote set syntax in writing, and I try to keep that notation in LaTeX. What would I use to make it scale when needed?

    – Arun Debray
    Dec 7 '15 at 16:55






  • 1





    These days I tend to use this construction: tex.stackexchange.com/a/150516/3929, the idea behind it is (1) if I choose to use a bar syntax, I'd like it to be scalable along with the braces. (2) the spacing should be fully configurable from the preamble, not something that is manually inserted each time. (3) the input syntax should not be dependent on the choice for "given" symbol (here a bar), the syntax should make sense no matter the output symbol. (4) I want to get the scaller macros out of the way. In this construction "*" means autoscalling, and [big] us manually scaled.

    – daleif
    Dec 7 '15 at 18:39
















8














Text accents and math accents have different syntax in LaTeX: to get Ã, you would use ~{A} in textmode, but tilde A or widetilde A (the latter for a wider version) in mathmode.



Here is a table showing how to get different kinds of accents in textmode and mathmode.



Thus, your corrected code is



= sum_{e in A} w(e) = sum_{e in A} w(e)+ sum_{e in {(r,v)| v in V(G)}} w(e) = w( tilde A )





share|improve this answer
























  • While you're at it, you should also replace | with mid. The spacing around the two symbols is quite different.

    – Mico
    Dec 7 '15 at 6:16













  • Or use a better construction for set syntax. mid is not the proper symbol to use in general as it cannot be scaled (when needed). But useful as a one of.

    – daleif
    Dec 7 '15 at 6:26











  • @daleif: a bar in the middle is the way I generally denote set syntax in writing, and I try to keep that notation in LaTeX. What would I use to make it scale when needed?

    – Arun Debray
    Dec 7 '15 at 16:55






  • 1





    These days I tend to use this construction: tex.stackexchange.com/a/150516/3929, the idea behind it is (1) if I choose to use a bar syntax, I'd like it to be scalable along with the braces. (2) the spacing should be fully configurable from the preamble, not something that is manually inserted each time. (3) the input syntax should not be dependent on the choice for "given" symbol (here a bar), the syntax should make sense no matter the output symbol. (4) I want to get the scaller macros out of the way. In this construction "*" means autoscalling, and [big] us manually scaled.

    – daleif
    Dec 7 '15 at 18:39














8












8








8







Text accents and math accents have different syntax in LaTeX: to get Ã, you would use ~{A} in textmode, but tilde A or widetilde A (the latter for a wider version) in mathmode.



Here is a table showing how to get different kinds of accents in textmode and mathmode.



Thus, your corrected code is



= sum_{e in A} w(e) = sum_{e in A} w(e)+ sum_{e in {(r,v)| v in V(G)}} w(e) = w( tilde A )





share|improve this answer













Text accents and math accents have different syntax in LaTeX: to get Ã, you would use ~{A} in textmode, but tilde A or widetilde A (the latter for a wider version) in mathmode.



Here is a table showing how to get different kinds of accents in textmode and mathmode.



Thus, your corrected code is



= sum_{e in A} w(e) = sum_{e in A} w(e)+ sum_{e in {(r,v)| v in V(G)}} w(e) = w( tilde A )






share|improve this answer












share|improve this answer



share|improve this answer










answered Dec 7 '15 at 5:27









Arun DebrayArun Debray

5,54321945




5,54321945













  • While you're at it, you should also replace | with mid. The spacing around the two symbols is quite different.

    – Mico
    Dec 7 '15 at 6:16













  • Or use a better construction for set syntax. mid is not the proper symbol to use in general as it cannot be scaled (when needed). But useful as a one of.

    – daleif
    Dec 7 '15 at 6:26











  • @daleif: a bar in the middle is the way I generally denote set syntax in writing, and I try to keep that notation in LaTeX. What would I use to make it scale when needed?

    – Arun Debray
    Dec 7 '15 at 16:55






  • 1





    These days I tend to use this construction: tex.stackexchange.com/a/150516/3929, the idea behind it is (1) if I choose to use a bar syntax, I'd like it to be scalable along with the braces. (2) the spacing should be fully configurable from the preamble, not something that is manually inserted each time. (3) the input syntax should not be dependent on the choice for "given" symbol (here a bar), the syntax should make sense no matter the output symbol. (4) I want to get the scaller macros out of the way. In this construction "*" means autoscalling, and [big] us manually scaled.

    – daleif
    Dec 7 '15 at 18:39



















  • While you're at it, you should also replace | with mid. The spacing around the two symbols is quite different.

    – Mico
    Dec 7 '15 at 6:16













  • Or use a better construction for set syntax. mid is not the proper symbol to use in general as it cannot be scaled (when needed). But useful as a one of.

    – daleif
    Dec 7 '15 at 6:26











  • @daleif: a bar in the middle is the way I generally denote set syntax in writing, and I try to keep that notation in LaTeX. What would I use to make it scale when needed?

    – Arun Debray
    Dec 7 '15 at 16:55






  • 1





    These days I tend to use this construction: tex.stackexchange.com/a/150516/3929, the idea behind it is (1) if I choose to use a bar syntax, I'd like it to be scalable along with the braces. (2) the spacing should be fully configurable from the preamble, not something that is manually inserted each time. (3) the input syntax should not be dependent on the choice for "given" symbol (here a bar), the syntax should make sense no matter the output symbol. (4) I want to get the scaller macros out of the way. In this construction "*" means autoscalling, and [big] us manually scaled.

    – daleif
    Dec 7 '15 at 18:39

















While you're at it, you should also replace | with mid. The spacing around the two symbols is quite different.

– Mico
Dec 7 '15 at 6:16







While you're at it, you should also replace | with mid. The spacing around the two symbols is quite different.

– Mico
Dec 7 '15 at 6:16















Or use a better construction for set syntax. mid is not the proper symbol to use in general as it cannot be scaled (when needed). But useful as a one of.

– daleif
Dec 7 '15 at 6:26





Or use a better construction for set syntax. mid is not the proper symbol to use in general as it cannot be scaled (when needed). But useful as a one of.

– daleif
Dec 7 '15 at 6:26













@daleif: a bar in the middle is the way I generally denote set syntax in writing, and I try to keep that notation in LaTeX. What would I use to make it scale when needed?

– Arun Debray
Dec 7 '15 at 16:55





@daleif: a bar in the middle is the way I generally denote set syntax in writing, and I try to keep that notation in LaTeX. What would I use to make it scale when needed?

– Arun Debray
Dec 7 '15 at 16:55




1




1





These days I tend to use this construction: tex.stackexchange.com/a/150516/3929, the idea behind it is (1) if I choose to use a bar syntax, I'd like it to be scalable along with the braces. (2) the spacing should be fully configurable from the preamble, not something that is manually inserted each time. (3) the input syntax should not be dependent on the choice for "given" symbol (here a bar), the syntax should make sense no matter the output symbol. (4) I want to get the scaller macros out of the way. In this construction "*" means autoscalling, and [big] us manually scaled.

– daleif
Dec 7 '15 at 18:39





These days I tend to use this construction: tex.stackexchange.com/a/150516/3929, the idea behind it is (1) if I choose to use a bar syntax, I'd like it to be scalable along with the braces. (2) the spacing should be fully configurable from the preamble, not something that is manually inserted each time. (3) the input syntax should not be dependent on the choice for "given" symbol (here a bar), the syntax should make sense no matter the output symbol. (4) I want to get the scaller macros out of the way. In this construction "*" means autoscalling, and [big] us manually scaled.

– daleif
Dec 7 '15 at 18:39











2














I solved the issue by replacing ~{A} with tilde{A}.






share|improve this answer





















  • 3





    Your answer has already been provided by Mico, hasn't it?

    – Stefan Pinnow
    Jul 12 '16 at 10:13
















2














I solved the issue by replacing ~{A} with tilde{A}.






share|improve this answer





















  • 3





    Your answer has already been provided by Mico, hasn't it?

    – Stefan Pinnow
    Jul 12 '16 at 10:13














2












2








2







I solved the issue by replacing ~{A} with tilde{A}.






share|improve this answer















I solved the issue by replacing ~{A} with tilde{A}.







share|improve this answer














share|improve this answer



share|improve this answer








edited Jul 12 '16 at 10:13









Stefan Pinnow

20.3k83578




20.3k83578










answered Jul 12 '16 at 8:45









marufmaruf

211




211








  • 3





    Your answer has already been provided by Mico, hasn't it?

    – Stefan Pinnow
    Jul 12 '16 at 10:13














  • 3





    Your answer has already been provided by Mico, hasn't it?

    – Stefan Pinnow
    Jul 12 '16 at 10:13








3




3





Your answer has already been provided by Mico, hasn't it?

– Stefan Pinnow
Jul 12 '16 at 10:13





Your answer has already been provided by Mico, hasn't it?

– Stefan Pinnow
Jul 12 '16 at 10:13











0














Just use the package lmodern.



documentclass{article}
usepackage{amsmath,amssymb}
usepackage[utf8]{inputenc}
usepackage[T1]{fontenc}
usepackage{verbatim}

usepackage{lmodern}

begin{document}

$$ y = w( ~{A} ) $$

You can also disregard the use of verb=~{A}= and use à directly, like the example below:

$$ y = w( Ã ) $$

end{document}


enter image description here






share|improve this answer








New contributor




Roberto de Freitas Cabral 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.SE! That is already mentioned in the answer of @mico, I guess?

    – Kurt
    14 hours ago











  • You get LaTeX Warning: Command ~ invalid in math mode and moreover the A is not in math italic. Is it so difficult to use tilde{A}, which is the proper markup?

    – egreg
    13 hours ago


















0














Just use the package lmodern.



documentclass{article}
usepackage{amsmath,amssymb}
usepackage[utf8]{inputenc}
usepackage[T1]{fontenc}
usepackage{verbatim}

usepackage{lmodern}

begin{document}

$$ y = w( ~{A} ) $$

You can also disregard the use of verb=~{A}= and use à directly, like the example below:

$$ y = w( Ã ) $$

end{document}


enter image description here






share|improve this answer








New contributor




Roberto de Freitas Cabral 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.SE! That is already mentioned in the answer of @mico, I guess?

    – Kurt
    14 hours ago











  • You get LaTeX Warning: Command ~ invalid in math mode and moreover the A is not in math italic. Is it so difficult to use tilde{A}, which is the proper markup?

    – egreg
    13 hours ago
















0












0








0







Just use the package lmodern.



documentclass{article}
usepackage{amsmath,amssymb}
usepackage[utf8]{inputenc}
usepackage[T1]{fontenc}
usepackage{verbatim}

usepackage{lmodern}

begin{document}

$$ y = w( ~{A} ) $$

You can also disregard the use of verb=~{A}= and use à directly, like the example below:

$$ y = w( Ã ) $$

end{document}


enter image description here






share|improve this answer








New contributor




Roberto de Freitas Cabral is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.










Just use the package lmodern.



documentclass{article}
usepackage{amsmath,amssymb}
usepackage[utf8]{inputenc}
usepackage[T1]{fontenc}
usepackage{verbatim}

usepackage{lmodern}

begin{document}

$$ y = w( ~{A} ) $$

You can also disregard the use of verb=~{A}= and use à directly, like the example below:

$$ y = w( Ã ) $$

end{document}


enter image description here







share|improve this answer








New contributor




Roberto de Freitas Cabral is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this answer



share|improve this answer






New contributor




Roberto de Freitas Cabral is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









answered 14 hours ago









Roberto de Freitas CabralRoberto de Freitas Cabral

1




1




New contributor




Roberto de Freitas Cabral is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Roberto de Freitas Cabral is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Roberto de Freitas Cabral 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.SE! That is already mentioned in the answer of @mico, I guess?

    – Kurt
    14 hours ago











  • You get LaTeX Warning: Command ~ invalid in math mode and moreover the A is not in math italic. Is it so difficult to use tilde{A}, which is the proper markup?

    – egreg
    13 hours ago





















  • Welcome to TeX.SE! That is already mentioned in the answer of @mico, I guess?

    – Kurt
    14 hours ago











  • You get LaTeX Warning: Command ~ invalid in math mode and moreover the A is not in math italic. Is it so difficult to use tilde{A}, which is the proper markup?

    – egreg
    13 hours ago



















Welcome to TeX.SE! That is already mentioned in the answer of @mico, I guess?

– Kurt
14 hours ago





Welcome to TeX.SE! That is already mentioned in the answer of @mico, I guess?

– Kurt
14 hours ago













You get LaTeX Warning: Command ~ invalid in math mode and moreover the A is not in math italic. Is it so difficult to use tilde{A}, which is the proper markup?

– egreg
13 hours ago







You get LaTeX Warning: Command ~ invalid in math mode and moreover the A is not in math italic. Is it so difficult to use tilde{A}, which is the proper markup?

– egreg
13 hours 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%2f281881%2ftrying-to-use-to-generate-tilde-symbol-in-math-mode%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

A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks

Calculate evaluation metrics using cross_val_predict sklearn

Insert data from modal to MySQL (multiple modal on website)