Hi all

I have recently tried to put an 'Algorithm' float into one chapter of my
thesis (each chapter being a separate file). When I render that chapter
by itself in pdflatex, it works OK.

But when I attempt to render the whole thesis, it doesn't work. I
presume there is some incompatibility arising from my document preamble,
which contains as below.

Can anyone tell me if any of those things (lmodern, url, listings,
hyperref) cause problems with Algorithm floats?

The error message that I get is related to a syntax error in my
reference to the float \ref{alg:xxxxxxx}. It says "Undefined control
sequence".

If I convert my 'algorithm' float into a 'table' float, the problem goes
away.

As I said, if I just render the one chapter by itself (empty preamble)
it works fine.

What is it that I'm missing here? This is with LyX 1.4.3 on Ubuntu 7.04
(standard .deb install)

Cheers
JP

------8<-----
\usepackage[bookmarks,bookmarksnumbered=true,
  bookmarksopenlevel=0,
  pdfstartview=FitH,bookmarksopen=true]{hyperref}
\usepackage{lmodern}
\usepackage{url}
\usepackage{color}
\definecolor{darkred}{rgb}{0.55,0,0}
\definecolor{darkgreen}{rgb}{0,0.55,0}

\usepackage{listings}

\lstdefinelanguage{ascend}{
  morekeywords=[1]{
     REQUIRE,IMPORT,NOTES,
     ATOM,MODEL,METHOD,METHODS,
     UNIVERSAL,CONSTANT,DIMENSION,DEFAULT,
     END,FOR,CREATE,DO,EXTERNAL, 
     CONDITIONAL,SATISFIED,WHEN,CASE,OTHERWISE,TRUE,
     FALSE,SELF,
  },
  morekeywords=[2]{
     REFINES,IS_A,WILL_BE,ALIASES,INPUT,OUTPUT,DATA,
     FIX,FREE,RUN,ARE_THE_SAME
  },
  morekeywords=[3]{
     solver_var,integer_constant
  },
  sensitive=true,
  morecomment=[s][\color{blue}]{(*}{*)},
  morestring=[b][\color{darkgreen}]',
  morestring=[b][\color{darkgreen}]",
  morecomment=[s][\color{darkgreen}]{\{}{\}},
}

\lstnewenvironment{ascend}
  {\lstset{basicstyle=\ttfamily\small, keywordstyle=\color{darkred}}}
  {}

------8<-----

-- 
John Pye
Department of Mechanical and Manufacturing Engineering
University of New South Wales, Sydney, Australia
http://pye.dyndns.org/

Reply via email to