4

I have created a table using tabularx. Can I color the \midrule instead of having it colored black as default?

Jamgreen
  • 3,687
  • 2
    doesn't \arrayrulecolor{blue} from colortbl work? If not edit the question to have a complete small document that shows the problem. – David Carlisle Jun 22 '15 at 18:18
  • 2
    Apparently you still have not understood how this site works: Provide a MWE –  Jun 22 '15 at 18:18
  • It really would make it much easier to help if you would provide a minimum working example. For example \midrule is not defined by tabularx and is not a standard LaTeX command either. There are many, many, many packages so people do not necessarily know which packages your question requires - never mind issues to do with your choice of document class. In this particular case, many users will recognise \midrule as coming from booktabs but that is just because it is a popular package and a frequently-used command. A user new to LaTeX would not be much helped by your question, either. ;) – cfr Jun 22 '15 at 18:42

1 Answers1

11

Something like this?

enter image description here

\documentclass{article}
\usepackage{booktabs,tabularx, colortbl} 
\begin{document}
\begin{tabularx}{0.3\textwidth}{XXX}
\arrayrulecolor{red}  % choose color
aaaa & bbbb & cccc\\
\midrule
xxxx & yyyy & zzzz\\
\end{tabularx}
\end{document}
Mico
  • 506,678