Math equation in latex (varnothing)











up vote
5
down vote

favorite












In a pseudocode, I would like to assign varnothing to a variable.

My code goes like this:



documentclass[runningheads]{llncs} 
usepackage{graphicx}
usepackage{algpseudocode}
usepackage{algorithm}
usepackage{amsmath}
begin{document}
begin{algorithm}
caption{Find...}
begin{algorithmic}[1] State $RS$ $leftarrow$ $varnothing$ end{algorithmic}
end{algorithm}
end{document}


Unfortunately this doesn't work. The error message I got is the following:




State $RS$ $leftarrow varnothing $ The control sequence at the end
of the top line of your error message was never def'ed. If you have
misspelled it (e.g., `hobx'), type `I' and the correct spelling
(e.g., `Ihbox'). Otherwise just continue, and I'll forget about
whatever was undefined. ! Undefined control sequence.
varnothing l.103 ...quad quad $R$ $leftarrow$ $varnothing $
Comment{$R$ is the set ... The control sequence at the end of the top
line of your error message was never def'ed. If you have misspelled
it (e.g., `hobx'), type `I' and the correct spelling (e.g.,
`Ihbox'). Otherwise just continue, and I'll forget about whatever was
undefined.



Do you have any ides on how this can be resolved?



FYI, I've already installed amsmath from texlive-latex-base in debian 9.



Thanks,

Pavlos










share|improve this question









New contributor




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




















  • Could you add fully compilable MWE?
    – Raaja
    Nov 23 at 9:57










  • welcome to tex.se! please extend your code fragment to complete small document (caled minimal working example: mwe) beginning with documentclass... and ending with end{document}
    – Zarko
    Nov 23 at 9:58










  • documentclass[runningheads]{llncs} usepackage{graphicx} usepackage{algpseudocode} usepackage{algorithm} usepackage{amsmath} begin{document} begin{algorithm} caption{Find...} begin{algorithmic}[1] State $RS$ $leftarrow$ end{algorithmic} end{algorithm} end{document}
    – Pavlos Ponos
    Nov 23 at 10:10










  • @PavlosPonos You can also remove the comment with your code as Raaja has edited your question.
    – Sebastiano
    Nov 23 at 10:51















up vote
5
down vote

favorite












In a pseudocode, I would like to assign varnothing to a variable.

My code goes like this:



documentclass[runningheads]{llncs} 
usepackage{graphicx}
usepackage{algpseudocode}
usepackage{algorithm}
usepackage{amsmath}
begin{document}
begin{algorithm}
caption{Find...}
begin{algorithmic}[1] State $RS$ $leftarrow$ $varnothing$ end{algorithmic}
end{algorithm}
end{document}


Unfortunately this doesn't work. The error message I got is the following:




State $RS$ $leftarrow varnothing $ The control sequence at the end
of the top line of your error message was never def'ed. If you have
misspelled it (e.g., `hobx'), type `I' and the correct spelling
(e.g., `Ihbox'). Otherwise just continue, and I'll forget about
whatever was undefined. ! Undefined control sequence.
varnothing l.103 ...quad quad $R$ $leftarrow$ $varnothing $
Comment{$R$ is the set ... The control sequence at the end of the top
line of your error message was never def'ed. If you have misspelled
it (e.g., `hobx'), type `I' and the correct spelling (e.g.,
`Ihbox'). Otherwise just continue, and I'll forget about whatever was
undefined.



Do you have any ides on how this can be resolved?



FYI, I've already installed amsmath from texlive-latex-base in debian 9.



Thanks,

Pavlos










share|improve this question









New contributor




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




















  • Could you add fully compilable MWE?
    – Raaja
    Nov 23 at 9:57










  • welcome to tex.se! please extend your code fragment to complete small document (caled minimal working example: mwe) beginning with documentclass... and ending with end{document}
    – Zarko
    Nov 23 at 9:58










  • documentclass[runningheads]{llncs} usepackage{graphicx} usepackage{algpseudocode} usepackage{algorithm} usepackage{amsmath} begin{document} begin{algorithm} caption{Find...} begin{algorithmic}[1] State $RS$ $leftarrow$ end{algorithmic} end{algorithm} end{document}
    – Pavlos Ponos
    Nov 23 at 10:10










  • @PavlosPonos You can also remove the comment with your code as Raaja has edited your question.
    – Sebastiano
    Nov 23 at 10:51













up vote
5
down vote

favorite









up vote
5
down vote

favorite











In a pseudocode, I would like to assign varnothing to a variable.

My code goes like this:



documentclass[runningheads]{llncs} 
usepackage{graphicx}
usepackage{algpseudocode}
usepackage{algorithm}
usepackage{amsmath}
begin{document}
begin{algorithm}
caption{Find...}
begin{algorithmic}[1] State $RS$ $leftarrow$ $varnothing$ end{algorithmic}
end{algorithm}
end{document}


Unfortunately this doesn't work. The error message I got is the following:




State $RS$ $leftarrow varnothing $ The control sequence at the end
of the top line of your error message was never def'ed. If you have
misspelled it (e.g., `hobx'), type `I' and the correct spelling
(e.g., `Ihbox'). Otherwise just continue, and I'll forget about
whatever was undefined. ! Undefined control sequence.
varnothing l.103 ...quad quad $R$ $leftarrow$ $varnothing $
Comment{$R$ is the set ... The control sequence at the end of the top
line of your error message was never def'ed. If you have misspelled
it (e.g., `hobx'), type `I' and the correct spelling (e.g.,
`Ihbox'). Otherwise just continue, and I'll forget about whatever was
undefined.



Do you have any ides on how this can be resolved?



FYI, I've already installed amsmath from texlive-latex-base in debian 9.



Thanks,

Pavlos










share|improve this question









New contributor




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











In a pseudocode, I would like to assign varnothing to a variable.

My code goes like this:



documentclass[runningheads]{llncs} 
usepackage{graphicx}
usepackage{algpseudocode}
usepackage{algorithm}
usepackage{amsmath}
begin{document}
begin{algorithm}
caption{Find...}
begin{algorithmic}[1] State $RS$ $leftarrow$ $varnothing$ end{algorithmic}
end{algorithm}
end{document}


Unfortunately this doesn't work. The error message I got is the following:




State $RS$ $leftarrow varnothing $ The control sequence at the end
of the top line of your error message was never def'ed. If you have
misspelled it (e.g., `hobx'), type `I' and the correct spelling
(e.g., `Ihbox'). Otherwise just continue, and I'll forget about
whatever was undefined. ! Undefined control sequence.
varnothing l.103 ...quad quad $R$ $leftarrow$ $varnothing $
Comment{$R$ is the set ... The control sequence at the end of the top
line of your error message was never def'ed. If you have misspelled
it (e.g., `hobx'), type `I' and the correct spelling (e.g.,
`Ihbox'). Otherwise just continue, and I'll forget about whatever was
undefined.



Do you have any ides on how this can be resolved?



FYI, I've already installed amsmath from texlive-latex-base in debian 9.



Thanks,

Pavlos







equations






share|improve this question









New contributor




Pavlos Ponos 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 question









New contributor




Pavlos Ponos 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 question




share|improve this question








edited Nov 23 at 12:21









Circumscribe

3,3421326




3,3421326






New contributor




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









asked Nov 23 at 9:53









Pavlos Ponos

282




282




New contributor




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





New contributor





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






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












  • Could you add fully compilable MWE?
    – Raaja
    Nov 23 at 9:57










  • welcome to tex.se! please extend your code fragment to complete small document (caled minimal working example: mwe) beginning with documentclass... and ending with end{document}
    – Zarko
    Nov 23 at 9:58










  • documentclass[runningheads]{llncs} usepackage{graphicx} usepackage{algpseudocode} usepackage{algorithm} usepackage{amsmath} begin{document} begin{algorithm} caption{Find...} begin{algorithmic}[1] State $RS$ $leftarrow$ end{algorithmic} end{algorithm} end{document}
    – Pavlos Ponos
    Nov 23 at 10:10










  • @PavlosPonos You can also remove the comment with your code as Raaja has edited your question.
    – Sebastiano
    Nov 23 at 10:51


















  • Could you add fully compilable MWE?
    – Raaja
    Nov 23 at 9:57










  • welcome to tex.se! please extend your code fragment to complete small document (caled minimal working example: mwe) beginning with documentclass... and ending with end{document}
    – Zarko
    Nov 23 at 9:58










  • documentclass[runningheads]{llncs} usepackage{graphicx} usepackage{algpseudocode} usepackage{algorithm} usepackage{amsmath} begin{document} begin{algorithm} caption{Find...} begin{algorithmic}[1] State $RS$ $leftarrow$ end{algorithmic} end{algorithm} end{document}
    – Pavlos Ponos
    Nov 23 at 10:10










  • @PavlosPonos You can also remove the comment with your code as Raaja has edited your question.
    – Sebastiano
    Nov 23 at 10:51
















Could you add fully compilable MWE?
– Raaja
Nov 23 at 9:57




Could you add fully compilable MWE?
– Raaja
Nov 23 at 9:57












welcome to tex.se! please extend your code fragment to complete small document (caled minimal working example: mwe) beginning with documentclass... and ending with end{document}
– Zarko
Nov 23 at 9:58




welcome to tex.se! please extend your code fragment to complete small document (caled minimal working example: mwe) beginning with documentclass... and ending with end{document}
– Zarko
Nov 23 at 9:58












documentclass[runningheads]{llncs} usepackage{graphicx} usepackage{algpseudocode} usepackage{algorithm} usepackage{amsmath} begin{document} begin{algorithm} caption{Find...} begin{algorithmic}[1] State $RS$ $leftarrow$ end{algorithmic} end{algorithm} end{document}
– Pavlos Ponos
Nov 23 at 10:10




documentclass[runningheads]{llncs} usepackage{graphicx} usepackage{algpseudocode} usepackage{algorithm} usepackage{amsmath} begin{document} begin{algorithm} caption{Find...} begin{algorithmic}[1] State $RS$ $leftarrow$ end{algorithmic} end{algorithm} end{document}
– Pavlos Ponos
Nov 23 at 10:10












@PavlosPonos You can also remove the comment with your code as Raaja has edited your question.
– Sebastiano
Nov 23 at 10:51




@PavlosPonos You can also remove the comment with your code as Raaja has edited your question.
– Sebastiano
Nov 23 at 10:51










1 Answer
1






active

oldest

votes

















up vote
5
down vote



accepted










varnothing belongs to the set of symbols in the package amssymb. So include it in your preamble as usepackage{amssymb} and you are good to go.



documentclass{article} 
usepackage{graphicx}
usepackage{algpseudocode}
usepackage{algorithm}
usepackage{amsmath}
usepackage{amssymb}
begin{document}
begin{algorithm}
caption{Find...}
begin{algorithmic}[1] State $RS$ $leftarrow$ $varnothing$ end{algorithmic}
end{algorithm}
end{document}


with which you will get:



enter image description here






share|improve this answer



















  • 3




    usepackage{amssymb} was the solution to my "problem". When adding this, without changing anything else, it solved my problem! Thanks!
    – Pavlos Ponos
    Nov 23 at 10:23






  • 1




    @Pavlos Ponos you are welcome.
    – Raaja
    Nov 23 at 10:25











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',
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
});


}
});






Pavlos Ponos is a new contributor. Be nice, and check out our Code of Conduct.










 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f461388%2fmath-equation-in-latex-varnothing%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
5
down vote



accepted










varnothing belongs to the set of symbols in the package amssymb. So include it in your preamble as usepackage{amssymb} and you are good to go.



documentclass{article} 
usepackage{graphicx}
usepackage{algpseudocode}
usepackage{algorithm}
usepackage{amsmath}
usepackage{amssymb}
begin{document}
begin{algorithm}
caption{Find...}
begin{algorithmic}[1] State $RS$ $leftarrow$ $varnothing$ end{algorithmic}
end{algorithm}
end{document}


with which you will get:



enter image description here






share|improve this answer



















  • 3




    usepackage{amssymb} was the solution to my "problem". When adding this, without changing anything else, it solved my problem! Thanks!
    – Pavlos Ponos
    Nov 23 at 10:23






  • 1




    @Pavlos Ponos you are welcome.
    – Raaja
    Nov 23 at 10:25















up vote
5
down vote



accepted










varnothing belongs to the set of symbols in the package amssymb. So include it in your preamble as usepackage{amssymb} and you are good to go.



documentclass{article} 
usepackage{graphicx}
usepackage{algpseudocode}
usepackage{algorithm}
usepackage{amsmath}
usepackage{amssymb}
begin{document}
begin{algorithm}
caption{Find...}
begin{algorithmic}[1] State $RS$ $leftarrow$ $varnothing$ end{algorithmic}
end{algorithm}
end{document}


with which you will get:



enter image description here






share|improve this answer



















  • 3




    usepackage{amssymb} was the solution to my "problem". When adding this, without changing anything else, it solved my problem! Thanks!
    – Pavlos Ponos
    Nov 23 at 10:23






  • 1




    @Pavlos Ponos you are welcome.
    – Raaja
    Nov 23 at 10:25













up vote
5
down vote



accepted







up vote
5
down vote



accepted






varnothing belongs to the set of symbols in the package amssymb. So include it in your preamble as usepackage{amssymb} and you are good to go.



documentclass{article} 
usepackage{graphicx}
usepackage{algpseudocode}
usepackage{algorithm}
usepackage{amsmath}
usepackage{amssymb}
begin{document}
begin{algorithm}
caption{Find...}
begin{algorithmic}[1] State $RS$ $leftarrow$ $varnothing$ end{algorithmic}
end{algorithm}
end{document}


with which you will get:



enter image description here






share|improve this answer














varnothing belongs to the set of symbols in the package amssymb. So include it in your preamble as usepackage{amssymb} and you are good to go.



documentclass{article} 
usepackage{graphicx}
usepackage{algpseudocode}
usepackage{algorithm}
usepackage{amsmath}
usepackage{amssymb}
begin{document}
begin{algorithm}
caption{Find...}
begin{algorithmic}[1] State $RS$ $leftarrow$ $varnothing$ end{algorithmic}
end{algorithm}
end{document}


with which you will get:



enter image description here







share|improve this answer














share|improve this answer



share|improve this answer








edited Nov 23 at 10:51

























answered Nov 23 at 10:20









Raaja

2,0632524




2,0632524








  • 3




    usepackage{amssymb} was the solution to my "problem". When adding this, without changing anything else, it solved my problem! Thanks!
    – Pavlos Ponos
    Nov 23 at 10:23






  • 1




    @Pavlos Ponos you are welcome.
    – Raaja
    Nov 23 at 10:25














  • 3




    usepackage{amssymb} was the solution to my "problem". When adding this, without changing anything else, it solved my problem! Thanks!
    – Pavlos Ponos
    Nov 23 at 10:23






  • 1




    @Pavlos Ponos you are welcome.
    – Raaja
    Nov 23 at 10:25








3




3




usepackage{amssymb} was the solution to my "problem". When adding this, without changing anything else, it solved my problem! Thanks!
– Pavlos Ponos
Nov 23 at 10:23




usepackage{amssymb} was the solution to my "problem". When adding this, without changing anything else, it solved my problem! Thanks!
– Pavlos Ponos
Nov 23 at 10:23




1




1




@Pavlos Ponos you are welcome.
– Raaja
Nov 23 at 10:25




@Pavlos Ponos you are welcome.
– Raaja
Nov 23 at 10:25










Pavlos Ponos is a new contributor. Be nice, and check out our Code of Conduct.










 

draft saved


draft discarded


















Pavlos Ponos is a new contributor. Be nice, and check out our Code of Conduct.













Pavlos Ponos is a new contributor. Be nice, and check out our Code of Conduct.












Pavlos Ponos is a new contributor. Be nice, and check out our Code of Conduct.















 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f461388%2fmath-equation-in-latex-varnothing%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

flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

Mangá

Eduardo VII do Reino Unido