问题:
tabularx
我希望在双列环境中将用 编写的单列表格拆分为两页。我曾见过使用 和 实现此目的的示例supertabular
,longtable
但xtab
在我的示例中似乎不起作用。
最小工作示例(MWE):
\documentclass[twocolumn]{article}
\usepackage[OT6,T1]{fontenc}
\usepackage{booktabs}
\usepackage{tabularx}
\begin{document}
\begin{table*}[t]
\caption{Caption here}
\begin{tabularx}{\textwidth}{Xcc}
\toprule
\textbf{Question} & \textbf{Responses} & \textbf{Frequency} \\
\midrule
\textbf{1. I prefer the following greeting by a chatbot:} & & \\
\hspace{2.5mm} By saying hello. & 11 & 14.7\% \\
\hspace{2.5mm} By saying hello, followed by my name. & 7 & 9.3\% \\
\hspace{2.5mm} By saying hello, followed by my name and asking me what I want help with. & 27 & 36\% \\
\hspace{2.5mm} It should be my initiative to start a conversation. & 30 & 40\% \\
\textbf{2. I prefer the following response when a chatbot does not understand me:} & & \\
\hspace{2.5mm} \textquotedbl I am sorry, I do not understand.\textquotedbl & 11 & 14.7\% \\
\hspace{2.5mm} \textquotedbl I am sorry, I do not understand. Maybe you can help me by asking your question in a different way? & 11 & 14.7\% \\
\hspace{2.5mm} \textquotedbl I am sorry, I do not understand. Do you want to talk with a human instead?\textquotedbl & 11 & 14.7\% \\
\hspace{2.5mm} \textquotedbl I do not know what you mean, try again!\textquotedbl & 11 & 14.7\% \\
\hspace{2.5mm} \textquotedbl I have searched the internet for \textquotedbl[your previous question/statement]\textquotedbl. & 11 & 14.7\% \\
\textbf{3. You have asked a chatbot to help you look for destinations for your next business trip.} & & \\
\hspace{2.5mm} \textbf{Which update message do you prefer?} & & \\
\hspace{2.5mm} \textquotedbl Back soon.\textquotedbl & 11 & 14.7\% \\
\hspace{2.5mm} \textquotedbl Searching for destinations...\textquotedbl & 11 & 14.7\% \\
\hspace{2.5mm} \textquotedbl Going through all the exciting options.\textquotedbl & 11 & 14.7\% \\
\hspace{2.5mm} \textquotedbl I don't want an update, only the result when the chatbot has finished the search.\textquotedbl & 11 & 14.7\% \\
\hspace{2.5mm} \textquotedbl Oh, a trip! *clapping hands* Can I come with? Think about it while I look up the
best options for your & 11 & 14.7\% \\
\hspace{2.5mm} destination.\textquotedbl & & \\
\hspace{2.5mm} \textquotedbl Drifting away, dreaming about the perfect destination, back soon...\textquotedbl & 11 & 14.7\% \\
\textbf{4. You ask a chatbot when the next bus to a train station leaves. Which response do you prefer?} & & \\
\hspace{2.5mm} \textquotedbl 12:15\textquotedbl & 11 & 14.7\% \\
\hspace{2.5mm} \textquotedbl Bus 11 towards *destination* leaves at 12:15.\textquotedbl & 11 & 14.7\% \\
\hspace{2.5mm} \textquotedbl Bus 11 leaves at 12:15, Bus 24 leaves at 12:18 and Bus 11 leaves at 12:25.\textquotedbl & 11 & 14.7\% \\
\hspace{2.5mm} \textquotedbl There are five different buses leaving to the train station from your bus stop,
number 11, number 24, & 11 & 14.7\% \\
\hspace{2.5mm} number 4, number 13 and number 121. Bus 11 leaves at 12:15, bus 24 leaves at 12:18, bus 4 leaves at 12:26, & & \\
\hspace{2.5mm} bus 13 leaves at 12:30 and bus 121 leaves at 12:31.\textquotedbl & & \\
\textbf{5. You have asked a chatbot for the weather tomorrow. Which response do you prefer?} & & \\
\hspace{2.5mm} \textquotedbl In what city?\textquotedbl & 11 & 14.7\% \\
\hspace{2.5mm} \textquotedbl 15 degrees celsius.\textquotedbl & 11 & 14.7\% \\
\hspace{2.5mm} \textquotedbl 15 degrees celsius and sunny with some clouds.\textquotedbl & 11 & 14.7\% \\
\hspace{2.5mm} \textquotedbl In Gothenburg it will be 15 degrees celsius and sunny with some clouds
tomorrow.\textquotedbl & 11 & 14.7\% \\
\textbf{6. You are interacting with a chatbot that is connected to your bank.} & & \\
\hspace{2.5mm} \textbf{Which opening message do you prefer?} & & \\
\hspace{2.5mm} \textquotedbl Yo, where's the money?\textquotedbl & 11 & 14.7\% \\
\hspace{2.5mm} \textquotedbl Hello, how can I help you today?\textquotedbl & 11 & 14.7\% \\
\hspace{2.5mm} \textquotedbl Hi! Are you looking to save or spend today?\textquotedbl & 11 & 14.7\% \\
\hspace{2.5mm} \textquotedbl Good morning. I am your banking assistant bot. How can I be of service today?\textquotedbl & 11 & 14.7\% \\
\textbf{7. You are interacting with a bot that helps you play music. Which opening message do you prefer?} & & \\
\hspace{2.5mm} \textquotedbl Please state genre, artist or song title in order to receive appropriate choices.\textquotedbl & 11 & 14.7\% \\
\hspace{2.5mm} \textquotedbl Tell me what you want to listen to, and I can help you find it!\textquotedbl & 11 & 14.7\% \\
\hspace{2.5mm} \textquotedbl Hi! Good to see you again, which genre do you feel like listening to today?\textquotedbl & 11 & 14.7\% \\
\hspace{2.5mm} \textquotedbl Groovy, you're back! I have some sweet tunes for you, you ready to get down?\textquotedbl & 11 & 14.7\% \\
\textbf{8. You are interacting for the first time with a chatbot at work to book a meeting.} & & \\
\hspace{2.5mm} \textbf{Which opening message do you prefer?} & & \\
\hspace{2.5mm} \textquotedbl Hi, I am your meeting buddy! What is on your mind? :)\textquotedbl & 11 & 14.7\% \\
\hspace{2.5mm} \textquotedbl Hello! Nice to see you here, let me know how I can help you.\textquotedbl & 11 & 14.7\% \\
\hspace{2.5mm} \textquotedbl Do you want to book a room or manage your calendar?\textquotedbl & 11 & 14.7\% \\
\hspace{2.5mm} \textquotedbl Welcome, would you like to see available times in your calendar?\textquotedbl & 11 & 14.7\% \\
\hspace{2.5mm} \textquotedbl Welcome, I am a bot that can help you to manage your calendar and book a
meeting room. Do you want & 11 & 14.7\% \\
\hspace{2.5mm} me to suggest appropriate times for a meeting?\textquotedbl & & \\
\textbf{9. You have booked a trip with a chatbot. Which response do you prefer?} & & \\
\hspace{2.5mm} \textquotedbl Trip booked leaving tomorrow 09:05 arriving 12:08 in Stockholm.\textquotedbl & 11 & 14.7\% \\
\hspace{2.5mm} \textquotedbl Your trip is booked. Leaving tomorrow at 09:05 and arriving 12:08 in
Stockholm.\textquotedbl & 11 & 14.7\% \\
\hspace{2.5mm} \textquotedbl Your trip is booked. Your train departs from the station tomorrow at 09:05 and
will be arriving at 12:08 & 11 & 14.7\% \\
\hspace{2.5mm} in Stockholm.\textquotedbl & & \\
\textbf{10. You are frustrated that a chatbot can not understand what you want and have expressed the} & & \\
\hspace{2.5mm} \textbf{frustration to the chatbot. Which response do you prefer?} & & \\
\hspace{2.5mm} \textquotedbl I don't understand. Please try again.\textquotedbl & 11 & 14.7\% \\
\hspace{2.5mm} \textquotedbl I am sorry, it seems I am not following, could you please rephrase and try again?\textquotedbl & 11 & 14.7\% \\
\hspace{2.5mm} \textquotedbl I am so sorry, I really want to help you but I just can not understand. Please
rephrase or try simple keywords instead.\textquotedbl & 11 & 14.7\% \\
\hspace{2.5mm} \textquotedbl I am terribly sorry, this is not how I wanted it to end up either..! I am doing my best to help you, please bare with me, I will do everything in my power to make it up to you.\textquotedbl & 11 & 14.7\% \\
\bottomrule
\end{tabularx}
\end{table*}
\end{document}
输出:
期望输出:
使tabularx
(或任何其他表格解决方案)延续两页,并在脚注中注明“接上页”。
答案1
为了获得X
跨两列文章两列的多页类型列表,您可以在 之前和之后使用xltabular
和。请记住,无论何时使用或 ,都会出现分页符。\onecolumn
\twocolumn
xltabular
\onecolumn
\twocolumn
以下是完整的 MWE:
\documentclass[twocolumn]{article}
\usepackage[OT6,T1]{fontenc}
\usepackage{booktabs}
\usepackage{xltabular}
\begin{document}
\onecolumn
\begin{xltabular}{\textwidth}{Xcc}
\caption{Caption here}\\
\toprule
\textbf{Question} & \textbf{Responses} & \textbf{Frequency} \\
\midrule
\endfirsthead
\caption{Caption here - continued from previous page}\\
\toprule
\textbf{Question} & \textbf{Responses} & \textbf{Frequency} \\
\midrule
\endhead
\textbf{1. I prefer the following greeting by a chatbot:} & & \\
\hspace{2.5mm} By saying hello. & 11 & 14.7\% \\
\hspace{2.5mm} By saying hello, followed by my name. & 7 & 9.3\% \\
\hspace{2.5mm} By saying hello, followed by my name and asking me what I want help with. & 27 & 36\% \\
\hspace{2.5mm} It should be my initiative to start a conversation. & 30 & 40\% \\
\textbf{2. I prefer the following response when a chatbot does not understand me:} & & \\
\hspace{2.5mm} \textquotedbl I am sorry, I do not understand.\textquotedbl & 11 & 14.7\% \\
\hspace{2.5mm} \textquotedbl I am sorry, I do not understand. Maybe you can help me by asking your question in a different way? & 11 & 14.7\% \\
\hspace{2.5mm} \textquotedbl I am sorry, I do not understand. Do you want to talk with a human instead?\textquotedbl & 11 & 14.7\% \\
\hspace{2.5mm} \textquotedbl I do not know what you mean, try again!\textquotedbl & 11 & 14.7\% \\
\hspace{2.5mm} \textquotedbl I have searched the internet for \textquotedbl[your previous question/statement]\textquotedbl. & 11 & 14.7\% \\
\textbf{3. You have asked a chatbot to help you look for destinations for your next business trip.} & & \\
\hspace{2.5mm} \textbf{Which update message do you prefer?} & & \\
\hspace{2.5mm} \textquotedbl Back soon.\textquotedbl & 11 & 14.7\% \\
\hspace{2.5mm} \textquotedbl Searching for destinations...\textquotedbl & 11 & 14.7\% \\
\hspace{2.5mm} \textquotedbl Going through all the exciting options.\textquotedbl & 11 & 14.7\% \\
\hspace{2.5mm} \textquotedbl I don't want an update, only the result when the chatbot has finished the search.\textquotedbl & 11 & 14.7\% \\
\hspace{2.5mm} \textquotedbl Oh, a trip! *clapping hands* Can I come with? Think about it while I look up the
best options for your & 11 & 14.7\% \\
\hspace{2.5mm} destination.\textquotedbl & & \\
\hspace{2.5mm} \textquotedbl Drifting away, dreaming about the perfect destination, back soon...\textquotedbl & 11 & 14.7\% \\
\textbf{4. You ask a chatbot when the next bus to a train station leaves. Which response do you prefer?} & & \\
\hspace{2.5mm} \textquotedbl 12:15\textquotedbl & 11 & 14.7\% \\
\hspace{2.5mm} \textquotedbl Bus 11 towards *destination* leaves at 12:15.\textquotedbl & 11 & 14.7\% \\
\hspace{2.5mm} \textquotedbl Bus 11 leaves at 12:15, Bus 24 leaves at 12:18 and Bus 11 leaves at 12:25.\textquotedbl & 11 & 14.7\% \\
\hspace{2.5mm} \textquotedbl There are five different buses leaving to the train station from your bus stop,
number 11, number 24, & 11 & 14.7\% \\
\hspace{2.5mm} number 4, number 13 and number 121. Bus 11 leaves at 12:15, bus 24 leaves at 12:18, bus 4 leaves at 12:26, & & \\
\hspace{2.5mm} bus 13 leaves at 12:30 and bus 121 leaves at 12:31.\textquotedbl & & \\
\textbf{5. You have asked a chatbot for the weather tomorrow. Which response do you prefer?} & & \\
\hspace{2.5mm} \textquotedbl In what city?\textquotedbl & 11 & 14.7\% \\
\hspace{2.5mm} \textquotedbl 15 degrees celsius.\textquotedbl & 11 & 14.7\% \\
\hspace{2.5mm} \textquotedbl 15 degrees celsius and sunny with some clouds.\textquotedbl & 11 & 14.7\% \\
\hspace{2.5mm} \textquotedbl In Gothenburg it will be 15 degrees celsius and sunny with some clouds
tomorrow.\textquotedbl & 11 & 14.7\% \\
\textbf{6. You are interacting with a chatbot that is connected to your bank.} & & \\
\hspace{2.5mm} \textbf{Which opening message do you prefer?} & & \\
\hspace{2.5mm} \textquotedbl Yo, where's the money?\textquotedbl & 11 & 14.7\% \\
\hspace{2.5mm} \textquotedbl Hello, how can I help you today?\textquotedbl & 11 & 14.7\% \\
\hspace{2.5mm} \textquotedbl Hi! Are you looking to save or spend today?\textquotedbl & 11 & 14.7\% \\
\hspace{2.5mm} \textquotedbl Good morning. I am your banking assistant bot. How can I be of service today?\textquotedbl & 11 & 14.7\% \\
\textbf{7. You are interacting with a bot that helps you play music. Which opening message do you prefer?} & & \\
\hspace{2.5mm} \textquotedbl Please state genre, artist or song title in order to receive appropriate choices.\textquotedbl & 11 & 14.7\% \\
\hspace{2.5mm} \textquotedbl Tell me what you want to listen to, and I can help you find it!\textquotedbl & 11 & 14.7\% \\
\hspace{2.5mm} \textquotedbl Hi! Good to see you again, which genre do you feel like listening to today?\textquotedbl & 11 & 14.7\% \\
\hspace{2.5mm} \textquotedbl Groovy, you're back! I have some sweet tunes for you, you ready to get down?\textquotedbl & 11 & 14.7\% \\
\textbf{8. You are interacting for the first time with a chatbot at work to book a meeting.} & & \\
\hspace{2.5mm} \textbf{Which opening message do you prefer?} & & \\
\hspace{2.5mm} \textquotedbl Hi, I am your meeting buddy! What is on your mind? :)\textquotedbl & 11 & 14.7\% \\
\hspace{2.5mm} \textquotedbl Hello! Nice to see you here, let me know how I can help you.\textquotedbl & 11 & 14.7\% \\
\hspace{2.5mm} \textquotedbl Do you want to book a room or manage your calendar?\textquotedbl & 11 & 14.7\% \\
\hspace{2.5mm} \textquotedbl Welcome, would you like to see available times in your calendar?\textquotedbl & 11 & 14.7\% \\
\hspace{2.5mm} \textquotedbl Welcome, I am a bot that can help you to manage your calendar and book a
meeting room. Do you want & 11 & 14.7\% \\
\hspace{2.5mm} me to suggest appropriate times for a meeting?\textquotedbl & & \\
\textbf{9. You have booked a trip with a chatbot. Which response do you prefer?} & & \\
\hspace{2.5mm} \textquotedbl Trip booked leaving tomorrow 09:05 arriving 12:08 in Stockholm.\textquotedbl & 11 & 14.7\% \\
\hspace{2.5mm} \textquotedbl Your trip is booked. Leaving tomorrow at 09:05 and arriving 12:08 in
Stockholm.\textquotedbl & 11 & 14.7\% \\
\hspace{2.5mm} \textquotedbl Your trip is booked. Your train departs from the station tomorrow at 09:05 and
will be arriving at 12:08 & 11 & 14.7\% \\
\hspace{2.5mm} in Stockholm.\textquotedbl & & \\
\textbf{10. You are frustrated that a chatbot can not understand what you want and have expressed the} & & \\
\hspace{2.5mm} \textbf{frustration to the chatbot. Which response do you prefer?} & & \\
\hspace{2.5mm} \textquotedbl I don't understand. Please try again.\textquotedbl & 11 & 14.7\% \\
\hspace{2.5mm} \textquotedbl I am sorry, it seems I am not following, could you please rephrase and try again?\textquotedbl & 11 & 14.7\% \\
\hspace{2.5mm} \textquotedbl I am so sorry, I really want to help you but I just can not understand. Please
rephrase or try simple keywords instead.\textquotedbl & 11 & 14.7\% \\
\hspace{2.5mm} \textquotedbl I am terribly sorry, this is not how I wanted it to end up either..! I am doing my best to help you, please bare with me, I will do everything in my power to make it up to you.\textquotedbl & 11 & 14.7\% \\
\bottomrule
\end{xltabular}
\twocolumn
\end{document}
由于我正确地假设您想要针对每个问题水平缩进整个答案块,因此我想出了以下 MWE。在这里,我必须@{\quad\quad}
将第一列的所有内容缩进宽度为。\quad\quad
为了为问题重写这个缩进,我使用了\multicolumn{1}{@{\hspace{6pt}}X}{...}
。由于这很长,并且为了不必手动编号问题,我引入了一个新的计数器和自定义命令\myquestion
来负责问题的格式和编号。我还使用该siunitx
包来改进第二列和第三列数字的对齐,并删除了重复的\%
。最后,我还添加了\addlinespace
在每个新问题前添加一点垂直白色间距。
\documentclass[twocolumn]{article}
\usepackage[OT6,T1]{fontenc}
\usepackage{booktabs}
\usepackage{xltabular}
\usepackage{siunitx}
\newcounter{myquestionnumber}
\setcounter{myquestionnumber}{1}
\newcommand{\myquestion}[1]{\multicolumn{1}{@{\hspace{6pt}}X}{\textbf{\themyquestionnumber.~#1}}\stepcounter{myquestionnumber}}
\begin{document}
\onecolumn
\begin{xltabular}{\textwidth}{@{\quad\quad}>{\raggedright\arraybackslash}XS[table-format=2]S[table-format=2.1]}
\caption{Caption here}\\
\toprule
\multicolumn{1}{@{\hspace{6pt}}X}{\textbf{Question}} & \textbf{Responses} & \textbf{Frequency in \%} \\
\midrule
\endfirsthead
\caption{Caption here - continued from previous page}\\
\toprule
\multicolumn{1}{@{\hspace{6pt}}X}{\textbf{Question}} & \textbf{Responses} & \textbf{Frequency in \%} \\
\midrule
\endhead
\myquestion{I prefer the following greeting by a chatbot:} & & \\
By saying hello. & 11 & 14.7 \\
By saying hello, followed by my name. & 7 & 9.3 \\
By saying hello, followed by my name and asking me what I want help with. & 27 & 36 \\
It should be my initiative to start a conversation. & 30 & 40 \\
\addlinespace
\myquestion{I prefer the following response when a chatbot does not understand me:} & & \\
\textquotedbl I am sorry, I do not understand.\textquotedbl & 11 & 14.7 \\
\textquotedbl I am sorry, I do not understand. Maybe you can help me by asking your question in a different way? & 11 & 14.7 \\
\textquotedbl I am sorry, I do not understand. Do you want to talk with a human instead?\textquotedbl & 11 & 14.7 \\
\ \textquotedbl I do not know what you mean, try again!\textquotedbl & 11 & 14.7 \\
\textquotedbl I have searched the internet for \textquotedbl[your previous question/statement]\textquotedbl. & 11 & 14.7 \\
\addlinespace
\myquestion{You have asked a chatbot to help you look for destinations for your next business trip. Which update message do you prefer?} & & \\
\textquotedbl Back soon.\textquotedbl & 11 & 14.7 \\
\textquotedbl Searching for destinations...\textquotedbl & 11 & 14.7 \\
\textquotedbl Going through all the exciting options.\textquotedbl & 11 & 14.7 \\
\textquotedbl I don't want an update, only the result when the chatbot has finished the search.\textquotedbl & 11 & 14.7 \\
\textquotedbl Oh, a trip! *clapping hands* Can I come with? Think about it while I look up the
best options for your destination.\textquotedbl & 11 & 14.7 \\
\textquotedbl Drifting away, dreaming about the perfect destination, back soon...\textquotedbl & 11 & 14.7 \\
\addlinespace
\myquestion{You ask a chatbot when the next bus to a train station leaves. Which response do you prefer?} & & \\
\textquotedbl 12:15\textquotedbl & 11 & 14.7 \\
\textquotedbl Bus 11 towards *destination* leaves at 12:15.\textquotedbl & 11 & 14.7 \\
\textquotedbl Bus 11 leaves at 12:15, Bus 24 leaves at 12:18 and Bus 11 leaves at 12:25.\textquotedbl & 11 & 14.7 \\
\textquotedbl There are five different buses leaving to the train station from your bus stop,
number 11, number 24, number 4, number 13 and number 121. Bus 11 leaves at 12:15, bus 24 leaves at 12:18, bus 4 leaves at 12:26, bus 13 leaves at 12:30 and bus 121 leaves at 12:31.\textquotedbl & 11 & 14.7 \\
\addlinespace
\myquestion{You have asked a chatbot for the weather tomorrow. Which response do you prefer?} & & \\
\textquotedbl In what city?\textquotedbl & 11 & 14.7 \\
\textquotedbl 15 degrees celsius.\textquotedbl & 11 & 14.7 \\
\textquotedbl 15 degrees celsius and sunny with some clouds.\textquotedbl & 11 & 14.7 \\
\textquotedbl In Gothenburg it will be 15 degrees celsius and sunny with some clouds
tomorrow.\textquotedbl & 11 & 14.7 \\
\addlinespace
\myquestion{You are interacting with a chatbot that is connected to your bank. Which opening message do you prefer?} & & \\
\textquotedbl Yo, where's the money?\textquotedbl & 11 & 14.7 \\
\textquotedbl Hello, how can I help you today?\textquotedbl & 11 & 14.7 \\
\textquotedbl Hi! Are you looking to save or spend today?\textquotedbl & 11 & 14.7 \\
\textquotedbl Good morning. I am your banking assistant bot. How can I be of service today?\textquotedbl & 11 & 14.7 \\
\addlinespace
\myquestion{You are interacting with a bot that helps you play music. Which opening message do you prefer?} & & \\
\textquotedbl Please state genre, artist or song title in order to receive appropriate choices.\textquotedbl & 11 & 14.7 \\
\textquotedbl Tell me what you want to listen to, and I can help you find it!\textquotedbl & 11 & 14.7 \\
\textquotedbl Hi! Good to see you again, which genre do you feel like listening to today?\textquotedbl & 11 & 14.7 \\
\textquotedbl Groovy, you're back! I have some sweet tunes for you, you ready to get down?\textquotedbl & 11 & 14.7 \\
\addlinespace
\myquestion{You are interacting for the first time with a chatbot at work to book a meeting. Which opening message do you prefer?} & & \\
\textquotedbl Hi, I am your meeting buddy! What is on your mind? :)\textquotedbl & 11 & 14.7 \\
\textquotedbl Hello! Nice to see you here, let me know how I can help you.\textquotedbl & 11 & 14.7 \\
\textquotedbl Do you want to book a room or manage your calendar?\textquotedbl & 11 & 14.7 \\
\textquotedbl Welcome, would you like to see available times in your calendar?\textquotedbl & 11 & 14.7 \\
\textquotedbl Welcome, I am a bot that can help you to manage your calendar and book a
meeting room. Do you want me to suggest appropriate times for a meeting?\textquotedbl & 11 & 14.7 \\
\addlinespace
\myquestion{You have booked a trip with a chatbot. Which response do you prefer?} & & \\
\textquotedbl Trip booked leaving tomorrow 09:05 arriving 12:08 in Stockholm.\textquotedbl & 11 & 14.7 \\
\textquotedbl Your trip is booked. Leaving tomorrow at 09:05 and arriving 12:08 in
Stockholm.\textquotedbl & 11 & 14.7 \\
\addlinespace
\textquotedbl Your trip is booked. Your train departs from the station tomorrow at 09:05 and
will be arriving at 12:08 in Stockholm.\textquotedbl & 11 & 14.7 \\
\myquestion{You are frustrated that a chatbot can not understand what you want and have expressed the} & & \\
\textbf{frustration to the chatbot. Which response do you prefer?} & & \\
\textquotedbl I don't understand. Please try again.\textquotedbl & 11 & 14.7 \\
\textquotedbl I am sorry, it seems I am not following, could you please rephrase and try again?\textquotedbl & 11 & 14.7 \\
\textquotedbl I am so sorry, I really want to help you but I just can not understand. Please
rephrase or try simple keywords instead.\textquotedbl & 11 & 14.7 \\
\textquotedbl I am terribly sorry, this is not how I wanted it to end up either..! I am doing my best to help you, please bare with me, I will do everything in my power to make it up to you.\textquotedbl & 11 & 14.7 \\
\bottomrule
\end{xltabular}
\twocolumn
\end{document}
答案2
我刚刚复制了上面@leandriis 的部分表格,并使用了多列而不是双列。阅读文档很重要,因为在完成文档后,您肯定会喜欢调整列平衡。手册描述了不同的策略,并提供了改进分页符和列平衡的技巧。特别是,如果您有几个短的多列环境(一段或两段)被表格和图片打断,您可能需要进行一些调整。
请注意,列内不能有浮动元素(图片、表格)。
\documentclass{article}
\usepackage{multicol, lipsum}
\usepackage[OT6,T1]{fontenc}
\usepackage{booktabs}
\usepackage{xltabular}
\usepackage{siunitx}
\newcounter{myquestionnumber}
\setcounter{myquestionnumber}{1}
\newcommand{\myquestion}[1]{\multicolumn{1}{@{\hspace{6pt}}X}{\textbf{\themyquestionnumber.~#1}}\stepcounter{myquestionnumber}}
\begin{document}
\begin{multicols}{2}[\section{We start with a section}]
\lipsum[1-2]
\end{multicols}
\begin{xltabular}{\textwidth}{@{\quad\quad}>{\raggedright\arraybackslash}XS[table-format=2]S[table-format=2.1]}
\caption{Caption here}\\
\toprule
\multicolumn{1}{@{\hspace{6pt}}X}{\textbf{Question}} & \textbf{Responses} & \textbf{Frequency in \%} \\
\midrule
\endfirsthead
\caption{Caption here - continued from previous page}\\
\toprule
\multicolumn{1}{@{\hspace{6pt}}X}{\textbf{Question}} & \textbf{Responses} & \textbf{Frequency in \%} \\
\midrule
\endhead
\myquestion{I prefer the following greeting by a chatbot:} & & \\
By saying hello. & 11 & 14.7 \\
By saying hello, followed by my name. & 7 & 9.3 \\
By saying hello, followed by my name and asking me what I want help with. & 27 & 36 \\
It should be my initiative to start a conversation. & 30 & 40 \\
\addlinespace
\myquestion{I prefer the following response when a chatbot does not understand me:} & & \\
\textquotedbl I am sorry, I do not understand.\textquotedbl & 11 & 14.7 \\
\textquotedbl I am sorry, I do not understand. Maybe you can help me by asking your question in a different way? & 11 & 14.7 \\
\textquotedbl I am sorry, I do not understand. Do you want to talk with a human instead?\textquotedbl & 11 & 14.7 \\
\ \textquotedbl I do not know what you mean, try again!\textquotedbl & 11 & 14.7 \\
\textquotedbl I have searched the internet for \textquotedbl[your previous question/statement]\textquotedbl. & 11 & 14.7 \\
\addlinespace
\myquestion{You have asked a chatbot to help you look for destinations for your next business trip. Which update message do you prefer?} & & \\
\textquotedbl Back soon.\textquotedbl & 11 & 14.7 \\
\textquotedbl Searching for destinations...\textquotedbl & 11 & 14.7 \\
\textquotedbl Going through all the exciting options.\textquotedbl & 11 & 14.7 \\
\textquotedbl I don't want an update, only the result when the chatbot has finished the search.\textquotedbl & 11 & 14.7 \\
\textquotedbl Oh, a trip! *clapping hands* Can I come with? Think about it while I look up the
best options for your destination.\textquotedbl & 11 & 14.7 \\
\textquotedbl Drifting away, dreaming about the perfect destination, back soon...\textquotedbl & 11 & 14.7 \\
\addlinespace
\bottomrule
\end{xltabular}
\begin{multicols}{2}[\section{We continue with a section}]
\lipsum[1-3]\par
But we need more text to balance the columns, even more, ups to three lines more. Compilation is slow.
\end{multicols}
\end{document}