首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >怎样才能使表格中的垂直线没有任何间隙?

怎样才能使表格中的垂直线没有任何间隙?
EN

Stack Overflow用户
提问于 2021-07-18 21:42:12
回答 1查看 84关注 0票数 1

第三列中的垂直线有两个间隙。我怎么才能让它看起来是满的?

代码如下:

代码语言:javascript
复制
\begin{table}[H]
\centering
\caption{Enzymatic cocktails and the respective tested concentrations in \%(v/v) used in Combined Hydrolysis}
\label{enzymatic cocktails}
\begin{tabular}{@{}ccc@{}}
\toprule
\textbf{Cocktail}  & \textbf{Enzymes}               & \textbf{Concentration \%(v/v)}                                              \\ \midrule
\multirow{2}{*}{A} & \multicolumn{1}{c|}{Cellulase} & \multirow{8}{*}{\begin{tabular}[c]{@{}c@{}}0.25\\ 0.50\\ 1.00\end{tabular}} \\
                   & \multicolumn{1}{c|}{$\boldsymbol{\beta}$-glucosidase}            &  \\ \cmidrule(r){1-2}
\multirow{3}{*}{B} & \multicolumn{1}{c|}{Cellulase}                &  \\
                   & \multicolumn{1}{c|}{$\boldsymbol{\beta}$-glucosidase}            &  \\
                   & \multicolumn{1}{c|}{xylanase}                 & \\ \cmidrule(r){1-2}
\multirow{3}{*}{C} & \multicolumn{1}{c|}{Cellulase}                &  \\
                   & \multicolumn{1}{c|}{$\boldsymbol{\beta}$-glucosidase}            &  \\
                   & \multicolumn{1}{c|}{$\boldsymbol{\beta}$-glucanase and xylanase} &  \\ \bottomrule
\end{tabular}
\end{table}
EN

回答 1

Stack Overflow用户

发布于 2021-08-18 14:29:02

c|中的垂直线与booktabs包中的toprulebottomrulemidrulecmidrule等水平线不匹配。

代码语言:javascript
复制
\documentclass{article}
\usepackage{multirow}
\begin{document}

\begin{table}%[H]
\centering
\caption{Enzymatic cocktails and the respective tested concentrations in \%(v/v) used in Combined Hydrolysis}
\label{enzymatic_cocktails}
\begin{tabular}{@{}ccc@{}}
\hline
\textbf{Cocktail}  & \textbf{Enzymes}               & \textbf{Concentration \%(v/v)}\\
\hline
\multirow{2}{*}{A} & \multicolumn{1}{c|}{Cellulase} & %
  \multirow{8}{*}{\begin{tabular}[c]{@{}c@{}}0.25\\ 0.50\\ 1.00\end{tabular}}\\
                   & \multicolumn{1}{c|}{$\mathbb{\beta}$-glucosidase}     & \\
                   \cline{1-2}
\multirow{3}{*}{B} & \multicolumn{1}{c|}{Cellulase}                        & \\
                   & \multicolumn{1}{c|}{$\boldsymbol{\beta}$-glucosidase} & \\
                   & \multicolumn{1}{c|}{xylanase}                         & \\
                   \cline{1-2}
\multirow{3}{*}{C} & \multicolumn{1}{c|}{Cellulase}                        & \\
                   & \multicolumn{1}{c|}{$\mathbb{\beta}$-glucosidase}     & \\
                   & \multicolumn{1}{c|}{$\mathbb{\beta}$-glucanase and xylanase} & \\
\hline
\end{tabular}
\end{table}
\end{document}

所以我在我的代码中返回到hlines。更好的做法是使用上面提到的包booktabs,避免使用竖线。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/68429681

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档