How can I get this work:

\namedinclude{perceptron\_multilayer.h}{Multi-layer perceptron class definition}

where namedinclude is defined as


Currently I get an "Emergency stop".

  • \subsection doesn't take two arguments, but I guess that doesn't matter in this case.
    – Werner
    Oct 7, 2014 at 6:34
  • The second argument should hold a description. Changed macro definition does not help.
    – user877329
    Oct 7, 2014 at 6:37
  • \lstinputlisting{a\_b} is not allowed.
    – egreg
    Oct 7, 2014 at 6:54

1 Answer 1


A token like \_ in the file name is not allowed, whereas _ is.

You can do




but, in this case, you do

\namedinclude{perceptron_multilayer.h}{Multi-layer perceptron class definition}

However, I'd see better this as an environment:


and use this as

Multi-layer perceptron class definition
with more words.

Even a new paragraph.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .