I am using the following code to generate a table.  \documentclass[acmsmall]{acmart} \begin{document} \begin{table}[!t] \renewcommand{\arraystretch}{1.3} \caption{Some text} \centering \begin{tabular}{|p{8.3cm}|p{1.7cm}|p{1.7cm}|} \hline \textbf{Some text} &amp; \textbf{Some text} &amp; \textbf{Some text} \\ \hline  \textbf{Some text:} \begin{itemize} \item Some text \item Some text \item Some text \end{itemize} &amp;  43\%{$\newline$} \checkmark{$\newline$} -{$\newline$} -{$\newline$} &amp;  57\%{$\newline$} -{$\newline$} \checkmark{$\newline$} \checkmark{$\newline$} \\ \hline \textbf{Some text} \begin{itemize} \item Some text \item Some text \item Some text \item Some text \end{itemize} &amp; 25\%{$\newline$} \checkmark{$\newline$} -{$\newline$} -{$\newline$} -{$\newline$} &amp; 75\%{$\newline$} -{$\newline$} \checkmark{$\newline$} \checkmark{$\newline$} \checkmark{$\newline$} \\ \hline \textbf{Some text:} \begin{itemize} \item Some text \item Some text \end{itemize} &amp; 0\%{$\newline$} -{$\newline$} -{$\newline$} &amp; 100\%{$\newline$} \checkmark{$\newline$} \checkmark{$\newline$} \\ \hline \end{tabular} \label{table1} \end{table} \end{document}   However, as shown in the figure below there are empty spaces (highlighted in yellow). I am just wondering if there is a way to remove those extra lines from the table?   I am happy to provide any other details if needed :)
123813
I have a macro that creates itemize environment in it. The issue is that I have extra space after the itemize environment when used in longtable.  How to remove the space?  \documentclass{memoir} \usepackage{enumitem} \usepackage{longtable} \usepackage{booktabs}  \newcommand{\fuda}[2]{% Functions:% \begin{itemize}[nosep] #1% \end{itemize} Data:% \begin{itemize}[nosep] #2% \end{itemize} } \begin{document} \begin{longtable}{p{0.3\textwidth}|p{0.7\textwidth}} \caption[List of components]{List of functions and data allocated to each component} \label{d_plan} \\ \toprule \textbf{Components} &amp; \textbf{Functions and Data} \\\midrule \textbf{Registration} &amp; \fuda{ \item Register capabilities of the device \item Unregister capabilities of the device \item Register context representation  }{ \item  Interface List  \item Capability List \item  Protocol List \item Representation List} \\\bottomrule \end{longtable} \end{document}     ADDED  The solution that uses -\baselineskip: works with article class, but not with memoir class.
81303
I have a code that prints a table with 2 rows. I want to keep format of it and change 2 rows into 3.   \documentclass[conference]{IEEEtran}  \usepackage{pgfplots} \usepackage{siunitx} \usepackage{multirow} \begin{document}  \begin{table}[h] \caption{Family data set results} \label{tbl::Fam} \centering \begin{tabular}{|l|l|c|c|c!{\vrule width 2pt}l|l|c|c|c|} %\noalign{\hrule height 2pt} \hline \textbf{Column}&amp;\textbf{Algorithm}&amp;\textbf{min}&amp;\textbf{max}&amp;\textbf{std}l&amp;\textbf{Column}&amp;\textbf{Algorithm}&amp;\textbf{min}&amp;\textbf{max}&amp;\textbf{std}\\\hline \multirow{2}{*}{age}&amp;Original&amp;9&amp;2.8&amp;100&amp;\multirow{2}{*}{employer\_type}&amp;Original&amp;13&amp;2&amp;10\\ \cline{2-5} \cline{7-10}&amp;PrivBayes&amp;2&amp;95&amp;96&amp;&amp;PrivBayes&amp;2&amp;100&amp;100\\\hline \multirow{2}{*}{education\_level}&amp;Original&amp;7&amp;2&amp;98&amp;\multirow{2}{*}{marital\_status}&amp;Original&amp;10&amp;2&amp;100\\ \cline{2-5} \cline{7-10}&amp;PrivBayes&amp;2&amp;6&amp;96&amp;&amp;PrivBayes&amp;2&amp;6&amp;100\\\hline \hline %\noalign{\hrule height 2pt} \end{tabular} \end{table}  \end{document}   In this picture, I have 2 algorithms {Original, PrivBayes}. I want to change 2 algorithms into 3 algorithms with keeping the format of table. Can you please help me to do it?
62360
I used some of the solution proposed in this post:    and my code is as follows:  \documentclass{standalone} \begin{document}  \begin{tabular}{c*{11}{@{\,}c}}       2&amp;:&amp;7&amp;=&amp;0&amp;,&amp;$\overline{2}$&amp;$\overline{8}$&amp;$\overline{5}$&amp;$\overline{7}$&amp; $\overline{1}$&amp;$\overline{4}$       \\       {\color{red} 2} &amp;{\color{red} 0 } &amp; &amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp; \\       1 &amp; 4 &amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;  \\  \cline{1-2}        &amp; 6&amp; 0 &amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;  \\        &amp; 5 &amp; 6 &amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;  \\   \cline{2-3}        &amp;  &amp; 4 &amp; 0 &amp;&amp;&amp;&amp;&amp;&amp;&amp;  \\        &amp;  &amp; 3 &amp; 5 &amp;&amp;&amp;&amp;&amp;&amp;&amp;  \\  \cline{3-4}        &amp;  &amp;      &amp; 5 &amp; 0 &amp;&amp;&amp;&amp;&amp;&amp; \\        &amp;  &amp;      &amp; 4 &amp; 9 &amp;&amp;&amp;&amp;&amp;&amp;  \\  \cline{4-5}        &amp;  &amp;      &amp;   &amp; 1 &amp; 0 &amp;&amp;&amp;&amp;&amp; \\        &amp;  &amp;      &amp;   &amp;   &amp; 7 &amp;&amp;&amp;&amp;&amp; \\ \cline{5-6}        &amp;  &amp;      &amp;   &amp;   &amp; 3 &amp; 0 &amp;&amp;&amp;&amp; \\        &amp;  &amp;      &amp;   &amp;   &amp; 2 &amp; 8 &amp;&amp;&amp;&amp; \\  \cline{6-7}        &amp;  &amp;      &amp;   &amp;   &amp;   &amp; { \color{red} 2} &amp;{\color{red} 0} &amp;&amp;&amp;     \end{tabular} \end{document}   The goal is to show the repeating decimal part with overline over the repeating decimals. The code does that, but each decimal is overlined in isolation, but I want a continuous overline!  But that does seem to infer with the mechanics of tabular ...
66743
I would like to have a table that looks like the image below.  \documentclass{article} \begin{document}     \begin{table*}         \begin{tabular}{|l|l|l|l|l|l|l|} \hline              &amp;\multicolumn{3}{c|}{A} &amp;\multicolumn{3}{c|}{B} \\ \cline{2-7}            1 &amp; a &amp; b &amp; c &amp; d &amp; e &amp; f \\ \hline           2 &amp; g &amp; h &amp; i &amp; j &amp; k &amp; l \\ \hline          \end{tabular}     \end{table*} \end{document}   However, I cannot obtain the table with an entire empty row, like the cold cache, written in its center. Is there some way to do so?    I also want the caption below the table.
35335
I'm making a tabular and I'd like to automatically do a like break rather than going beyond the page.   This is my tabular code:  \begin{table}[h] \begin{tabular}{|l|l|l|} Use Case Navn:          &amp; \multicolumn{2}{l}{Opret Server} \\ Scenarie:               &amp; \multicolumn{2}{l}{At oprette en server med bestemte regler som tillader folk at spille sammen. More Text more text More Text} \\ \end{tabular} \end{table}   This is my preamble:  \documentclass[danish,a4paper,twoside,11pt]{report} \usepackage{babel} \usepackage[utf8x]{inputenc} \usepackage{natbib} \usepackage{graphicx} \usepackage{epstopdf} \usepackage{titling} \usepackage{color} \usepackage{xcolor} \usepackage{nag} \usepackage{tabularx}  \newcommand{\myparagraph}[1]{\paragraph{#1}\mbox{}\\}   This is how it looks right now:
28042
I really tried hard to do this on my own, but I keep failing ... Using multi-column and multi-row commands confused me. I know some of you might frown upon such a request but I really need help getting this table implemented .. So I'm sorry if I upset anyone.  My preamble has :   \documentclass[12pt,a4paper]{report} \usepackage[lmargin=3.81cm,tmargin=2.54cm,rmargin=2.54cm,bmargin=2.52cm]{geometry} \linespread{1.5}     Is there a way I can convert this from excel to LaTeX form ? I tried an add-in before but it didn't work for me. Also online generators cannot combine cells the way I want them (unless I didn't find a better table generator ? )
28788
The following code gives me an error:  \documentclass[12pt]{article} \usepackage[margin=2cm]{geometry} \usepackage [english]{babel} \usepackage{amsmath, amssymb} \usepackage{enumitem, array} \begin{document} {\begin{minipage}[t]{\textwidth} \begin{enumerate}[label=(\roman*)] {\setlength\itemindent{10pt}\item  \begin{equation*} \begin{array}{&gt;{\centering\arraybackslash}m{1.5cm}&gt;{\centering\arraybackslash}m{1.5cm}&gt;{\centering\arraybackslash}m{1.5cm}&gt;{\centering\arraybackslash}m{1.5cm}&gt;{\centering\arraybackslash}m{1.5cm}}  \hline x &amp; l_{[x]} &amp; d_{[x]} &amp; l_{x+1} &amp; \mathring{e}_{[x]} \\ \hline \end{array} \end{equation*}} \end{enumerate} \end{minipage}} \end{document}   Note: for various reasons, I have to keep minipage there. For some reason, this code gives me an error when it compiles. It gives the following output:     The errors either say there is a } missing or a $ missing. My eyes don't see such a thing!
35230
\documentclass{cta-author}  \newtheorem{theorem}{Theorem}{} \newtheorem{corollary}{Corollary}{} \newtheorem{remark}{Remark}{} \usepackage{blindtext} \usepackage{enumitem} \usepackage{array} \usepackage{mathrsfs} \usepackage{amsfonts} \usepackage{bm} \usepackage{tabularx} \usepackage{multirow} \usepackage{amsmath} \usepackage{graphicx} \usepackage{float} \usepackage{makecell} \usepackage{adjustbox} \usepackage{textcmds} \usepackage{lineno} \usepackage{rotating}  \begin{document}   \begin{table*}[t] \renewcommand{\arraystretch}{1} \caption{C at PCC} \label{Table1} \centering \begin{tabular}{c|c|c|c|c|c|c|c|c}  \hline \hline  Standards &amp;\multicolumn{2}{c}{IEEE 2014}&amp; \multicolumn{2}{|c}{IEEE 2018}&amp; \multicolumn{2}{|c}{IEC 27} &amp;\multicolumn{2}{|c}{EN61-2}\\ \cline{2-4}  \end{tabular} \end{table*}    \end{document}   I use this code to generate table but is showing an error as given below. While I give \hline instead of \cline{-} it is working properly. But I need to use that \cline.
12179
Is it possible to create a table like this one?    The usual structure of tables I use looks like this:  \begin{table}[H]     \begin{adjustbox}{width=\textwidth,center}     % \begin{adjustbox}{center}         \begin{tabular}{lll}             \hline             \multicolumn{1}{l}{\head{XXX}} &amp; \multicolumn{1}{l}{\head{XXX}} &amp; \multicolumn{1}{l}{\head{XXX}} \\             \hline             \ttfamily xxx &amp; \ttfamily xxx &amp; \ttfamily xxx \\             \hline         \end{tabular}     \end{adjustbox}     \vspace{ - 05 mm}     \caption{xxx}     \label{tab:xxx} \end{table}
19420
I have the following (Non-working) example.  \renewcommand*{\arraystretch}{1.8} \begin{longtable}{lcl}     \caption{Summary of proven determinants for falling}\\ \toprule     \label{tab:FallPredictionVariables}     \textbf{Author} &amp;\textbf{Subject count (M:F)} &amp; \textbf{Determinants}\\     \midrule      \noindent Author 1 &amp;     1780 (?) &amp;      \begin{itemize}%[label={--},noitemsep,leftmargin=*,topsep=0pt,partopsep=0pt]         \item Recent falls (last 2 months)         \item Agitation         \item Frequent toileting         \item Visual impairment     \end{itemize}\\      \noindent Author 2 &amp;     311 (?) &amp;     \begin{itemize}%[label={--},noitemsep,leftmargin=*,topsep=0pt,partopsep=0pt]         \item Posture sway         \item Two or more falls in previous year         \item Low hand grip strength         \item Depressive state of mind     \end{itemize}\\         \bottomrule  \end{longtable}   However, it works OK outside a longtable environment:  \renewcommand*{\arraystretch}{1.8} \begin{table} \centering     \caption{Summary of proven determinants for falling}      \label{tab:FallPredictionVariables}     \begin{tabular}{lcp{60mm}}     \toprule     \textbf{Author} &amp;\textbf{Subject count (M:F)} &amp; \textbf{Determinants}\\     \midrule      \noindent Author 1 &amp;     1780 (?) &amp;      \begin{itemize}[label={--},noitemsep,leftmargin=*,topsep=0pt,partopsep=0pt]         \item Recent falls (last 2 months)         \item Agitation         \item Frequent toileting         \item Visual impairment     \end{itemize}\\      \noindent Author 2 &amp;     311 (?) &amp;     \begin{itemize}[label={--},noitemsep,leftmargin=*,topsep=0pt,partopsep=0pt]         \item Posture sway         \item Two or more falls in previous year         \item Low hand grip strength         \item Depressive state of mind     \end{itemize}\\         \bottomrule          \end{tabular}  \end{table}   As you can see in the picture below, it does what I'm expecting (except there is some vertical space over the first item that I would like to remove, and the solutions posted in  only seem to work for tabularx environments).    I'm unable to make my code work inside longtable, and I really need it (the complete table is very long).  Any ideas for both things:   To be able to have itemize inside longtable environment Eliminate the extra space for the first item   PS: This is the preamble for both examples:  \documentclass[a4paper,twoside,11pt,openright]{report} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{longtable}   \usepackage[inline]{enumitem}    \usepackage{booktabs}  \begin{document} ... \end{document}
40040
I'm trying to create the following table. This is the code which I wrote.   \begin{table}[!htb] \centering \caption{"table1"} \begin{tabular}{|c|c|c|c|c|c|c|c|} System &amp; \multicolumn{2}{c}{Interaction} &amp; \multicolumn{2}{c}{Commit} &amp; Ver &amp; LOC &amp; terms \\\hline \multirow{3}{c}{System1} &amp; \multicolumn{2}{c}{3272 traces} &amp; \multicolumn{2}{c}{5093 revisions} &amp; \multirow{3}{c}{3.4} &amp; \multirow{3}{c}{1700} &amp; \multirow{3}{c}{2400} \\\hline &amp; File &amp; Method &amp; File &amp; Method &amp; &amp; &amp; \\\hline &amp; 12 &amp; 13 &amp; 14 &amp; 15 &amp; &amp; &amp; \\\hline  \end{tabular} \end{table}   and this the error that Latex shows:! Missing number, treated as zero.!
115509
Consider the following table example, the text in the second row is wrapped.  \documentclass[a4paper]{article}  \usepackage[english]{babel} \usepackage[utf8x]{inputenc} \usepackage{tabu} \usepackage{booktabs}  \usepackage{array} \setlength{\extrarowheight}{5pt}  \begin{document}    \begin{tabu} to \linewidth {X[.5,c] X[1,l] X[1,l] X[2,l]}     \toprule     \rowfont{\bfseries}     Row &amp; Head 1                   &amp; Head 2 &amp; Head 3 \\\hline     1.  &amp; short text               &amp; ? &amp; ? \\\hline     2.  &amp; long long long long text &amp; ? &amp; ? \\\hline     3.  &amp; short text               &amp; ? &amp; ? \\\hline     4.  &amp; short text               &amp; ? &amp; ? \\     \bottomrule   \end{tabu}  \end{document}   It renders like:    Why is there so little space between the text in the second row and the rule below it?  How can I fix it?  What comes to my mind is to use \\[1ex] instead of \\, is there a better solution?
14384
still working on that table. Here's my new question reguarding the table borders:  It appears, that i do something wrong setting boarders. Here is my code, and a screenshot:  \documentclass{article} \usepackage{multirow} % Used for the vertical cells \usepackage{rotating} % Used for the vertical cells  \usepackage{xcolor} % Used for cell-colors \usepackage{colortbl} % Used for cell-colors  \usepackage[a4paper]{geometry}% Used to set the pdf margins manually \newgeometry{left=2cm,bottom=0.1cm}  \definecolor{grey}{HTML}{F2F2F2} % Define grey for the cells \definecolor{red}{HTML}{FF0000} % Define red for testing  \begin{document} \scriptsize % Use a small font size  \begin{tabular}{|p{0.6cm}|p{0.6cm}|p{0.6cm}|p{0.6cm}|p{0.6cm}|p{0.6cm}|p{0.6cm}|p{0.6cm}|p{0.6cm}|p{0.6cm}|p{0.6cm}|p{0.6cm}|p{0.6cm}|p{0.6cm}|p{0.6cm}|p{0.6cm}|p{0,6cm}|}  \cline{10-17}  \multicolumn{9}{|c|}{} &amp; \multicolumn{2}{p{\dimexpr (0.6cm)*2+2\arrayrulewidth+2\tabcolsep\relax}|}{\cellcolor{grey}Work to retired ratio} &amp; \multicolumn{4}{p{\dimexpr (0.6cm)*4+1\arrayrulewidth+2\tabcolsep\relax}|}{Health care sizing (per thousand)} &amp; \multicolumn{2}{p{\dimexpr (0.6cm)*2+1\arrayrulewidth+2\tabcolsep\relax}|}{\cellcolor{grey}Inverse dependency ratio}\\\cline{3-9}  \multicolumn{2}{|c|}{} &amp; \multicolumn{4}{c|}{\cellcolor{grey}Population (mio.)} &amp; \multicolumn{3}{c}{Workforce (1000)}  &amp; \multicolumn{2}{|c|}{\cellcolor{grey}} &amp; \multicolumn{2}{l|}{Physicians by} &amp; \multicolumn{2}{l}{Nurses by} &amp; \multicolumn{2}{|l|}{\cellcolor{grey}Old agers by}\\\hline  \multicolumn{2}{|c|}{} &amp; \begin{sideways}\cellcolor{grey}\parbox{4cm}{Overall}\end{sideways} &amp; \begin{sideways}\cellcolor{grey}\parbox{4cm}{Young age}\end{sideways} &amp; \begin{sideways}\cellcolor{grey}\parbox{4cm}{Working age}\end{sideways} &amp; \begin{sideways}\cellcolor{grey}\parbox{4cm}{Old age}\end{sideways} &amp; \begin{sideways}\parbox{4cm}{Overall}\end{sideways} &amp; \begin{sideways}\parbox{4cm}{Physicians (Proj: 2025)}\end{sideways} &amp; \begin{sideways}\parbox{4cm}{Nurses (Proj: 2030)}\end{sideways} &amp; \begin{sideways}\parbox{4cm}{\cellcolor{grey}Working age by Old age}\end{sideways} &amp; \begin{sideways}\parbox{4cm}{\cellcolor{grey}Work force by Old age}\end{sideways} &amp; \begin{sideways}\parbox{4cm}{Workforce}\end{sideways} &amp; \begin{sideways}\parbox{4cm}{Working age}\end{sideways} &amp; \begin{sideways}\parbox{4cm}{Workforce}\end{sideways} &amp; \begin{sideways}\parbox{4cm}{Working age}\end{sideways} &amp; \begin{sideways}\parbox{4cm}{\cellcolor{grey}1 physicians}\end{sideways} &amp; \begin{sideways}\parbox{4cm}{\cellcolor{grey}1 nurse}\end{sideways}\\\hline  \multicolumn{2}{|l}{USA} &amp; \multicolumn{4}{l}{\cellcolor{grey}} &amp; \multicolumn{3}{l}{} &amp; \multicolumn{2}{l}{\cellcolor{grey}} &amp; \multicolumn{4}{l}{} &amp; \multicolumn{2}{l|}{\cellcolor{grey}}\\\hline  1990/1 &amp; &amp; 248,6 &amp; 71,3 &amp; 146,1 &amp; 31,2 &amp; 127.500 &amp; 615,4 &amp; 1491,6 &amp; 4,68 &amp; 4,09 &amp; 4,83 &amp; 4,21 &amp; 11,70 &amp; 10,21 &amp; 50,7 &amp; 20,9\\\hline  1 &amp; 2 &amp; 3 \\\hline  \end{tabular}  \end{document}     On 1 the Top border of Population is not visible although i did used \\\cline{3-9}\cline{12-17} on that line.  In 2 both borders are pushed a bit to the right for no reason i can see.  And in 3 again the top borders are not visible despite using \cline{10-17} on that line. What did i do wrong?  Thanks!
52724
In my table, in order to have texts centered in each cell, I am using  \newcolumntype{P}[1]{&gt;{\centering\arraybackslash}p{#1}}    and instead of a simple p{1.5cm}, I am using   &gt;{\centering\arraybackslash}p{1.5cm}    I am also using \toprule, \midrule, and \bottomrule along with \usepackage{booktabs}.  My code is the following:  \documentclass[12pt]{article}    \newcolumntype{P}[1]{&gt;{\centering\arraybackslash}p{#1}} \usepackage{multicol} \usepackage{multirow} \usepackage{booktabs}   \begin{document}   \begin{table}[h] \centering \begin{tabular}{| &gt;{\centering\arraybackslash}p{1.5cm} | &gt;{\centering\arraybackslash}p{1.2cm} | &gt;{\centering\arraybackslash}p{1.2cm} |  &gt;{\centering\arraybackslash}p{1.2cm} | &gt;{\centering\arraybackslash}p{1.2cm} |&gt;{\centering\arraybackslash}p{1.2cm} | &gt;{\centering\arraybackslash}p{1.2cm} | &gt;{\centering\arraybackslash}p{1.2cm} | &gt;{\centering\arraybackslash}p{1.2cm}|} \toprule \multirow{2}{*}{} &amp; \multicolumn{4}{c|}{Payoffs} &amp;  \multicolumn{4}{c}{ROR} \\ \cline{2-9}  &amp; $\theta =1$ &amp; $\theta =2$ &amp; $E(P)$ &amp; $\sigma(P)$ &amp; $\theta =1$ &amp; $\theta =2$ &amp; $E(r)$ &amp; $\sigma(r)$ \\ \midrule Asset 1 &amp; 110 &amp; 95 &amp;   &amp;   &amp;   &amp;   &amp;   &amp;   \\ Asset 2 &amp; 105 &amp; 90 &amp;   &amp;   &amp;   &amp;   &amp;   &amp;   \\ Asset 3 &amp; 120 &amp; 90 &amp;   &amp;   &amp;   &amp;   &amp;   &amp;   \\ \bottomrule \end{tabular} \end{table}    \end{document}    And my result looks very strange like this:    First, the far right vertical line is short; the first row is not closed on the right.  Second, all the vertical lines are cut.  Any thoughts?
99425
I have a , but it has unwanted white space above the list, making it horizontally unaligned with other cells in the row.  Starting the list with  helps a bit, but the problem persists.  Is there a way to get rid of the space? Here is my minimal working example consisting of 4 code pattern combinations from : \documentclass{article} \usepackage{array} \usepackage{booktabs} \usepackage{enumitem} \begin{document} Hello world.  \begin{tabular}{l&gt;{\raggedright}p{3in}} \toprule    Item title \#1    &amp;    \begin{itemize}[noitemsep,topsep=0pt] % Code pattern 1    \item Two    \item bullets    \end{itemize} \tabularnewline[0.1in]    Item title \#2    &amp;    \begin{itemize}[noitemsep,topsep=0pt] % Code pattern 1, 2nd row    \item Two more    \item bullets    \end{itemize} \tabularnewline[0.1in]    Item title \#3    &amp;    \kern-\parskip\begin{itemize}[noitemsep,topsep=0pt] % Code pattern 2    \item Another two    \item bullets    \end{itemize}\kern-\parskip \tabularnewline[0.1in]    Item title \#4    &amp;    \kern-\parskip\begin{itemize} % Code pattern 3    \item Another two more    \item bullets    \end{itemize}\kern-\parskip \tabularnewline[0.1in]    Item title \#5    &amp;    \begin{itemize}[noitemsep,topsep=-8pt] % Code pattern 4    \item Another two more    \item bullets still    \end{itemize} \tabularnewline \bottomrule \end{tabular}  \end{document}  Here is the compiled result:
100885
\begin{table}[ht] \centering \begin{tabular}{c|ccccccc} \hline &amp; col1 &amp; col2 &amp; col3 &amp; col4 &amp; col5 &amp; col6 &amp; col7 \\ \hline \rowcolor{red} row1&amp; \ra &amp; \ra &amp; \ra &amp; \ra &amp; \ra &amp; \ra &amp; \ra \\ row2&amp; \ra &amp; \ra &amp; \ra &amp; \ra &amp; \ra &amp; \ra &amp; \ra \\ \rowcolor{red} row3&amp; \ra &amp; \ra &amp; \ra &amp; \ra &amp; \ra &amp; \ra &amp; \ra \\ row4&amp; \ra &amp; \ra &amp; \ra &amp; \ra &amp; \ra &amp; \ra &amp; \ra \\ \rowcolor{red} row5&amp; \ra &amp; \ra &amp; \ra &amp; \ra &amp; \ra &amp; \ra &amp; \ra \\ row6&amp; \ra &amp; \ra &amp; \ra &amp; \ra &amp; \ra &amp; \ra &amp; \ra \\ \hline \end{tabular} \end{table}   I have a simple table with color coded rows (red or black), and I would like to append a simple color coded legend that tells the reader Red = Male, Black = Female. Perhaps something that looks like this?
71522
I am using the tocloft package so that the word Table shows up before the number in the list of tables.  When I do this, the tables with long captions wrap to the next line but are not aligned.  This is the code that I am using.   \documentclass [12pt] {article} \usepackage{times, url} \usepackage[left=1.5in,top=1in,bottom=1in,right=1in,footskip=0.5in]{geometry} \usepackage{float} \usepackage{booktabs,threeparttable} \usepackage[subfigure]{tocloft} \usepackage{subfigure} \usepackage[justification=centering]{caption}  \renewcommand{\cfttabfont}{Table }   \begin{document}   \listoftables    \begin{table}[htbp] \begin{threeparttable} \captionsetup{font=normalsize} \caption{Summary Statistics for Structural Housing Characteristics.  Central Kentucky Data, 2000-2011. N=142,164.} \centering \footnotesize \label{table:sumstatsfull} \begin{tabular}{lcccc} \hline Variable &amp; Mean &amp; Std. Dev. &amp; Min &amp; Max \\ \hline \end{tabular} \end{threeparttable} \end{table}  \end{document} `  I want the Table to precede the table number but I want the caption to be aligned like it is when the code below is used  ` \documentclass [12pt] {article} \usepackage{times, url} \usepackage[left=1.5in,top=1in,bottom=1in,right=1in,footskip=0.5in]{geometry} \usepackage{float} \usepackage{booktabs,threeparttable} \usepackage[subfigure]{tocloft} \usepackage{subfigure} \usepackage[justification=centering]{caption}  %\renewcommand{\cfttabfont}{Table }   \begin{document}   \listoftables    \begin{table}[htbp] \begin{threeparttable} \captionsetup{font=normalsize} \caption{Summary Statistics for Structural Housing Characteristics.  Central Kentucky Data, 2000-2011. N=142,164.} \centering \footnotesize \label{table:sumstatsfull} \begin{tabular}{lcccc} \hline Variable &amp; Mean &amp; Std. Dev. &amp; Min &amp; Max \\ \hline \end{tabular} \end{threeparttable} \end{table}  \end{document}