Graphics, Figures & TablesEnding Tabbing with \hfill

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
JBClaypool
Posts: 10
Joined: Fri Jul 31, 2020 6:11 pm

Ending Tabbing with \hfill

Post by JBClaypool »

I am trying to use a tabbing environment, and instead of having the final tab extend 2.5in, I'd like it to end with the final characters to line up. The MWE has the dates misaligned on the final character.

Code: Select all

\documentclass[10pt,letterpaper]{article}
\RequirePackage[width=6.50in, height=9.50in]{geometry}

\begin{document}
%
% INDEPENDENT CONTRACTOR
{\bf\begin{tabbing} \hspace{2.5in}\=\hspace{2.5in}\=\kill
	Independent Contractor: \> Buffalo, NY\> Feb 5 2022 \texttwelveudash\space{\small PRESENT}
\end{tabbing}}
%
% INDEPENDENT CONTRACTOR
{\bf\begin{tabbing} \hspace{2.5in}\=\hspace{2.5in}\=\kill
		Independent Contractor: \> Niagara Falls, NY\> Oct 20 2023 \texttwelveudash\space Nov 03 2024
\end{tabbing}}
%
\end{document}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
TikZ book
User avatar
Stefan Kottwitz
Site Admin
Posts: 10311
Joined: Mon Mar 10, 2008 9:44 pm

Re: Ending Tabbing with \hfill

Post by Stefan Kottwitz »

You could use a tabular environment that has more options for alignment, such as the following:

Code: Select all

\documentclass[10pt,letterpaper]{article}
\RequirePackage[width=6.50in, height=9.50in]{geometry}
\usepackage{tabularx}
\begin{document}
\bfseries
\begin{tabular}{lll@{\ \texttwelveudash\ }r}
Independent Contractor: & Buffalo, NY        & Feb 5 2022  & \small PRESENT\\
Independent Contractor: & Niagara Falls, NY  & Oct 20 2023 & Nov 03 2024
\end{tabular}
\end{document}
table.jpg
table.jpg (16.15 KiB) Viewed 6439 times
Stefan
LaTeX.org admin
JBClaypool
Posts: 10
Joined: Fri Jul 31, 2020 6:11 pm

Re: Ending Tabbing with \hfill

Post by JBClaypool »

I had a feeing that tabular would be the best route. I haven't had too much experience with it, though. While it resolves the issue of ending atthe same spot, it doesn't have the same placement for the data. This is for a resume, and the format needs to be aligned left "job title" then tab 2.5in for location, then end aligned to the right for the date(s).

Code: Select all

\begin{document}
{\bf\begin{tabbing} \hspace{2.5in}\=\hspace{2.5in}\=\kill
		Independent Contractor: \> Buffalo, NY\> Feb 5 2022 \texttwelveudash\space{\small PRESENT}
\end{tabbing}}
\begin{itemize}[nolistsep]
	%PRIVATE PROJECT
	\item \textbf{Private Contract: WNY [Freelancer] \hfill Dec 11 2023 \textendash{ \footnotesize PRESENT}}
	\begin{itemize}[nolistsep]
		%ECHO FRONT PRODUCTION
		\item[$\circ$] \textbf{\textsl{Echo Front Productions: WNY \hfill Dec 31 2024 - {\footnotesize PRESENT}}}
		\item[$\cdot$] Electronic Arts Surveillance
		\item[] Performed 2hr tagging sessions for multiple locations.
	\end{itemize}	
\end{itemize}
%
% INDEPENDENT CONTRACTOR
{\bf\begin{tabbing} \hspace{2.5in}\=\hspace{2.5in}\=\kill
		Independent Contractor: \> Niagara Falls, NY\> {\hfill Oct 20 2023 \texttwelveudash\space Nov 03 2024}
\end{tabbing}}
	\begin{itemize}[nolistsep]
	%ECHO FRONT PRODUCTION
	\item[$\circ$] \textbf{\textsl{Echo Front Productions: WNY \hfill Dec 31 2024 - {\footnotesize PRESENT}}}
	\item[$\cdot$] Electronic Arts Surveillance
	\item[] Performed 2hr tagging sessions for multiple locations.
\end{itemize}
%	\begin{tabular}{lll@{\ \texttwelveudash\ }r}
%		Independent contractor: & Buffalo, NY & Feb 5 2022 & \small PRESENT
%	\end{tabular}
\end{document}
Attachments
res.PNG
res.PNG (37.12 KiB) Viewed 6422 times
User avatar
Stefan Kottwitz
Site Admin
Posts: 10311
Joined: Mon Mar 10, 2008 9:44 pm

Re: Ending Tabbing with \hfill

Post by Stefan Kottwitz »

I still would use tabular, one table for everything, possibly \multicolumn in it. I don't have time to reformat all here, but you can think about in.

Perhaps you want more sophisticated design, then look at https://latextemplates.com/cat/curricula-vitae. While they templates are carefully created and selected, here are many more that may be good or not: https://www.overleaf.com/latex/templates/tagged/cv

Stefan
LaTeX.org admin
Post Reply