Featured Book

LaTeX Beginners Guide

Who is online

In total there are 7 users online :: 1 registered, 0 hidden and 6 guests (based on users active over the past 5 minutes)
Most users ever online was 1327 on Tue Nov 05, 2013 7:11 pm

Users browsing this forum: Google [Bot] and 6 guests

Partner Sites

TeXwelt - Fragen und Antworten goLaTeX
TeXblog
TeXnicCenter
TeXample

AASTeX | Optimization for scientific Table Topic is solved

Add tags Information and discussion about graphics, figures & tables in LaTeX documents.

AASTeX | Optimization for scientific Table

Postby volcs0 on Mon Jul 2nd, 2012

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  •  Open in writeLaTeX
%% 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 518 times

AASTeX-table-continued.png
AASTeX-table-continued.png (37.68 KiB) Viewed 518 times

I appreciate the advice.
Last edited by localghost on Mon Jul 2nd, 2012, edited 1 time in total.
Reason: Preferably no external links (see Board Rules). Attachments go onto the forum server where possible.
volcs0
 
Posts: 3
Joined: Mon Jul 2nd, 2012

Re: AASTeX | Optimization for scientific Table  Topic is solved

Postby Stefan_K on Mon Jul 2nd, 2012

Hi,

welcome to the board!

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

Code: Select all  •  Open in writeLaTeX
\long\def\@make@caption@text#1#2{%
 \center\rmfamily#1.\quad#2\endcenter
}%


To redefine it, put this into your preamble:

Code: Select all  •  Open in writeLaTeX
\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 Community Administrator
User avatar
Stefan_K
Site Admin
 
Posts: 6377
Joined: Mon Mar 10th, 2008
Location: Hamburg, Germany

Re: AASTeX | Optimization for scientific Table

Postby volcs0 on Mon Jul 2nd, 2012

Brilliant!

Thanks so much. You saved me a lot of time.
volcs0
 
Posts: 3
Joined: Mon Jul 2nd, 2012


Return to Graphics, Figures & Tables

Who is online

Users browsing this forum: Google [Bot] and 6 guests