Algorithm options

2001-02-22 Thread Claus Hentschel

I am using the algorithm float in LyX together with the listing package.
Most things work as I want them to use. So I am able to change the float's
name as well as the name of the list of floats with these commands in the
LyX preambel:
\floatname{algorithm}{XYZ}
\renewcommand{\listalgorithmname}{List of XYZs}

But how can I change the *numbering scheme* of algorithm floats to insert
the chapter's number? By default algotithms are just counted throuout the
document. Every time I insert
\usepackage{algorithm}[chapter]
in the preamble I got errors.

Another question is how to change the floating behaviour of that float type?
By default (reading the sty file) that float type is set to respect options
{htbp}{loa}. I want them to use {tbp} instead. (BTW: What does {loa} mean?
The float documentation -- just a README -- doesn't say anything about!)

Claus






Re: Algorithm options

2001-02-22 Thread Dekel Tsur

On Thu, Feb 22, 2001 at 09:30:56AM +0100, Claus Hentschel wrote:
 But how can I change the *numbering scheme* of algorithm floats to insert
 the chapter's number? By default algotithms are just counted throuout the
 document. Every time I insert
 \usepackage{algorithm}[chapter]

I guess you meant \usepackage[chapter]{algorithm}

 in the preamble I got errors.

The problem is that lyx already loads the algorithm package without the
'chapter' option.
You have 2 options:

1. Put 'chapter' in the 'extra options' field in the document dialog.
The problem is that the chapter option may be passed to other packages,
giving you unwanted results. So it may be better to use the next option.

2. Enable AMS-math in the document dialog, and put 
'\numberwithin{algorithm}{chapter}' in the preamble.

 
 Another question is how to change the floating behaviour of that float type?
 By default (reading the sty file) that float type is set to respect options
 {htbp}{loa}. I want them to use {tbp} instead. (BTW: What does {loa} mean?
 The float documentation -- just a README -- doesn't say anything about!)

Put '\newfloat{algorithm}{tbp}{loa}' in the preamble.



Re: Algorithm options

2001-02-22 Thread Herbert Voss

Claus Hentschel wrote:
 
 I am using the algorithm float in LyX together with the listing package.
 Most things work as I want them to use. So I am able to change the float's
 name as well as the name of the list of floats with these commands in the
 LyX preambel:
 \floatname{algorithm}{XYZ}
 \renewcommand{\listalgorithmname}{List of XYZs}
 
 But how can I change the *numbering scheme* of algorithm floats to insert
 the chapter's number? By default algotithms are just counted throuout the
 document. Every time I insert
 \usepackage{algorithm}[chapter]
 in the preamble I got errors.

in preamble:

\renewcommand{\thealgorithm}{\thechapter-\arabic{algorithm}}
\@addtoreset{algorithm}{chapter}

Herbert


-- 
[EMAIL PROTECTED]
http://perce.de/lyx/



Algorithm options

2001-02-22 Thread Claus Hentschel

I am using the algorithm float in LyX together with the listing package.
Most things work as I want them to use. So I am able to change the float's
name as well as the name of the list of floats with these commands in the
LyX preambel:
\floatname{algorithm}{XYZ}
\renewcommand{\listalgorithmname}{List of XYZs}

But how can I change the *numbering scheme* of algorithm floats to insert
the chapter's number? By default algotithms are just counted throuout the
document. Every time I insert
\usepackage{algorithm}[chapter]
in the preamble I got errors.

Another question is how to change the floating behaviour of that float type?
By default (reading the sty file) that float type is set to respect options
{htbp}{loa}. I want them to use {tbp} instead. (BTW: What does {loa} mean?
The float documentation -- just a README -- doesn't say anything about!)

Claus






Re: Algorithm options

2001-02-22 Thread Dekel Tsur

On Thu, Feb 22, 2001 at 09:30:56AM +0100, Claus Hentschel wrote:
 But how can I change the *numbering scheme* of algorithm floats to insert
 the chapter's number? By default algotithms are just counted throuout the
 document. Every time I insert
 \usepackage{algorithm}[chapter]

I guess you meant \usepackage[chapter]{algorithm}

 in the preamble I got errors.

The problem is that lyx already loads the algorithm package without the
'chapter' option.
You have 2 options:

1. Put 'chapter' in the 'extra options' field in the document dialog.
The problem is that the chapter option may be passed to other packages,
giving you unwanted results. So it may be better to use the next option.

2. Enable AMS-math in the document dialog, and put 
'\numberwithin{algorithm}{chapter}' in the preamble.

 
 Another question is how to change the floating behaviour of that float type?
 By default (reading the sty file) that float type is set to respect options
 {htbp}{loa}. I want them to use {tbp} instead. (BTW: What does {loa} mean?
 The float documentation -- just a README -- doesn't say anything about!)

Put '\newfloat{algorithm}{tbp}{loa}' in the preamble.



Re: Algorithm options

2001-02-22 Thread Herbert Voss

Claus Hentschel wrote:
 
 I am using the algorithm float in LyX together with the listing package.
 Most things work as I want them to use. So I am able to change the float's
 name as well as the name of the list of floats with these commands in the
 LyX preambel:
 \floatname{algorithm}{XYZ}
 \renewcommand{\listalgorithmname}{List of XYZs}
 
 But how can I change the *numbering scheme* of algorithm floats to insert
 the chapter's number? By default algotithms are just counted throuout the
 document. Every time I insert
 \usepackage{algorithm}[chapter]
 in the preamble I got errors.

in preamble:

\renewcommand{\thealgorithm}{\thechapter-\arabic{algorithm}}
\@addtoreset{algorithm}{chapter}

Herbert


-- 
[EMAIL PROTECTED]
http://perce.de/lyx/



Algorithm options

2001-02-22 Thread Claus Hentschel

I am using the algorithm float in LyX together with the listing package.
Most things work as I want them to use. So I am able to change the float's
name as well as the name of the list of floats with these commands in the
LyX preambel:
\floatname{algorithm}{XYZ}
\renewcommand{\listalgorithmname}{List of XYZs}

But how can I change the *numbering scheme* of algorithm floats to insert
the chapter's number? By default algotithms are just counted throuout the
document. Every time I insert
\usepackage{algorithm}[chapter]
in the preamble I got errors.

Another question is how to change the floating behaviour of that float type?
By default (reading the sty file) that float type is set to respect options
{htbp}{loa}. I want them to use {tbp} instead. (BTW: What does {loa} mean?
The float documentation -- just a README -- doesn't say anything about!)

Claus






Re: Algorithm options

2001-02-22 Thread Dekel Tsur

On Thu, Feb 22, 2001 at 09:30:56AM +0100, Claus Hentschel wrote:
> But how can I change the *numbering scheme* of algorithm floats to insert
> the chapter's number? By default algotithms are just counted throuout the
> document. Every time I insert
> \usepackage{algorithm}[chapter]

I guess you meant \usepackage[chapter]{algorithm}

> in the preamble I got errors.

The problem is that lyx already loads the algorithm package without the
'chapter' option.
You have 2 options:

1. Put 'chapter' in the 'extra options' field in the document dialog.
The problem is that the chapter option may be passed to other packages,
giving you unwanted results. So it may be better to use the next option.

2. Enable AMS-math in the document dialog, and put 
'\numberwithin{algorithm}{chapter}' in the preamble.

> 
> Another question is how to change the floating behaviour of that float type?
> By default (reading the sty file) that float type is set to respect options
> {htbp}{loa}. I want them to use {tbp} instead. (BTW: What does {loa} mean?
> The float documentation -- just a README -- doesn't say anything about!)

Put '\newfloat{algorithm}{tbp}{loa}' in the preamble.



Re: Algorithm options

2001-02-22 Thread Herbert Voss

Claus Hentschel wrote:
> 
> I am using the algorithm float in LyX together with the listing package.
> Most things work as I want them to use. So I am able to change the float's
> name as well as the name of the list of floats with these commands in the
> LyX preambel:
> \floatname{algorithm}{XYZ}
> \renewcommand{\listalgorithmname}{List of XYZs}
> 
> But how can I change the *numbering scheme* of algorithm floats to insert
> the chapter's number? By default algotithms are just counted throuout the
> document. Every time I insert
> \usepackage{algorithm}[chapter]
> in the preamble I got errors.

in preamble:

\renewcommand{\thealgorithm}{\thechapter-\arabic{algorithm}}
\@addtoreset{algorithm}{chapter}

Herbert


-- 
[EMAIL PROTECTED]
http://perce.de/lyx/