Discussion:
ERROR: \singlespacing already defined when using paragraph settings
Danny Parker
2011-02-08 23:23:33 UTC
Permalink
I'm getting the following error when trying to switch to single spacing in
my document.

LaTeX Error: Command \singlespacing already defined.
From reading up on similar errors I think it may be a conflict between
packages but I'm not experienced enough to know which ones cause the
conflict and which ones can be deleted. My document class is the thesis
class for my university which I'm including and it looks like it installs
the following packages:

\documentclass[oneside,english]{msuthesis}

\usepackage[T1]{fontenc}

\usepackage[latin9]{inputenc}

\usepackage{units}

\usepackage{textcomp}

\usepackage{graphicx}

\usepackage{setspace}

\usepackage{nomencl}


Can anyone point me in the right direction since Google wasn't any help?
Thanks in advance.


Danny
Richard Heck
2011-02-08 23:28:02 UTC
Permalink
Post by Danny Parker
I'm getting the following error when trying to switch to single
spacing in my document.
LaTeX Error: Command \singlespacing already defined.
From reading up on similar errors I think it may be a conflict between
packages but I'm not experienced enough to know which ones cause the
conflict and which ones can be deleted. My document class is the
thesis class for my university which I'm including and it looks like
\documentclass[oneside,english]{msuthesis}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{units}
\usepackage{textcomp}
\usepackage{graphicx}
\usepackage{setspace}
\usepackage{nomencl}
Can anyone point me in the right direction since Google wasn't any
help? Thanks in advance.
If you look in your cls file, you will see that it does define a
\singlespacing command. When you try to change to single spacing, LyX
includes setspace.sty, which I think also defines a command by that
name. The solution, for our purposes, is probably to change the command
in the class file to something else, and then search and replace the
other occurrences.

Richard
Danny Parker
2011-02-08 23:40:32 UTC
Permalink
Thanks a lot for the help.

Is that the line that says "\newcommand{\singlespacing}{1}"? So I could
just replace all \singlespacing with something like \snglspcing?

If so, I'm not sure if that will address what I'm ultimately trying to do.
My root problem is that when I insert a float figure, lyx's
\inlcudegraphics command has a caption that has the figure number and
caption on separate lines. Where the thesis.cls defines a function \Figure
that supposedly does it all on one line (per the guidelines). However, when
I insert ERT and call the classes function I get an error "LaTeX Error:
Unknown graphics extension: .eps." which I don't know what to do with. Any
suggestions there?

Danny
Post by Richard Heck
Post by Danny Parker
I'm getting the following error when trying to switch to single spacing in
my document.
LaTeX Error: Command \singlespacing already defined.
From reading up on similar errors I think it may be a conflict between
packages but I'm not experienced enough to know which ones cause the
conflict and which ones can be deleted. My document class is the thesis
class for my university which I'm including and it looks like it installs
\documentclass[oneside,english]{msuthesis}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{units}
\usepackage{textcomp}
\usepackage{graphicx}
\usepackage{setspace}
\usepackage{nomencl}
Can anyone point me in the right direction since Google wasn't any help?
Thanks in advance.
If you look in your cls file, you will see that it does define a
\singlespacing command. When you try to change to single spacing, LyX
includes setspace.sty, which I think also defines a command by that name.
The solution, for our purposes, is probably to change the command in the
class file to something else, and then search and replace the other
occurrences.
Richard
Richard Heck
2011-02-08 23:51:15 UTC
Permalink
Post by Danny Parker
Thanks a lot for the help.
Is that the line that says "\newcommand{\singlespacing}{1}"? So I
could just replace all \singlespacing with something like \snglspcing?
Yes, but then you have to change all the \singlespacing commands in the
class file to \snglspcing.
Post by Danny Parker
If so, I'm not sure if that will address what I'm ultimately trying to
do. My root problem is that when I insert a float figure, lyx's
\inlcudegraphics command has a caption that has the figure number and
caption on separate lines. Where the thesis.cls defines a function
\Figure that supposedly does it all on one line (per the guidelines).
However, when I insert ERT and call the classes function I get an
error "LaTeX Error: Unknown graphics extension: .eps." which I don't
know what to do with. Any suggestions there?
I'm less sure about that one, as I don't use graphics much in my own
work. Try re-posting that particular problem. Someone else will know.

Richard
Danny Parker
2011-02-09 02:06:55 UTC
Permalink
Post by Richard Heck
Yes, but then you have to change all the \singlespacing commands in the
class file to \snglspcing.
Understood. Thanks for all the help.

Danny
Post by Richard Heck
Yes, but then you have to change all the \singlespacing commands in the
class file to \snglspcing.
Loading...