sangría de párrafo de salto de columna de tabla

sangría de párrafo de salto de columna de tabla

Me gustaría indentel salto de línea en table. Mi resultado esperado es

ingrese la descripción de la imagen aquí

Mi MWE ES:

\documentclass{book}
\usepackage{booktabs}

\begin{document}

\begin{table}
\caption{A summary of the default Rails directory structure.    \label{table:rails_directory_structure}}
\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}}lp{3.5in}@{}}
\toprule
\textbf{File/Directory} & \textbf{Purpose} \\
\midrule
\textbf{app/}  & Core application (app) code, including models, views,     controllers, and helpers \\
\textbf{app/assets} & Applications assets such as cascading style sheets     (CSS), JavaScript files, and images \\
\textbf{bin/} & Binary executable files \\
\textbf{config/}  & Application configuration \\
\textbf{db/}  & Database files \\
\textbf{doc/}  & Documentation for the application \\
\textbf{lib/}  & Library modules \\
\textbf{lib/assets} & Library assets such as cascading style sheets (CSS),     JavaScript files, and images \\
\textbf{log/}  & Application log files \\
\bottomrule
\end{tabular*}
\end{table}
\end{document}

Respuesta1

Puede usar \hangindent=1em\hangafter=1y poner esto y \ttfamily(que encontré más adecuado para este caso \bfseries) en los especificadores de columna usando arrayel paquete.

\documentclass{book}
\usepackage{booktabs,array}

\begin{document}

\begin{table}
\caption{A summary of the default Rails directory structure.    \label{table:rails_directory_structure}}
\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}}>{\ttfamily}l
                        >{\hangindent=1em\hangafter=1}p{3.5in}@{}}
\toprule
File/Directory & \textbf{Purpose} \\
\midrule
app/  & Core application (app) code, including models, views,     controllers, and helpers \\
app/assets & Applications assets such as cascading style sheets     (CSS), JavaScript files, and images \\
bin/ & Binary executable files \\
config/  & Application configuration \\
db/  & Database files \\
doc/  & Documentation for the application \\
lib/  & Library modules \\
lib/assets & Library assets such as cascading style sheets (CSS),     JavaScript files, and images \\
log/  & Application log files \\
\bottomrule
\end{tabular*}
\end{table}
\end{document}

ingrese la descripción de la imagen aquí

información relacionada