I am trying to put some code in an alltt environment, in a subfigure in LLNCS documentclass.
I was previously using another documentclass which supported the subcaption package just fine, but when changing it to llncs, the subcaption package outputs
The `subcaption' package does not work correctly in compatibility mode.
So I think I am bound to use a \subfloat in the subfig package. Unfortunately, I could not get it working, and the answer at the similar question \begin{alltt} inside \subfloat is not quite satisfactory for me: would I have to use n saveboxes, one for each subfig in the figure?
Also, I think the main problem here is the next error that happens if I replace subcaption with subfig as per the previously linked question:
Something's wrong--perhaps a missing \item
alltt
cannot go in the argument to another command.