# Creating multiple PDF files from a single LaTeX file [duplicate]

Possible Duplicate:
How to create individual chapter PDFs

In my LaTeX file, I have

``````\chapter{chapter one}

\chapter{chapter two}

\chapter{chapter three}
``````

etc.

I wonder if there is a way to create separate PDF files for each chapter, i.e. `chapter one.pdf`, `chapter two.pdf`, `chapter three.pdf` etc. As there are quite a few chapters in my document and they keep changing, separating the chapters manually can prove to be time consuming and ineffective. I am using texlive in Ubuntu. Any help is much appreciated.

## marked as duplicate by lockstep, cmhughes, diabonas, egreg, Stefan Kottwitz♦Jan 2 '12 at 8:48

• Yes, see Typeset single chapter from book. Put every chapter in its own file and use `\include{<file>}` in the main file. Then add `\includeonly{<files/chapter you want include>}` in the preamble. You need to change this line for every chapter and compile the document again, then rename the PDF. However, I don't know an automatic way. You could write a shell script which automates it for you, if you know how to do it. – Martin Scharrer Jan 1 '12 at 12:21