Feed on
Posts
Comments

Archive for the 'LaTeX' Category

single-space lists in latex

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!

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}

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]

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.

produce a resume in latex

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 […]

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

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 […]

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.

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}.

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}

Next »

More blogs about http://desk.stinkpot.org:8080/tricks.