I have a xtable generated in R/Sweave that I would like displayed in portrait mode in a pdf. The spaces in the spacedSeq should properly align the sequences.
How can I force this to be in a monospace font.
I can use XeteX if necessary but I don't know what fonts are available to me from my TeXlive installation on OS X.
a subset of the table below:
% latex table generated in R 2.13.0 by xtable 1.5-6 package
% Tue Nov 1 13:53:39 2011
\begin{table}[ht]
\begin{center}
\begin{tabular}{rlllrrrrrr}
\hline
& rname & spacedSeq & edits & RB494N & RB494T & RB495N & RB495T & RB498N & RB498T \\
\hline
1 & hsa-let-7a-1 & AGAGGTAGTAGGTTGTATAA & 6:T 25:G & 1 & 0 & 0 & 0 & 0 & 0 \\
2 & hsa-let-7a-1 & AGAGGTAGTAGGTTGTATAGT & 6:T & 7 & 5 & 21 & 4 & 5 & 2 \\
3 & hsa-let-7a-1 & AGAGGTAGTAGGTTGTATAGTT & 6:T & 14 & 16 & 113 & 20 & 30 & 4 \\
4 & hsa-let-7a-1 & AGAGGTAGTAGGTTGTATAGTTA & 6:T 28:T & 2 & 1 & 8 & 0 & 0 & 0 \\
5 & hsa-let-7a-1 & AGAGGTAGTAGGTTGTATAGTTG & 6:T 28:T & 1 & 0 & 1 & 1 & 1 & 0 \\
6 & hsa-let-7a-1 & AGAGGTAGTAGGTTGTATAGTTGT & 6:T 28:T & 1 & 0 & 0 & 0 & 0 & 0 \\
7 & hsa-let-7a-1 & AGATGTAGTAGGTTGTATAGT & 6:T 9:G & 1 & 0 & 2 & 0 & 0 & 0 \\
8 & hsa-let-7a-1 & AGGTAGTAGGTTGTATAGT & & 5 & 0 & 0 & 0 & 8 & 1 \\
9 & hsa-let-7a-1 & AGGTAGTAGGTTGTATAGTTT & & 1 & 0 & 0 & 0 & 0 & 0 \\
10 & hsa-let-7a-1 & AGGTAGTGGGTTGTATAGT & 15:A & 1 & 0 & 0 & 0 & 0 & 0 \\
\hline
\end{tabular}
\end{center}
\end{table}
Best Answer
This requires the array package:
Then you can use the
>{...}
syntax for adding declarations for one column; spaces not to be ignored are obtained by~
One has to override the
\ttfamily
declaration in the header, which can be done byor