hrule が 2 列目のマージンを超えています

hrule が 2 列目のマージンを超えています

幅の異なる 2 つの列を作成するために使用していますtabular。理想的には、各列のタイトルの下に、最初の列では列の終わりまで、2 番目の列では余白まで水平線が引かれるようにします。 を使用しました\hruleが、余白をはるかに超えて伸びています。以下はスニペットです。

\documentclass[10pt]{article}
\usepackage{geometry,array}

\geometry{verbose,tmargin=40pt,bmargin=40pt,lmargin=30pt,
rmargin=30pt}

\newcolumntype{R}{>{\raggedright}p{0.4\textwidth}}
\newcolumntype{L}{p{0.6\textwidth}}
\begin{document}

\begin{tabular}{L R}
{\subsection*{EDUCATION}}
\hrule
\vspace{2mm}
&
{\subsection*{SKILLS}}
\hrule
\vspace{2mm}
\end{tabular}

\end{document}

\hrule右の列の値を操作するよりも良い方法で、右の余白を超えない2 番目の望ましい結果を達成するにはどうすればよいでしょうか?

答え1

これは機能しますが、コメントで述べたように、ジオメトリ設定が最適ではありません。

\documentclass[10pt]{article}
\usepackage{geometry,array}
\usepackage{calc}
\geometry{verbose,tmargin=40pt,bmargin=40pt,lmargin=30pt,
    rmargin=30pt}
\usepackage{showframe} % shows you the cut-off side margin

\begin{document}
    \noindent % If the table stands alone, as it is, it will get a paragraph indent without this command.
    %\tabcolsep=15pt % if you want to change the blank width in the middle  
    \begin{tabular}{@{}p{0.46\textwidth} >{\raggedright\arraybackslash}p{0.54\textwidth-2\tabcolsep}}
        {\subsection*{EDUCATION}}
        \hrule
        \vspace{2mm}
        &
        {\subsection*{SKILLS}}
        \hrule
        \vspace{2mm}
    \end{tabular}   
\end{document}

ここに画像の説明を入力してください

関連情報