1

I am trying to TeX my description of one of my algorithms. My Algorithm will be described by words not by code.

My first Problem was that i rather like the 1. Notation over 1:

I solved this by \algsetup{linenodelimiter={.}}.

Then I wanted to get rid of the Numbering of the Algorithm, so i use:

\renewcommand{\thealgorithm}{}

Now my MWE code is:

\documentclass[12pt,a4paper,twoside]{report} 
\usepackage[ngerman]{babel}
\usepackage[Algorithmus]{algorithm}
\usepackage[noend]{algorithmic}
\renewcommand{\thealgorithm}{}
\algsetup{linenodelimiter={.}}
\begin{document}
\begin{algorithm}
\caption{MyAlgName}
\begin{algorithmic}[1]
  \STATE First Step of the Alg
  \STATE Second Step of the Alg
  \STATE Substate a. First Part of Second Step
  \STATE Substate b. Second Part of Second Step
  \STATE Third Step of the Alg
\end{algorithmic}
\end{algorithm}
\end{document} 

and yields enter image description here

But I would like to change the third and forth STATE to be something like a substate. I would prefer the numeration to be a. and b. and have a little indention.

In the End it should look like:

  1. First Step of the Alg

  2. Second Step of the Alg

    a. First Part of the Substate

    b. Second Part of the Substate

  3. Third Step of the Alg

Also I looked around to change the size of the numeration of the States in general. Is it possible to change the Size of the numeration to match the actual text (it seems to be a little smaller in the algorithm enviroment, probably to have a numeration to count code lines)

I appreciate any Help and thanks in advance.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.