为什么垂直线没有从上到下完全连接起来?

为什么垂直线没有从上到下完全连接起来?

我希望顶部和底部的线是暗线。

    \PassOptionsToPackage{svgnames,x11names}{xcolor}
    \documentclass[paper=legapaper,9pt]{scrartcl}              %class
    \usepackage[left=1.0cm,right=1cm,top=1.5cm,bottom=1cm]{geometry} %for layout
    \usepackage{setspace} % for spacing between lines
    \usepackage{graphicx}         %for including images
    \usepackage{eso-pic}     %package for including background image
    \usepackage{color,tikz}
    \usepackage{wallpaper}
    \usepackage{ulem}
    \usepackage{anyfontsize}
    \usepackage{pdflscape}
    \usepackage{calligra}
    \usepackage[T1]{fontenc}
    \usepackage{niceframe}
    \usepackage[object=vectorian]{pgfornament}
    \usepackage{ragged2e}
    \usepackage{ifthen}
    \newboolean{long}
    \usepackage[pdftex]{eforms}
    \usepackage{arydshln}
    \usepackage{eurosym,datatool,longtable,booktabs}


    \begin{document}


       \begin{tabular}{l|ccccc|c|c|c|ccc}
         \toprule

         \bfseries Exams. Passed & &&\bfseries Name of &&  &\bfseries Examination  & \bfseries Year of  & \bfseries Division/  & &\bfseries Name of& \\ 
         &&& \bfseries Board/University &&& \bfseries Roll No. & \bfseries Passing & \bfseries Class && \bfseries School/College&\\ \toprule
         H.S.L.C. &&&&&  & &  &  & &&\\ \hline
         H.S.S.L.C. &&&&&  & &  &  &&& \\ \hline
         B.A/B.Sc./B.Com/L.L.B & &&&& & &  &  & &&\\ 
         B.E/M.B.B.S/B.Mus. &&&&&  & &  &  & &&\\ \hline
         M.A/M.Sc./M.Com. & &&&& & &  &  & &&\\ \hline 
         Others & &&&& & &  &  & &&\\
         \bottomrule
       \end{tabular}


    \end{document}

答案1

这是您的表格设置(使用 和不使用booktabs)。我只是旋转了表格以使其适合您的页面。但您应该考虑以下几点:

  • booktabs手册中给出的建议
  • 您的表格有两行标题(也许您应该使用p{}以中心为中心的解决方案)
  • 如果你使用这些垂直规则,你也应该让它们关闭表格的左侧和右侧

表

代码:

\PassOptionsToPackage{svgnames,x11names}{xcolor}
\documentclass[paper=legapaper,9pt]{scrartcl}
\usepackage[margin=1cm]{geometry}
\usepackage{booktabs}
\usepackage{rotating}

\begin{document}
   \rotatebox{90}{\begin{tabular}{l|ccccc|c|c|c|ccc}
     \hline
     \bfseries Exams. Passed & &&\bfseries Name of &&  &\bfseries Examination  & \bfseries Year of  & \bfseries Division/  & &\bfseries Name of& \\ 
     &&& \bfseries Board/University &&& \bfseries Roll No. & \bfseries Passing & \bfseries Class && \bfseries School/College&\\ \hline
     H.S.L.C. &&&&&  & &  &  & &&\\ \hline
     H.S.S.L.C. &&&&&  & &  &  &&& \\ \hline
     B.A/B.Sc./B.Com/L.L.B & &&&& & &  &  & &&\\ 
     B.E/M.B.B.S/B.Mus. &&&&&  & &  &  & &&\\ \hline
     M.A/M.Sc./M.Com. & &&&& & &  &  & &&\\ \hline 
     Others & &&&& & &  &  & &&\\
     \hline
   \end{tabular}}
   \renewcommand{\arraystretch}{1.5}
  \rotatebox{90}{\begin{tabular}{l*{11}{c}}
     \toprule
     \bfseries Exams. Passed & &&\bfseries Name of &&  &\bfseries Examination  & \bfseries Year of  & \bfseries Division/  & &\bfseries Name of& \\ 
     &&& \bfseries Board/University &&& \bfseries Roll No. & \bfseries Passing & \bfseries Class && \bfseries School/College&\\ \midrule
     H.S.L.C. &&&&&  & &  &  & &&\\ \hline
     H.S.S.L.C. &&&&&  & &  &  &&& \\ \hline
     B.A/B.Sc./B.Com/L.L.B & &&&& & &  &  & &&\\ 
     B.E/M.B.B.S/B.Mus. &&&&&  & &  &  & &&\\ \hline
     M.A/M.Sc./M.Com. & &&&& & &  &  & &&\\ \hline 
     Others & &&&& & &  &  & &&\\
     \bottomrule
   \end{tabular}}

\end{document}

相关内容