I have a document with 8 chapters, and each chapter has various sections

%%Chapter 1

%%Chapter 2

And so forth up to 8 chapters. This is a simplified example (there are 8 chapters, and usually about 20-30 sections per chapter).

I often find myself commenting in and out chunks of input commands - for example I often want to output all input files from one given chapter.

Is there a way to declare a variable int chapter and then wrap each chapter of input files with ... if chapter = x....or similar command? I realize this syntax is not used in LaTeX...but is there a way to do something like this?

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.