什么是相当于 LaTeX \texttt 的 R markdown?

What is the R markdown equivalent to LaTeX \texttt?

相当于 LaTeX 的 R 降价是多少 \texttt

有了这个 MWE:

---
title: "A test"
author: "Alessandro"
date: "February 19, 2016"
output: pdf_document
---
```{r, echo=FALSE}
d<-data.frame(product_name=c('d','a','b','c')) # what to write here to get a typewriter font?
```

Product names are: `r sort(d$product_name)`.

我得到这个 pdf:

虽然我想从中获得输出 .tex file

\documentclass[a4paper]{article}

\usepackage[english]{babel}
\usepackage[utf8x]{inputenc}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage[colorinlistoftodos]{todonotes}

\title{A test}
\author{Alessandro}

\begin{document}
\maketitle
Product names are: \texttt{a, b, c, d}.

\end{document}

没有原生的降价方式可以做到这一点。但是当输出格式为 pdf_document 时,\texttt 的 rmarkdown 等价物是 \texttt 本身:

Product names are: \texttt{`r sort(d$product_name)`}.

Rmarkdown 在后台使用 Latex 编译为 PDF,因此大多数原始 Latex 命令应该可以按预期工作。

html输出也是如此:

Product names are: <tt>`r sort(d$product_name)`</tt>.