display latex preview only when allowed