\documentclass{book}
\usepackage{amsfonts}
\usepackage{amsmath}
\usepackage[gen]{eurosym}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
\usepackage{graphicx}
\usepackage{etoolbox}
\usepackage{titleps}
\usepackage{float}
% use hidelinks to remove boxes around links to be similar to Texinfo TeX
\usepackage[hidelinks]{hyperref}
\usepackage[utf8]{inputenc}

\makeatletter
\newcommand{\Texinfosettitle}{No Title}%

% style command for cite in 'cmd_text' formatting context
\newcommand\Texinfocommandstyletextcite[1]{{\normalfont{}\textsl{#1}}}%

% style command for kbd in 'cmd_text' formatting context
\newcommand\Texinfocommandstyletextkbd[1]{{\ttfamily\textsl{#1}}}%

% style command for var in 'cmd_text' formatting context
\newcommand\Texinfocommandstyletextvar[1]{{\normalfont{}\textsl{#1}}}%

% redefine the \mainmatter command such that it does not clear page
% as if in double page
\renewcommand\mainmatter{\clearpage\@mainmattertrue\pagenumbering{arabic}}
\newenvironment{Texinfopreformatted}{%
  \par\GNUTobeylines\obeyspaces\frenchspacing\parskip=\z@\parindent=\z@}{}
{\catcode`\^^M=13 \gdef\GNUTobeylines{\catcode`\^^M=13 \def^^M{\null\par}}}
\newenvironment{Texinfoindented}{\begin{list}{}{}\item\relax}{\end{list}}


% used for substitutions in commands
\newcommand{\Texinfoplaceholder}[1]{}

\newpagestyle{single}{\sethead[\chaptername{} \thechapter{} \chaptertitle{}][][\thepage]
                              {\chaptername{} \thechapter{} \chaptertitle{}}{}{\thepage}}

% allow line breaking at underscore
\let\Texinfounderscore\_
\renewcommand{\_}{\Texinfounderscore\discretionary{}{}{}}
\renewcommand{\includegraphics}[1]{\fbox{FIG \detokenize{#1}}}

\makeatother
% set default for @setchapternewpage
\makeatletter
\patchcmd{\chapter}{\if@openright\cleardoublepage\else\clearpage\fi}{\Texinfoplaceholder{setchapternewpage placeholder}\clearpage}{}{}
\makeatother
\pagestyle{single}%


\begin{document}
\label{anchor:Top}%
\chapter{{chapter}}
\label{anchor:chapter}%

\texttt{c{-}{-}ode}, \textsl{d--fn}, \Texinfocommandstyletextvar{v--ar}, \textbf{s--trong}, \Texinfocommandstyletextkbd{k{-}{-}bd}, `\texttt{s{-}{-}amp}'.

\texttt{\textsl{d{-}{-}fn in code}}
\Texinfocommandstyletextvar{\texttt{c{-}{-}ode in var}}
\texttt{\Texinfocommandstyletextvar{v--ar in code}}
\textbf{\Texinfocommandstyletextkbd{k{-}{-}bd in strong}}
`\texttt{\textbf{s{-}{-}trong in samp}}'
\textbf{`\texttt{s{-}{-}amp in strong}'}

\Texinfocommandstyletextcite{c--ite}

\texttt{\Texinfocommandstyletextcite{c--ite in code}}
\Texinfocommandstyletextcite{\texttt{c{-}{-}ode in cite}}

\texttt{c{-}{-}ode} \textsl{s--lanted} \textbf{b--} \texttt{t{-}{-}}

\texttt{\textsl{s{-}{-}lanted in code}}
\textsl{\texttt{c{-}{-}ode in slanted}}
\textbf{\textsl{s--lanted in b}}
\textsl{\textbf{b-- in slanted}}
\texttt{\textsl{s{-}{-}lanted in t}}
\textsl{\texttt{t{-}{-} in slanted}}
\texttt{\Texinfocommandstyletextvar{v--ar in t}}
\Texinfocommandstyletextvar{\texttt{t{-}{-} in var}}

\begin{Texinfoindented}
\begin{Texinfopreformatted}%
\ttfamily \Texinfocommandstyletextvar{v--ar in example}
\Texinfocommandstyletextcite{c--ite in example}
\end{Texinfopreformatted}
\end{Texinfoindented}
\end{document}
