Posted in LaTeX on April 19th, 2008 No Comments »
much thanks to ilana bromberg heintz for the following hint!
When you have a list environment, either itemize or enumerate, it automatically double spaces between the items. That’s annoying. To get rid of it, just add ‘mdwlist’ to the \usepackage list in your declarations, then use\begin{enumerate*} and \end{enumerate*} (or itemize*).
Single spaced!
Posted in LaTeX on June 18th, 2007 No Comments »
for my thesis proposal, i’ve tried to reduce the volume of space my bibliography takes up as much as possible. here are some of the strategies i’ve employed: use single-spacing, make the font small, and make the citations print in two-column style:
\begin{singlespace}
\begin{footnotesize}
\begin{twocolumn}
\bibliography{main}
\bibliographystyle{unsrtnat}
\end{twocolumn}
\end{footnotesize}
\end{singlespace}
Posted in LaTeX on May 25th, 2007 3 Comments »
to adjust the spacing between rows in a latex table, add square brackets and the size adjustment after the linebreak.
for instance, to compress rows by 1 inch:
entry1 & entry2 & entry3 \\[-1in]
Posted in LaTeX on May 17th, 2007 No Comments »
i wanted to give my thesis proposal abstract a listing in the table of contents, but i didn’t want to give it an explicit chapter number. to achieve this, i prefaced by abstract with:
\addcontentsline{toc}{chapter}{\protect\numberline{}Abstract}
\chapter*{Abstract}
my abstract.
Posted in LaTeX on October 3rd, 2006 No Comments »
latex makes everything beautiful. so, why not use it to make one of your most important documents — your resume — more attractive?
it’s easy. (assuming you’ve got some basic knowledge of latex or the moxie to acquire some.) i won’t teach any introductory latex here; that’s what google is for.
instead, i’ll provide […]
Posted in LaTeX, Mac OS X on July 18th, 2006 1 Comment »
to get latex and pdflatex running in mac os x, first download i-installer.
then, install the ‘tex’ package found in the i-installer.
then, compile a tex file into a pdf with the command:
>>pdflatex mytexfile.tex
Posted in LaTeX on May 16th, 2006 13 Comments »
to tile images in a figure, use the following code:
\begin{figure}[h]
\begin{center}$
\begin{array}{cc}
\includegraphics[width=2.5in]{image1.jpg} &
\includegraphics[width=2.5in]{image2.jpg}
\end{array}$
\end{center}
\caption{my caption}
\end{figure}
to place more than 2 images on a line, add extra ‘c’s to the {array} specification and follow each \includegraphics[]{} with an ampersand (&). to create a matrix of images, insert newlines using two slashes: for instance, to make a 2X2 matrix of […]
Posted in LaTeX, Matlab on March 31st, 2006 1 Comment »
manually writing out matlab matrices in latex is really tedious. here’s how to save yourself the time:
assume you have some matrix L
>> s = sym(L);
>> v = vpa(s,5); # assign numerical precision
>> latex(v)
matlab should now spit out the latex source code that you can directly copy into your .tex file.
Posted in LaTeX on March 30th, 2006 No Comments »
you might want to use monospaced strings in latex to reproduce things like filenames. (where monospace refers to fonts like courier, where every character takes up the same amount of line space.)
here’s an example of how to do it:
The matrix $C_{i,j}$ is calculated in the uploaded file
\texttt{loadComplex.m}.
Posted in LaTeX on March 29th, 2006 3 Comments »
to split a long, multiline formula over two lines, import the “amsmath” package and use the “split command” and double slashes.
for instance, to produce the above equation, use the following code:
\usepackage{amsmath}
…
\begin{split}
\arg\max_\Theta\left[\sum_zP(\mathcal{G}|\mathcal{D},\mathcal{S})
P(\mathcal{G}|\mathcal{S},\Theta_n)\log{P(\mathcal{D}|\mathcal{G},
\mathcal{S},\Theta)}\right. \\
+
\left.\sum_zP(\mathcal{G}|\mathcal{D},\mathcal{S})P(\mathcal{G}|
\mathcal{S},\Theta_n)\log{P(\mathcal{D}|\mathcal{G},\mathcal{S},\Theta)}\right]
\end{split}