0

I'm running Ubuntu 16.04 and using the texlive-full apt package. I've tried this in TeXmaker and TeXstudio and I get the same errors in both, and I've tried it on Overleaf and it works just fine, so the problem must be with TeX Live.

I am able to import the setspace package without any errors or warnings, but if I try to use any of the setspace methods, the compiler says they're undefined. Here's an example and a relevant part of the log file.

I just don't know why this package is working on Overleaf but not my machine.

\documentclass{article}
\usepackage[utf8]{inputenc}

\title{Title}
\author{Author}
\date{May 2020}

\usepackage[doublespacing]{setspace}
\setdisplayskipstretch{}
\setstretch{2}

\begin{document}

\maketitle

\section{Introduction}

\end{document}
This is pdfTeX, Version 3.14159265-2.6-1.40.18 (TeX Live 2017/Debian) (preloaded format=pdflatex 2020.5.15)  20 MAY 2020 01:22
entering extended mode

...

)) (./setspace.sty)

! LaTeX Error: Unknown option `doublespacing' for package `setspace'.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              

! Undefined control sequence.
<recently read> \setdisplayskipstretch 

l.9 \setdisplayskipstretch
                          {}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
l.10 \setstretch
                {2}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.


! LaTeX Error: Missing \begin{document}.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.10 \setstretch{2
                  }
You're in trouble here.  Try typing  <return>  to proceed.
If that doesn't work, type  X <return>  to quit.
...
9
  • 1
    Welcome to TeX.SE.
    – Mico
    Commented May 20, 2020 at 6:46
  • 1
    Try with \usepackage[doublespacing]{setspace} and remove \setdisplayskipstretch{} \setstretch{2}
    – MadyYuvi
    Commented May 20, 2020 at 6:57
  • 5
    Why are you using a local copy of setspace? and not the version from your latex installation?
    – daleif
    Commented May 20, 2020 at 6:58
  • @daleif I'm not sure what you mean. I never installed setspace independently. It's not even clear to me that it's possible to add packages when the texlive installation comes from a package manager.
    – NoName
    Commented May 20, 2020 at 7:09
  • 2
    When we look at your log sniplet we see (./setspace.sty) this means that the version of the setspace package you are using is in the same folder as your .tex file and this it is being used not the one from the latex installation. Try renaming that local file such that it does not bother your compilation
    – daleif
    Commented May 20, 2020 at 7:44

1 Answer 1

4

The sniplet of the log shows

)) (./setspace.sty)

meaning that you have a local copy of setspace.sty in your folder. Presumably this is a really old copy of setspace or a modified version.

Try renaming the local copy and see if that helps.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .