I would like the if statement to have "current stage" in serif and "satisfies" as normal text. The following code produces both with italics:
\documentclass{article}
\usepackage{algorithm2e}
\begin{document}
\begin{algorithm}
\If{\textsf{current\_state} \textrm{satisfies} \textsf{goal}}
{
return \textsf{existing\_plan}
}
\end{algorithm}
\end{document}
Any ideas?
\Var{current-state} \Satisfies \Var{goal}
. If you usexparse
and a tiny bit ofexpl3
, you can auto-replace-
to_
.