Monday 16 February 2015

How to write your thesis with $\LaTeX$

You want to write your thesis in $\LaTeX$. Great, you made a good decision. You have a lot more advantage than people who use Word as you don't need to bother about how the font or page needs to be tuned for every new section or page. Latex takes care of your design and formatting. Of course, you would have to dig deeper if you want to do design changes. But, if you are happy with the design of a particular thesis style, just download that particular template zip archive and get going. In this post, I will tell you how to setup Latex on your PC(for Linux and Mac users, procedure should be quite similar). You can get started with your thesis today.

  1. Install $\LaTeX$ and other software in your PC 
    1. Go to MikTeX website to download the latest release of MikTeX. This contains all the basic packages you would need to get going. Install it. Takes about 10-15 mins. 
    2. Go to TeXStudio website and download  preferably the best cross-platform $\LaTeX$ editor. Install this. Takes few minutes.
    3. Ensure you have a pdf viewer on your system. It could be anything : Adobe Reader, Foxit Reader or PDF xchange. 
    4. Get JabRef to make your reference bibliography(.bib) files. If you are already having a reference management system such as EndNote or Mendeley, you could probably export the library as a bib file. Takes few minutes.
    5. Download and install GIMP: Graphics software for manipulating images or saving them as eps format. Takes 5-10 minutes. 
    6. Check whether the TeXStudio works with a sample tex file. Use a template and check whether pdflatex command(F5 button) works.
  2. Now get the thesis template. Here is a sample thesis. What does it contain ? 
    1. thesis.tex: This is your thesis main file
    2. thesisstyle.cls: Style file for defining your thesis. In this template, I am just using report class. 
    3. acknowledgement.tex etc: Various files accompanying your thesis main contents
    4. chapter*.tex: Chapters of your thesis as separate texts
    5. appendix.tex: Appendix if you need one. Doesn't get numbered like chapters
    6. thesisbibstyle.bst: Bibliography style for your thesis
    7. thesislib.bib:Bibliography file containing all the citations needed for your thesis
    8. figure*.eps: Figures to be added to your thesis should be in eps/pdf format for maximum resolution. I prefer eps and can make these by saving them using graphics software such as gimp(it's free).
  3. Configure TeXStudio for your thesis :
    1. Specify thesis.tex as your master document. 
    2. Make chapters as separate tex files. Make new folders for each chapter to store images and figures specific to that chapter.
    3. Add and include more files as you go. If you are working on a specific chapter, then comment all others in thesis.tex for faster compilation. 
    4. You can print your thesis in draft mode to reduce the compilation time even further by placing figures as just whiteboxes.
  4. Organizational Tips 
    1. Use Dropbox for storing your thesis versions.
    2. Create folders for figures in different chapters.  
    3. Maintain whole thesis as a folder. Save these versions as different folders with dates to keep track of progress. 
    4. Once you are done with the writing completely, you can change your thesis class to suit your institution's demands. Before doing the hardwork, you may want to also google to find if such a template exists. That template will not be very different. 
  5.  Get ready and start writing !!
    1. First and foremost, read latex documentation. This is just to get you started but not enough to sustain your momentum to carve out your thesis.
    2. Use \chapter{chaptername} to start a new chapter. Start new sections(\section{sectionname}) and subsections(\section{sectionname}) and so on.
      1
      2
      3
      4
      \chapter{What I did}
      \section{Assumptions}
      \subsection{FirstAssumption}
      \section{Hypothesis}
      
    3. Equations
      1
      2
      3
      \begin{equation}
      x^{2} + y^{2} = a^{2}
      \end{equation}
    4. Figure 
      1
      2
      3
      4
      \begin{figure}
      \includegraphics[scale=1]{filename.eps}
      \caption{\label{fig1}This figure is good!}
      \end{figure}
    5. Table
       1
       2
       3
       4
       5
       6
       7
       8
       9
      10
      11
      12
      13
      \begin{table}
      \centering
      \hrule
      \begin{tabular}{ccc}
      Sno & Animal & FavoriteFood \\
      \hrule\\
      1 & Ant & Sugar \\ 
      2 & Elephant & Banana \\
      3 & Panda & Bamboo \\
      \hrule
      \caption{\label{table1}This table is about food}
      \end{tabular}
      \end{table}
And as you keep writing, you will keep learning based on what you would require. Happy TeXing. 

2 comments:

  1. It is very useful, brief and clear introduction to how to use Latex. Thank you Prashant.

    ReplyDelete