%mwe_tabular.tex
\documentclass[a4paper]{ctexart}
\usepackage{colortbl}
\usepackage{xcolor}
\usepackage{makecell}
\usepackage{array}
\usepackage{longtable}
\usepackage{tcolorbox}
\tcbuselibrary{skins,
vignette,
raster,
listings,
theorems,
breakable,
magazine,
poster,
fitting,
hooks,
xparse,
external,
documentation,
}
\usepackage{tikz}
\begin{document}
![](/static/images/ext/pdf.gif)<a href="https://static.latexstudio.net/data/attach/201911/83126fb9457cf90.pdf" target="_blank">mwe_tabular.pdf</a>\noindent
\begin{tabular}{c}
\tcbset{enhanced,fonttitle=\bfseries\large,fontupper=\normalsize\sffamily}
\begin{tcolorbox}[arc=4mm,colback=yellow,
tabulars={c|c|c|c|c|c},width=0.8\linewidth]
检测基因&NFE2L2&NQO1&SOD2&CAT&\\
\end{tcolorbox}\\
\multicolumn{1}{c}{}\\
\tcbset{enhanced,fonttitle=\bfseries\large,fontupper=\normalsize\sffamily}
\begin{tcolorbox}[arc=4mm,colback=yellow,
tabulars={c|c|c|c|c|c},width=0.8\linewidth]
结 果&TT&GG&AA&CC&\\
\end{tcolorbox}
\end{tabular}
\end{document}
![](/static/images/ext/pdf.gif)<a href="https://static.latexstudio.net/data/attach/201911/83126fb9457cf90.pdf" target="_blank">mwe_tabular.pdf</a>
回答:
2019-11-14 12:39
%mwe_tabular.tex
\documentclass[a4paper]{ctexart}
\usepackage{colortbl}
\usepackage{xcolor}
\usepackage{makecell}
\usepackage{array}
\usepackage{longtable}
\usepackage{tcolorbox}
\tcbuselibrary{skins,
vignette,
raster,
listings,
%listingsutf8,
%minted,
theorems,
breakable,
magazine,
poster,
fitting,
hooks,
xparse,
external,
documentation,
}
\usepackage{tikz}
\begin{document}
\begin{comment}
\begin{tabular}{c|c|c|c|c|c}
\hline
\rowcolor{yellow} 检测基因&NFE2L2&NQO1&SOD2&CAT&\\ \hline
\multicolumn{6}{c}{}\\ \hline
\rowcolor{yellow} 结 果&TT&GG&AA&CC&\\
\hline
\end{tabular}
\end{comment}
\noindent
\begin{tabular}{c}
\begin{tcolorbox}[arc=3mm,colback=yellow,
tabulars={c|c|c|c|c|c},width=0.7\linewidth]
检测基因&NFE2L2&NQO1&SOD2&CAT&\\
\end{tcolorbox}\\
\multicolumn{1}{c}{}\\
\begin{tcolorbox}[arc=3mm,colback=yellow,
tabulars={c|c|c|c|c|c},width=0.45\linewidth]
结 果&TT&GG&AA&CC&\\
\end{tcolorbox}
\end{tabular}
\end{document}
![](/static/images/ext/pdf.gif)
mwe_tabular.pdf
回答:
2019-11-14 13:44
%mwe_tabular.tex
\documentclass[a4paper]{ctexart}
\usepackage{comment}
\usepackage{colortbl}
\usepackage{xcolor}
\usepackage{makecell}
\usepackage{array,tabularx}
\usepackage{longtable}
\usepackage[left=1.5cm,right=1.5cm]{geometry}
\usepackage{tcolorbox}
\usepackage{tikz}
\begin{document}
\noindent
\begin{tabular}{c}
\begin{tcolorbox}[arc=3mm,colback=yellow,
tabularx={X|X|X|X|X|X},width=0.9\linewidth]
检测基因&NFE2L2&NQO1&SOD2&CAT&\\
\end{tcolorbox}\\
\multicolumn{1}{c}{}\\
\begin{tcolorbox}[arc=3mm,colback=yellow,
tabularx={X|X|X|X|X|X},width=0.9\linewidth]
结 果&TT&GG&AA&CC&\\
\end{tcolorbox}
\end{tabular}
\end{document}
![](/static/images/ext/pdf.gif)
mwe_tabular.pdf
回答:
2019-11-14 16:31
\input{preamble_QQ2019.tex}
%主要是增加了tikz宏包,填加了 shapes.multipart库.
\begin{document}
\begin{tikzpicture}
[every node/.style={rounded corners=8pt,text width=1.5cm, draw, anchor=text,rectangle split,rectangle split horizontal,rectangle split parts=6,fill=yellow}]
\node at(0,0) {检测基因 \nodepart{two}NFE2L2 \nodepart{three}NQO1 \nodepart{four}SOD2 \nodepart{five}CAT \nodepart{six}};
\node at(0,-1cm){\hfil 结\hspace{\ccwd}果\hfil \nodepart{two}TT \nodepart{three}GG \nodepart{four}AA \nodepart{five}CC \nodepart{six}};
\end{tikzpicture}
%\end{comment}
\end{document}
![](/static/images/ext/pdf.gif)
mwe_tabular.pdf
回答:
2019-11-14 16:39
最后一个办法的导言内容:
\documentclass[a4paper]{ctexart}
\usepackage{comment}
\usepackage{xcolor}
\usepackage{tikz}
\usetikzlibrary{shapes,shapes.multipart}