在 Latex 中,通常使用“~”来引用标签,以保留附在标签上的数字,例如图形或表格。
https://tex.stackexchange.com/questions/227285/problems-with-tilde-and-line-break/227296显示了一个例子。
可以在此处找到一个完整的示例:
http://md5.mshaffer.com/WSU_STATS419/stackoverflow/tilde/
在 Rmd 文件中,http ://md5.mshaffer.com/WSU_STATS419/stackoverflow/tilde/reference-tilde.Rmd ,
我有以下内容:
---
title: "Untitled"
output:
pdf_document:
keep_tex: true
number_sections: true
latex_engine: pdflatex
---
\section{My Section Name}
\label{sec:my}
Below you will find Equation~\ref{eq:my-model}.
\begin{equation}
\label{eq:my-model}
Y_{jt} = \alpha + \beta X_{jt} + \upsilon_{j} + \varepsilon_{jt} ,
\end{equation}
\subsection{My sub section}
\label{sec:mysub}
For more information, please refer to Section~\ref{sec:my}.
请注意基本 Latex 用法中概述的“~”波浪号。
当我单击 Knit-PDF 时,它会输出一些我没想到的内容:
http://md5.mshaffer.com/WSU_STATS419/stackoverflow/tilde/reference-tilde.pdf
由于我选择了“keep_tex”,所以可以查看.TEX文件
http://md5.mshaffer.com/WSU_STATS419/stackoverflow/tilde/reference-tilde.tex可以在这里在线查看:http: //md5.mshaffer.com/WSU_STATS419/stackoverflow/tilde/reference-tilde.tex。文本
它似乎已将波浪号替换为文本版本:
\begin{document}
\maketitle
\section{My Section Name}
\label{sec:my}
Below you will find Equation\textasciitilde{}\ref{eq:my-model}.
\begin{equation}
\label{eq:my-model}
Y_{jt} = \alpha + \beta X_{jt} + \upsilon_{j} + \varepsilon_{jt} ,
\end{equation}
\subsection{My sub section}
\label{sec:mysub}
For more information, please refer to
Section\textasciitilde{}\ref{sec:my}.
\end{document}
我该如何纠正这种情况?
如何让乳胶按预期呈现?
如何让我的波浪号作为间隔号回来?