Impresión de látex barra simple, barra invertida r, barra invertida n
Quiero que la siguiente línea dentro de un archivo * .tex se imprima "tal cual":
while (tmp[0] == '\r' || tmp[0] == '\n') {tmp++;}
Cuando lo envuelvo en un comando \ verb como este:
\verb"while (tmp[0] == '\r' || tmp[0] == '\n') {tmp++;}"
no funciona, y obtengo:
! Undefined control sequence.
Todas las demás respuestas de Google sonentonces Complicado.
Seguramente, debe haber una manera fácil de hacer esto, ¿verdad? ¡Gracias!
EDITAR:
Aquí está el ejemplo de contador mínimo solicitado en los comentarios:
%%%%%%%%%%%%%%%%%%%%%%%%%%
% document class: beamer %
%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass{beamer}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% no navigation bars please %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\setbeamertemplate{footline}[frame number]{}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% no navigation symbols please %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\setbeamertemplate{navigation symbols}{}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% no footers at all please %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\setbeamertemplate{footline}{}
%%%%%%%%%%%%%%%%%%%%%%%%%%%
% center the title please %
%%%%%%%%%%%%%%%%%%%%%%%%%%%
\setbeamertemplate{frametitle}[default][center]
%%%%%%%%%%%%%%%%%%
% begin document %
%%%%%%%%%%%%%%%%%%
\begin{document}
%%%%%%%%%
% title %
%%%%%%%%%
\title{Some Title}
%%%%%%%%%%
% author %
%%%%%%%%%%
\author{Some Author}
%%%%%%%%%%%%
% date ... %
%%%%%%%%%%%%
\date{\today}
%%%%%%%%%%%%%
% frame ... %
%%%%%%%%%%%%%
\frame{\titlepage}
%%%%%%%%%%%%%%%%%%%%%%%%%%%
% SECTION :: Introduction %
%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Section Introduction}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Frame Title :: Introduction %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\frame{\frametitle{Status}
%%%%%%%%%%%%%%%%%%
% Items :: Begin %
%%%%%%%%%%%%%%%%%%
\begin{itemize}
\item
while (tmp[0] == 'A' $||$ tmp[1] == 'B') $\{$tmp++;$\}$
\end{itemize}
}
\end{document}