# Disable the function of the lettrine command

I would like to have two versions of my document. The differences depend on whether kpfonts is loaded or not. If it's not loaded I want to disable the\lettrine command and the arguments in the command should appear as normal text. Below is a MWE.

\documentclass{scrreprt}
\usepackage{lettrine}
\usepackage{lipsum}
%\usepackage{kpfonts}

\makeatletter
%don't do anything in this MWE
}
{
\renewcommand{\familydefault}{\sfdefault} %just an example
%I also want to disable lettrine here
}
\makeatother

\begin{document}

\chapter{Whatever}

\lettrine[findent=1pt, nindent=1pt]{N}{ow, let lipsum do the job:} \lipsum[1]

%Now, let lipsum do the job: \lipsum[1]. <<Achieve this with the above line

\end{document}


Is there a way of doing this so I wouldn't have to edit the actual text?

-

Adding \renewcommand{\lettrine}[3][]{#2#3} should do.

\documentclass{scrreprt}
\usepackage{lettrine}
\usepackage{lipsum}
%\usepackage{kpfonts}

\makeatletter
{%
%don't do anything in this MWE
}
{%
\renewcommand{\familydefault}{\sfdefault}%just an example
\renewcommand{\lettrine}[3][]{#2#3}%
}
\makeatother

\begin{document}

\chapter{Whatever}

\lettrine[findent=1pt, nindent=1pt]{N}{ow, let lipsum do the job:} \lipsum[1]

Now, let lipsum do the job: \lipsum[1].

\end{document}

-
Worked great, you forgot the [] in the code. You can accept an answer in 9 minutes :) –  pythonista Apr 17 '13 at 0:12
@AbdulhaqElhouderi Sorry for the mistake. Fixed. –  egreg Apr 17 '13 at 0:14