2

The code for the environment is bellow, For the longer lines in \list item how do I change the length of the \items so that it lines up with the date?

Basically I want a kind of "margin" that is on the left side of the Dates, but only for the list \items. I tried \newgeometry but it changes the entire page and makes a new page. Any ideas?

Class Document

\newenvironment{work}[3]{\WorkFont\WorkNameStyle #1 \hfill{}\normalsize\numberstyle #2
\\* \worklistfont\WorkDeatleStyle 
    \begin{list}{-}{#3 \vspace*{0.40em}}
}{
\end{list}\vspace*{1.0 em}}

TeX Document

\begin{work}{Pennsylvania Governors School for the Sciences}{July 2007}{Physics TA/Counselor}
    \item{Taught concepts in relativistic physics to high school seniors}
    \item{Assisted project to build Wilberforce pendulum and documented findings}
    \item{Evaluated students’ progress throughout the program}
    \item{Encouraged intellectual thinking and social interaction between students}
\end{work}

It produces something that looks like...

It produces a list that has a "title" and a date

4
  • 1
    I think, this could be achieved easier with a tabular environment
    – user31729
    Feb 27 '15 at 22:59
  • It is not clear what you mean by "line up with the date", it always helps if you supply a complete document that makes the image shown rather than just fragments. Also note \item does not take an argument so the {} are forming a group rather than marking the argument to item. Feb 27 '15 at 23:20
  • 1
    you could draw lines on the image in a bitmap editor to indicate which parts you want to align Feb 27 '15 at 23:22
  • All the 4 items are too short to fill the line until the right margin.
    – Sigur
    Feb 27 '15 at 23:34
0

you can try something like this

\newenvironment{work}[3]{%
#1\hfill #2\\*#3
\begin{list}{-}{%
\settowidth{\rightmargin}{#2}}}{%
\end{list}}
4
  • Perhaps you could expand a little your answer? Feb 28 '15 at 0:06
  • @GonzaloMedina it's difficult for me. Did you try it? it just do what is needed
    – touhami
    Feb 28 '15 at 6:28
  • I'm intrigued by this, but do you need to set a value for the \rightmargin ? I will try later today.
    – Howard
    Feb 28 '15 at 16:59
  • So this totally does what he says it does... and its simple but I honestly don't understand why it works. While i'm sure the solution by "SoundsOfSilence" is more robust, or "better" in some way i'm having trouble integrating it and it requires more packages which i'd like to avoid that.
    – Howard
    Mar 2 '15 at 23:04
2

This is a quick-and-dirty tabularx approach, with automatic - at the first column. The widths of the columns etc. are just guesses, as well as the font commands.

\documentclass{article}

\usepackage{tabularx}

\newcommand{\WorkFont}{\bfseries}
\newcommand{\WorkNameStyle}{\upshape}
\newcommand{\numberstyle}{\scshape}
\newcommand{\worklistfont}{\itshape}
\newcommand{\WorkDeatleStyle}{}

\usepackage{array}

\newcolumntype{R}{>{-\arraybackslash}r}
\newcolumntype{I}[1]{>{\worklistfont\WorkDeatleStyle}p{#1}}

\newenvironment{work}[3]{%
  \tabularx{\linewidth}{RI{0.7\textwidth}X}
    \multicolumn{2}{p{0.7\textwidth}}{\WorkFont\WorkNameStyle #1} & \numberstyle #2 \tabularnewline
    \multicolumn{3}{c}{} \tabularnewline % Empty
  }{%
  \endtabularx%
}

\begin{document}
\noindent\begin{work}{Pennsylvania Governors School for the Sciences}{July 2007}{Physics TA/Counselor}
& Taught concepts in relativistic physics to high school seniors  \tabularnewline
&Assisted project to build Wilberforce pendulum and documented findings \tabularnewline
&Evaluated students’ progress throughout the program \tabularnewline
&Encouraged intellectual thinking and social interaction between students \tabularnewline
\end{work}
\end{document}

enter image description here

1
  • the spacing and hyphenation are unpleasant. a ragged right approach would improve the appearance; probably ragged2e would be better here than the default \raggedright. Feb 28 '15 at 16:00
2

I'd suggest you to use a customized list defined with the help of enumitem and some \parboxes to include the information for every work:

\documentclass[draft]{article}
\usepackage[T1]{fontenc}
\usepackage{enumitem}
\usepackage{calc}

\newcommand\WorkFont{\bfseries\raggedright}
\newcommand\WorkNameStyle{\upshape}
\newcommand\numberstyle{\scshape}
\newcommand\worklistfont{\itshape}
\newcommand\WorkDeatleStyle{}

\newlength\LongestDate

\newlist{Work}{itemize}{1}
\setlist[Work,1]{
  leftmargin=1cm,
  before=\setlength\rightmargin{\dimexpr\LongestDate+1em\relax},
  label={--}
}

\newenvironment{work}[3]
  {%
    \par\noindent
    \settowidth\LongestDate{\normalsize\numberstyle#2~}%
    \parbox[t]{\dimexpr\linewidth-\LongestDate-1em\relax}{%
      {\WorkFont\WorkNameStyle\raggedright #1}\par
      {\worklistfont\WorkDeatleStyle#3}
    }%
    \hfill
    \parbox[t]{\LongestDate}{%
      {\normalsize\numberstyle #2}%
    }  
    \par\nobreak
    \begin{Work}\raggedright
  }
  {\end{Work}\vspace{1.0 em}}

\begin{document}

\begin{work}{Pennsylvania Governors School for the Sciences and some more text}{July 2007}{Physics TA/Counselor}
    \item Taught concepts in relativistic physics to high school seniors
    \item Assisted project to build Wilberforce pendulum and documented findings
    \item Evaluated students' progress throughout the program
    \item Encouraged intellectual thinking and social interaction between students
\end{work}

\begin{work}{Pennsylvania Governors School for the Sciences and some more text}{October 2015}{Physics TA/Counselor}
    \item Taught concepts in relativistic physics to high school seniors
    \item Assisted project to build Wilberforce pendulum and documented findings
    \item Evaluated students' progress throughout the program
    \item Encouraged intellectual thinking and social interaction between students
\end{work}

\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.