![LaTeX 表格的垂直线不显示](https://linux22.com/image/368459/LaTeX%20%E8%A1%A8%E6%A0%BC%E7%9A%84%E5%9E%82%E7%9B%B4%E7%BA%BF%E4%B8%8D%E6%98%BE%E7%A4%BA.png)
\documentclass{article}
\usepackage{forloop}
%\usepackage{a4paper,left=0cm,top=0cm}{geometry}
\newcommand{\aline}{\\\hline &&&&\rule{0cm}{.5cm}}
\begin{document}
\newcounter{theyflines}
\begin{tabular}{|p{3cm}|p{1cm}|p{.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{1cm}|p{1cm}|p{1cm}|p{1cm}}
\hline
Name& Room& L/11& D/11& B/12& L/12& D/12& B/13& L/13& D/13& B/14& L/1& Deposit& Cost& Extra& Due
\forloop{theyflines}{1}{\value{theyflines} < 15}{\aline}\\
\hline
\end{tabular}
\end{document}
我修改了此代码如何创建考勤表?对于此代码,输出如下所示 -
预期输出如下 -
答案1
\documentclass{article}
\usepackage{forloop}
\usepackage[a4paper,left=0cm,top=0cm]{geometry}
\newcommand{\aline}{\\\hline &&&&&&&&&&&&&&\rule{0cm}{.4cm}}
\begin{document}
\newcounter{theyflines}
\begin{tabular}{|p{2.75cm}|p{1cm}|p{.35cm}|p{0.35cm}|p{0.35cm}|p{0.35cm}|p{0.35cm}|p{0.35cm}|p{0.35cm}|p{0.35cm}|p{0.35cm}|p{0.35cm}|p{1cm}|p{1cm}|p{1cm}|}
\hline
Name& Room&L&D&B&L&D&B&L&D&B&L&Deposit&Cost&Extra
\forloop{theyflines}{1}{\value{theyflines} < 48}{\aline}\\
\hline
\end{tabular}
\end{document}
输出