Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I really like the formatting of tables offered by the AASTex package. AASTex Generator

But it is not quite what I need in terms of flexibility.

Here is some code for a table I am making. I don't like the way the Table 1 includes a period and is not centered on the first page. I do like the way it looks overall, though. I've tried other formatting and making the table from scratch. I've Googled trying to figure out how to center the first caption and how to get rid of the period - each "solution" leads to another problem.

I have a hunch that the best solution will be to create my own table formatting from scratch, but I can't seem to get one to look as nice as this one (at least in terms of fonts and formatting).

Here is sample output:

enter image description here

I appreciate the advice.

%% LaTeX deluxetable generator for the AASTeX package.
%% Written by Greg Schwarz (5/1/2001).

%% Table generated: Sat Jun 23 16:44:36 2012

%% Remove the two lines and the last line if you want
%% want to incorporate this table into another LaTex document.
\documentclass{aastex}
\usepackage{underscore}
%%\usepackage[labelformat=empty]{caption}
\pagestyle{empty}

\begin{document}
%% The values (usually only l,r and c) in the last part of
%% \begin{deluxetable}{} command tell LaTeX how many columns
%% there are and how to align them.

\begin{deluxetable}{rcrcc}

%% Keep a portrait orientation

%% Over-ride the default font size
%% Use 12pt
%%\tabletypesize{\postscriptsize}
\tablewidth{290pt}
\tabletypesize{\scriptsize}
%%\centering
%% Use \tablewidth{?pt} to over-ride the default table width.
%% If you are unhappy with the default look at the end of the
%% *.log file to see what the default was set at before adjusting
%% this value.

%% This is the title of the table.
%%\tablecaption{Table 2}


%% This command over-rides LaTeX's natural table count
%% and replaces it with this number.  LaTeX will increment 
%% all other tables after this table based on this number
\tablenum{2}

%% The \tablehead gives provides the column headers.  It
%% is currently set up so that the column labels are on the
%% top line and the units surrounded by ()s are in the 
%% bottom line.  You may add more header information by writing
%% another line between these lines. For each column that requries
%% extra information be sure to include a \colhead{text} command
%% and remember to end any extra lines with \\ and include the 
%% correct number of &s.
\tablehead{\colhead{Probe} & \colhead{Symbol} & \colhead{Probe} & \colhead{Symbol} & \colhead{Classification} \\ 
\colhead{} & \colhead{} & \colhead{} & \colhead{}  & \colhead{} } 

%% All data must appear between the \startdata and \enddata commands
\startdata

225292_at & COL27A1 & 221605_s_at & PIPOX & 99.0 \\
226421_at & AMMECR1 & 230076_at & PITPNM3 & 99.0 \\
232149_s_at & NSMAF & 226576_at & ARHGAP26 & 99.0 \\
228904_at & HOXB3 & 221605_s_at & PIPOX & 99.0 \\
1568957_x_at & SRGAP2P1 & 206446_s_at & NA & 99.0 \\
203737_s_at & PPRC1 & 206446_s_at & NA & 99.0 \\
205731_s_at & NCOA2 & 221605_s_at & PIPOX & 99.0 \\
225263_at & HS6ST1 & 239132_at & NOS1 & 99.0 \\
239466_at & LOC344595 & 210247_at & SYN2 & 99.0 \\
205150_s_at & TRIL & 221605_s_at & PIPOX & 99.0 \\
227083_at & B3GALTL & 239132_at & NOS1 & 99.0 \\
1554500_a_at & RGS7 & 231916_at & NOS1 & 99.0 \\
1554500_a_at & RGS7 & 239132_at & NOS1 & 99.0 \\
225292_at & COL27A1 & 221605_s_at & PIPOX & 99.0 \\
226421_at & AMMECR1 & 230076_at & PITPNM3 & 99.0 \\
232149_s_at & NSMAF & 226576_at & ARHGAP26 & 99.0 \\
228904_at & HOXB3 & 221605_s_at & PIPOX & 99.0 \\
1568957_x_at & SRGAP2P1 & 206446_s_at & NA & 99.0 \\
203737_s_at & PPRC1 & 206446_s_at & NA & 99.0 \\
205731_s_at & NCOA2 & 221605_s_at & PIPOX & 99.0 \\
225263_at & HS6ST1 & 239132_at & NOS1 & 99.0 \\
239466_at & LOC344595 & 210247_at & SYN2 & 99.0 \\
205150_s_at & TRIL & 221605_s_at & PIPOX & 99.0 \\
227083_at & B3GALTL & 239132_at & NOS1 & 99.0 \\
1554500_a_at & RGS7 & 231916_at & NOS1 & 99.0 \\
1554500_a_at & RGS7 & 239132_at & NOS1 & 99.0 \\
225292_at & COL27A1 & 221605_s_at & PIPOX & 99.0 \\
226421_at & AMMECR1 & 230076_at & PITPNM3 & 99.0 \\
232149_s_at & NSMAF & 226576_at & ARHGAP26 & 99.0 \\
228904_at & HOXB3 & 221605_s_at & PIPOX & 99.0 \\
1568957_x_at & SRGAP2P1 & 206446_s_at & NA & 99.0 \\
203737_s_at & PPRC1 & 206446_s_at & NA & 99.0 \\
205731_s_at & NCOA2 & 221605_s_at & PIPOX & 99.0 \\
225263_at & HS6ST1 & 239132_at & NOS1 & 99.0 \\
239466_at & LOC344595 & 210247_at & SYN2 & 99.0 \\
205150_s_at & TRIL & 221605_s_at & PIPOX & 99.0 \\
227083_at & B3GALTL & 239132_at & NOS1 & 99.0 \\
1554500_a_at & RGS7 & 231916_at & NOS1 & 99.0 \\
1554500_a_at & RGS7 & 239132_at & NOS1 & 99.0 \\
\enddata
%% Include any \tablenotetext{key}{text}, \tablerefs{ref list},
%% or \tablecomments{text} between the \enddata and 
%% \end{deluxetable} commands

%% No \tablecomments indicated

%% No \tablerefs indicated

\end{deluxetable}
\end{document}
share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

As I wrote on LaTeX-Community.org as answer to your cross-post Scientific table with AASTex - is there a better option:

You could modify the macro \@make@caption@text. Originally, it is defined as

\long\def\@make@caption@text#1#2{%
 \center\rmfamily#1.\quad#2\endcenter
}%

To redefine it, put this into your preamble:

\makeatletter
\renewcommand{\@make@caption@text}[2]{%
  \begin{center}
    \makebox[\textwidth]{\rmfamily#1\quad#2}
  \end{center}
}%
\makeatother

Here, I removed the period and put the caption into a box of the width of the text, to get it actually centered. You could also use \columnwidth or \linewidth, or modify it in any way if desired. Btw. the removing the center environment would cause an error, so I let it here.

share|improve this answer
    
Yes. This worked great. Sorry about the cross-post. I tried to post here first, and I got the warning about not being able to post images - but misread it as not being able to post at all. So, I posted over there, and then realized I could post here without the pictures. But thanks again - this did the trick, and I'm glad to have a good place to ask questions like this if I can't find the solution through search. –  user16171 Jul 2 '12 at 12:46
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.