152
edits
No edit summary |
|||
(16 intermediate revisions by the same user not shown) | |||
I (Josh) wrote, formatted, and edited my thesis using [http://www.tug.org/texworks/ TeXworks], a free, open-source TeX editing software. (You can download it and all necessary associated files using that link.) The formatting used in these documents was accepted by the [http://grad.wisc.edu/currentstudents/degree/ Graduate School] in August, 2014, but you should probably check if there are any changes in the requirements.
== Directions for Downloading Files and Compiling Josh's Thesis ==
I've uploaded .zip files with all of the files you need to compile my thesis. Unfortunately, because of the size limit on uploading files, I had to split it up, so it's a bit more complicated than I would have liked.
First, download the .tex documents:
[[File:TeX_files.zip]]
Unzip the folder, and save them all in a folder, let's call it "Thesis" (but it doesn't really matter). All of the files must eventually be put in this same folder.
Next, download the reference files:
[[File:Ref1.zip]]
[[File:Ref2.zip]]
[[File:Ref3.zip]]
[[File:Ref4.zip]]
Unzip this files, and put them all in one folder called "References" (this name DOES matter). Put "References" inside "Thesis" with the .tex files.
Finally, download the figure files:
[[File:Figs1.zip]]
[[File:Figs2.zip]]
Unzip these files, and save them in a new folder called "Josh" (this name DOES matter). Then, put "Josh" inside another folder called "figures"(this name DOES matter). (I know. I'm sorry that it's complicated. I would have had to change my code to make this easier.) Put "figures" in "Thesis".
== Overview of Files ==
===Basic Commands===
If you're not familiar with LaTeX, as I wasn't, I would suggest just looking (in my .tex files or others) for examples of things similar to what you want to do and then modifying that code. I found many coding answers just using Google or searching [http://tex.stackexchange.com/ Stack Exchange]. Stack Exchange also has the answer to many other [http://scifi.stackexchange.com/questions/66661/exactly-how-secret-was-the-reveal-in-the-empire-strikes-back pressing] [http://scifi.stackexchange.com/questions/47085/who-made-the-decision-for-gandalfs-promotion-from-grey-to-white questions].
That said, here are a few basic commands and other small tips that I found useful.
* To cite a reference, use the command:
\cite{Citation Key}
where "Citation Key" is entered in Mendeley Reference manager. Mendeley's default citation key is "[AuthorLastName][YearofPublication]".
* If you want text in italics, use:
\textit{your text here}
or for bold, use:
\textbf{your text here}.
* If you want to label something, use the command:
\label{prefix:your_label}
where "your_label" is whatever you want to use as your label. "prefix" indicates what you are labeling. Some common prefixes I used are:
ch: for chapters
sec: for sections
subsec: for subsections
fig: for figures
table: for tables
eq: for equations
When you want to refer to these things later, just use \ref{prefix:your_label}. This will number everything automatically, and it will update if you change the order of things.
* For chapters, sections, and subsections, use the commands
\chapter{Your Chapter Name}
\section{Your Section Name}
\subsection{Your Subsection Name}
This will do the formatting for you.
* If you want to enter an equation or symbols inline, you must surround them with dollar signs. That allows you to enter math code. As an example, you could enter $\omega$ like this to have the variable appear. If you want to enter standalone equations, see the next bullet.
* To enter standalone equations, start them with \begin{equation}, enter the equation, and end it with \end{equation}.
If you want it to be more than one line, do the same thing, but use "eqnarray" instead of "equation".
The command \\ brings you to the next line of the equation in an equation array.
The lines in equations and equation arrays are numbered automatically. Use \nonumber if you don't want a line numbered.
* You can enter fractions (\frac{numerator}{denominator}) and Greek letters (\alpha,\Alpha,\beta,...) and symbols (\approx, \times,...) directly into TeXworks. (Stack Exchange and a lot of sites have lists of symbols.) However, if you have really gross equations, I'd recommend entering them in the more user-friendly interface of [http://www.lyx.org/ Lyx] LaTeX editor. In Lyx, you can then go to View -> View Source to get the LaTeX source code, which you can copy and paste into TeXworks.
* If you want multiple lines to line up in an equation array, you can use the tab command. For example, if I want the equal signs to line up, you could do
\begin{eqnarray}
x&=&y^2 \nonumber \\
23x&=&z-903
\label{eq:example}
\end{eqnarray}
(The first equation wouldn't be numbered here.)
* If you want to enter normal text in math mode (either between $ or in an equation or equation array), you can use \text{your text here}.
*If you want to add vertical or horizontal space in your document, you can use \vspace{1in} or \hspace{1in}. This gives you 1 inch of vertical space, but you can enter in any value, in inches, cm, or a lot of other units. You can also just use ~ to insert extra spaces.
* For figures and tables, I would suggest just modifying existing code.
Here's an example figure code (I put the bullets in so that the wiki wouldn't format this stuff.):
* \begin{figure}[h!]
* \centering
* \includegraphics[angle=0,width=3in]{figures/Josh/AOM.jpg}
* \caption{\textit{Acousto-Optic Modulator} An acousto-optic modulator uses pressure waves to create a time-varying index of refraction in a crystalline structure. This time-varying index can be used to modulate the frequency of laser light. The frequency shift is the result of an exchange of momentum between phonons in the crystal and incident photons.}
* \label{fig:AOM}
* \end{figure}
The only things I really ever changed was the width, the file name, the caption, and the label name. The [h!] has something to do with formatting, but I never messed with that.
Here's an example of a table (I put the bullets in so that the wiki wouldn't format this stuff.):
* \begin{table}[h!]
* \begin{center}
* \begin{tabular}{ |c || c | c | c | c |}
* \hline
* Molecule & $\omega_e$ & $\omega_ex_e$ & $B_e$ & $\alpha_e$ \\ \hline \hline
* \textbf{D$_2$} & 3118.4 & 64.09 & 30.429 & 1.0492 \\ \hline
* \textbf{H$_2$} & 4395.2 & 117.99 & 60.800 & 2.993 \\ \hline
* \end{tabular}
* \end{center}
* \caption{\textit{Deuterium and Hydrogen Constants} This table presents the values of the constants needed to calculate the energies of the molecular states as detailed above. All values are for the ground electronic state, and units for all entries are wavenumbers (cm$^{-1}$). All values are from Table 39 of the appendix of Herzberg \cite{herzberg}.}
* \label{table:appendix}
* \end{table}
Here you can change the alignment of the text in each column next to {tablular}. Each column is represented by a letter - r, l, and c for right, left, or centered text.
You can also change the number of lines between columns (by adding or subtracting | around the r, l, and cs).
In the actual data, & separate columns.
The \hline command puts horizontal lines in the table.
===Other Thoughts===
* To get (red underline) spell-checking in TeXworks, go to Edit -> Spelling -> en_US.
* With some changes, especially with reference and figure numbering, you may have to run / typeset thesis.tex ''twice'' before you see the changes take place in the PDF.
* I think it screws it up if you use spaces in your file names, so use underscores (_) instead.
* Make sure all of your files are in one folder. (Sub-folders are ok.)
* I made my thesis by taking Tyler's, and then gradually editing it into mine. That worked pretty well, and I'd recommend trying it.
|