Graphics, Figures & TablesAASTeX | Optimization for scientific Table

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
volcs0
Posts: 3
Joined: Mon Jul 02, 2012 5:48 am

AASTeX | Optimization for scientific Table

Post by volcs0 »

I really like the formatting of tables offered by the AASTex package.
http://authortools.aas.org/LATEX/make-latex.html

But it is not quite what I need in terms of flexibility. Here is some code for a table I am making.

Code: Select all

%% 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}
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:
AASTeX-table.png
AASTeX-table.png (108.75 KiB) Viewed 5366 times
AASTeX-table-continued.png
AASTeX-table-continued.png (37.68 KiB) Viewed 5366 times
I appreciate the advice.
Last edited by localghost on Mon Jul 02, 2012 10:04 am, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
Stefan Kottwitz
Site Admin
Posts: 10350
Joined: Mon Mar 10, 2008 9:44 pm

AASTeX | Optimization for scientific Table

Post by Stefan Kottwitz »

Hi,

welcome to the board!

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

Code: Select all

\long\def\@make@caption@text#1#2{%
 \center\rmfamily#1.\quad#2\endcenter
}%
To redefine it, put this into your preamble:

Code: Select all

\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. You could also use \columnwidth or \linewidth, if desired.

Stefan
LaTeX.org admin
volcs0
Posts: 3
Joined: Mon Jul 02, 2012 5:48 am

Re: AASTeX | Optimization for scientific Table

Post by volcs0 »

Brilliant!

Thanks so much. You saved me a lot of time.
Post Reply