1

With

\begin{equation*}
PMI\left(w_{1};w_{2}\right) 
=\log _{2} \dfrac{P(\llbracket w_{1},\rrbracket w_{2})} {P(\llbracket w_{1}) P(\rrbracket w_{2})}
\end{equation*}

I get an “undefined control sequence” error. Can anybody help?

2
  • 3
    Welcome to TeX.se. Questions need to be in English, but more importantly, just showing a fragment of code won't usually give enough information to help you. Minimally you need to show us what control sequence was undefined. If I put this fragment into a small document loading just amsmath it shows that \llbracket is undefined. If that's the error you're getting then add \usepackage{stmaryrd} to your document preamble.
    – Alan Munn
    Sep 1, 2023 at 13:34
  • Also, the error will tell you what control sequence was undefined. The next line in the log will have the line in your tex file ending with the undefined control sequence. (If you're on Overleaf, you'll need to read through the explanatory paragraph first.)
    – Teepeemm
    Sep 1, 2023 at 14:24

1 Answer 1

3

To use the \llbracket and \rrbracket macros, it's necessary to load either the stmaryrd or the fourier package. (Loading the fourier math package will also affect other parts of math typography in your document.) To use the \dfrac macro and the equation* environment, it's necessary to load the amsmath package.

enter image description here

\documentclass{article} % or some other suitable document class
% for '\dfrac' macro and 'equation*' environment:
\usepackage{amsmath}  
% for '\llbracket' and '\rrbracket' macros:
\usepackage{stmaryrd} % or: \usepackage{fourier}

\begin{document}

\begin{equation*}
\mathrm{PMI}(w_{1};w_{2})
=\log_{2} \dfrac{P(\llbracket w_{1},\rrbracket w_{2})}%
                {P(\llbracket w_{1}) P(\rrbracket w_{2})}
\end{equation*}

\end{document}

You must log in to answer this question.

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