我在 中遇到了一些间距问题LaTeX
。使用此代码:
\documentclass[numbers,sort&compress]{IntechOpen-Book}%%OPTIONS are numbers, authoryear, sort&compress,sectref
\usepackage{physics}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{svg}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{amsmath,amssymb,amsfonts}
\usepackage{mathtools}
\usepackage{placeins}
\graphicspath{{Artworks/}}
\begin{document}
\Mainmatter
\begin{frontmatter}
\chapter{Title}
% Enter author names EXACTLY as you would like them to appear in the final manuscript
\author{Author 1}
\makechaptertitle
\chaptermark{Chapter Title (will appear in header)}
\begin{abstract} % abstract = max 200 words, unstructured format
The abstract MUST be \textbf{unstructured} and briefly introduce the manuscript, not exceeding \textbf{200 words}. Citations should NOT be included in the abstract.
\end{abstract}
\begin{keywords} % use a minimum of 5 kwrds, separate them with a comma
kwrd 1, kwrd 2
\end{keywords}
\end{frontmatter}
\section{Introduction} % first section MUST be titled Introduction, and feature introductory text; do NOT change this title
\section{Data}
probability equal to the square of the magnitude of the basis state coefficient, i.e., $p_0 = \abs{h_0}^2$, and $p_1 = \abs{j_1}^2$, see Eq. \eqref{eq:Measurement}.
\begin{equation} \label{eq:Measurement}
P(\psi_1) =
\begin{bmatrix*}
k_0 \\
z_1
\end{bmatrix*} =
\begin{bmatrix*}
\abs{r_0}^2 \\
\abs{g_1}^2
\end{bmatrix*} =
\vcenter{\hbox{\includegraphics[height=2em]{image.png}}}
\end{equation}
% \begin{thebibliography}{99}
\bibliographystyle{unsrt} % Specify the bibliography style
\bibliography{refs}
% \end{thebibliography}
\end{document}
我得到了以下PDF:
如何删除句号前不必要的空格?
答案1
文档类
1526 \@ifpackageloaded{amsmath}{%
1527 \def\tagform@#1{\maketag@@@{(\ignorespaces#1\unskip\@@italiccorr)\hskip12pt}}%
1528 }{}
(行号仅供参考)这\hskip12pt
显然是导致问题的原因。
\eqref
通过分离方程编号来修复。
\documentclass[numbers,sort&compress]{IntechOpen-Book}
\usepackage{showframe} % just to show the margins
%%% FIX
\makeatletter
% detach \eqref and \tag making
\renewcommand{\eqref}[1]{\textup{\eqreftagform@{\ref{#1}}}}
\def\eqreftagform@#1{\maketag@@@{(\ignorespaces#1\unskip\@@italiccorr)}}
\makeatother
%%%
\begin{document}
\Mainmatter
\begin{frontmatter}
\chapter{Title}
% Enter author names EXACTLY as you would like them to appear in the final manuscript
\author{Author 1}
\makechaptertitle
\chaptermark{Chapter Title (will appear in header)}
\begin{abstract} % abstract = max 200 words, unstructured format
The abstract MUST be \textbf{unstructured} and briefly introduce the manuscript,
not exceeding \textbf{200 words}. Citations should NOT be included in the abstract.
\end{abstract}
\begin{keywords} % use a minimum of 5 kwrds, separate them with a comma
kwrd 1, kwrd 2
\end{keywords}
\end{frontmatter}
\section{Introduction}
\section{Data}
Some words before the equation~\eqref{test}. Here it is
\begin{equation}\label{test}
1+1=2
\end{equation}
\end{document}