
두 페이지로 구성된 긴 표의 형식을 지정하는 데 문제가 있습니다. 이것은 내 현재 코드입니다.
\begin{longtable}{p{5cm}p{9cm}}
\caption{Descriptions of learning styles \citep{Hoerner2013}}\\
\hline
\multicolumn{1}{c}{\textbf{Learning Style}} & \multicolumn{1}{c}{\textbf{Description}} \\\hline
\endhead
\multicolumn{1}{c}{1. Visual} & \parbox[c]{\hsize}{People who understand work better when it is in the form of a diagram. Knowledge and concept maps are good tools for such learners.} \vspace{1mm} \\\hline
\multicolumn{1}{c}{2. Aural} & \parbox[c]{\hsize}{\vspace{1mm} People who dislike reading, but enjoys hearing someone else say something aloud. Hearing the information is key for such students and group discussions can be of great aid.} \vspace{1mm} \\\hline
\multicolumn{1}{c}{3. Verbal} & \parbox[c]{\hsize}{Verbal learners are people who express themselves easier through writing and speaking. Mnemonics, scripting and role playing are some great techniques to helps those learners.} \vspace{1mm} \\\hline
\multicolumn{1}{c}{4. Physical} & \parbox[c]{\hsize}{Hands-on activities rather than lectures or demonstrations appeal to these learners. They are a small percentage of the population, but they learn better through practical experience.} \vspace{1mm} \\\hline
\multicolumn{1}{c}{5. Logical} & \parbox[c]{\hsize}{People who are good with numbers and using logic to understand. They easily recognize patterns and often tend to group information to further their understanding.} \vspace{1mm} \\\hline
\multicolumn{1}{c}{6. Social} & \parbox[c]{\hsize}{When communicating and socialising with others come easy, someone is a social learner. Studying in group formats and learning from others are their speciality and is how they excel.} \vspace{1mm} \\\hline
\multicolumn{1}{c}{7. Solitary} & \parbox[c]{\hsize}{People who are more comfortable studying in private and introspective. The concentration of these students are at their peak when they can focus on their own thoughts without the distractions of others around them.} \vspace{1mm} \\\hline
\label{learningstyles}
\end{longtable}
첨부된 그림과 같이 표시됩니다. 보시다시피, 테이블의 각 행에서 hline은 각 단락의 상단에 매우 가깝습니다. 작동하는 각 \hline 뒤에 \를 삽입했지만 각 단락 위와 아래의 간격은 동일한 크기가 아니며 테이블의 두 번째 페이지에서 3. Verbal 위에 빈 행이 추가됩니다. 간격이 같은 크기가 되도록 각 \hline 뒤에 \ 대신 \vspace{1mm}를 추가하려고 시도했지만 프로그램이 충돌했습니다.
더 보기 좋게 만들 수 있는 다른 방법이 있나요?
답변1
\hline
및를 사용하지 마십시오 \cline
. 대신 패키지를 로드 하고 , , 및 선 그리기 명령을 booktabs
사용하세요 .\toprule
\midrule
\bottomrule
\addlinespaces
또한 내부 수평선을 공백으로 바꾸고 열 내용을 중앙에 설정하지 않으며 굵은 글씨를 과도하게 사용하지 않을 것입니다.
\documentclass{article} % select a suitable document class
\usepackage{natbib, longtable, booktabs}
\newlength\mylen
\settowidth\mylen{Learning Style}
% Calculate maximal permissible width of second column:
\setlength\mylen{\dimexpr\textwidth-\mylen-2\tabcolsep\relax}
\begin{document}
\frenchspacing
\begin{longtable}{@{}lp{\mylen}@{}}
\caption{Descriptions of learning styles \citep{Hoerner2013}}
\label{learningstyles} \\
\toprule
Learning Style & Description \\
\midrule
\endhead
\bottomrule
\endfoot
1. Visual & People who understand work better when it is in the form of a diagram. Knowledge and concept maps are good tools for such learners. \\
\addlinespace
2. Aural & People who dislike reading, but enjoys hearing someone else say something aloud. Hearing the information is key for such students and group discussions can be of great aid. \\
\addlinespace
3. Verbal & Verbal learners are people who express themselves easier through writing and speaking. Mnemonics, scripting and role playing are some great techniques to helps those learners. \\
\addlinespace
4. Physical & Hands-on activities rather than lectures or demonstrations appeal to these learners. They are a small percentage of the population, but they learn better through practical experience. \\
\addlinespace
5. Logical & People who are good with numbers and using logic to understand. They easily recognize patterns and often tend to group information to further their understanding. \\
\addlinespace
6. Social & When communicating and socialising with others come easy, someone is a social learner. Studying in group formats and learning from others are their speciality and is how they excel. \\
\addlinespace
7. Solitary & People who are more comfortable studying in private and introspective. The concentration of these students are at their peak when they can focus on their own thoughts without the distractions of others around them. \\
\end{longtable}
\end{document}
답변2
xltabular
열 너비를 사용하면 자동으로 결정될 수 있습니다.
\documentclass{article}
\usepackage{booktabs, makecell, xltabular}
\renewcommand\theadfont{\normalsize\bfseries}
\usepackage{lipsum}
\begin{document}
\lipsum[1-3]
\begin{xltabular}{\linewidth}{@{} lX @{}}
\caption{Descriptions of learning styles}
\label{learningstyles} \\
\toprule
\thead{Learning\\ Style} & \thead{Description} \\
\midrule
\endfirsthead
\caption[]{Descriptions of learning styles (cont.)} \\
\toprule
\thead{Learning\\ Style} & \thead{Description} \\
\midrule
\endhead
\midrule
\multicolumn{2}{r}{%
\footnotesize\textit{Continue on the next page}}\\
\endfoot
\bottomrule
\endlastfoot
1. Visual
& People who understand work better when it is in the form of a diagram. Knowledge and concept maps are good tools for such learners.\\
\addlinespace
2. Aural
& People who dislike reading, but enjoys hearing someone else say something aloud. Hearing the information is key for such students and group discussions can be of great aid.\\
\addlinespace
3. Verbal
& Verbal learners are people who express themselves easier through writing and speaking. Mnemonics, scripting and role playing are some great techniques to helps those learners.\\
\addlinespace
4. Physical
& Hands-on activities rather than lectures or demonstrations appeal to these learners. They are a small percentage of the population, but they learn better through practical experience.\\
\addlinespace
5. Logical
& People who are good with numbers and using logic to understand. They easily recognize patterns and often tend to group information to further their understanding.\\
\addlinespace
6. Social
& When communicating and socialising with others come easy, someone is a social learner. Studying in group formats and learning from others are their speciality and is how they excel.\\
\addlinespace
7. Solitary
& People who are more comfortable studying in private and introspective. The concentration of these students are at their peak when they can focus on their own thoughts without the distractions of others around them.\\
\end{xltabular}
\end{document}
답변3
\parbox
이상한 간격의 원인인 을 제거 하고 이를 패키지 m
의 열로 바꾸는 것을 고려하십시오 array
.
나는 또한 booktabs
더 멋진 수평선을 위해 패키지를 사용했습니다.
\documentclass{article}
\usepackage{longtable}
\usepackage{array}
\usepackage{booktabs}
\begin{document}
\begin{longtable}{m{5cm}m{9cm}}
\caption{Descriptions of learning styles}\\
\toprule
\multicolumn{1}{c}{\textbf{Learning Style}} & \multicolumn{1}{c}{\textbf{Description}} \\
\midrule
\endhead
\multicolumn{1}{c}{1. Visual}
& People who understand work better when it is in the form of a diagram. Knowledge and concept maps are good tools for such learners.\\
\midrule
\multicolumn{1}{c}{2. Aural}
& People who dislike reading, but enjoys hearing someone else say something aloud. Hearing the information is key for such students and group discussions can be of great aid.\\
\midrule
\multicolumn{1}{c}{3. Verbal}
& Verbal learners are people who express themselves easier through writing and speaking. Mnemonics, scripting and role playing are some great techniques to helps those learners.\\
\midrule
\multicolumn{1}{c}{4. Physical}
& Hands-on activities rather than lectures or demonstrations appeal to these learners. They are a small percentage of the population, but they learn better through practical experience.\\
\midrule
\multicolumn{1}{c}{5. Logical}
& People who are good with numbers and using logic to understand. They easily recognize patterns and often tend to group information to further their understanding.\\
\midrule
\multicolumn{1}{c}{6. Social}
& When communicating and socialising with others come easy, someone is a social learner. Studying in group formats and learning from others are their speciality and is how they excel.\\
\midrule
\multicolumn{1}{c}{7. Solitary}
& People who are more comfortable studying in private and introspective. The concentration of these students are at their peak when they can focus on their own thoughts without the distractions of others around them.\\
\bottomrule
\label{learningstyles}
\end{longtable}
\end{document}
편집하다
일반적으로 나는 Mico의 제안에 동의하지만 제공된 테이블 스타일(내가 복제한)을 선호한다면 가장 긴 항목을 사용하여 Mico가 제안한 대로 열 너비를 계산하는 것이 좋습니다.
\documentclass{article}
\usepackage{longtable}
\usepackage{array}
\usepackage{booktabs}
\newlength\colOne
\newlength\colTwo
\settowidth\colOne{Learning Style}
% Calculate maximal permissible width of second column:
\setlength\colTwo{\dimexpr\textwidth-\colOne-2\tabcolsep\relax}
\begin{document}
\begin{longtable}{m{\colOne}m{\colTwo}}
\caption{Descriptions of learning styles}\\
\toprule
\multicolumn{1}{c}{\textbf{Learning Style}} & \multicolumn{1}{c}{\textbf{Description}} \\
\midrule
\endhead
\multicolumn{1}{c}{1. Visual}
& People who understand work better when it is in the form of a diagram. Knowledge and concept maps are good tools for such learners.\\
\midrule
\multicolumn{1}{c}{2. Aural}
& People who dislike reading, but enjoys hearing someone else say something aloud. Hearing the information is key for such students and group discussions can be of great aid.\\
\midrule
\multicolumn{1}{c}{3. Verbal}
& Verbal learners are people who express themselves easier through writing and speaking. Mnemonics, scripting and role playing are some great techniques to helps those learners.\\
\midrule
\multicolumn{1}{c}{4. Physical}
& Hands-on activities rather than lectures or demonstrations appeal to these learners. They are a small percentage of the population, but they learn better through practical experience.\\
\midrule
\multicolumn{1}{c}{5. Logical}
& People who are good with numbers and using logic to understand. They easily recognize patterns and often tend to group information to further their understanding.\\
\midrule
\multicolumn{1}{c}{6. Social}
& When communicating and socialising with others come easy, someone is a social learner. Studying in group formats and learning from others are their speciality and is how they excel.\\
\midrule
\multicolumn{1}{c}{7. Solitary}
& People who are more comfortable studying in private and introspective. The concentration of these students are at their peak when they can focus on their own thoughts without the distractions of others around them.\\
\bottomrule
\label{learningstyles}
\end{longtable}
\end{document}
편집 2
Mico가 그의 의견에서 제안한 것처럼 우리는 일반 글꼴 두께 너비와 다르기 때문에 텍스트의 굵은 글꼴 버전의 너비를 계산해야 합니다. 게다가 \tabcolsep
이 예에는 Mico와 비교하여 두 가지가 더 있습니다 . 테이블의 가장 왼쪽에 있는 것과 가장 오른쪽에 있는 것. Mico는 를 작성하여 이를 억제했습니다 @{}lp{\mylen}@{}
. 여기서 는 중괄호 사이에 있는 모든 차원으로 로컬로 @{}
재설정하는 데 사용되므로 이 경우에는 아무 것도 없습니다.\tabcolsep
따라서 열 너비를 계산하는 코드는 다음과 같이 대체되어야 합니다.
\newlength\colOne
\newlength\colTwo
\settowidth\colOne{\textbf{Learning Style}}
% Calculate maximal permissible width of second column:
\setlength\colTwo{\dimexpr\textwidth-\colOne-4\tabcolsep\relax}