표 열 나누기 단락 들여쓰기

표 열 나누기 단락 들여쓰기

indent에서 줄바꿈을 하고 싶습니다 table. 내 기대 결과는

여기에 이미지 설명을 입력하세요

내 MWE는 다음과 같습니다.

\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}

답변1

package를 사용하여 열 지정자 자체에 this 및 (이 경우에 더 적합하다고 생각함 ) \hangindent=1em\hangafter=1을 넣을 수 있습니다 .\ttfamily\bfseriesarray

\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}

여기에 이미지 설명을 입력하세요

관련 정보