LaTeX forum ⇒ Graphics, Figures & TablesAASTeX | Optimization for scientific Table Topic is solved

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

AASTeX | Optimization for scientific Table

Postby volcs0 » Mon Jul 02, 2012 5:51 am

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.
  1. %% LaTeX deluxetable generator for the AASTeX package.
  2. %% Written by Greg Schwarz (5/1/2001).
  3.  
  4. %% Table generated: Sat Jun 23 16:44:36 2012
  5.  
  6. %% Remove the two lines and the last line if you want
  7. %% want to incorporate this table into another LaTex document.
  8. \documentclass{aastex}
  9. \usepackage{underscore}
  10. %%\usepackage[labelformat=empty]{caption}
  11. \pagestyle{empty}
  12.  
  13. \begin{document}
  14. %% The values (usually only l,r and c) in the last part of
  15. %% \begin{deluxetable}{} command tell LaTeX how many columns
  16. %% there are and how to align them.
  17.  
  18. \begin{deluxetable}{rcrcc}
  19.  
  20. %% Keep a portrait orientation
  21.  
  22. %% Over-ride the default font size
  23. %% Use 12pt
  24. %%\tabletypesize{\postscriptsize}
  25. \tablewidth{290pt}
  26. \tabletypesize{\scriptsize}
  27. %%\centering
  28. %% Use \tablewidth{?pt} to over-ride the default table width.
  29. %% If you are unhappy with the default look at the end of the
  30. %% *.log file to see what the default was set at before adjusting
  31. %% this value.
  32.  
  33. %% This is the title of the table.
  34. %%\tablecaption{Table 2}
  35.  
  36.  
  37. %% This command over-rides LaTeX's natural table count
  38. %% and replaces it with this number. LaTeX will increment
  39. %% all other tables after this table based on this number
  40. \tablenum{2}
  41.  
  42. %% The \tablehead gives provides the column headers. It
  43. %% is currently set up so that the column labels are on the
  44. %% top line and the units surrounded by ()s are in the
  45. %% bottom line. You may add more header information by writing
  46. %% another line between these lines. For each column that requries
  47. %% extra information be sure to include a \colhead{text} command
  48. %% and remember to end any extra lines with \\ and include the
  49. %% correct number of &s.
  50. \tablehead{\colhead{Probe} & \colhead{Symbol} & \colhead{Probe} & \colhead{Symbol} & \colhead{Classification} \\
  51. \colhead{} & \colhead{} & \colhead{} & \colhead{} & \colhead{} }
  52.  
  53. %% All data must appear between the \startdata and \enddata commands
  54. \startdata
  55.  
  56. 225292_at & COL27A1 & 221605_s_at & PIPOX & 99.0 \\
  57. 226421_at & AMMECR1 & 230076_at & PITPNM3 & 99.0 \\
  58. 232149_s_at & NSMAF & 226576_at & ARHGAP26 & 99.0 \\
  59. 228904_at & HOXB3 & 221605_s_at & PIPOX & 99.0 \\
  60. 1568957_x_at & SRGAP2P1 & 206446_s_at & NA & 99.0 \\
  61. 203737_s_at & PPRC1 & 206446_s_at & NA & 99.0 \\
  62. 205731_s_at & NCOA2 & 221605_s_at & PIPOX & 99.0 \\
  63. 225263_at & HS6ST1 & 239132_at & NOS1 & 99.0 \\
  64. 239466_at & LOC344595 & 210247_at & SYN2 & 99.0 \\
  65. 205150_s_at & TRIL & 221605_s_at & PIPOX & 99.0 \\
  66. 227083_at & B3GALTL & 239132_at & NOS1 & 99.0 \\
  67. 1554500_a_at & RGS7 & 231916_at & NOS1 & 99.0 \\
  68. 1554500_a_at & RGS7 & 239132_at & NOS1 & 99.0 \\
  69. 225292_at & COL27A1 & 221605_s_at & PIPOX & 99.0 \\
  70. 226421_at & AMMECR1 & 230076_at & PITPNM3 & 99.0 \\
  71. 232149_s_at & NSMAF & 226576_at & ARHGAP26 & 99.0 \\
  72. 228904_at & HOXB3 & 221605_s_at & PIPOX & 99.0 \\
  73. 1568957_x_at & SRGAP2P1 & 206446_s_at & NA & 99.0 \\
  74. 203737_s_at & PPRC1 & 206446_s_at & NA & 99.0 \\
  75. 205731_s_at & NCOA2 & 221605_s_at & PIPOX & 99.0 \\
  76. 225263_at & HS6ST1 & 239132_at & NOS1 & 99.0 \\
  77. 239466_at & LOC344595 & 210247_at & SYN2 & 99.0 \\
  78. 205150_s_at & TRIL & 221605_s_at & PIPOX & 99.0 \\
  79. 227083_at & B3GALTL & 239132_at & NOS1 & 99.0 \\
  80. 1554500_a_at & RGS7 & 231916_at & NOS1 & 99.0 \\
  81. 1554500_a_at & RGS7 & 239132_at & NOS1 & 99.0 \\
  82. 225292_at & COL27A1 & 221605_s_at & PIPOX & 99.0 \\
  83. 226421_at & AMMECR1 & 230076_at & PITPNM3 & 99.0 \\
  84. 232149_s_at & NSMAF & 226576_at & ARHGAP26 & 99.0 \\
  85. 228904_at & HOXB3 & 221605_s_at & PIPOX & 99.0 \\
  86. 1568957_x_at & SRGAP2P1 & 206446_s_at & NA & 99.0 \\
  87. 203737_s_at & PPRC1 & 206446_s_at & NA & 99.0 \\
  88. 205731_s_at & NCOA2 & 221605_s_at & PIPOX & 99.0 \\
  89. 225263_at & HS6ST1 & 239132_at & NOS1 & 99.0 \\
  90. 239466_at & LOC344595 & 210247_at & SYN2 & 99.0 \\
  91. 205150_s_at & TRIL & 221605_s_at & PIPOX & 99.0 \\
  92. 227083_at & B3GALTL & 239132_at & NOS1 & 99.0 \\
  93. 1554500_a_at & RGS7 & 231916_at & NOS1 & 99.0 \\
  94. 1554500_a_at & RGS7 & 239132_at & NOS1 & 99.0 \\
  95. \enddata
  96. %% Include any \tablenotetext{key}{text}, \tablerefs{ref list},
  97. %% or \tablecomments{text} between the \enddata and
  98. %% \end{deluxetable} commands
  99.  
  100. %% No \tablecomments indicated
  101.  
  102. %% No \tablerefs indicated
  103.  
  104. \end{deluxetable}
  105. \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 1082 times

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

