Create unified directive handler.
This correctly handles "demo" for equations.