I want to make own paragraphs for algorithms by numbering them appropriately. I do not need any fancy things - white background, no borders and black font are ok. I am trying to write in Springer style which is different from styles of Cormen and Dasgupta in their textbooks.
Code
\documentclass{article}
\usepackage[lined,boxed,commentsnumbered]{algorithm2e}
\begin{document}
\section{Under Pressure}
\subsection{Serial Computation}
\begin{algorithm2e}
\For {j=0; j<N; j++} {
double prefix = y0+(j+1)*h*... /* initial conditions */
double sum_a = 0.0;
\For {...} % TODO Is this right? No braces needed?
sum_a = sum_a + a[j-k]*...;
double yp_1 = ...
...
}
\caption{\textbf{Baseline method}. This algorithm lorem. Pseudocode.}
\end{algorithm2e}
\end{document}
which should be shown as
1. Under pressure
1.1 Serial computation
1.1.1. *Baseline method*. This algorithm lorem .... Pseudocode is:
for (j=0; j<N; j++) {
double prefix = y0+(j+1)*h*... /* initial conditions */
double sum_a = 0.0;
for (...)
sum_a = sum_a + a[j-k]*...;
double yp_1 = ...
...
}
I changed the formatting of algorithms from mdframed + verbose to algorithm2e. Now, it is the challenge to understand how this package works. I am not sure if you can have official style by it. I am open to any other recommendation. I normally used only multiline equations but this does not seem to be the way to go in Springer publications.
How can you have publication typography for algorithms and their pseudocode? I originally thought about Springer style but it is not strict so any official guideline about the the thing is ok.
algorithm2e
that you can use. I don't have package verbose and was not able to locate it. Can you show a graphical output of a Springer algorithm environment? – Johannes_B Nov 29 '14 at 14:09