My latex document is becoming bigger and bigger. Today I no longer can compile it, it takes forever to compile but nothing changes.

I wonder should I write each chapter in a separate independent document?

Or is there an option to write everything in the same document and have it compiled fast, smoothly and easily? How?

PS: I use Texpad. Typesetting into pdf.






    \renewcommand\indexname{New Name Of Index}

    \newcolumntype{?}{!{\vrule width 1pt}}




    \chapter{Supports Théoriques}

    \chapter{Revue de littérature}







    % \phantomsection

    % \phantomsection

  • 3
    If it no longer compiles you probably have an error and should correct it. Beside this you can use \include / \input to comment the parts you are currently not caring about -- and you certainly don't need to recompile the index and the bib all the time. Commented May 17, 2016 at 9:58
  • Thank you. But how can I avoid recompiling index and bib?
    – user105139
    Commented May 17, 2016 at 10:05
  • 3
    latex doesn't make the index and bibliography they are made by separate programs (makeindex or xindy and bibtex or biber normally) so if you are calling those programs every time just don't do that. Commented May 17, 2016 at 10:30
  • 1
    also what do you mean by "forever"? When I started using tex 15 minutes per page was common, I assume it is not taking that long? if you really mean "forever" and the job is not stopping then as Ulrike says you have an error in your document but impossible to guess what that is given no information. Commented May 17, 2016 at 10:33
  • 1
    You should post your code. Conflicts between packages, incorrect loading order of packages, infinite loops all are possibly slowing you down. But, if nobody sees it, nobody will be able to help. See meta.tex.stackexchange.com/q/3343/90087 for how to post an example.
    – A Feldman
    Commented May 18, 2016 at 2:02

1 Answer 1


Separate the document into pieces and put them into separate tex-files. These tex-files you include via \include.

After that, you uncomment only the part, you are working on. i.e.:


\include{./chapter4.tex} %What should be included

Some stuff, you are writing right now. Lots of text text text text text text.

That should work.

  • 9
    instead of commenting out the files you're not compiling in the current run, \includeonly allows you to specify the files you do wish to compile. Commented May 17, 2016 at 12:32
  • Not my taste, but good point. Commented May 19, 2016 at 23:16
  • On a modern machine there should be an error to find. Use the commenting out that @MaestroGlanz demonstrated to find which of your \input files is presenting the problem. After that see if you can find your error, if you then still cannot figure out the problem, make a copy of that file, add \usepackage{lipsum} replace your plain text with \lipsum and post it here for further help. 300 pages is really not a very long document for TeX to handle.
    – A Feldman
    Commented May 20, 2016 at 19:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .