LaTeX 引用章节、公式和图表 |
您所在的位置:网站首页 › 智云支持列表 › LaTeX 引用章节、公式和图表 |
原 文:Cross referencing sections, equations and floats 译 者:Xovee 翻译时间:2021年6月4日 引用章节、公式和图表如果你想在 LaTeX 文档中使用数字(或者其他引用格式)来引用文档中的公式、章节、图片等元素,本篇文章将会教给你具体的做法。 文章目录 引用章节、公式和图表介绍引用章节引用公式、图片和表格引用元素所在页编译带有引用的文档 介绍下面是一个简单的引用图片的例子: \section{Introduction} \label{introduction} This is an introductory paragraph with some dummy text. This section will be referenced later. \begin{figure}[h] \centering \includegraphics[width=0.3\linewidth]{overleaf-logo} \caption{This image will be referenced below.} \label{fig:leaf} \end{figure} You can reference images; for instance, Figure \ref{fig:leaf} shows the \textit{Overleaf} logo.
下面是一个引用章的例子: \section{Introduction} \label{introduction} This is an introductory paragraph with some dummy text. This section will be referenced later. \begin{figure}[h] \centering \includegraphics[width=0.3\linewidth]{overleaf-logo} \caption{This image will be referenced below.} \label{fig:leaf} \end{figure} You can reference images; for instance, Figure \ref{fig:leaf} shows the \textit{Overleaf} logo. \vspace{0.5cm} \section{Math references} \label{mathrefs} As mentioned in section \ref{introduction}, different elements can be referenced within a document.
在本章的开头,我们看到了一个引用图片的例子,下面介绍如何引用公式: \section{Math references} \label{mathrefs} As mentioned in section \ref{introduction}, different elements can be referenced within a document. \subsection{Powers series} \label{subsection} \begin{equation} \label{eq:1} \sum_{i=0}^{\infty} a_i x^i \end{equation} Equation \ref{eq:1} is a typical power series.文档中的元素一般使用数字来引用它们。如果你需要的话,你也可以引用它们所在的页数字。 \section{Math references} \label{mathrefs} As mentioned in section \ref{introduction}, different elements can be referenced within a document. \subsection{Powers series} \label{subsection} \begin{equation} \label{eq:1} \sum_{i=0}^{\infty} a_i x^i \end{equation} Equation \ref{eq:1} is a typical power series. \vspace{0.5cm} %\Blindtext \section{Last section} In subsection \ref{subsection} on page \pageref{eq:1} an example of a power series was presented.
在 Overleaf 平台上,交叉引用是立即生效的。对于本地的 LaTeX 编译环境,你必须编译文档两次来使交叉引用生效。你也可以使用特定的命令来使所有的交叉引用生效。例如,如果你的文档是main.tex,你可以使用下面的命令 latexmk -pdf main.tex来生成main.pdf文件。文件中所有的交叉引用都会生效。如果你要改变输出的格式,使用-dvi或者-ps参数。 |
今日新闻 |
点击排行 |
|
推荐新闻 |
图片新闻 |
|
专题文章 |
CopyRight 2018-2019 实验室设备网 版权所有 win10的实时保护怎么永久关闭 |