Межстрочный интервал между уравнением и текстом

Межстрочный интервал между уравнением и текстом

Чтобы сократить расстояние между отображаемыми уравнениями, а также между текстом и уравнением, я добавил следующую команду в преамбулу LaTeX в моем стандартном articleдокументе в LyX:

\usepackage[nodisplayskipstretch]{setspace}
\setstretch{1.5}

Но я получаю следующее сообщение об ошибке:

"LaTeX Error: Option clash for package setspace.
 \setstretch
                {1.5}
The package setspace has already been loaded with options:
  []
Description: There has now been an attempt to load it with options
  [nodisplayskipstretch]
Adding the global options:
  ,nodisplayskipstretch
to your \documentclass declaration may fix this.
Try typing  <return>  to proceed."

что это значит, или как это исправить? Как нужно уменьшить расстояние между отображаемыми уравнениями и текстом.


@ Бернард. Спасибо, Бернард. Вот фиктивный файл для воспроизведения проблемы. Снимок PDF также показывает проблему. Я также создаю текст на случай, если возникнут проблемы с межстрочным интервалом.

%% LyX 2.1.1 created this file.  For more info, see http://www.lyx.org/.

\documentclass[english,fleqn]{article}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{geometry}
\geometry{verbose,tmargin=1in,bmargin=1in,lmargin=1in,rmargin=1in}
\usepackage{color}
\usepackage{babel}
\usepackage{amsmath}
\usepackage{setspace}
\usepackage{esint}
\usepackage[authoryear]{natbib}
\setstretch{2}
\usepackage[unicode=true,pdfusetitle,
 bookmarks=true,bookmarksnumbered=false,bookmarksopen=false,
 breaklinks=false,pdfborder={0 0 0},backref=false,colorlinks=true]
 {hyperref}
\hypersetup{
 linkcolor=blue, urlcolor=blue, citecolor=blue}
\usepackage{breakurl}

\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.

\usepackage{titlesec}
\titlespacing\section{0pt}{2pt plus 4pt minus 2pt}{0pt plus 2pt minus 2pt}
\titlespacing\subsection{0pt}{2pt plus 4pt minus 2pt}{0pt plus 2pt minus 2pt}
\titlespacing\subsubsection{0pt}{2pt plus 4pt minus 2pt}{0pt plus 2pt minus 2pt}

\PassOptionsToPackage{nodisplayskipstretch}{setspace}
\usepackage[nodisplayskipstretch]{setspace} 
\setstretch{1.5}

\makeatother

\begin{document}

\title{Model Model Model }


\author{X Y }
\maketitle
\begin{abstract}
\begin{spacing}{2}
\noindent The role of Text TextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextText.
Text TextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextText.
Text TextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextText.
Text TextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextText.
Text TextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextText 

\noindent {\bf Keywords:} Text, Text, Text 

\noindent {\bf JEL Classification:} A123, E123 \end{spacing}

\end{abstract}

\section{\noindent \label{sec:Introduction}Introduction }

\begin{spacing}{2}
The Government is confident changes to Senate voting laws will get
support, and stop crossbenchers with miniscule votes getting into
Parliament. Follow our live blog for rolling updates.

The Government is confident changes to Senate voting laws will get
support, and stop crossbenchers with miniscule votes getting into
Parliament. Follow our live blog for rolling updates.

The Government is confident changes to Senate voting laws will get
support, and stop crossbenchers with miniscule votes getting into
Parliament. Follow our live blog for rolling updates.
\end{spacing}

\begin{spacing}{2}

\section{\noindent \label{sec:Model}Model}
\end{spacing}

\begin{spacing}{2}
The Government is confident changes to Senate voting laws will get
support, and stop crossbenchers with miniscule votes getting into
Parliament. Follow our live blog for rolling updates.
\end{spacing}

\begin{spacing}{2}

\subsection{\noindent hfjhfjkd}
\end{spacing}

