We choose the coordinate system shown, with positive torques chosen to be
clockwise. Let's write
We choose the coordinate system shown, with positive torques clockwise.
As the plank is moved out from the roof the effective normal forces acts
at a point closer to the edge. When the normal force reaches the edge,
the plank is on the verge of tipping. We write

We choose the coordinate system shown. Choose counterclockwise for the direction of positive torques.