I want to include inline code examples such as if i < n then i++ and else i--. I'm using the following LaTeX:
\documentclass{article}
\usepackage{algorithmic}
\usepackage{algorithm2e}
\begin{document}
Inline code examples such as \lIf{i < n}{i++} and \lElse{i--} but
line breaks are being injected.
\end{document}
Which produces:
Inline code examples such as if i < n then i++;
and else i--;
but line breaks are being injected.
Rather than what I would expect:
Inline code examples such as if i < n then i++; and else i--; but line breaks are being injected.
How do I prevent linebreaks?