I'm using a (required) template with a sans serif font, however I would like to maintain the default font for algorithms.
I'm using pseudocode with variables with more than one letter, so I defined a data type in algorithm2e with that variable name, because I was told that in math mode latex understands multiple variables without spaces as a multiplication of several single letter variables and not as the long name of a variable.
However, as I have to use sans serif font, my variables use that font also, and it doesn't look good, as it's different from single varibles.
I tried using italic an Computer Modern font...
My code:
\documentclass[10pt,a4paper,twoside]{report}
\usepackage[linesnumbered,ruled,vlined,algochapter]{algorithm2e}
\DontPrintSemicolon
\SetAlFnt{crm}
\SetDataSty{it}
\SetKwData{Result}{result}
% Use Arial font as default
\renewcommand{\rmdefault}{phv}
\renewcommand{\sfdefault}{phv}
\begin{document}
\begin{algorithm}
\KwIn{ \(x\) and \(y\) }
\KwOut{ \Result }
\( \Result \leftarrow x + y \) \;
\Return{ \Result }
\caption{ This is a caption }
\end{algorithm}
In here I talk about the \Result of \(x + y \).
\end{document}
How it looks:
How I would like it to look:
("result" seem the same font as "x" and "y", but the caption also changed...)

