## 09 May 2014

### 574. Texmaker and texlive on windows xp

There are two ways of dealing with latex on windows -- either using native packages or via cygwin. Here's the  native approach, which I tested in a virtual machine with Windows XP SP2

1. Install texlive

Run the file. You'll now be taken through the installation of texlive. Note that the full installation is ca 3.7 Gb and it will take a few hours to download and install. On the other hand, space is cheap and most people (in academia) don't pay for bandwidth, so it's not a bad idea to do the full install.

Anyway, here are a few screenshots of the installation process:

 It's a good idea to change the mirror to speed up the download

 Uncheck TexWorks since we'll be installing TexMaker

 This step can take many hours

 Finally done.

2. Install texmaker

The same file will work on XP, Vista and 8 (and presumably 7, which is more or less a patched version of Vista) and it will work on both 32 and 64 bit systems.

Install texmaker.

3. Configure  texmaker
Start texmaker

Go to Options/Configure Texmaker.

Under Commands you can select to use an external pdf viewer. Note that you will need to make sure that the path is correct -- in my case it was pointing to adobe reader 11, whereas I had adobe reader 9 installed. Easy enough to change, but you need to do it manually. The embedded/internal pdf viewer works ok, but distorts the text and figures somewhat (everything got a bit squashed)
 Choose internal or external pdf viewer. Make sure the path is correct
Under Quick Build you can tick Latex+Bib(la)tex+Latex(x2)+dvips+ps2pdf+View pdf. NOTE: if you do this you won't be able to compile any file which hasn't got a \cite command and a mathing .bib file.

Alternatively, pick latex + dvips + ps2pdf + View pdf.

 Quick Build -- pick the one with bibtex in it
Under Editor you can disable code completion (which can get annoying at times):

You can now load a tex file and hit F1 to compile it:

Quick test example

0. Create a folder called e.g. testtex

Put it in the testtex folder.

2. Create the following anothertest.bib file in either texmaker or notepad:
@Article{2014:example,
AUTHOR = {Placeholder, A},
TITLE = {Comprehensive title},
YEAR = 2014,
JOURNAL = {J. Comp. Chem.},
VOLUME ={45},
PAGES = {100-101}
}

Put it in the testtex folder.

3. Create a new tex file in texmaker:

 Make sure to tick graphicx

 Basic tex file

4. Edit your tex file as shown below::
\documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}

\usepackage{url}
\title{This is a test}

\begin{document}

\section{The test}
This is a simple test which consists of inserting a figure and adding a reference via bibtex. You can download the logo from \url{http://vectorlogotypes.net/logo/68332_UCSD.htm}. Put the UCSD.eps file in the same directory as your .tex file.
\begin{figure}
\includegraphics{UCSD.eps}
\caption{UC San Diego logo.}
\label{fig:test}
\end{figure}

Here's a citation.\cite{2014:example}

\bibliography{anothertest}
\bibliographystyle{ChemEurJ}
\end{document}

5. Compile.
If you set up your F1 as shown above (i.e. with bibtex support), then all you need to do is hit F1. Otherwise, if you used the alternative setup, do F2 (latex), F11 (bibtex), F2 (latex), F11 (bibtex), F1 (compile and view).