152
edits
No edit summary |
|||
That said, here are a few basic commands and other small tips that I found useful.
* To cite a reference, use the command:
where "Citation Key" is entered in Mendeley Reference manager. Mendeley's default citation key is "[AuthorLastName][YearofPublication]".
* If you want text in italics, use:
\textbf{your text here}.
* If you want to label something, use the command:
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}
This will do the formatting for you.
\begin{equation, eqnarray}▼
* 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
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:
\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.
Here's an example of a table:
\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.
|