thx.,
glen.
--------------------------------------------------------------------------------------------------------------------------------------------------------------
\documentclass[10pt,dvips,twocolumn]{article}
\topmargin -0.50in
\textheight 8.5in
\textwidth 6.25in
\oddsidemargin -0.010in
\usepackage{times}
\usepackage{courier}
\usepackage{algorithm}
\usepackage{algpseudocode}
\newlength{\algofontsize}
\setlength{\algofontsize}{6pt}
\begin{document}
\algsetup{linenodelimiter=.}
\begin{algorithm}
{\fontsize{10pt}{10pt}\selectfont
\caption {The Example algorithm.}
\label {algorithm:ex1}
\begin{algorithmic}[1]
\Procedure {ExampleProcedure}{}
\State {The quick brown fox jumped over the lazy dog.}
\Repeat
\State {Step 1 - aaaa}
\State {Step 2 - bbbb}
\State {Step 3 - cccc}
\State {Step 4 - dddd}
\State {Step 5 - eeee}
\State {Step 6 - ffff}
\Until \mbox{\tt (curr = max)}
\EndProcedure
\State {A man a plan panama.}
\end{algorithmic}
}
\end{algorithm}
\end{document}
I'm working with the code above and have changed it slightly. The
following is the resulting bug:
(./example-mbox.aux) (/usr/share/texmf/tex/latex/psnfss/ot1ptm.fd)
! Undefined control sequence.
l.20 \Procedure
{ExampleProcedure}{}
?
Does anyone know what the problem is with this? Thanks a lot.
Glen.
--------------------------------------------------------------------------------------------------------------------------------------------
\documentclass[10pt,dvips,twocolumn]{article}
\topmargin -0.50in
\textheight 8.5in
\textwidth 6.25in
\oddsidemargin -0.010in
\usepackage{times}
\usepackage{courier}
\usepackage{algorithm}
\usepackage{algorithmic}
>I get an error message on the algsetup line from the following code.
>If you know what it is could you pls send
>the fix. Also, the 6pt font size appears to not work.
You are mixing up several packages.
(1) The algorithm package defines a floating environment named
"algorithm".
(2) The algorithmic package is usually used with algorithm.
It defines an environment named "algorithmic" for
displaying algorithmic code. This package includes an
\algsetup command for modifying the behavior of its
algorithmic environment.
(3) The algpseudocode package defines an "algpseudocode"
environment for displaying algorithmic code.
(4) The algorithmicx package is loaded by algpseudocode.
It too defines an algorithmic environment, but not the
same as the one defined by (2). Since you load it last,
its algorithmic environment will be used, and it is
unaffected by \algsetup.
So you are using (1), (3) and (4) and then trying to use
a command from (2). You should read the documentation of
algorithmix and use whatever facilities it supplies to
change the behavior of the algorithmic environment.
>\begin{document}
>\algsetup{linenodelimiter=.}
Since you want to change the appearence of the line number,
\renewcoommand{\alglinenumber}[1]{#1.}
When a line number is added it is formatted using the
\alglinenumber command. This takes the arabic number of the
line as its argument. The above redefinition simply appends
a dot. You could also insert a font change command before it:
\renewcoommand{\alglinenumber}[1]{\small #1.}
The default definition is: \footnotesize#1:
Unfortunately, I can't find \alglinenumber documented
anywhere except in the algorithmicx.sty file.
Dan
To reply by email, change LookInSig to luecking
>
>Since you want to change the appearence of the line number,
>
> \renewcoommand{\alglinenumber}[1]{#1.}
Better to spell "command" with only one "o":
\renewcommand{\alglinenumber}[1]{#1.}
>
>When a line number is added it is formatted using the
>\alglinenumber command. This takes the arabic number of the
>line as its argument. The above redefinition simply appends
>a dot. You could also insert a font change command before it:
>
> \renewcoommand{\alglinenumber}[1]{\small #1.}
Likewise:
\renewcommand{\alglinenumber}[1]{\small #1.}