
Estoy usando tabular
para hacer dos columnas de diferente ancho. Lo ideal sería tener el título de cada columna bajo el cual habría una línea horizontal hasta el final de la columna, para la primera, y hasta el margen, para la segunda. Lo usé \hrule
y se extiende mucho más allá del margen. Aquí hay un fragmento:
\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}
¿Cómo podría lograr el resultado deseado de que el segundo \hrule
no exceda el margen derecho de mejor manera que jugando con el valor de la columna derecha?
Respuesta1
Esto funciona, pero como mencioné en el comentario, la configuración de su geometría no es óptima:
\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}