1

I can't get setspace package working:

\documentclass[a5paper, 11pt]{memoir}
\usepackage[utf8]{inputenc}
\usepackage[spanish,es-tabla]{babel}
\usepackage{setspace}

\begin{document}
\begin{spacing}{1.5}  
  Texto  
\end{spacing}
\end{document}

When I pdflatex it, I get:

! LaTeX Error: Environment spacing undefined.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.8 \begin{spacing}
                   {1.5}

But I have it installed:

enter image description here

I tried to uninstall and re-install it (just in case), but TeX Live Manager won't allow it:

tlmgr: not removing setspace, needed by collection-latexrecommended
tlmgr: no packages removed.
tlmgr: action remove returned an error; continuing.
Completado.

I have checked setspace package not working in TeX Live , but it doesn't help.

1
  • 2
    the memoir version (no package needed) is Spacing with a captial S Feb 17, 2022 at 19:33

1 Answer 1

4

memoir suppresses the setspace package and has its own version:

\documentclass[a5paper, 11pt]{memoir}
\usepackage[utf8]{inputenc}
\usepackage[spanish,es-tabla]{babel}
%%\usepackage{setspace}

\begin{document}
\begin{Spacing}{1.5}  
  Texto  
\end{Spacing}
\end{document}
5
  • 1
    Thanks! It worked as a charm! In 5 min I will be able to accept the answer. Feb 17, 2022 at 19:38
  • I cannot even begin to account for how long it took me to figure this out (by finding this answer, I mean). Why would they do that without issuing a warning if you try to import setspace? Why break compatibility? Nov 1, 2022 at 14:45
  • This means that I have to edit LaTeX sources I'm trying to integrate into my thesis (which by department policy must use their document class, which derives from memoir) just to change spacing to Spacing. Ugh. Nov 1, 2022 at 14:46
  • 1
    @AlexReinking you'd have to ask the class author, but it sort of follows the general memoir philosophy. It was one of the first "big" classes that tried to solve random package clash issues by loading possibily modified versions of lots of packages by default in a form they work as a whole, and so suppressing explicit loading of lots of packages. So self contained and tested functionality was given more priority than compatibility with article class and a bunch of packages. But I was not involved, this is just looking from the outside Nov 1, 2022 at 15:26
  • Gotcha... as someone without deep knowledge of the history of (La)TeX, many of these decisions appear arbitrary. Nov 1, 2022 at 15:39

You must log in to answer this question.

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