Posted in LaTeX on June 1st, 2010 1 Comment »
Despite having multiple sections and chapters in my document, my figures were only numbered: Figure 1, Figure, 2, etc.
To change their naming to Figure 1.1, Figure 1.2, etc, I simply included the following code:
\usepackage{amsmath}
\numberwithin{figure}{section}
Posted in LaTeX on June 1st, 2010 1 Comment »
to have hyperlinks between references in your document and figures or sections, simply load:
\usepackage{hyperref}
once this package is loaded, you can also embed webpage hyperlinks:
\url{http//www.google.com}
Posted in LaTeX on April 19th, 2008 1 Comment »
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 2 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 34 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 4 Comments »
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.