3

My document isn't compiling anymore as soon as I use a fraction as fontsize in \documentclass[fontsize=10.5pt]{scrartcl}. Compilation breaks at \usepackage[onehalfspacing]{setspace} with the error message

Missing \begin{document}.
1
  • You need package scrhack as well.
    – Johannes_B
    Dec 27 '15 at 12:12
5

You need to load package scrhack in order to get onehalfspacing to work with non-integr font sizes.

texsxKomaSetspace

\documentclass[fontsize=10.5pt]{scrartcl}
\usepackage{lmodern}
\usepackage{blindtext}
\usepackage{scrhack}
\usepackage[onehalfspacing]{setspace}
\begin{document}
\setlength{\tabcolsep}{0pt}
\begin{tabular}{p{1em}p{1em}p{1em}}
    \KOMAoptions{fontsize=10pt} M \par M &
    M  \par M&
    \KOMAoptions{fontsize=11pt}M  \par M
\end{tabular}
\end{document}
3
  • this doesn't compile and brings up the same error message at line 6: Missing \begin{document}. \begin Dec 28 '15 at 8:00
  • @user3105453 If this would not compile, i wouldn't have posted it as an answer. Do you have an up to date TeX distribution?
    – Johannes_B
    Dec 28 '15 at 8:43
  • I just updated from TeX Live 2014 to 2015 and now it's compiling without errors, thanks. The answer below, however, works even with older distributions. Dec 28 '15 at 11:41
1

Instead of \usepackage[onehalfspacing]{setspace} simply use these lines:

\usepackage{setspace}
\setstretch{1.25} 

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.