I have a table which I want to shade certain cells of. I know this is simple to do using colortbl and xcolor, but the colortbl package conflicts with another package I am using (OTtablx). Is there any other way to shade table cells? Or, alternatively, is there a way to turn off the conflicting package just for this table and then turn it back on?
OTtablx (which "makes heavy use of PSTricks, which precludes direct use of pdfLATEX to generate PDFs", if that is relevant) makes tables easily in a special format particular to my discipline. I use these throughout this document and can't change them now. I don't care that I can't shade those special tables, I just have one regular table I want to put shading in. My current workaround is to make it in word, take a screenshot, convert to .eps in photoshop, and put it in with \includegraphics. Ugly, ugly, ugly.
Here is a MWE:
\documentclass[12pt,oneside]{book}
\usepackage[top=1.375in,left=1in,right=1in,bottom=1in,headheight=.25in,headsep=.2in]{geometry}
\usepackage{threeparttablex}
\usepackage{booktabs} % for much better looking tables
\usepackage{multirow, multicol}
%\usepackage{tipa} %included in OTtablx, don't need to load separately unless you need to use options
\usepackage [medium] {OTtablx} %must run with tex and dvi not pdftex
\newcommand{\0}{$\emptyset$} %null
\begin{document}
Here is a plain, unshaded table.
\begin{table}[h]
{\begin{threeparttable}\caption{Agreement paradigms}\label{table:comboagree}
\centering
\fontsize{10.5}{12}\selectfont
\begin{tabular}{ r l l@{}r lr@{\extracolsep{1em}}l@{}r l@{}r@{\extracolsep{1em}}l@{}r l@{}r }
\toprule
&&\multicolumn{4}{c}{\textbf{Indicative}}&\multicolumn{4}{c}{\textbf{Optative}}&\multicolumn{4}{c}{\textbf{Negative}}\\
\midrule
\multicolumn{14}{l}{{A. OBJECT AGREEMENT}}\\[0.5ex]
\textbf{Obj} & \textbf{Subj} &\multicolumn{2}{l}{\textbf{s}}&\multicolumn{2}{l}{\textbf{pl}}&\multicolumn{2}{l}{\textbf{s}}&\multicolumn{2}{l}{\textbf{pl}}&\multicolumn{2}{l}{\textbf{s}}&\multicolumn{2}{l}{\textbf{pl}}\\
\cmidrule{3-6}\cmidrule{7-10}\cmidrule{11-14}
1s\phantom{} & & na-&&kana-&\phantom{-i}& na-&-i&kana-&-i& na-&-ara&kana-&-ap\\
1pl & & kin-&&&& kin-&-i&&& kin-&-ap&&\\
2s\phantom{} & & i-&-ap&&& i-&-ap&&& \0-&-ap&&\\
2pl & & kii(k)-&-ap&&& kii(k)-&-ap&&& kii(k)-&-ap&&\\
[0.5ex]\midrule
\multicolumn{14}{l}{{B. SUBJECT AGREEMENT}}\\[0.5ex]
\textbf{Subj} & \textbf{Obj} &\multicolumn{2}{l}{\textbf{s}}&\multicolumn{2}{l}{\textbf{pl}}&\multicolumn{2}{l}{\textbf{s}}&\multicolumn{2}{l}{\textbf{pl}}&\multicolumn{2}{l}{\textbf{s}}&\multicolumn{2}{l}{\textbf{pl}}\\
\cmidrule{3-6}\cmidrule{7-10}\cmidrule{11-14}
&\textbf{2nd}& &&&&&&&&&&\\
1\phantom{} & & nu-&\phantom{-i}&n/a&& nu-&-i&n/a&& kin-&-ara&n/a&\\[0.5ex]
&\multicolumn{5}{l}{\textbf{3rd/intransitive}}& &&&& &&&\\
1s\phantom{} & & ni-&&&& kan-&-i&&& na-&-ara&&\\
2s\phantom{} & & i-&&&& \0-&-i&&& \0-&-ara&&\\
3s\phantom{} & & u-&&&& kam-&-i&&& \0-&-ara&\0-&-ap\\
1pl & & nu-&&&& nu-&-i&&& kin-&-ara&&\\
2pl & & ku-&&&& kii(k)-&-i&&& \0-&-ap&&\\
3pl & & kun-&&kin-&\phantom{-i}& kun-&-i&kin-&-i& \0-&-ap&kin-&-ap\\
\bottomrule
\end{tabular}
\begin{tablenotes}
\small
\item[a] Unless marked \textit{n/a}, when no entry is given in the plural column, the agreement affixes listed in the singular colum apply for both singular and plural.
\end{tablenotes}
\end{threeparttable}}
\end{table}
\normalsize
%And just for reference, here is the code for a table produced by OTtablx.
%
%\begin{OTtableau}{5}
% \OTsolids{3,4,5}\OTdashes{1,2}
% \OTtoprow [/avansa/] { {\sc Max-C}, {\sc *CC-Coda}, {\sc Dep}, {*V\#},{\sc Max-V}}
% \OTcandrow {avan} {*!,,,,*}
% \OTcandrow {avans} {,*!,,,*}
% \OTcandrow [\OThand] {avansa} {,,,*,}
%\end{OTtableau}
\end{document}
Here is a picture of what I want the table to look like (I don't know how to do the annotations, either, but shading is my top priority):
edited to add: Here are pictures of what it normally looks like, and what happens to the OTtablx when I load colortbl (or array) in the actual document. This does not occur in the MWE, and I have no idea why.
ps2eps
, and include that as a graphic. In this way, you easily get the same fonts etc. that you also use in the main document.OTtablx
conflicts withcolortbl
and maybe we can solve that problem.colortbl
instead ofOTtblx
. Add\pagestyle{empty}
to the preamble, and put everything from\begin{threeparttable}
to\end{threeparttable}
inside the document (and nothing else). Then, compile it as you are won't to do. Ctd. ...colortbl
with no problem.