I appreciate the advice.
Last edited by localghost on Mon Jul 02, 2012 10:04 am, edited 1 time in total.
Reason: Preferably no external links (see Board Rules). Attachments go onto the forum server where possible.

Link:
BBcode:
HTML:
Hide post links
Show post links

User avatar
Stefan Kottwitz
Site Admin
Posts: 7804
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:

Postby Stefan Kottwitz » Mon Jul 02, 2012 8:14 am

Hi,

welcome to the board!

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

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


To redefine it, put this into your preamble:

  1. \makeatletter
  2. \renewcommand{\@make@caption@text}[2]{%
  3. \begin{center}
  4. \makebox[\textwidth]{\rmfamily#1\quad#2}
  5. \end{center}
  6. }%
  7. \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
Site admin

Link:
BBcode: Topic is solved[/url]" title="Click to select post's link in BBcode format" onclick="this.focus();this.select();" />
HTML: Topic is solved</a>" title="Click to select post's link in HTML format" onclick="this.focus();this.select();" />
Hide post links
Show post links

volcs0
Posts: 3
Joined: Mon Jul 02, 2012 5:48 am

Postby volcs0 » Mon Jul 02, 2012 8:26 am

Brilliant!

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

Link:
BBcode:
HTML:
Hide post links
Show post links


Return to “Graphics, Figures & Tables”

Who is online

Users browsing this forum: No registered users and 4 guests