I am looking for a package that will allow me to write pseudocode
of algorithms. The pseudocode may include mathematical symbols, like
\forall
, \in
and subscripts. But I would like also to "talk" about
variables contained in the pseudocode in my text, so be able to say "In figure ...
variable foobar
corresponds .." and make the word foobar
have the same appearance
as in the pseudocode example.
I found that with the listings
package
I can add mathematical symbols by using: \begin{lstlisting}[mathescape]
. The problem
with this package is that I don't know how to make just one word have the
same appearance as the words appearing inside \begin{lstlisting} ... \end{lstlisting}
.
Any ideas how to do this? Or perhaps of another package that will help solve the above mentioned problem?
algorithm2e
andalgorithmic
\begin{lstlisting}\end{lstlisting}
is\lstinline{}