我正在尝试编写一个,tabular
其中第二列包含一些引用(\cite{}
)。获得的结果是每个单元格都有一行,我想将引用放在两行中,以便长度与其他行相当。
我能怎么做?
代码如下,图片是我得到的。
\documentclass[a4paper,twoside,12pt]{book}
\usepackage[T1]{fontenc}
\usepackage[utf8x]{inputenc}
\usepackage[english]{babel}
\usepackage{fancyhdr}
\usepackage{caption,setspace}
\usepackage{quoting}
\usepackage[version=3]{mhchem}
\usepackage{booktabs, array}
\usepackage{tabularx}
\usepackage{tikz}
\usetikzlibrary{arrows}
\quotingsetup{font=small}
\captionsetup{font={small,stretch=1}}
\begin{document}
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1cm}}
\newcolumntype{M}[1]{>{\small\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1cm}}
\begin{tabular}{C{1.7} M{2} C{2.5} C{2.2} C{1.6} C{2}}
\toprule
{\bf Type of crop} & {\bf Reference} & {\bf Location}\\
\midrule
{\bf Rice} & {\cite{Lugato:2013}} & {Northern Italy}\\
{\bf Maize} & {\cite{Uzoma:2011}} & {Tottori, Japan}\\
{\bf Maize} & {\cite{Oguntunde:2004}} &{Ejura, Ghana}\\
{\bf Soyabean} & {\cite{Tagoe:2008}} & {Gifu, Japan}\\
\bottomrule
\end {tabular}
\include{biblio}
\bibliographystyle{apalike}
\bibliography{Tesi}
\end{document}
答案1
我建议你不要m
在表格中使用说明符。你喜欢这样的布局吗?另请注意,你在表格头中指定了六列。
\documentclass[a4paper,twoside,12pt]{book}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{booktabs, array, tabularx}
\usepackage{lmodern, natbib, ragged2e}
\begin{document}
\newcolumntype{P}[1]{>{\small\hspace{0pt}\RaggedRight}p{#1cm}}
\newcolumntype{B}[1]{>{\small\hspace{0pt}\RaggedRight\bfseries}p{#1cm}}
\newcolumntype{L}{>{\small\hspace{0pt}\RaggedRight}l}
\begin{tabular}{@{}B{1.7} P{2} L@{}}
\toprule
\mdseries Type of crop & Reference & Location \\ \midrule
Rice & \citet{Lugato:2013} & Northern Italy \\
Maize & \citet{Uzoma:2011} & Tottori, Japan \\
Maize & \citet{Oguntunde:2004} & Ejura, Ghana \\
Soyabean & \citet{Tagoe:2008} & Gifu, Japan \\
\bottomrule
\end{tabular}
\begin{thebibliography}{}
\bibitem[Lugato et al.(2013)]{Lugato:2013} Lugato et al.(2013).
\bibitem[Uzoma et al.(2011)]{Uzoma:2011} Uzoma et al.(2011).
\bibitem[Oguntunde et al.(2014)]{Oguntunde:2004} Oguntunde et
al. (2014).
\bibitem[Tagoe et al.(2008)]{Tagoe:2008} Tagoe et al.(2008).
\end{thebibliography}
\end{document}