分数方程超出分数线

分数方程超出分数线

我使用的是 overleaf springer nature latex 模板。可以在这里:我尝试了很多软件包来让这个等式正确显示,但没有成功。它看起来像这。如果我使用 Elsevier latex 模板 overleaf 或在线公式编辑器,公式就会正常显示。请提供任何帮助。

\documentclass[default,iicol]{sn-jnl}% Default with double column layout

\jyear{2021}%

%% as per the requirement new theorem styles can be included as shown below
\theoremstyle{thmstyleone}%
\newtheorem{theorem}{Theorem}%  meant for continuous numbers
%%\newtheorem{theorem}{Theorem}[section]% meant for sectionwise numbers
%% optional argument [theorem] produces theorem numbering sequence instead of independent numbers for Proposition
\newtheorem{proposition}[theorem]{Proposition}% 
%%\newtheorem{proposition}{Proposition}% to get separate numbers for theorem and proposition etc.

\theoremstyle{thmstyletwo}%
\newtheorem{example}{Example}%
\newtheorem{remark}{Remark}%

\theoremstyle{thmstylethree}%
\newtheorem{definition}{Definition}%

\raggedbottom
%%\unnumbered% uncomment this for unnumbered level heads

\begin{document}

\section{Equations}\label{sec1}

% EQUATION 1
\begin{equation}
\label{Eq.1}
P(h(x)|S) = \frac{P(h(x) \cdot P(S|h(x))}{P(S)}
\end{equation}

\end{document}

答案1

  • 考虑@Barbara Beeton 的评论,并且
  • |你必须使用\mid
\documentclass[default,iicol]{sn-jnl}% Default with double column layout

\jyear{2021}%

\begin{document}

\section{Equations}
\label{sec1}

\begin{equation}\label{Eq.1}
P(h(x)\mid S) = \frac{P(h(x)) \cdot P(S\mid h(x))}{P(S)} %, 
\end{equation}

\end{document}

在此处输入图片描述

答案2

对我有用吗?!请提供完整的代码示例,请参阅这里

\documentclass{article}

\begin{document}

\begin{equation} 
P(h(x)|S) = \frac{P(h(x) \cdot P(S|h(x))}{P(S)}
\label{Eq.1}
\end{equation}

\end{document}

在此处输入图片描述

相关内容