2

I'm using an overleaf springer nature latex template. It can be found here: I tried many packages to get this equation to appear right without success. It appears like this. If I use the Elsevier latex template overleaf or online equation editor the equation will appear just fine. Any help, please.

\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}

  • 2
    Welcome to tex.sx. I haven't tested this, but it looks like there are more opening parentheses than closing ones. Count them carefully to make sure they match, and try again. – barbara beeton May 23 '22 at 00:27

2 Answers2

5
  • consider @Barbara Beeton comment, and
  • instead of | you had to use the \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}

enter image description here

Zarko
  • 296,517
2

Works for me?! Please provide a complete code example, see here.

\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}

enter image description here

  • 1
    @AbdullaAburomman I recommend that you provide a compilable code example and include it in your question. That makes things much easier for others to help (less guesswork). The linked template seems complex - so please boil it down to the essentials regarding the problem. – Dr. Manuel Kuehner May 23 '22 at 01:05
  • "I recommend that you provide a compilable code example and include it in your question". I did that by re-editing my post. – Abdulla Aburomman May 23 '22 at 13:27
  • Thank you very much, your solution works. :-) – Abdulla Aburomman May 23 '22 at 13:57