=\log _{2} \dfrac{P(\llbracket w_{1},\rrbracket w_{2})} {P(\llbracket w_{1}) P(\rrbracket w_{2})}

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

  • 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
    Commented 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
    Commented Sep 1, 2023 at 14:24

1 Answer 1


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:
% for '\llbracket' and '\rrbracket' macros:
\usepackage{stmaryrd} % or: \usepackage{fourier}


=\log_{2} \dfrac{P(\llbracket w_{1},\rrbracket w_{2})}%
                {P(\llbracket w_{1}) P(\rrbracket w_{2})}


You must log in to answer this question.

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