\begin{spacing}{2}
The Government is confident changes to Senate voting laws will get
support, and stop crossbenchers with miniscule votes getting into
Parliament. Follow our live blog for rolling updates%
\footnote{\begin{spacing}{2}
The Government is confident changes to Senate voting laws will get
support, and stop crossbenchers with miniscule votes getting into
Parliament. Follow our live blog for rolling updates\end{spacing}
%
}.
\end{spacing}

\begin{spacing}{2}
\noindent \setlength{\mathindent}{0pt}
\[
MaxE_{t}\sum_{s=0}^{\infty}z^{s}\varrho_{t+s}\left[ln(Q_{t+s}-bQ_{t+s-1})-\psi\frac{X_{t+s}(l)^{1+\eta}}{1+\eta}\right]
\]
 subject to the budget constraint
\[
\frac{Y_{t}(l)}{P_{t}}X_{t}(l)+R_{t+1}E_{t}-E_{t+1}-Q_{t}-T_{t}=0,
\]
and Text TextTextTextTextTextTextTextText. 
\end{spacing}

\noindent Text TextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextText 

\noindent 
\begin{equation}
\frac{\delta A}{\delta B_{t}}=0\text{ \ensuremath{\Rightarrow}}L_{t}=\frac{\varrho_{t}}{C_{t}-bC_{t-1}}-\beta b\frac{\varrho_{t+1}}{C_{t+1}-bC_{t}},\label{eq:(1)}
\end{equation}


\noindent 
\begin{equation}
\frac{\delta D}{\delta\mathbf{E}_{t+1}}=0\text{ \ensuremath{\Rightarrow}}L_{t}=\beta L_{t+1}R_{t+1}.\label{eq:2}
\end{equation}
Defining the d factor as 
\begin{equation}
L_{t+1}=\frac{L_{t+1}}{L_{t}},\label{eq:3 discount factor}
\end{equation}
Equation (\ref{eq:2}) becomes
\begin{equation}
1=\beta L_{t+1}S_{t+1}.\label{eq:4}
\end{equation}
Text TextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextText.

\begin{spacing}{2}

\subsubsection*{\noindent The jfhdjhfjh}
\end{spacing}

\begin{spacing}{2}
\noindent Text TextTextTextTextTextTextTextTextTex: 

\noindent 
\begin{equation}
X_{t}=\left(\intop_{0}^{1}X_{t}(l)^{\frac{\epsilon_{w}-1}{\epsilon_{w}}}dl\right)^{\frac{\epsilon_{w}}{\epsilon_{w}-1}},\label{eq:LS}
\end{equation}
 where $\epsilon_{w}$ is Text Text $\left(\epsilon_{w}>1\right)$.
Text TextTextTextTextTextTextTextTextTexText Tex, 

\noindent 
\[
\underset{X_{t}\left(l\right)}{Max}P_{t}^{P}\left(\intop_{0}^{1}X_{t}(l)^{\frac{\epsilon_{w}-1}{\epsilon_{w}}}dl\right)^{\frac{\epsilon_{w}}{\epsilon_{w}-1}}-\intop_{0}^{1}P_{t}(l)X_{t}(l)dl,
\]
 where extTextTextTe The first order extTextTextTe is,

\noindent 
\[
P_{t}^{P}\frac{\epsilon_{w}}{\epsilon_{w}-1}\left(\intop_{0}^{1}X_{t}(l)^{\frac{\epsilon_{w}-1}{\epsilon_{w}}}dl\right)^{\frac{\epsilon_{w}}{\epsilon_{w}-1}-1}\frac{\epsilon_{w}-1}{\epsilon_{w}}X_{t}(l)^{\frac{\epsilon_{w}-1}{\epsilon_{w}}-1}=P_{t}(l)
\]
\begin{equation}
\Rightarrow X_{t}(l)\left(\intop_{0}^{1}X_{t}(l)^{\frac{\epsilon_{w}-1}{\epsilon_{w}}}dl\right)^{-\frac{\epsilon_{w}}{\epsilon_{w}-1}}=\left(\frac{P_{t}(l)}{P_{t}^{P}}\right)^{-\epsilon_{w}}
\end{equation}


