LyX の classicthesis の数式の上下の不要なスペースを削除する方法

LyX の classicthesis の数式の上下の不要なスペースを削除する方法

私は classicthesis テンプレートの最新の LyX バージョンを使用しています。

word-to-latex で変換した LaTeX コードを LyX にインポートすると、生成された PDF では各方程式の上下に不要なスペース (通常は上に 2 行、下に 1 行) がありますが、LyX 自体ではスペースはありません (スペースは見えず、正常に見えます)。

これらのスペースを回避または削除するにはどうすればよいですか?

更新: テンプレートに次のコメントを見つけました:「章や節の見出しに数式を使用すると、予期しない結果になる場合があります。pdfspacing オプションを検討してください。」

LyX で「pdfspacing」オプションを使用するにはどうすればよいですか?

更新:ソースコードと不要なPDFレイアウトは

ここに画像の説明を入力してください

\begin{document}
There are differences in the space above equation.
\[
    W = a + b+ c
\]
There are differences in the space below equation.

There are differences in the space above equation.
\begin{equation}
    W = a + b+ c
\end{equation}
There are differences in the space below equation.
\end{document}

ここに画像の説明を入力してください

答え1

LyXで表示されるのは変更可能なプレビューにすぎません。PDF版(つまり文書の最終版)で数式の上と後ろのスペースを減らしたい場合は、

式n°(1)の期待される結果

ここに示すように、これらの行を環境の前に置く必要がありますequation

\documentclass[a4paper]{article}
\begin{document}
There are differences in the space above equation.
\[
    W = a + b+ c
\]
There are differences in the space below equation.

\setlength{\belowdisplayskip}{0pt} \setlength{\belowdisplayshortskip}{0pt}
\setlength{\abovedisplayskip}{0pt} \setlength{\abovedisplayshortskip}{0pt}
There are differences in the space above equation.
\begin{equation}
    W = a + b+ c
\end{equation}
There are differences in the space below equation.
\end{document}

およびequationの代わりに方程式にを使う必要があります\[\]

編集

LyXでは、Ctrl+L(または挿入してからCode TeX)を押して、空白の部分に貼り付けます。

\setlength{\belowdisplayskip}{0pt}
\setlength{\belowdisplayshortskip}{0pt}
\setlength{\abovedisplayskip}{0pt}
\setlength{\abovedisplayshortskip}{0pt}

これはLyXの例ですLyXの例

LyXによって生成されたLaTeXコードは

\setlength{\belowdisplayskip}{0pt} \setlength{\belowdisplayshortskip}{0pt} \setlength{\abovedisplayskip}{0pt} \setlength{\abovedisplayshortskip}{0pt}

There are differences in the space above equation. 

\[
W=a+b+c
\]


There are differences in the space below equation. 

There are differences in the space above equation. 
\begin{equation}
W=a+b+c
\end{equation}
\begin{equation}
T=est
\end{equation}


There are differences in the space below equation. 

関連情報