答案1
我不建议在表格中使用垂直线,但这里有一个解决这个问题的方法......
当然,可以通过正确的方式\multicolumn
获得单个细胞或单个细胞簇。\cline
消失单元格为\multicolumn{number of cells}{l}{}
,此处省略|
。
\documentclass{article}
\begin{document}
\huge
\begin{tabular}{|*{8}{l|}}
\hline
This & is & a & bad & example & of & a & table \tabularnewline
\hline
\multicolumn{2}{l|}{} & \multicolumn{1}{c|}{Proved!} & \multicolumn{5}{l}{} \tabularnewline
\cline{3-3}
\end{tabular}
\end{document}
答案2
我太慢了,但只是为了展示siunitx
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{siunitx}
\sisetup{locale=DE,group-separator=.,group-four-digits}
\usepackage{array}
\begin{document}
\begin{tabular}{|S[table-format=2.0]|S[table-format=5.2]|S[table-format=6.2]|S[table-format=5.2]|S[table-format=5.2]|}
% put the € symbol in your header row as it is redundant.
\hline
7 & 28362.47 & 2694.43 & 28362.47 & 0.00 \\\hline
8 & 28362.47 & 2694.43 & 28362.47 & 0.00 \\\hline
9 & 28362.47 & 2694.43 & 28362.47 & 0.00 \\\hline
10 & 28362.47 & 2694.43 & 28362.47 & 0.00 \\\hline
\multicolumn{1}{l|}{} & \multicolumn{1}{l}{Summe Zinsen:} & \multicolumn{1}{S[table-format=6.2]|}{115569.00} & \multicolumn{2}{l}{} \\
\cline{2-3}
\end{tabular}
\end{document}
和booktabs
:
% arara: pdflatex
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage{textcomp}
\usepackage{siunitx}
\sisetup{locale=DE,group-separator=.,group-four-digits}
\usepackage{array}
\usepackage{booktabs}
\begin{document}
\begin{tabular}{S[table-format=2.0]S[table-format=5.2]S[table-format=6.2]S[table-format=5.2]S[table-format=5.2]}
% put the € symbol in your header row as it is redundant.
\toprule
{Number} & {value in €} & {value in €} & {value in €} & {value in €}\\
\midrule
7 & 28362.47 & 2694.43 & 28362.47 & 0.00 \\
8 & 28362.47 & 2694.43 & 28362.47 & 0.00 \\
9 & 28362.47 & 2694.43 & 28362.47 & 0.00 \\
10 & 28362.47 & 2694.43 & 28362.47 & 0.00 \\
\midrule
\multicolumn{2}{l}{Summe Zinsen:} & 115569.00 & & \\
\bottomrule
\end{tabular}
\end{document}