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.



\section{Under Pressure} 
\subsection{Serial Computation}
         \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.}

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.

  • There are packages like 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
  • @Johannes_B Thank you for your excellent comment! I changed from mdframed + verbose into only algorithm2e. It seems to be a package which can work here. Any tips how to change the above pseudocode in the correct format. – Léo Léopold Hertz 준영 Nov 29 '14 at 15:26
  • What is the correct format? :-p – Johannes_B Nov 29 '14 at 15:27
  • @Johannes_B Logical correct format. Sorry for the confusion. Anything that seems to be official. – Léo Léopold Hertz 준영 Nov 30 '14 at 9:48
  • 1
    What is publication typography? You know i have been thinking about this question for quite some time, but it is still unclear for me, what the question is? There are several packages, that do not care about the contents, and just print the input, some of them can highlight keywords, and such. You are comparing different styles (that i don't know), do you have any visual aid that lets us compare as well, and maybe suggest what to style where? – Johannes_B Feb 18 '15 at 21:03