1

I was wondering if given a huge Latex \documentclass[oneside]{book} is it possible to compile a specific range of pages, for example pages 11-35, to a PDF?

I want to compile a single chapter without having to copy and paste content, and move relevant packages into the new file.

I use Kile as my IDE.

Thanks in advance.

  • 5
    You can't compile a range of pages as in your example 11-35, because LaTeX must first set the pages 1 to 10 in order to know what page 11 is. You can compile single parts of your document using \include and \includeonly. – campa Aug 17 '15 at 10:25
  • Thanks, that might actually be enough for my needs. Cheers. – Docconcoct Aug 17 '15 at 10:28
  • Look e.g. at http://tex.stackexchange.com/questions/87010 and references therein. – campa Aug 17 '15 at 10:29
  • 4
    I think you want to look at the pagesel package. – egreg Aug 17 '15 at 10:30
  • @egreg: ok, now I'm quite baffled... never heard of that. Ashes on my head. – campa Aug 17 '15 at 10:32
  • @egreg: on second thoughts, I might have simply misinterpreted the question. As far as I understand, pagesel does compile the entire document but ships out only the requested pages. However, the typesetting must be performed anyway. Since the OP asked about "compiling a specific range of pages", I immediately thought about \include. – campa Aug 17 '15 at 10:40
  • If you use WinEdt, it a has toolbar button Compile selected that launches a macro which creates a temporary file with the preamble of your file and only the selection as the body of the document. – Bernard Aug 17 '15 at 10:54
  • @Bernard I'm using Ubuntu. Don't think it's available for that. – Docconcoct Aug 17 '15 at 11:03
  • I've seen it works under Wine. If it's only for a few documents, you may give it a try for free for 1 month. – Bernard Aug 17 '15 at 11:05
  • @Docconcoct exactly which LaTeX are you using on Ubuntu? If you are using the version from the Ubuntu repositories, there are lots of those you may need to figure out exactly which Ubuntu package provides that package. I use the Vanilla TeX Live 2015, manually installed, this include pagesel – daleif Aug 17 '15 at 11:24
  • @Bernard isn't it a plain LaTeX package, how is Wine related to this? – daleif Aug 17 '15 at 11:25
  • 1
    @daleif: No, I mentioned the WinEdt macro compileselected.edt. WinEdt is just a dedicated editor for Windows. But I read once it works fine under Wine. – Bernard Aug 17 '15 at 11:47
  • @Bernard ok, that makes more sense. – daleif Aug 17 '15 at 11:49

0 Answers0