我需要在 overleaf 中创建一个表格,大多数单元格的内容都包含大量内容,在 excel 中需要换行才能容纳。我尝试了所有在线表格编辑器,也尝试创建自己的表格,但都不起作用。它们都太宽了,或者即使我可以将它们放在页面上,它们也太小而无法阅读。我查看了类似问题的所有答案,但找不到正确的解决方法。在花了整整两天时间尝试修复一个简单的表格之后,我现在已经没有时间了,我想知道是否有任何付费的表格生成器软件或在线工具可以让我获得更高级的功能,例如换行文本?
这是我一直在使用的最新表格。
\begin{table}[ht]
\centering
\begin{tabular}{ll}
\hline
\textbf{Fungible Tokens} & \textbf{Non-fungible tokens} \\ \hline
{\color[HTML]{333333} \begin{tabular}[c]{@{}l@{}}Interchangeable Here a token can be exchanged for another token if its of the same type. For example, 100 Bitcoin can be exchanged for 100 Bitcoin\end{tabular}} & \begin{tabular}[c]{@{}l@{}}Not-Interchangeable Here a non-fungible token cannot be exchanged or replaced with another non-fungible token. For example, a non-fungible token representing an unique asset such as a property cannot be exchanged with another unique property asset.\end{tabular} \\ \hline
\begin{tabular}[c]{@{}l@{}}Uniform Each token is of the same type, is identical in their specification. For example, Bitcoin is a fungible token and each bitcoin is of the same type and identical to any other bitcoin on the network\end{tabular} & \begin{tabular}[c]{@{}l@{}}Unique Each token is unique and has different characteristics to the next token. For example, a unique asset represented as a digital asset such as a property will be unique to all other properties. Each property will be uniquely represented.\end{tabular} \\ \hline
\begin{tabular}[c]{@{}l@{}}Divisible Fungible tokens can be divided into smaller amounts. For example, 100 Bitcoin can be divided into two units 50 Bitcoin or 100 units of 1 Bitcoin. There is no change in the value of the 100 bitcoin even if its broken down into smaller units.\end{tabular} & \begin{tabular}[c]{@{}l@{}}Non-divisable Non-fungible tokens cannot be broken down into smaller units. For example, a whole property represented as a digital asset cannot be broken down into units.\end{tabular} \\ \hline
\end{tabular}
\end{table}
我正在使用提供的模板,但我认为以下内容是您所要求的。TX
% Set up the document
\documentclass[a4paper, 11pt, oneside]{Thesis} % Use the "Thesis" style, based on the ECS Thesis style by Steve Gunn
\graphicspath{Figures/}
% Include any extra LaTeX packages required
\usepackage[square, numbers, comma, sort&compress]{natbib} % Use the "Natbib" style for the references in the Bibliography
\usepackage[nottoc]{tocbibind} % bind bibliography to the table of contents
\usepackage{verbatim} % Needed for the "comment" environment to make LaTeX comments
\usepackage{vector} % Allows "\bvec{}" and "\buvec{}" for "blackboard" style bold vectors in maths
\usepackage[table]{xcolor}
% \usepackage{booktabs}
% \usepackage{graphicx}
% \usepackage[table,xcdraw]{xcolor}
% \usepackage{csvsimple}
\usepackage{array}
\usepackage{tabularx}
\usepackage[table,xcdraw]
\usepackage{graphicx}
\hypersetup{urlcolor=black, colorlinks=true} % Colours hyperlinks in black, can be distracting if there are many links and colored blue.
%% ----------------------------------------------------------------
\begin{document}
\frontmatter % Begin Roman style (i, ii, iii, iv...) page numbering
答案1
以下是三个简单示例。我使用了tabularx
和两个X
类型列,使表格的宽度与文本宽度相同,并允许在表格单元格内自动换行。在第二个和第三个示例中,我还用包\hline
中的水平线替换了命令booktabs
,并完全删除了一些行。在第二个和第三个示例中,我还使用了\emph
(和第三个示例中的换行符),以便为每个单元格文本开头的关键字添加微妙的视觉突出显示。
注意:在原始示例中,第一列/第一行的单元格的文本颜色不同。我在第一个示例中保留了原样,但在示例 2 和 3 中删除了颜色,因为我不确定颜色变化是否是故意的。在 MWE 中,我还使用了类article
而不是,Thesis
因为周围有很多类被调用thesis.cls
,我不知道您到底使用了哪一个。
\documentclass{article}
\usepackage{xcolor}
\usepackage{tabularx}
\usepackage{booktabs}
\begin{document}
\begin{table}[ht]
\centering
\begin{tabularx}{\textwidth}{XX}
\hline
\textbf{Fungible Tokens} & \textbf{Non-fungible tokens} \\ \hline
{\color[HTML]{333333} Interchangeable Here a token can be exchanged for another token if its of the same type. For example, 100 Bitcoin can be exchanged for 100 Bitcoin} & Not-Interchangeable Here a non-fungible token cannot be exchanged or replaced with another non-fungible token. For example, a non-fungible token representing an unique asset such as a property cannot be exchanged with another unique property asset. \\ \hline
Uniform Each token is of the same type, is identical in their specification. For example, Bitcoin is a fungible token and each bitcoin is of the same type and identical to any other bitcoin on the network & Unique Each token is unique and has different characteristics to the next token. For example, a unique asset represented as a digital asset such as a property will be unique to all other properties. Each property will be uniquely represented. \\ \hline
Divisible Fungible tokens can be divided into smaller amounts. For example, 100 Bitcoin can be divided into two units 50 Bitcoin or 100 units of 1 Bitcoin. There is no change in the value of the 100 bitcoin even if its broken down into smaller units. & Non-divisable Non-fungible tokens cannot be broken down into smaller units. For example, a whole property represented as a digital asset cannot be broken down into units. \\ \hline
\end{tabularx}
\end{table}
\begin{table}[ht]
\centering
\begin{tabularx}{\textwidth}{XX}
\toprule
Fungible Tokens & Non-fungible tokens \\
\midrule
\emph{Interchangeable} Here a token can be exchanged for another token if its of the same type. For example, 100 Bitcoin can be exchanged for 100 Bitcoin
&\emph{Not-Interchangeable} Here a non-fungible token cannot be exchanged or replaced with another non-fungible token. For example, a non-fungible token representing an unique asset such as a property cannot be exchanged with another unique property asset. \\
\addlinespace
\emph{Uniform} Each token is of the same type, is identical in their specification. For example, Bitcoin is a fungible token and each bitcoin is of the same type and identical to any other bitcoin on the network
& \emph{Unique} Each token is unique and has different characteristics to the next token. For example, a unique asset represented as a digital asset such as a property will be unique to all other properties. Each property will be uniquely represented. \\
\addlinespace
\emph{Divisible} Fungible tokens can be divided into smaller amounts. For example, 100 Bitcoin can be divided into two units 50 Bitcoin or 100 units of 1 Bitcoin. There is no change in the value of the 100 bitcoin even if its broken down into smaller units.
& \emph{Non-divisable} Non-fungible tokens cannot be broken down into smaller units. For example, a whole property represented as a digital asset cannot be broken down into units. \\
\bottomrule
\end{tabularx}
\end{table}
\begin{table}[ht]
\centering
\begin{tabularx}{\textwidth}{XX}
\toprule
\multicolumn{1}{l}{Fungible Tokens} & \multicolumn{1}{l}{Non-fungible tokens} \\
\midrule
\multicolumn{1}{l}{\emph{Interchangeable}} & \multicolumn{1}{l}{\emph{Not-Interchangeable}}\\
Here a token can be exchanged for another token if its of the same type. For example, 100 Bitcoin can be exchanged for 100 Bitcoin
& Here a non-fungible token cannot be exchanged or replaced with another non-fungible token. For example, a non-fungible token representing an unique asset such as a property cannot be exchanged with another unique property asset. \\
\addlinespace
\multicolumn{1}{l}{\emph{Uniform}} & \multicolumn{1}{l}{\emph{Unique}}\\
Each token is of the same type, is identical in their specification. For example, Bitcoin is a fungible token and each bitcoin is of the same type and identical to any other bitcoin on the network
& Each token is unique and has different characteristics to the next token. For example, a unique asset represented as a digital asset such as a property will be unique to all other properties. Each property will be uniquely represented. \\
\addlinespace
\multicolumn{1}{l}{\emph{Divisible}} & \multicolumn{1}{l}{\emph{Non-divisable}}\\
Fungible tokens can be divided into smaller amounts. For example, 100 Bitcoin can be divided into two units 50 Bitcoin or 100 units of 1 Bitcoin. There is no change in the value of the 100 bitcoin even if its broken down into smaller units.
& Non-fungible tokens cannot be broken down into smaller units. For example, a whole property represented as a digital asset cannot be broken down into units. \\
\bottomrule
\end{tabularx}
\end{table}
\end{document}