7

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

9

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

In your case you would do:

\inputminted[firstline=2,lastline=15]{language}{file}
1
  • +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 .