Is it possible, using the minted or listings package to format
a file between or till a certain textual marker automatically.
E.g. consider a source file:
code
code
//marker
code ...
//end marker
code
I would like to input the code between the two markers
without manually specifying the firstline & lastline
as they can change during the project.
listings's arbitrary line-range markers for that. See section 5.7 in the documentation for more details, and http://tex.stackexchange.com/a/200128/21891 for an example. – jub0bs May 18 '15 at 19:52minted, and some form will be present in the next release. Basic functionality should already be possible usingfancyvrbsyntax, which is a bit ugly (hence the need for a nicemintedwrapper); see the linked issue for an example. – G. Poore May 18 '15 at 19:55mintedv3.0. I don't have an estimate for when that will be released. – G. Poore Jan 05 '18 at 15:06