latex - 长表操作 - 乳胶
问题描述
我正在编写 LaTeX 代码以使用 longtable 包生成一个长表,我希望第一列颜色为灰色
这是我的代码:
\documentclass[a4paper,11pt,english]{report}
\usepackage{longtable}
\usepackage{multirow}
\usepackage{graphicx}
\usepackage[table,xcdraw]{xcolor}
\usepackage{lipsum} % just for dummy text- not needed for a longtable
\begin{document}
\lipsum[1]
\lipsum[1]
\lipsum[1]
\definecolor{lightgray}{HTML}{EFEFEF}
\begin{longtable}[H]{|
>{\columncolor{lightgray}}p{0.2\linewidth} | p{0.175\linewidth} |}
\hline
foo & bar \\ \hline
foo & bar \\ \hline
foo & bar \\ \hline
foo & bar \\ \hline
foo & bar \\ \hline
foo & bar \\ \hline
foo & bar \\ \hline
foo & bar \\ \hline
foo & bar \\ \hline
foo & bar \\ \hline
foo & bar \\ \hline
\caption{Your caption here} % needs to go inside longtable environment
\label{tab:myfirstlongtable}
\end{longtable}
Table \ref{tab:myfirstlongtable} shows my first longtable.
\end{document}
有什么帮助吗?
解决方案
推荐阅读
- javascript - 使用画布在spreadJS上进行赛普拉斯测试
- java - Consistency of return type
- .net-core - 包含在 .NET Core 中的循环引用
- r - 在这种情况下如何使用连接?
- android - 链接文件失败
- maven - 如何从命令行处理 MAVEN_OPTS 中的参数空间?
- c# - c# web api [必需] 不适用于复杂对象中的某些类
- python - Pandas GroupBy 单列并将多列显示为值计数
- exchangewebservices - 为什么不能在 Exchange 中删除约会
- apache-kafka - Kafka - Confluent Hub - 仅利用其中的一部分