Code: Select all
\documentclass[12pt]{article}
\usepackage{titlesec}
\usepackage{titling}
\usepackage[margin=1in]{geometry}
\geometry{headheight=15pt}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\renewcommand{\headrulewidth}{0pt}
\usepackage[T1]{fontenc}
\usepackage{enumitem}
\usepackage[dvipsnames]{xcolor}
\usepackage[british]{babel}
\usepackage{csquotes}
\titleformat{\section}
{\fontsize{15pt}{15}\bfseries}
{}
{0em}
{}[\titlerule]
\titleformat{\subsection}
{\fontsize{14pt}{15}}
{}
{.4em}
{}
\renewcommand{\maketitle}{
{\Large
\setlength{\parindent}{0em} \theauthor}
}
\usepackage{setspace}
\setstretch{1.2}
\addtolength{\skip\footins}{1pc}
\setlength{\footnotesep}{1.5pc}
\usepackage[symbol]{footmisc}
\renewcommand{\thefootnote}{\fnsymbol{footnote}}
\usepackage{soul}
\setul{1ex}{}
\thispagestyle{empty}
\definecolor{lightgray}{gray}{0.8}
\usepackage{array}
\newcolumntype{L}{>{\raggedright}p{0.825\textwidth}} #I would rather justify this column#
\newcolumntype{R}{p{0.65\textwidth}} #I have no idea what this 0.65 value value actually does, nor how to align this column to the right instead#
\newcommand\VRule{\color{lightgray}\vrule width 0.5pt}
\usepackage{hanging}
\usepackage{ragged2e}
\begin{document}
…
\section{Nutritional Representation}
\vspace{.25em}
\begin{tabular}{L!{\VRule}R}
\begin{tabular}{L!{\VRule}R}
Broccoli Representative & 2018--2019\\
\vspace{0em}
Cauliflower Representative & 2020--2021\\
\vspace{0em}
Cabbage Representative & 2021--2022\\
\end{tabular}
\vspace{.2em}
…
\end{document}
I made a tabular using this code (with some dummy values inserted above because the real code is for my CV). I have several questions about it.
First, how can I justify the left column? Right now I’m using the ragged2e package and manually doing it in every instance where I want justified text. Which is fine, but I thought there would be a cleaner way to do it globally.
Second, when I do this, the justified text is far too close to the vrule. Is there a way to control the amount of space between the text and the vrule?
Third, for this line: \newcolumntype{R}{p{0.65\textwidth}}, what is the 0.65 value (I’ve been playing with it and it appears to do nothing), and fourth, how do I align the right column to the right (instead of the left). (I’m using a hackey workaround right now that works fine.)
Fifth, I’ve noticed that when the tabular gets too large, it starts on the next page instead of where I want it. How can I fix this? One solution is just to break up the table in each instance on different pages. That’s a one-off solution.
Sixth, I’ve noticed that when the tabular gets too large, the rest of the tabular disappears into a phantom next page, and doesn’t appear on the actual next page. How can I fix this? One solution is just to break up the table in each instance on different pages. That’s another one-off solution.
Seventh, is there a better tabular/table code that is more suitable to my needs? Thanks.