0

I want to compile and view just the chapter I'm working on. How do I do this? It seems way harder to do than it should be.

Clarification: I'm not trying to print the main document with only a subset of chapters. I'm trying to compile a specific chapter as its own document without any of the additional text baggage carried in the main document. The real-world problem to be solved is that I'm working on a chapter of my thesis but cannot easily see what it will look like as a PDF document; I am currently jumping back and forth between uncompilable and compilable (but cluttered) documents to see the chapter I am building.

  • 2
  • Create the chapters on separate .tex files and then use the \include{<chapter name here>} command in your main file and compile. Comment out the chapters you do not want. – azetina Jan 13 '14 at 20:22
  • 1
    Chapters in separated files (*.tex), including them by \include and compiling selected chapters by \includeonly should do the trick. – Thorsten Donig Jan 13 '14 at 20:26
  • Perhaps I wasn't clear in my description. I'm not trying to print the main document with only a subset of chapters. I'm trying to compile a specific chapter as its own document without any of the additional text baggage carried in the main document. – Dylan Knowles Jan 13 '14 at 20:38
  • 1
    @dylanlknowles: What is wrong with using \include for all chapters and \includeonly for the one you're interested in seeing. Sure this will include the title page, perhaps acknowledgements and maybe a ToC/LoF/LoT, but you can comment those out easily, can't you? – Werner Jan 13 '14 at 20:45
  • Good point. It'll be a bit awkward -- our university's thesis format has a lot of text / control mixing -- but there's no reason I can't try. This said, it still leaves me switching between windows. It'd be nice if I could just have a PDF / Latex split on my monitor. – Dylan Knowles Jan 13 '14 at 20:55
  • Create all your content in compartmentalized files, and \input them, while \chapters could follow a \include/\includeonly approach. I'm still not following the problems you may be experiencing... – Werner Jan 13 '14 at 20:58
  • If you're really interested in what the final output will look like in university thesis style, you'll pretty much have to use their documentclass and/or style file, with whatever front matter commented out as needed. Otherwise, you'll have to match their margins, line spacing, etc. on your own. – Mike Renfro Jan 13 '14 at 21:08

1 Answers1

1

Attempt, The pagesel package I use this package to compile to individual chapters. Abstract: Single pages or page areas can be selected for output.

\usepackage[2-5]{pagesel}

There are some more answers, here.

Louis
  • 633