# Choose \documentclass dependent on compiler

I am not able to compile this tex document

\documentclass{scrartcl}
% \documentclass{article}
\begin{document}
hello
\end{document}


with htlatex. I am able to do this using pdflatex. If I choose article (see 2nd line) as documentclass, everything is fine. However, I'd like to have pdfs using scrartcl. How can I switch between documentclasses dependent on the compiler I use?

-
\RequirePackage{ifpdf}\documentclass{\ifpdf scrartcl\else article\fi} –  Manuel Jun 20 '14 at 11:36
@Manuel: If you post this as an answer, I can accept it. Thx. –  Stefan Bollmann Jun 20 '14 at 11:39
However, if you want everything available with article, there's nothing stoping you from \usepackage{scrbase} with article class. That way, you have everything from scrartcl available. –  Manuel Jun 20 '14 at 11:44

\RequirePackage{ifpdf}
\documentclass{\ifpdf scrartcl\else article\fi}

\begin{document}
hello
\end{document}


Or, may be (I don't know) it's better not to risk anything

\RequirePackage{ifpdf}
\ifpdf
\documentclass{scrartcl}
\else
\documentclass{article}
\fi

\begin{document}
hello
\end{document}

-