\noindent 
\begin{equation}
\Rightarrow X_{t}(l)=\left(\frac{P_{t}(l)}{P_{t}^{P}}\right)^{-\epsilon_{w}}X_{t}.\label{eq:demand for X}
\end{equation}


\noindent Equation (\ref{eq:demand for X})TextTextText TextTextTextTextTextTextTextTextTexText
as,
\[
P_{t}^{P}Xt=\intop_{0}^{1}P_{t}(l)X_{t}(l)dl=\intop_{0}^{1}P_{t}(l)^{1-\epsilon_{w}}P_{t}^{\epsilon_{w}}X_{t}dl
\]
\[
\Rightarrow\left(P_{t}^{P}\right)^{1-\epsilon_{w}}=\intop_{0}^{1}P_{t}(l)^{1-\epsilon_{w}}dl
\]
\begin{equation}
\Rightarrow P_{t}^{P}=\left(\intop_{0}^{1}P_{t}(l)^{1-\epsilon_{w}}dl\right)^{\frac{1}{1-\epsilon_{w}}}.\label{eq:aggregate xyz index}
\end{equation}

\end{spacing}

\begin{spacing}{2}

\subsubsection*{\noindent fhgdfjkhjh hdfsjfhdjh }
\end{spacing}

\begin{spacing}{2}
\noindent Text TextTextTextTextTextTextTextTextTexText Tex

\noindent 
\[
P_{t}^{P}=\left(\intop_{0}^{1}P_{t}(l)^{1-\epsilon_{w}}dl\right)^{\frac{1}{1-\epsilon_{w}}}.
\]


\noindent TextTextTextTextTextTextTextTextTexText\textcolor{black}{
\begin{equation}
g_{1,t}=\varrho_{t}\psi q_{t}^{\epsilon_{w}(1+\eta)}X_{t}^{1+\eta}+\beta\phi_{w}g_{1,t+1},\label{eq:f1}
\end{equation}
\begin{equation}
g_{2,t}=\varrho_{t}\psi q_{t}^{\epsilon_{w}(1+\eta)}X_{t}^{1+\eta}+\beta\phi_{w}g_{1,t+1},\label{eq:f2}
\end{equation}
}TextTextTextTextTextTextTextTextTexText

\appendix
\noindent {\Large{}Appendix}\renewcommand{\thetable}{A\arabic{table}}
\setcounter{table}{0}

\noindent \renewcommand{\thefigure}{A\arabic{figure}}
\setcounter{figure}{0}

\noindent \renewcommand{\theequation}{A\arabic{equation}}
\setcounter{equation}{0}
\end{spacing}

\begin{spacing}{2}

\section{\noindent \label{sec:Linearized-equations}Linearized equations }
\end{spacing}

\begin{spacing}{2}

\subsubsection*{\noindent gsdgdfg and fkjdskfjkdjs }
\end{spacing}

\begin{equation}
L_{t}=\frac{\varrho_{t}}{C_{t}-bC_{t-1}}-\beta b\frac{\varrho_{t+1}}{C_{t+1}-bC_{t}},\label{eq:A1}
\end{equation}


\begin{equation}
L_{t+1}+S_{t+1}=0\label{eq:A2}
\end{equation}


\begin{equation}
L_{t+1}=\lambda_{t+1}-\lambda_{t}\label{eq:A3}
\end{equation}



\subsubsection*{fghfghfg sector}

\begin{align}
\nu\hat{\nu_{t}} & =(1-\theta)\beta\left[\left(R_{k}-R\right)\Lambda_{t+1}+R_{k}R_{k,t+1}-RR_{t+1}\right]\label{eq:A4}
\end{align}

\end{document}

Снимок PDF-файла

решение1

Это значит, что setspaceпакет был загружен дважды, один раз без каких-либо опций, а другой с вашей опцией. LaTeX этого не любит.

Вы можете сделать так, как сказано: добавить опцию nodisplayskipstretch в \documentclass код.

В качестве альтернативы вы можете добавить в преамбулу следующую строку:

\PassOptionsToPackage{nodisplayskipstretch}{setspace}

Связанный контент