# Writing and Managing Thesis in LaTeX

I'm in the process of thesis writing. I'm LaTeX newbie and have its limited knowledge and experience. I'm thinking to use LaTeX or LyX for my thesis. Which one is better for thesis write up? If I go with LaTeX then how can I use it more efficiently. In case of LaTeX I'd like to have separate .tex file for each chapter and each chapter will have its own bibliography. Then how can I combine all chapters and other issue would of cross references. I have to my Univ. template for thesis write up. I'd highly appreciate if someone provide me general guidelines to manage and write a long document like thesis in LaTeX.

-
As a start, I would suggest reading: (1) LaTeX templates for writing a thesis and (2) Everyday LaTeX and workflow? – Werner Sep 26 '11 at 6:38
In addition to the given suggestions I also prefer to create an own directory for the images and subchapters. Including a chapter then looks like this: \include{./tex/example.tex} I find another hack quite useful: For labels I prepend a short indicator for the kind of label: \label{txt:foobar} is for a label in a paragraph where \label{img:foobar} refers to an image. This way, the labels won't collide so often. – 0x6d64 Sep 26 '11 at 7:33
For a thesis, you will also want version control – Seamus Sep 26 '11 at 14:13

The following code is derived from my template code (currently only in svn). My old template can be found on this site.

It shows how to organise chapters using include and includeonly. Also numbering of pages at the beginning, main part and appendix are set up. having a bib for each chapter can be set up using biblatex, which I have not tried yet.

...

\includeonly{
content/Title,
content/0-Abstract,
content/0-Introduction,
content/1-Theory,
content/2-Experiments,
content/3-Results,
content/4-Discussion,
}

\listfiles

\begin{document}

% required for hyperref (not displayed)
\pagenumbering{alph}\setcounter{page}{1}%
\pagestyle{empty}

% -- title page --
\include{content/Title}
\cleardoublepage

% -- abstract --
\include{content/0-Abstract}
\cleardoublepage

\frontmatter

%
\pdfbookmark[1]{\contentsname}{toc}
\tableofcontents

% --- Main Document --- --- --- --- --- --- ---
\mainmatter
%
\include{content/0-Introduction}
\include{content/1-Theory}
\include{content/2-Experiments}
\include{content/3-Results}
\include{content/4-Discussion}

% -- bibliography --
% (must be placed _before_ appendix)
\printbibliography[%
]

%% -- list of figures and tables --
\clearpage
\listoffigures
\listoftables

% --- Appendix --- --- --- --- --- --- ---
\appendix % switch to appendix mode
\include{content/Z-Appendix}

\end{document}

-
Thanks for nice guidelines. I wonder how to do cross references from one chapter to another and have to make different folder for each chapter. Thanks – MYaseen208 Sep 26 '11 at 14:15
I really like you template. I tried the latest version but it did not work for me. I believe I missed something. I'd highly appreciate if you let me know where can I download the zipped folder for the latest template. Thanks – MYaseen208 Sep 26 '11 at 18:52
references from one chapter to another requires nothing special and where your files are located does not matter either. About my template Version 3 from the website - what are your problems exactly? You can also send me a personal email. about the new version: you can extract the source using any svn client. There is no release yet. It does not mean that it is alpha software. It works, and I wrote my phd thesis with it. It is mostly unfinished regarding the documentation. General note: make sure you have the lastest miktex or texlive installed. – Matthias Pospiech Sep 26 '11 at 19:21
Thanks for your prompt positive reply. I got this error message File showexpl.sty' not found. – MYaseen208 Sep 26 '11 at 19:24
It is not required. Search for \usepackage{showexpl} and remove that line. But better would be to make a full install of miktex or texlive. – Matthias Pospiech Sep 26 '11 at 19:27

On the "Managing" side, I'd really recommend a version control system. git (and github) has treated me very well.

-
I'll just mention that, unlike Github, a free account on BitBucket has unlimited private repositories. BB uses Mercurial, which is also a distributed VCS, like Git. – Torbjørn T. Sep 26 '11 at 15:40
An addition to the above comment: BitBucket has for a little while provided Git repositories as well as Mercurial repos. – Torbjørn T. Nov 20 '11 at 15:04

You should check out Choosing Your Workflow Applications (also on GitHub) by Kieran Healy. It is targeted to social science grad students, but a lot of the information should be relevant.

Introduction for "Choosing Your Workflow Applications" :

-
Sorry, I had to delete your answer to the PhD guide question, because the text there is identical to this here. Both questions are linked, see the answer by Yiannis Lazarides on the other post, or the right navigation panel on both questions. I deleted the 0 votes answer and kept this one with 3 upvotes. – Stefan Kottwitz Jan 29 '12 at 10:10

I have recently started learning latex to write my thesis. I can recommened two great books for reference.

1) Latex for Beginner's by Stefan Kottwitz (This book is awesome and there is a section on handling large documents - having chapters in different files.)

http://www.amazon.co.uk/LaTeX-Beginner%2527s-Guide-Stefan-Kottwitz/dp/1847199860/ref=sr_1_1?ie=UTF8&qid=1317044296&sr=8-1

2)Latex Wikibook

http://en.wikibooks.org/wiki/LaTeX

A friend told me when starting:

a) Don't use a template. They are very tempting but you can do it all yourself and learn how latex works much better along the way. I tried to use some templates but they were more confusing than just starting from scratch with the book class.

b) Use biblatex and biber. You want a bibliography at the end of each section and biblatex can do it without any extra packages plus the documentation is good.

c)Running "texdoc " is your friend! (on windows to get package documentation)

As for the editor, I use texworks as it is simple and comes with TexLive 2011. Again, LyX was tempting.

Good luck!

-
My impression about templates: advanced latex users almost never use them. Most beginners would not even consider to use LaTeX without them. My template is not really fancy in the layout and not fast because it loads a lot packages, but you can do everything you ever wanted without the need to even think about the correct package for that task - it simply works. Also most self written templates make me cry when I see all those typical errors, wrong configs and wrong packages. – Matthias Pospiech Sep 26 '11 at 14:19
Use a template if your university has very detailed requirements on how a thesis must look (universities in the US tend to be much more picky about this). You may not have to use it in the beginning, though. However, it is true that the code quality in many university-provided templates is lacking -- I'm trying to make sure my university's template is as clean as possible. – Mike Renfro Sep 26 '11 at 15:33
I agree with Mike on this. The advice to use or not use templates depends a lot on the quality of the template that is available. There are many well-maintained thesis classes for US universities, so a blanket rule of "don't use a template" is too strong. This is especially true if the class/template for your university is (i) available on CTAN and (ii) updated regularly by a stable maintainer. If both of these conditions are met, using a template may be the best way to go. – Alan Munn Sep 26 '11 at 18:03
At my university in germany (hanover) there is no requirement on how a thesis must look. My template is very general and documented so that it can be modified. It is however not on ctan. But I consider moving the next version there. – Matthias Pospiech Sep 26 '11 at 19:24

I have come to like package todonotes` which helps a lot to remember all the small and big things you still have to to. LaTeX-savy reviewers can also use it.

-