我想知道是否可以强制表格中特定列的大小写?假设下表的第 3 列为小写。
\documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{longtable}
\usepackage{array}
\begin{document}
{\tiny
\begin{longtable}[1]{>{\itshape}l>{\itshape}l>{\itshape}l>{\itshape}lrr}
\caption{Summary of fish species sampled in both biogeographic provinces.} \\
\hline
\textbf{Order} & \textbf{Family} & \textbf{Genus} & \textbf{Species} & \textbf{Mean abundance (catch per unit effort)} & \textbf{Mean 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 \\
& & & Mitchilli & 14.00 & 5.12 \\
Cypriniformes & Catostomidae & Carpiodes & Cyprinus & 12.00 & 38.84 \\
& & Catostomus & Commersoni & 2.00 & 22.07 \\
& & Moxostoma & Macrolepidotum & 1.00 & 37.40 \\
& Cyprinidae & Carassius & Auratus & 2.50 & 26.49 \\
& & Cyprinus & Carpio & 2.83 & 57.31 \\
& & Notemigonus & Crysoleucas & 2.00 & 14.00 \\
& & Notropis & Atherinoides & 10.00 & 9.71 \\
& & & Hudsonius & 2.67 & 8.17 \\
Cyprinodontiformes & Fundulidae & Fundulus & Grandis & 14.00 & 9.95 \\
Elopiformes & Elopidae & Elops & Saurus & 1.14 & 21.20 \\
Gadiformes & Gadidae & Microgadus & Tomcod & 10.30 & 9.41 \\
& & Pollachius & Virens & 1.00 & 13.10 \\
& Lotidae & Enchelyopus & Cimbrius & 1.50 & 21.48 \\
& Merlucciidae & Merluccius & Bilinearis & 2.00 & 20.98 \\
& Phycidae & Urophycis & Chuss & 3.67 & 24.75 \\
& & & Regia & 4.62 & 21.65 \\
& & & Tenuis & 3.86 & 21.56 \\
Gasterosteiformes & Gasterosteidae & Gasterosteus & Aculeatus & 1.00 & 7.80 \\
Lampriformes & Trachipteridae & Desmodema & Polystictum & 1.00 & 16.95 \\
Lepisosteiformes & Lepisosteidae & Atractosteus & Spatula & 1.00 & 48.00 \\
& & Lepisosteus & Oculatus & 1.00 & 47.00 \\
& & & Osseus & 4.00 & 91.18 \\
Lophiiformes & Ogcocephalidae & Ogcocephalus & Radiatus & 1.00 & 19.70 \\
Mugiliformes & Mugilidae & Mugil & Cephalus & 2.89 & 17.53 \\
& & & Curema & 1.57 & 12.21 \\
Ophidiiformes & Ophidiidae & Ophidion & Marginatum & 1.50 & 16.85 \\
Osmeriformes & Osmeridae & Osmerus & Mordax & 1.00 & 12.15 \\
Perciformes & Carangidae & Carangoides & Ruber & 6.00 & 6.48 \\
& & Caranx & Crysos & 2.00 & 15.07 \\
& & & Hippos & 3.09 & 8.92 \\
& & & Latus & 2.00 & 8.91 \\
& & Chloroscombrus & Chrysurus & 25.50 & 7.31 \\
& & Decapterus & Punctatus & 7.00 & 13.21 \\
& & Hemicaranx & Amblyrhynchus & 2.67 & 12.01 \\
& & Selar & Crumenophthalmus & 7.00 & 9.40 \\
& & Selene & Setapinnis & 1.62 & 6.00 \\
& & & Vomer & 2.14 & 5.60 \\
& & Trachinotus & Carolinus & 2.00 & 9.89 \\
& & & Falcatus & 4.50 & 6.98 \\
& Centrarchidae & Lepomis & Gibbosus & 8.14 & 11.13 \\
& & & Macrochirus & 4.86 & 14.94 \\
& & & Microlophus & 3.00 & 10.13 \\
& & Micropterus & Salmoides & 1.00 & 10.50 \\
& & Pomoxis & Annularis & 1.40 & 15.12 \\
& Centropomidae & Centropomus & Undecimalis & 1.00 & 24.00 \\
& Chaetodontidae & Chaetodon & Ocellatus & 2.00 & 4.85 \\
& Ephippidae & Chaetodipterus & Faber & 3.13 & 7.47 \\
& Gerreidae & Eucinostomus & Argenteus & 3.20 & 7.03 \\
& & & Gula & 1.40 & 9.18 \\
& & & Lefroyi & 6.50 & 7.64 \\
& Gobiidae & Gobioides & Broussonneti & 1.00 & 19.60 \\
& & Gobiosoma & Bosc & 3.00 & 3.63 \\
& Haemulidae & Haemulon & Plumieri & 9.50 & 8.96 \\
& & Orthopristis & Chrysoptera & 7.60 & 12.00 \\
& Labridae & Halichoeres & Caudalis & 1.00 & 11.50 \\
& & Lachnolaimus & Maximus & 5.00 & 6.80 \\
& & Tautoga & Onitis & 10.60 & 17.06 \\
& & Tautogolabrus & Adspersus & 4.11 & 10.22 \\
& Lutjanidae & Lutjanus & Griseus & 2.00 & 10.30 \\
& & & Synagris & 2.67 & 8.16 \\
\hline
\hline
\end{longtable}
}
\end{document}
问候,菲尔
答案1
这collcell
包裹是专门为满足这一要求而设计的。从collcell
文档:
该包提供了收集单元格内容
tabular
并将其作为参数提供给宏的宏。
\documentclass[10pt]{article}
\usepackage{longtable,array}% http://ctan.org/pkg/{longtable,array}
\usepackage{collcell}% http://ctan.org/pkg/collcell
\begin{document}
{\tiny
\begin{longtable}[1]{>{\itshape}l>{\itshape}l>{\itshape\collectcell\MakeLowercase}l<{\endcollectcell}>{\itshape}lrr}
\caption{Summary of fish species sampled in both biogeographic provinces.} \\
\hline
\textbf{Order} & \textbf{Family} & \multicolumn{1}{l}{\textit{\textbf{Genus}}} & \textbf{Species} & \textbf{Mean abundance (catch per unit effort)} & \textbf{Mean 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 \\
& & & Mitchilli & 14.00 & 5.12 \\
Cypriniformes & Catostomidae & Carpiodes & Cyprinus & 12.00 & 38.84 \\
& & Catostomus & Commersoni & 2.00 & 22.07 \\
& & Moxostoma & Macrolepidotum & 1.00 & 37.40 \\
& Cyprinidae & Carassius & Auratus & 2.50 & 26.49 \\
& & Cyprinus & Carpio & 2.83 & 57.31 \\
& & Notemigonus & Crysoleucas & 2.00 & 14.00 \\
& & Notropis & Atherinoides & 10.00 & 9.71 \\
& & & Hudsonius & 2.67 & 8.17 \\
Cyprinodontiformes & Fundulidae & Fundulus & Grandis & 14.00 & 9.95 \\
Elopiformes & Elopidae & Elops & Saurus & 1.14 & 21.20 \\
Gadiformes & Gadidae & Microgadus & Tomcod & 10.30 & 9.41 \\
& & Pollachius & Virens & 1.00 & 13.10 \\
& Lotidae & Enchelyopus & Cimbrius & 1.50 & 21.48 \\
& Merlucciidae & Merluccius & Bilinearis & 2.00 & 20.98 \\
& Phycidae & Urophycis & Chuss & 3.67 & 24.75 \\
& & & Regia & 4.62 & 21.65 \\
& & & Tenuis & 3.86 & 21.56 \\
Gasterosteiformes & Gasterosteidae & Gasterosteus & Aculeatus & 1.00 & 7.80 \\
Lampriformes & Trachipteridae & Desmodema & Polystictum & 1.00 & 16.95 \\
Lepisosteiformes & Lepisosteidae & Atractosteus & Spatula & 1.00 & 48.00 \\
& & Lepisosteus & Oculatus & 1.00 & 47.00 \\
& & & Osseus & 4.00 & 91.18 \\
Lophiiformes & Ogcocephalidae & Ogcocephalus & Radiatus & 1.00 & 19.70 \\
Mugiliformes & Mugilidae & Mugil & Cephalus & 2.89 & 17.53 \\
& & & Curema & 1.57 & 12.21 \\
Ophidiiformes & Ophidiidae & Ophidion & Marginatum & 1.50 & 16.85 \\
Osmeriformes & Osmeridae & Osmerus & Mordax & 1.00 & 12.15 \\
Perciformes & Carangidae & Carangoides & Ruber & 6.00 & 6.48 \\
& & Caranx & Crysos & 2.00 & 15.07 \\
& & & Hippos & 3.09 & 8.92 \\
& & & Latus & 2.00 & 8.91 \\
& & Chloroscombrus & Chrysurus & 25.50 & 7.31 \\
& & Decapterus & Punctatus & 7.00 & 13.21 \\
& & Hemicaranx & Amblyrhynchus & 2.67 & 12.01 \\
& & Selar & Crumenophthalmus & 7.00 & 9.40 \\
& & Selene & Setapinnis & 1.62 & 6.00 \\
& & & Vomer & 2.14 & 5.60 \\
& & Trachinotus & Carolinus & 2.00 & 9.89 \\
& & & Falcatus & 4.50 & 6.98 \\
& Centrarchidae & Lepomis & Gibbosus & 8.14 & 11.13 \\
& & & Macrochirus & 4.86 & 14.94 \\
& & & Microlophus & 3.00 & 10.13 \\
& & Micropterus & Salmoides & 1.00 & 10.50 \\
& & Pomoxis & Annularis & 1.40 & 15.12 \\
& Centropomidae & Centropomus & Undecimalis & 1.00 & 24.00 \\
& Chaetodontidae & Chaetodon & Ocellatus & 2.00 & 4.85 \\
& Ephippidae & Chaetodipterus & Faber & 3.13 & 7.47 \\
& Gerreidae & Eucinostomus & Argenteus & 3.20 & 7.03 \\
& & & Gula & 1.40 & 9.18 \\
& & & Lefroyi & 6.50 & 7.64 \\
& Gobiidae & Gobioides & Broussonneti & 1.00 & 19.60 \\
& & Gobiosoma & Bosc & 3.00 & 3.63 \\
& Haemulidae & Haemulon & Plumieri & 9.50 & 8.96 \\
& & Orthopristis & Chrysoptera & 7.60 & 12.00 \\
& Labridae & Halichoeres & Caudalis & 1.00 & 11.50 \\
& & Lachnolaimus & Maximus & 5.00 & 6.80 \\
& & Tautoga & Onitis & 10.60 & 17.06 \\
& & Tautogolabrus & Adspersus & 4.11 & 10.22 \\
& Lutjanidae & Lutjanus & Griseus & 2.00 & 10.30 \\
& & & Synagris & 2.67 & 8.16 \\
\hline
\hline
\end{longtable}
}
\end{document}
为了克服\collectcell
...的影响\endcollectcell
,您可以使用\multicolumn{1}{.}{..}
。
答案2
我改了四行。首先,我添加了这两行:
\usepackage{stringstrings}
\def\mklower#1{\caselower}
然后我修改了这个:
\begin{longtable}[1]{>{\itshape}l>{\itshape}l>{\itshape\mklower}l>{\itshape}lrr}
和这个:
\textbf{Order} & \textbf{Family} & \ \unskip\textbf{Genus} & \textbf...
请注意,这只会使第一个字符变为小写,但是,对于此表而言,这可以正常工作。
\documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{longtable}
\usepackage{array}
\usepackage{stringstrings}
\def\mklower#1{\caselower}
\begin{document}
{\tiny
\begin{longtable}[1]{>{\itshape}l>{\itshape}l>{\itshape\mklower}l>{\itshape}lrr}
\caption{Summary of fish species sampled in both biogeographic provinces.} \\
\hline
\textbf{Order} & \textbf{Family} & \ \unskip\textbf{Genus} & \textbf{Species} & \textbf{Mean abundance (catch per unit effort)} & \textbf{Mean 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 \\
& & & Mitchilli & 14.00 & 5.12 \\
Cypriniformes & Catostomidae & Carpiodes & Cyprinus & 12.00 & 38.84 \\
& & Catostomus & Commersoni & 2.00 & 22.07 \\
& & Moxostoma & Macrolepidotum & 1.00 & 37.40 \\
& Cyprinidae & Carassius & Auratus & 2.50 & 26.49 \\
& & Cyprinus & Carpio & 2.83 & 57.31 \\
& & Notemigonus & Crysoleucas & 2.00 & 14.00 \\
& & Notropis & Atherinoides & 10.00 & 9.71 \\
& & & Hudsonius & 2.67 & 8.17 \\
Cyprinodontiformes & Fundulidae & Fundulus & Grandis & 14.00 & 9.95 \\
Elopiformes & Elopidae & Elops & Saurus & 1.14 & 21.20 \\
Gadiformes & Gadidae & Microgadus & Tomcod & 10.30 & 9.41 \\
& & Pollachius & Virens & 1.00 & 13.10 \\
& Lotidae & Enchelyopus & Cimbrius & 1.50 & 21.48 \\
& Merlucciidae & Merluccius & Bilinearis & 2.00 & 20.98 \\
& Phycidae & Urophycis & Chuss & 3.67 & 24.75 \\
& & & Regia & 4.62 & 21.65 \\
& & & Tenuis & 3.86 & 21.56 \\
Gasterosteiformes & Gasterosteidae & Gasterosteus & Aculeatus & 1.00 & 7.80 \\
Lampriformes & Trachipteridae & Desmodema & Polystictum & 1.00 & 16.95 \\
Lepisosteiformes & Lepisosteidae & Atractosteus & Spatula & 1.00 & 48.00 \\
& & Lepisosteus & Oculatus & 1.00 & 47.00 \\
& & & Osseus & 4.00 & 91.18 \\
Lophiiformes & Ogcocephalidae & Ogcocephalus & Radiatus & 1.00 & 19.70 \\
Mugiliformes & Mugilidae & Mugil & Cephalus & 2.89 & 17.53 \\
& & & Curema & 1.57 & 12.21 \\
Ophidiiformes & Ophidiidae & Ophidion & Marginatum & 1.50 & 16.85 \\
Osmeriformes & Osmeridae & Osmerus & Mordax & 1.00 & 12.15 \\
Perciformes & Carangidae & Carangoides & Ruber & 6.00 & 6.48 \\
& & Caranx & Crysos & 2.00 & 15.07 \\
& & & Hippos & 3.09 & 8.92 \\
& & & Latus & 2.00 & 8.91 \\
& & Chloroscombrus & Chrysurus & 25.50 & 7.31 \\
& & Decapterus & Punctatus & 7.00 & 13.21 \\
& & Hemicaranx & Amblyrhynchus & 2.67 & 12.01 \\
& & Selar & Crumenophthalmus & 7.00 & 9.40 \\
& & Selene & Setapinnis & 1.62 & 6.00 \\
& & & Vomer & 2.14 & 5.60 \\
& & Trachinotus & Carolinus & 2.00 & 9.89 \\
& & & Falcatus & 4.50 & 6.98 \\
& Centrarchidae & Lepomis & Gibbosus & 8.14 & 11.13 \\
& & & Macrochirus & 4.86 & 14.94 \\
& & & Microlophus & 3.00 & 10.13 \\
& & Micropterus & Salmoides & 1.00 & 10.50 \\
& & Pomoxis & Annularis & 1.40 & 15.12 \\
& Centropomidae & Centropomus & Undecimalis & 1.00 & 24.00 \\
& Chaetodontidae & Chaetodon & Ocellatus & 2.00 & 4.85 \\
& Ephippidae & Chaetodipterus & Faber & 3.13 & 7.47 \\
& Gerreidae & Eucinostomus & Argenteus & 3.20 & 7.03 \\
& & & Gula & 1.40 & 9.18 \\
& & & Lefroyi & 6.50 & 7.64 \\
& Gobiidae & Gobioides & Broussonneti & 1.00 & 19.60 \\
& & Gobiosoma & Bosc & 3.00 & 3.63 \\
& Haemulidae & Haemulon & Plumieri & 9.50 & 8.96 \\
& & Orthopristis & Chrysoptera & 7.60 & 12.00 \\
& Labridae & Halichoeres & Caudalis & 1.00 & 11.50 \\
& & Lachnolaimus & Maximus & 5.00 & 6.80 \\
& & Tautoga & Onitis & 10.60 & 17.06 \\
& & Tautogolabrus & Adspersus & 4.11 & 10.22 \\
& Lutjanidae & Lutjanus & Griseus & 2.00 & 10.30 \\
& & & Synagris & 2.67 & 8.16 \\
\hline
\hline
\end{longtable}
}
\end{document}