I have a pretty long paper that is getting sluggish to compile. Different sections are imported with \input. I'd like to have something like \includeonly but that works on \input rather than \include commands (\input works better for the paper as it does not start sections on new pages, etc.).

A reasonable option would be to use \include for the draft and swap back later, but thought I would ask here first if there is a command like \includeonly for \input. (By the way, I tried \includeonly combined with \input but indeed it doesn't work.)

  • 2
    You could use something like \let\myinput\include in the preamble and then change it to \let\myinput\input for the final version. If you don't want to risk patching internal commands. – cfr Oct 2 '19 at 3:44
  • I don't really get though why this question is a duplicate of the other question? I understand from the nice flashy graphic on the other question why the answer that was once here is not perhaps the best solution, but I am left with the question of how best to omit inputs in that case (the other question does not address this at all). @cfr, that is a reasonable solution, thanks! – badroit Oct 3 '19 at 2:59
  • 1
    I agree. This is certainly NOT a duplicate of the other question. If it is to be marked as a duplicate, it should be a duplicate of the question linked from the one it is marked as currently. I can only think David marked it as a duplicate on the grounds that the answer is the same, but even that strikes me as incorrect. For one thing, you're open to other solutions than eliminating \clearpage from \include so 'don't do this' may apply to Alan Munn's answer, but it needn't apply to all answers to this question. – cfr Oct 3 '19 at 18:07
  • That is, if it is a duplicate, it's a duplicate of stackoverflow.com/q/1209065/3186474. – cfr Oct 3 '19 at 18:09
  • But that question isn't on TeX SE so I don't know it can be marked as a duplicate here. – cfr Oct 3 '19 at 18:11

Your Answer

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

Browse other questions tagged or ask your own question.