
나는 Excel2Latex를 사용했다
% Table generated by Excel2LaTeX from sheet 'Sheet1'
\begin{table}[htbp]
\centering
\caption{Add caption}
\begin{tabular}{|r|r|r|r|r|}
\cmidrule{1-1} \rowcolor[rgb]{1,1,0} & \multicolumn{1}{r}{\cellcolor[rgb]{1,1,1}} & \multicolumn{1}{r}{\cellcolor[rgb]{1,1,1}} & \multicolumn{1}{r}{\cellcolor[rgb]{1,1,1}} & \multicolumn{1}{r}{\cellcolor[rgb]{1,1,1}} \\
\cmidrule{1-2} & & \multicolumn{1}{r}{} & \multicolumn{1}{r}{} & \multicolumn{1}{r}{} \\
\cmidrule{1-3} & & & \multicolumn{1}{r}{} & \multicolumn{1}{r}{} \\
\cmidrule{1-4} & & & & \multicolumn{1}{r}{} \\
\midrule
\rowcolor[rgb]{.514,.235,.047} & \cellcolor[rgb]{1,1,1} & \cellcolor[rgb]{1,1,1} & \cellcolor[rgb]{1,1,1} & \cellcolor[rgb]{1,1,1} \\
\bottomrule
\end{tabular}%
\label{tab:addlabel}%
\end{table}%
답변1
이것은 Young tableau와 매우 유사합니다.
\documentclass{article}
\usepackage[table]{xcolor}
\usepackage{booktabs}
\usepackage{ytableau}
\definecolor{myyellow}{rgb}{1,1,0}
\definecolor{mybrown}{rgb}{.514,.235,.047}
\begin{document}
\begin{ytableau}
*(myyellow) \\
& \\
&& \\
&&& \\
*(mybrown) &&&&
\end{ytableau}
\end{document}
답변2
hhline
대신 다음 의 도움으로 booktabs
:
\documentclass{article}
\usepackage[table]{xcolor}
\usepackage{hhline}
\newcommand{\nocell}{\multicolumn{1}{r}{}}
\begin{document}
\begin{table}[htbp]
\centering
\caption{Add caption}
\begin{tabular}{|r|r|r|r|r|}
\hhline{|-|~~~~}
\cellcolor[rgb]{1,1,0} & \nocell & \nocell & \nocell & \nocell \\
\hhline{|-|-|~~~}
& & \nocell & \nocell & \nocell \\
\hhline{|-|-|-|~}
& & & \nocell & \nocell \\
\hhline{|-|-|-|-|}
& & & & \nocell \\
\hline
\cellcolor[rgb]{.514,.235,.047} & & & & \\
\hline
\end{tabular}%
\label{tab:addlabel}%
\end{table}%
\end{document}
답변3
작은 변형 @leandriis의 답변:
\documentclass{article}
\usepackage[table]{xcolor}
\usepackage{hhline}% part of shipunov bundle
\usepackage{cellspace}
\setlength\cellspacetoplimit{4pt}
\setlength\cellspacebottomlimit{4pt}
\usepackage{xparse}
\NewExpandableDocumentCommand\mcc{O{1}m}
{\multicolumn{#1}{c}{#2}}
\begin{document}
\begin{table}[htbp]
\centering
\caption{Add caption}
\begin{tabular}{|*{5}{Sr|}}
\hhline{-~~~~}
\cellcolor[rgb]{1,1,0}{} & \mcc[4]{} \\
\hhline{--~~~}
& & \mcc[3]{} \\
\hhline{---~~}
& & & \mcc[2]{} \\
\hhline{----~}
& & & & \mcc{} \\
\hhline{*5{-}}
\cellcolor[rgb]{.514,.235,.047}
& & & & \\
\hhline{*5{-}}
\end{tabular}%
\label{tab:addlabel}%
\end{table}
\end{document}