
Estou usando a versão mais recente do LyX do modelo de tese clássica.
Quando importo o código latex convertido por word-to-latex para o LyX, há espaços indesejados acima e abaixo de cada equação (geralmente duas linhas extras acima e uma linha extra abaixo) no PDF gerado, mas não no próprio LyX (os espaços são invisível, parece normal).
Como evitar ou remover esses espaços?
Atualização: encontrei um comentário no modelo: "Você pode obter resultados inesperados usando matemática em capítulos ou cabeçalhos de seção. Considere a opção pdfspaceing."
Como utilizo a opção “pdfspacing” no LyX?
Atualização: o código-fonte e o layout indesejado do PDF são
\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}
Responder1
O que você vê no LyX é apenas uma prévia que pode mudar. Se você quiser reduzir o espaço acima e atrás da equação na versão pdf (que é a versão final do seu documento)
você tem que colocar essas linhas antes do ambiente equation
como mostrado aqui.
\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}
Você deve usar equation
para equações em vez de \[
e\]
Editar
No LyX, pressione Ctrl+L (ou Inserção e depois Code TeX) e no espaço em branco cole
\setlength{\belowdisplayskip}{0pt}
\setlength{\belowdisplayshortskip}{0pt}
\setlength{\abovedisplayskip}{0pt}
\setlength{\abovedisplayshortskip}{0pt}
O código LaTeX gerado pelo LyX é
\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.