缩进表格中的第二行

缩进表格中的第二行

此代码创建了下面打印的表格:

\documentclass[a4paper,11pt]{article}

\usepackage{array}
\usepackage{booktabs}
\usepackage{tabularx}

\begin{document}

% outline different types table
\begin{table}
  \centering
  \footnotesize
  \begin{tabularx}{\linewidth}{lXl}
    \toprule
    Type & Example & Reference \\
    \midrule
    Habitat & Three tree-climbing species used different parts of trees & \textcite{LaraEtAl2015} \\
    Diet & Three species of dabbling ducks \textit{Anas} foraged on seeds of different size and mass & \textcite{BrochetEtAl2012} \\
    Temporal & Different species of \textit{Gyps} vulture visited carcasses at different times of day & \textcite{Kendall2014} \\
    Spatial & Different species of \textit{Sterna} tern foraged in different parts of the sea & \textcite{RobertsonEtAl2014} \\
    Acoustic & A large community of vocalising rainforest species partitioned the sound environment & \textcite{Luther2009} \\
    \bottomrule
  \end{tabularx}
  \caption[Types of niche partitioning]{Different types of niche partitioning with examples. Note that these types of niche partitioning are not mutually exclusive. For example, two species could partition habitat, which might be a consequence of partitioning diet.}.
  \label{table_niche_partitioning}
\end{table}
%%nichepartitioning

\end{document}

![在此处输入图片描述]1

当一行溢出到下一行时,我怎样才能使该行缩进,就像这样:

![在此处输入图片描述]2

答案1

\hangindent为-column插入一个段落X

在此处输入图片描述

\documentclass{article}

\usepackage{booktabs,tabularx}

\newcommand{\textcite}[1]{#1}% Just for this example
\begin{document}

\noindent
\begin{tabularx}{\linewidth}{l>{\hangindent=2em}Xl}
  \toprule
  Type & Example & Reference \\
  \midrule
  Habitat & Three tree-climbing species used different parts of trees & \textcite{LaraEtAl2015} \\
  Diet & Three species of dabbling ducks \textit{Anas} foraged on seeds of different size and mass & \textcite{BrochetEtAl2012} \\
  Temporal & Different species of \textit{Gyps} vulture visited carcasses at different times of day & \textcite{Kendall2014} \\
  Spatial & Different species of \textit{Sterna} tern foraged in different parts of the sea & \textcite{RobertsonEtAl2014} \\
  Acoustic & A large community of vocalising rainforest species partitioned the sound environment & \textcite{Luther2009} \\
  \bottomrule
\end{tabularx}

\end{document}

相关内容