0

I am trying to get the following equation:

enter image description here

To do so, I am using the code as shown below:

\documentclass[pdflatex,sn-mathphys]{sn-jnl}
\begin{document}
    $\mathbf{P(W|T)}$
\end{document}

However, this results in:

enter image description here

What can I do to get the desired equation?

3 Answers 3

0

Use the following code :

$\mathbf{P(W\vert T)}$

I tested it with the sn-jnl template on Overleaf.


To remove the whitespace, you can also use:

$\mathbf{P(W{\vert}T)}$
1

You can put \def |{\vert} in front of \begin{document}. Then $\mathbf{P(W|T)}$ will work.

0

It looks like a problem with the sn-jnl.sty.

This works (on my machine):

\documentclass[pdflatex,sn-mathphys]{scrreprt}% <<< class  
\begin{document}  
    $\mathbf{P(W|T)}$ % unchanged 
\end{document}
2
  • 1
    Welcome. // Please indicate relevant changes next time. Here I added just two comments, as at first glance both codes look the same, don't they?
    – MS-SPO
    Commented Aug 10, 2022 at 10:21
  • Thank you for your answer, Andrew. Your approach does not work for me and raises many errors for the rest of the document.
    – Emil
    Commented Aug 10, 2022 at 11:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .