我正在使用 longtable,我想知道是否有可能为 1 个特定列设置字体格式。例如,我想将第四列设为斜体。
\begin{longtable}[1]{llllrr}
\caption{XXXX} \\
\hline
\textbf{Order} & \textbf{Family} & \textbf{Genus} & \textbf{Specie} & \textbf{Average abundance} & \textbf{Average length (cm)} \\
\hline
Acipenseriformes & Acipenseridae & Acipenser & Brevirostrum & 3.67 & 59.90 \\
& & & Oxyrinchus & 2.50 & 27.81 \\
& Polyodontidae & Polyodon & Spathula & 1.50 & 14.25 \\
Anguilliformes & Anguillidae & Anguilla & Rostrata & 1.38 & 43.64 \\
& Congridae & Conger & Oceanicus & 1.00 & 20.10 \\
Atheriniformes & Atherinopsidae & Membras & Martinica & 12.33 & 6.69 \\
& & Menidia & Menidia & 2.50 & 6.72 \\
Aulopiformes & Synodontidae & Synodus & Foetens & 1.90 & 15.92 \\
Batrachoidiformes & Batrachoididae & Opsanus & Beta & 2.58 & 15.30 \\
& & & Pardus & 1.50 & 16.52 \\
& & & Tau & 4.05 & 19.29 \\
& & Porichthys & Plectrodon & 1.20 & 28.51 \\
Beloniformes & Belonidae & Strongylura & Marina & 6.00 & 20.15 \\
Carcharhiniformes & Carcharhinidae & Carcharhinus & Isodon & 1.00 & 38.00 \\
& & & Limbatus & 1.00 & 39.20 \\
& & & Porosus & 1.00 & 50.50 \\
& Sphyrnidae & Sphyrna & Tiburo & 1.00 & 37.47 \\
& Triakidae & Mustelus & Canis & 4.67 & 53.95 \\
Clupeiformes & Clupeidae & Alosa & Aestivalis & 3.62 & 7.95 \\
& & & Pseudoharengus & 6.38 & 7.35 \\
& & & Sapidissima & 7.33 & 10.43 \\
& & Brevoortia & Gunteri & 35.17 & 7.99 \\
& & & Patronus & 20.81 & 8.79 \\
& & & Smithi & 1.00 & 12.20 \\
& & & Tyrannus & 5.69 & 13.19 \\
& & Clupea & Harengus & 21.11 & 10.08 \\
& & Dorosoma & Cepedianum & 14.26 & 16.91 \\
& & & Petenense & 11.85 & 10.37 \\
& & Etrumeus & Teres & 1.00 & 20.00 \\
& & Harengula & Jaguana & 2.47 & 9.70 \\
& & Opisthonema & Oglinum & 2.22 & 8.46 \\
& & Sardinella & Aurita & 3.00 & 13.07 \\
& Engraulidae & Anchoa & Hepsetus & 8.66 & 6.81 \\
\hline
\hline
\end{longtable}
还有一件事,如何避免标题(此处为 specices)出现斜体?
答案1
只需添加序言\usepackage{array}
并修改行,\begin{longtable}
如我在以下代码中所示。请注意,必须插入列的格式说明符前>
通过符号和格式命令对同一列进行对齐{}
\textnormal
对于您的第二个问题,解决方案是在“Specie”标题中添加一个命令。
\begin{longtable}{l>{\bfseries}ll>{\itshape}lrr}
\hline
\textbf{Order} & \textbf{Family} & \textbf{Genus} & \textnormal{\textbf{Specie}} & \textbf{Average abundance} & \textbf{Average length (cm)} \\
\hline
Acipenseriformes & Acipenseridae & Acipenser & Brevirostrum & 3.67 & 59.90 \\
& & & Oxyrinchus & 2.50 & 27.81 \\
& Polyodontidae & Polyodon & Spathula & 1.50 & 14.25 \\
Anguilliformes & Anguillidae & Anguilla & Rostrata & 1.38 & 43.64 \\
& Congridae & Conger & Oceanicus & 1.00 & 20.10 \\
Atheriniformes & Atherinopsidae & Membras & Martinica & 12.33 & 6.69 \\
& & Menidia & Menidia & 2.50 & 6.72 \\
Aulopiformes & Synodontidae & Synodus & Foetens & 1.90 & 15.92 \\
Batrachoidiformes & Batrachoididae & Opsanus & Beta & 2.58 & 15.30 \\
& & & Pardus & 1.50 & 16.52 \\
& & & Tau & 4.05 & 19.29 \\
& & Porichthys & Plectrodon & 1.20 & 28.51 \\
Beloniformes & Belonidae & Strongylura & Marina & 6.00 & 20.15 \\
Carcharhiniformes & Carcharhinidae & Carcharhinus & Isodon & 1.00 & 38.00 \\
& & & Limbatus & 1.00 & 39.20 \\
& & & Porosus & 1.00 & 50.50 \\
& Sphyrnidae & Sphyrna & Tiburo & 1.00 & 37.47 \\
& Triakidae & Mustelus & Canis & 4.67 & 53.95 \\
Clupeiformes & Clupeidae & Alosa & Aestivalis & 3.62 & 7.95 \\
& & & Pseudoharengus & 6.38 & 7.35 \\
& & & Sapidissima & 7.33 & 10.43 \\
& & Brevoortia & Gunteri & 35.17 & 7.99 \\
& & & Patronus & 20.81 & 8.79 \\
& & & Smithi & 1.00 & 12.20 \\
& & & Tyrannus & 5.69 & 13.19 \\
& & Clupea & Harengus & 21.11 & 10.08 \\
& & Dorosoma & Cepedianum & 14.26 & 16.91 \\
& & & Petenense & 11.85 & 10.37 \\
& & Etrumeus & Teres & 1.00 & 20.00 \\
& & Harengula & Jaguana & 2.47 & 9.70 \\
& & Opisthonema & Oglinum & 2.22 & 8.46 \\
& & Sardinella & Aurita & 3.00 & 13.07 \\
& Engraulidae & Anchoa & Hepsetus & 8.66 & 6.81 \\
\hline
\hline
\end{longtable}