我想通过我的文档引用一个方程式,所以我认为最好使用cleveref
包,问题是当我引用一个方程式时,它引用的是方程式所在的部分。
cleveref
我正在写论文,因此使用它来代替常规命令会非常有帮助\ref
。
这里有一个小例子。
\documentclass[a4paper, 14pt,]{extreport}
\usepackage{color, xcolor}
\usepackage{amsmath}
\usepackage{breqn}
\usepackage{varioref}
\usepackage{hyperref}
\hypersetup{colorlinks=true,
citecolor=red,
linkcolor=blue,
urlcolor=magenta,
breaklinks}
\usepackage{cleveref}
\crefname{equation}{equation}{equations}
\newcommand{\p}{\partial}
\newcommand{\beqa}{\begin{eqnarray}}
\newcommand{\eeqa}{\end{eqnarray}}
\begin{document}
\chapter{Mathematical Modelling}\label{ch:math}
\section{Reynolds equation}\label{sec:Reynolds}
The well known Reynolds equation in dimensional form is given below:
\beqa \label{eq:rey_car}
\frac{\p}{\p x}\left(h^3 \frac{\p p}{\p x}\right) + \frac{\p}{\p y}\left(h^3 \frac{\p p}{\p y}\right) = 6\mu U \frac{\p h}{\p x} +12 \mu \frac{\p h}{\p t}
\eeqa
transform ~\cref{eq:rey_car} to polar coordinate by using the following relations:
$$\theta = x R ~~ , ~~ z = \frac{L}{2} y $$
\beqa\label{eq:rey_polar}
\frac{\p}{\p \theta}\left(h^3 \frac{\p p}{\p \theta}\right) + \left(\frac{D {L}\right)^2 \frac{\p}{\p z} \left(h^3 \frac{\p p}{\p z}\right) = 6 \mu U R \frac{\p h}{\p \theta} + 12 \mu R \frac{\p h}{\p t}
\eeqa
now, to get the dimensionless form of \vref{eq:rey_polar}
\end{document}
这是输出
答案1
eqnarray
您已经发现了许多应该避免的原因之一。
- 切勿使用
eqnarray
(见eqnarray 与 align) - 切勿使用
$$
(见为什么 \[ ... \] 比 $$ ... $$ 更可取?) - 切勿出现两个连续的显示
- 对于单个方程,使用
equation
为了符合您情况下的第 2 和第 3 条,请使用gather
。
\documentclass[a4paper, 14pt]{extreport}
\usepackage{color, xcolor}
\usepackage{amsmath}
\usepackage{varioref}
\usepackage{hyperref}
\hypersetup{
colorlinks=true,
citecolor=red,
linkcolor=blue,
urlcolor=magenta,
breaklinks
}
\usepackage{cleveref}
\crefname{equation}{equation}{equations}
\newcommand{\p}{\partial}
\begin{document}
\chapter{Mathematical Modelling}\label{ch:math}
\section{Reynolds equation}\label{sec:Reynolds}
The well known Reynolds equation in dimensional form is given below:
\begin{equation}\label{eq:rey_car}
\frac{\p}{\p x}\left(h^3 \frac{\p p}{\p x}\right) +
\frac{\p}{\p y}\left(h^3 \frac{\p p}{\p y}\right) =
6\mu U \frac{\p h}{\p x} +12 \mu \frac{\p h}{\p t}
\end{equation}
transform~\cref{eq:rey_car} to polar coordinate by using the following relations:
\begin{gather}
\theta = x R, \quad z = \frac{L}{2} y \nonumber \\
\frac{\p}{\p \theta}\left(h^3 \frac{\p p}{\p \theta}\right) +
\left(\frac{D}{L}\right)^2 \frac{\p}{\p z} \left(h^3 \frac{\p p}{\p z}\right) =
6 \mu U R \frac{\p h}{\p \theta} + 12 \mu R \frac{\p h}{\p t}
\label{eq:rey_polar}
\end{gather}
Now, to get the dimensionless form of \vref{eq:rey_polar}
\end{document}