在我的草稿中,方程编号在文本中显示为方程 2.1,而它们必须是方程 1 和方程 2。其次,方程编号没有对齐到最后一行。可能是我的序言有问题。我在这里发布 MWE。
\documentclass[12pt]{article}
\usepackage{comment}
\usepackage[margin=1in]{geometry}
\usepackage[none]{hyphenat}
\usepackage{nccmath, amsmath}
\usepackage[utf8]{inputenc}
\usepackage{pgfgantt}
\usepackage{enumitem}
\usepackage{graphicx}
\usepackage[affil-it]{authblk}
\usepackage[flushleft]{threeparttable}
\usepackage{siunitx}
\usepackage{booktabs}
\usepackage{placeins}
\usepackage{multicol}
\usepackage[title]{appendix}
\setlength{\parskip}{1em}
\renewcommand{\baselinestretch}{1}
\usepackage[colorlinks=true,citecolor=blue,linkcolor=blue]{hyperref}
\usepackage[natbibapa]{apacite}
\title {\textbf{My title}}
\author[1]{Firstname Lastname}
\author[2]{Firstname Lastname}
\affil[1]{ABC University}
\affil[2]{XYZ University}
\begin{document}
\maketitle
\bibliographystyle{apacite}
\begin{abstract}
Some text goes here.
\end{abstract}
\vfill
\pagenumbering{gobble}
\clearpage
\pagenumbering{arabic}
\section{Introduction}
\section{Methodology}
\subsection{Econometric estimation approach}
The econometric model is specified as Eq. \ref{eqt:1} below.
\begin{fleqn}[\parindent]
\begin{equation}
\begin{aligned}
\mathrm{Imports}_{ijt} & = \exp \bigl(\alpha_{i} + \beta_{j} + \gamma_{t} + \delta_0 + \delta_1\ln \mathrm{Myvar}_{it} + \delta_1 \ln \mathrm{Myvar}_{jt}\; \\
&\phantom{{} = } +\delta_3 \ln \mathrm{Distance}_{ij} + \delta_4 \mathrm{Contiguity}_{ij} + \delta_5 \mathrm{Colony}_{ij} + \delta_6 \mathrm{EIA}_{ij}\bigr) + \epsilon_{ijt}
\end{aligned}
\label{eqt:1}
\end{equation}
\end{fleqn}
Another econometric model is specified as Eq. \ref{eqt:2}. The definition of all variables are similar to as they are defined in Eq. \ref{eqt:1}.
\begin{fleqn}[\parindent]
\begin{equation}
\begin{aligned}
\mathrm{Imports}_{ijt} & = \exp \bigl(\alpha_{i} + \beta_{j} + \gamma_{t} + \delta_0 + \delta_1 \ln \mathrm{Myvar}_{it} + \delta_1 \ln \mathrm{Myvar}_{jt} + \delta_3 \mathrm{Myvar}_{ijt}\; \\
&\phantom{{} = } +\delta_3 \ln \mathrm{Distance}_{ij} + \delta_4 \mathrm{Contiguity}_{ij} + \delta_5 \mathrm{Colony}_{ij} + \delta_6 \mathrm{EIA}_{ij}\bigr) + \epsilon_{ijt}
\end{aligned}
\label{eqt:2}
\end{equation}
\end{fleqn}
\end{document}
答案1
这是我的解释。评论太长了,但我将flalign
在此示例中使用选项 how:
\documentclass[12pt]{article}
\usepackage{comment}
\usepackage[margin=1in]{geometry}
\usepackage{amsmath}
\renewcommand{\baselinestretch}{1}
\usepackage[colorlinks=true,citecolor=blue,linkcolor=blue]{hyperref}
\begin{document}
\begin{flalign}
M_{ijt} & = \exp (\alpha_{it} +\beta_{jt} + \gamma_{ij} +\delta_0+\delta_1\ln(\textnormal{Variable}_{ijt})) +\epsilon_{ijt} &
\label{eqt:1}
\end{flalign}
\begin{flalign}
M_{ijt} & = \exp(\alpha_{it}+\beta_{jt}+\gamma_{ij} +\delta_0 + \delta_1 \ln(\textnormal{Variable}_{ijt}))\times \textnormal{High income}_i \notag\\
&={}+\delta_2 \ln(\textnormal{Variable}_{ijt})\times \textnormal{Low income}_i) +\epsilon_{ijt} &
\label{eqt:2}
\end{flalign}
\end{document}
答案2
您可能误解了aligned
工作原理。在这种情况下,您应该考虑align
(与 不同aligned
):
\documentclass[12pt]{article}
% Use fleqn option to set all equations aligned from the left (instead of centered)
%\documentclass[12pt,fleqn]{article}
\usepackage[margin=1in]{geometry}
\usepackage{amsmath}
\begin{document}
Some text
\begin{align}
M_{ijt} &= \exp\bigl(\alpha_{it}+\beta_{jt}+\gamma_{ij}+\delta_0+\delta_1\ln\mathrm{Variable}_{ijt}\bigr)+\epsilon_{ijt},
\label{eqt:1}\\
\intertext{some more text (optional)}
M_{ijt} &= \exp\bigl(\alpha_{it}+\beta_{jt}+\gamma_{ij}+\delta_0+\delta_1\ln\mathrm{Variable}_{ijt}\times\mathrm{High\ income}_i \nonumber \\
&\phantom{{}=\exp\bigl(} +\delta_2\ln\mathrm{Variable}_{ijt}\times\mathrm{Low\ income}_i\bigr)+\epsilon_{ijt}.
\label{eqt:2}
\end{align}
\end{document}
我删除了所有出现的\;
(它们是错误的)。我还将 改为exp
和\exp
改为\textup{ln}
。\ln
我将Variable
、Highincome
和Lowincome
改为\mathrm
以获得正确的格式。
答案3
您可以使用fleqn
来自的环境来执行此操作nccmath
,它的工作方式与subequations
环境类似,并且可以将方程式开始处的文本左边距作为可选参数。我借此机会简化了您的代码(例如,\ln
在 的位置使用\;\textup{ln}\;
)。方程式编号与方程式最后一行的放置是通过环境[b]
的可选参数进行的aligned
(默认为c
)。我还删除了所有不必要的手动间距(\;
),因为我不明白为什么需要它们。
\documentclass[12pt]{article}
\usepackage{comment}
\usepackage[margin=1in, showframe]{geometry}
\usepackage{amsmath, nccmath}
\renewcommand{\baselinestretch}{1}
\usepackage[colorlinks=true,citecolor=blue,linkcolor=blue]{hyperref}
\begin{document}
\null\bigskip
\begin{fleqn}[\parindent]
\begin{equation}
\begin{aligned}
M_{ijt} & = \exp \bigl(\alpha_{it} + \beta_{jt} + \gamma_{ij} + \delta_0 + \delta_1\ln \text{Variable}_{ijt}\bigr)+\epsilon_{ijt}
\end{aligned}
\label{eqt:1}
\end{equation}
\begin{equation}
\begin{aligned}[b]
M_{ijt} & = \exp \bigl(\alpha_{it} + \beta_{jt} + \gamma_{ij} + \delta_0 + \delta_1\ln \text{Variable}_{ijt}\times \text{Highincome}_i\; \\
&\phantom{{} = } + \delta_2\ln \text{Variable}_{ijt}\times \text{Lowincome}_i\bigr) + \epsilon_{ijt}
\end{aligned}
\label{eqt:2}
\end{equation}
\end{fleqn}
\end{document}
第二个方程的另一种可能性(我认为更好看)是alignedat
:
\begin{fleqn}
\begin{equation}
\begin{alignedat}[b]{2}
M_{ijt} & = \exp \bigl(\alpha_{it} + \beta_{jt} + \gamma_{ij} + \delta_0 & & + \delta_1\ln \text{Variable}_{ijt}\times \text{Highincome}_i\; \\
& & & + \delta_2\ln \text{Variable}_{ijt}\times \text{Lowincome}_i\bigr) + \epsilon_{ijt}
\end{alignedat}
\label{eqt:2}
\end{equation}
\end{fleqn}