I am using minted package to display source code from an external file using the inputminted command but I don't want to display the whole file but a certain line number if possible, say from 2 to 15. Is that possible?

1 Answer 1


\inputminted has two optional arguments, firstline and lastline, that do exactly as the name suggests.

In your case you would do:

  • +1 for your suggestion....and for my reopen of the my question (very interesting), different \mathcal J.
    – Sebastiano
    Apr 26, 2018 at 21:12

You must log in to answer this question.

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