Text FormattingTrouble with \hfill not going to the end of the page.

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
nbosio1001
Posts: 1
Joined: Fri Dec 31, 2021 6:17 pm

Trouble with \hfill not going to the end of the page.

Post by nbosio1001 »

I am new at creating a class file to maintain a specific format for my resume.
I am trying to line up my dates at the very end of the page using \hfill, but LaTex is not letting me and I have no idea why. I included sample code and can edit the question if it isn't clear. Thanks!

main.tex

Code: Select all

Code, edit and compile here:
\documentclass[11pt,a4paper]{resume} % Use the custom resume.cls style
\usepackage[left=0.4 in,top=0.4in,right=0.4 in,bottom=0.4in]{geometry}
\usepackage{titlesec}
\usepackage{subfiles}
\name{Random Name} % Your name
% % if you do not have a website, sub your github instead.
\address{(111) 111-1111 \\ San Antonio, CA}
\address{\href{mailto:randomemail@gmail.com}{randomemail@gmail.com} \\ \href{https://www.linkedin.com/in/random/}{https://www.linkedin.com/in/random/} \\ \href{https://github.com/random}{https://github.com/random}}
\begin{document}
\rSection{Example Title}
\subfile{sections/firstsection}
\end{document}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
sections/firstsection.tex

Code: Select all

Code, edit and compile here:
\documentclass[../main.tex]{subfiles}
\begin{document}
\rSubSectionWork{Math tutoring for living, Company Education Services}{Mar 2021 - Present}
\begin{itemize}
\setlength\itemsep{0pt}
\item Provide tutoring and technical support for students in the Fintech Bootcamp. iuiuniuniuniuniu
\item This is sentence one with a lot of text for me to test this out please.
\item More text that will include everythgin and anything for a long time because ai will be the future of the test and they will increase the funding for the thing.
\end{itemize}
\rSubSectionWork{R\&D Engineering Technician, Amazon website}{Jan 2019 - Mar 2019}\\
\rSubSectionWork{Project Contributor, Goldman Sachs grouphhnhh}{Sept 2015-June 2016}
\end{document}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
resume.cls

Code: Select all

Code, edit and compile here:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Medium Length Professional CV - RESUME CLASS FILE
%
% This template has been downloaded from:
% http://www.LaTeXTemplates.com
%
% This class file defines the structure and design of the template.
%
% Original header:
% Copyright (C) 2010 by Trey Hunner
%
% Copying and distribution of this file, with or without modification,
% are permitted in any medium without royalty provided the copyright
% notice and this notice are preserved. This file is offered as-is,
% without any warranty.
%
% Created by Trey Hunner and modified by www.LaTeXTemplates.com
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ProvidesClass{resume}[2010/07/10 v0.9 Resume class]
\LoadClass[11pt,letterpaper]{article} % Font size and paper type
\usepackage[parfill]{parskip} % Remove paragraph indentation
\usepackage{array} % Required for boldface (\bf and \bfseries) tabular columns
\usepackage{ifthen} % Required for ifthenelse statements
% \setlist[itemize,1]{noitemsep, topsep=0pt}
\usepackage{hyperref}
\hypersetup{
colorlinks=true,
linkcolor=blue,
filecolor=magenta,
urlcolor=black,
}
\pagestyle{empty} % Suppress page numbers
%----------------------------------------------------------------------------------------
% HEADINGS COMMANDS: Commands for printing name and address
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

My desired output is at the separation at the bottom of the image with the job title at the left section and the dates at the very end of the right section.
https://i.stack.imgur.com/STTfI.png
Attachments
testing.zip
(3.3 KiB) Downloaded 182 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10330
Joined: Mon Mar 10, 2008 9:44 pm

Trouble with \hfill not going to the end of the page.

Post by Stefan Kottwitz »

Hi Nick,

welcome to the forum!

No problem with cross-posts, but you should add a link then. It was already solved by David Carlisle with the suggestion

Code: Select all

Code, edit and compile here:
\newenvironment{rSubSectionWork}[2]{%
#1 \hfill #2{\parfillskip=0pt\par}%
}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
for removing the skip at the end of a paragraph.

Without a link (or my information here) some readers may still try to help by downloading the zip file and spending time etc. Next time just add a link to the other forum so we can see if it's already done, thanks.

Stefan
LaTeX.org admin
Post Reply