2

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
  • 2
    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
6
\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}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.