Runaway argument?
! File ended while scanning use of \FancyVerbGetLine.
<inserted text>

Have already seen and tried workarounds mentioned here and here.

Code: Here

If I comment out lines 185 to 188, I get the above mentioned error.

Any help is highly appreciated!

  • Please, made a shorter example showing the issue.
    – egreg
    Dec 9, 2018 at 13:38

1 Answer 1


There should be no space between \end and {minted}.

The offending lines have

\begin {minted}{cpp}
string s = to_string (num);
\end {minted}

While the space after \begin is irrelevant, the one after \end is relevant and should be removed. With

string s = to_string (num);

you will be on track again.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.