9

First of all, yes, I am aware of the question LaTeX Editors/IDEs.

The reason why I am asking this question is because I'm curious about people's experience with writing really large documents (100+ pages) and the link above doesn't really talk about it. I've tried Texmaker before and it was getting sluggish with 30-40 page documents (this was about 3 years ago though). Now I will soon have to start writing my PhD thesis and I'm curious as to what people would recommend.

At home I'm running Debian and just use vim. However, here at uni I have win7 and am hoping to avoid vim because I've read that vim on windows might cumbersome - command piping unavailable, backslash in paths, etc.

A cloud-based solution maybe? Something like ShareLaTeX or WriteLaTeX?

I'm sure other people have thought about this as well, but a quick google search didn't really reveal anything.

tl;dr: 100+ page documents in LaTeX on windows without the editor becoming very slow. How?

kbau
  • 193
  • 15
    Divide the document into multiple files (e.g., one per chapter) then no sluggishness at all. – Manuel Sep 24 '14 at 10:01
  • 3
    I do a 220+ pages document in LYX. It is divided into several sub-documents. Editors can handle large tex-files. What may be more of an issue is compile-time. Thus, you should divide your thesis into several files, so that you can use \includeonly for chapter-wise compiling. Especially, when you have compiled graphics (TikZ, etc.) compile times grow. – Dohn Joe Sep 24 '14 at 10:18
  • I use git for version control and for synchronisation between different devices. There is a computer which is accessable from the outside. There, my git repo resides. So, I can pull and push to this repo from both my office at university and form at home. – Dohn Joe Sep 24 '14 at 10:20
  • 9
    100 pages may be "large", but it's neither "LARGE" nor "really large". :) – T. Verron Sep 24 '14 at 10:29
  • '\includeonly' looks neat.

    Regarding compiled graphics like TikZ, I actually often compile the images separately which means they don't have to be recompiled every time. See this.

    – kbau Sep 24 '14 at 10:30
  • @T.Verron I just wanted to be sure people notice that my post isn't just a "which is the best LaTeX editor" kind of post. :) – kbau Sep 24 '14 at 10:31
  • Use vim and define folds for your sectional units, paragraphs, and environments. See this for a start. –  Sep 24 '14 at 10:51
  • 1
    Might I suggest that if you are already comfortable in VIM anyway, using GVIM on Windows is probably the best solution. It's the only way I stay sane when having to edit stuff on Windows and it's no more complicated to use than your life already is being on Windows in the first place. – Caleb Sep 24 '14 at 11:08
  • 1
    @Caleb Using unix keeps me much more sane than using windows. Furthermore, the fewer windows the better, which is why I only have one terminal and always run vim from the command line. –  Sep 24 '14 at 11:33
  • 1
    There are many editors that get incredibly slugglish when you have long lines in the document (e.g., gedit and kate). So if you tend to write the content of one paragraph into a single line and use word wrap, the problem can easily occur. Writing one sentence per line speeds up things significantly in such cases, even if the number of lines in the document grows substantially in this way. Editing 100-200 PDF pages TeX documents then becomes managable with most editors. – DCTLib Sep 24 '14 at 14:25
  • 1
    Are you aware that in Windows you can use the forward slash for paths? like: C:/Some/path. The only thing you can't do is to begin a path with / in the command line. Because that usage conflicts with option flags, but you can workaround that. (This is true since DOS 2.0, and in all Windows versions). – Bakuriu Sep 24 '14 at 15:13
  • Actually I wasn't aware, I thought it was only backslash! – kbau Sep 24 '14 at 15:15
  • Adding more RAM to your system will push out the boundary of where sluggishness starts. – Mico Sep 24 '14 at 18:00

5 Answers5

8

As Manuel suggested in his comment, split your document into several files and your experienced sluggishness will most likely go away. Just have one "thesis.tex" file from which you call all your chapters.

\documentclass{article}
\begin{document}
 \input{chapterOne.tex}
 \input{chapterTwo.tex}
\end{document}

If you don't find that solution satisfactory, I would suggest moving your project to one of the cloud services you listed. I would still suggest you split up your chapters though as it will be much easier for you to make changes to the document.

Personally I use ShareLatex for my projects. Biggest one is on 167 pages and experiences no big sluggishness. Probably because I split the text into smaller files.

qwelyt
  • 208
  • That does sound like a very reasonable (and quite obvious) solution. Any frustration when compiling the big document together (i.e. including all chapters)? – kbau Sep 24 '14 at 10:22
  • @kbau As long as the compiler over at ShareLatex is not too busy (it is a shared resource after all), the compile time is usually less than 2min. Worth noting is that I use a free account which does not put me ahead of the compile-queue. – qwelyt Sep 24 '14 at 10:26
  • Cool. The cloud does sound tempting. And I'd most likely be using a free account as well. – kbau Sep 24 '14 at 10:28
  • 3
    using \include rather than \input gives you the advantage of being able to use \includeonly when you are happy with chapters one and two, and only want to compile chapter three. – barbara beeton Sep 24 '14 at 13:44
  • +1 My Masther's Thesis 180+ pages and I used gedit with the Latex plugin directly. As @Manuel and @Chewtoy suggested, split your document in several parts and you will find it easier to deal with. – Adri C.S. Sep 24 '14 at 14:49
2

I've been using Texshop on a mac for several years now and for more than 100 pages documents and it works very well. Texshop is very swift at the moments you have to compile text and bibliography and I use it for writing my thesis (more than 300 pages). But it's on mac. On Windows, you can give a try to Scrivener. Scrivener is a powerful text editor which allows you to organize your large document on the fly and export it in Latex format or just by pasting latex code into your Scrivener document. I use it too along with Texshop.

domi
  • 1,473
2
  1. Split your document into smaller parts. The subfiles package is really nice for this, as it allows you to share a preamble across the parts and typeset each part individually.

  2. A general-purpose programmer-targeted text editor like Vim, Emacs or Sublime Text can handle many many lines of text/code without problems. Only downside is, that it takes some effort to set the editor up with your latex workflow.

Argo
  • 1,724
2

Of course, to make things easier it is always good to split your document into several smaller files. But then the editor should still be able to climb through all of them to find out labels&ref etc.

I'm using emacs (under linux) for this (documents/books/lecture notes with > 600pages) and many many files. Emacs opens them all and finds crossref etc really fast: in the first round it reads all the files to get them, this takes a few seconds, but then all the labels and refs are stored and can be accessed really easily. Also index generation is really easy over the individual file borders...

1

TeXworks on the Mac turned out to be the one I use the most for my publications of over 1500-2500 pages.

That being said, my TeX code is created by a script that places the actual text in the proper place with the appropriate formatting as well. Essentially storing it as a TXT file with a .tex suffix. So I don't do constant editing in TeXworks.

The only issue I've got with it so far is that when you have the file open in TeXworks and you change something in it elsewhere like composing a new file with the external script, TeXworks takes a bit of time to read it in and that does frustrate me a bit. However if the file is closed in TeXworks before editing it with the external script and then opened afterwards, it opens quickly.

Editing itself happens realtime though when using TeXworks.

McGafter
  • 2,266
  • 1
    :O 2000 page document. That does give me faith for using a regular editor like TeXworks, TeXstudio or TeXmaker. – kbau Sep 24 '14 at 10:34