Showing posts with label thesis. Show all posts
Showing posts with label thesis. Show all posts

Monday, July 16, 2012

Making Awesome Latex Tables

Yep, still disserating... thus all the posts are more about the process of writing than actual science research.  Here is a post about how to make awesome looking tables using latex and deluxetable.

I like using the deluxetable style in latex because the tables look nicer than normal latex tables, and you have more flexibility.  Below is an example of a cool table with come nice features that I made for my thesis:



Latex Code:

\begin{deluxetable}{cccccccc}
\tabletypesize{\footnotesize}
\tablecolumns{8} 
\tablewidth{0pt}
\tablecaption{ Cross-correlation Fit Details
\label{tab:lumresults1}}
\tablehead{
\colhead{QSO} \vspace{-0.2cm}& \colhead{$R$ Range} &  & & &  &\colhead{Separation} & \colhead{Result}\\ \vspace{-0.2cm}
& & \colhead{$\langle f \rangle$} & \colhead{$r_0$} &  \colhead{$\gamma$}& $W$ & & \\
\colhead{Division} & \colhead{(Mpc/h)} & \colhead{} & \colhead{} & \colhead{}&& \colhead{(\%)} & \colhead{Strength}} 
\startdata 
\vspace{-0.2cm} \nicefrac{1}{3} Bright &  & $4.24 \cdot 10^{-4}$ & 6.19 && 96.97 & &\\ \vspace{-0.2cm}
& [0.3,3] & & & 1.77 & &  96.7 & 1.9$\sigma$ \\ 
 \nicefrac{2}{3} Dim & & $4.26 \cdot 10^{-4}$ & 4.48 & & 52.77
\enddata
\vspace{-0.8cm}
\tablecomments{Luminosity dependent quasar clustering using a cross-correlation technique between CS82 galaxies ($M < 23.5$) and SDSS, BOSS, and 2SLAQ quasars \hbox{($0.5$)}}
\end{deluxetable}


Note that you need the file deluxetable.sty from here.

Tuesday, June 19, 2012

TeXShop and .ps or .eps Files

I am frantically writing my thesis right now, so most of my "research" has to do with struggling with LaTex at the moment.

I am using TeXShop on Mac OS X to LaTeX my thesis.  I've encountered the problem that TeXShop doesn't seem to like .ps or .eps files.   So it requires some finagling to get TeXShop to handle these files.  Here are some tricks I've found:

1) Convert the .(e)ps files to PDF:

In a terminal window write the following command
ps2pdf filetoconvert.ps
eps2pdf filetoconvert.eps

This will produce the following file: filetoconvert.pdf

If you want to do a whole slew of files in a directory you can use the following script:


for x in *.ps; do
echo $x;
ps2pdf $x ${x/%ps/pdf};
done

2) Use Conversion Packages in TeXShop:


\usepackage{epstopdf}
\usepackage{ps2pdf}
\usepackage{pslatex}