Code: Select all
[PDFLaTeX] finished with exit status 1
./document_name.tex:13:File `(.sty' not found. \usepackage(c
[PDFLaTeX] 1 error, 0 warnings, 0 badboxes
Code: Select all
[PDFLaTeX] finished with exit status 1
./document_name.tex:13:File `(.sty' not found. \usepackage(c
[PDFLaTeX] 1 error, 0 warnings, 0 badboxes
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
When doing so, load the package with the table option and omit the colortabl package, because then it is loaded by xcolor.Stefan_K wrote:[…] try xcolor, see its documentation for hex values and HTML, look for the HTML model. […]
Code: Select all
\usepackage[table]{xcolor}
That explains why I was able to color columns and cells without colortbl. I already had xcolor with the [table] option enabled in the preamble. I also found the documentation for the colors supported by xcolor and an online resource for RGB colors in the correct (between 0 and 1) format:localghost wrote:When doing so, load the package with the table option and omit the colortabl package, because then it is loaded by xcolor.Stefan_K wrote:[…] try xcolor, see its documentation for hex values and HTML, look for the HTML model. […]Best regardsCode: Select all
\usepackage[table]{xcolor}
Thorsten¹
Code: Select all
\begingroup
\centering
\begin{tabular}{ |>{\small}p{1cm} |>{\small}p{5cm} |>{\small}p{1cm} |>{\small}p{5cm} | } \toprule
\rowcolor{forestgreen}\textcolor{white}{\bfseries Error Code} & \textcolor{white}{\bfseries Description} & \textcolor{white}{\bfseries Error Code} & \textcolor{white}{\bfseries Description} \\ \midrule
\multicolumn{2}{|>{\columncolor[rgb]{.8,.8,.8}}c|}{\bfseries Missing Data} & \multicolumn{2}{|>{\columncolor[rgb]{.8,.8,.8}}c|}{\bfseries Bad Data} \\ \hline
\rowcolor{webgreen!5}\textbf{1} & MISSING\_1 & \textbf{1} & BAD\_1 \\ \hline
\rowcolor{webgreen!5}\textbf{2} & MISSING\_2 & \textbf{2} & BAD\_2 \\ \hline
\rowcolor{webgreen!5}\textbf{3} & MISSING\_3 & \textbf{3} & BAD\_3 \\ \hline
\rowcolor{webgreen!5}\textbf{5} & UNAUTH\_5 & & \\ \hline
\cellcolor{webgreen!5}\textbf{6} & \cellcolor{webgreen!5}UNAUTH\_6 & \multicolumn{2}{|>{\columncolor[rgb]{.8,.8,.8}}c|}{\bfseries Errors} \\ \hline
& & \cellcolor{webgreen!5}\textbf{601} & \cellcolor{webgreen!5}1ERR \\ \hline
& & \cellcolor{webgreen!5}\textbf{701} & \cellcolor{webgreen!5}1HDR \\
\bottomrule
\end{tabular}
\endgroup
Code: Select all
\begingroup
\centering
\begin{tabular}{ |>{\small}p{1cm} |>{\small}p{5cm} |>{\small}p{1cm} |>{\small}p{5cm} | } \toprule
\rowcolor{forestgreen}\textcolor{white}{\bfseries Error Code} & \textcolor{white}{\bfseries Description} & \textcolor{white}{\bfseries Error Code} & \textcolor{white}{\bfseries Description} \\ \midrule
\multicolumn{2}{|>{\columncolor[rgb]{.8,.8,.8}}c|}{\bfseries Missing Data} & \multicolumn{2}{|>{\columncolor[rgb]{.8,.8,.8}}c|}{\bfseries\textcolor{white} Bad Data} \\ \hline
\rowcolor{webgreen!5}\textbf{1} & MISSING\_1 & \textbf{1} & BAD\_1 \\ \hline
\rowcolor{webgreen!5}\textbf{2} & MISSING\_2 & \textbf{2} & BAD\_2 \\ \hline
\rowcolor{webgreen!5}\textbf{3} & MISSING\_3 & \textbf{3} & BAD\_3 \\ \hline
\rowcolor{webgreen!5}\textbf{5} & UNAUTH\_5 & & \\ \hline
\cellcolor{webgreen!5}\textbf{6} & \cellcolor{webgreen!5}UNAUTH\_6 & \multicolumn{2}{|>{\columncolor[rgb]{.8,.8,.8}}c|}{\bfseries Errors} \\ \hline
& & \cellcolor{webgreen!5}\textbf{601} & \cellcolor{webgreen!5}1ERR \\ \hline
& & \cellcolor{webgreen!5}\textbf{701} & \cellcolor{webgreen!5}1HDR \\
\bottomrule
\end{tabular}
\endgroup[\code]
Only the "B" in "Bad Data" is colored white. The rest of the characters remain bolded and black. Another mystery (at least to me).
Code: Select all
\textcolor{white}{Bad Data}
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis