1

I want to align all the parboxes vertically so that the left corners are are equally offset from the dates which are in the left side

\documentclass{article} 
\usepackage{enumitem}
\usepackage{geometry}
\usepackage{xcolor}
\usepackage{tabularx}
\renewcommand*\familydefault{\sfdefault}


\begin{document}
                \begin{center}{\large \textbf{HANDING / TAKING OVER}}\end{center}
            \begin{description}         

\item AON for CHT
\subitem 11 Nov 2019--\parbox{\textwidth}{Preetha check progress with IFA}
\subitem 12 Nov 2019--\parbox{\textwidth}{Preetha to liaise with IFA}
\subitem 14 Nov 2019--\parbox{\textwidth}{ IFA has asked to come on next Wednesday}

\item Video Conferencing with ADGQA
\subitem 13 Nov 2019--\parbox[t]{\textwidth}{ pts for discussion}
\subsubitem Padmavathy for Digital DGQA--\parbox[t]{\textwidth}{She will be available for guidance but Kannan should take over \\--if required he can got to Bangalore}
\subsubitem Component Level Repair CLR--\parbox[t]{\textwidth}{  83 items\\{-- }to be decided by CQAL, Bangalore\\Action by Debnath}
\subsubitem FR 56j--\parbox[t]{\textwidth}{  List upto Jun 2020 to be sent \\{--}list again faxed on 14 Nov 2019\\ Vishwanath case--decision already conveyed as told by Col Vibhor}
\subsubitem Cover assembly BMP--\parbox[t]{\textwidth}{  2017 pending?\\ FFT?\\ Delay to be pinpointed \\Delay in G1 Form? \\Action by Kambli}
\subsubitem Digital DGQA--\parbox{\textwidth}{  Action by  --Kannan}
\end{description}
\end{document}

EDIT: Re @Johannes_B:not compiling Just ran it and it compiles--throwing up the image below from screen capture

enter image description here

And the code says No Error No Warningssee below

enter image description here

8
  • Your example does not compile and throws several overful hbox warnings otherwise.
    – Johannes_B
    Nov 17, 2019 at 15:45
  • @Johannes_B please see the EDIT above in main question--compiles correctly
    – js bibra
    Nov 17, 2019 at 15:56
  • First, the remaining space in a list environment is \linewidth, not \textwidth. Anyway, what you need is to use a common width (\makebox) for the dates. Nov 17, 2019 at 16:07
  • request one example--remaining I will take on
    – js bibra
    Nov 17, 2019 at 16:15
  • in such cases is it better to go for tabularx or minipage or some custom list--anything I can refer/read
    – js bibra
    Nov 17, 2019 at 16:20

1 Answer 1

3

I took the liberty of aligning the -- dividers. I got the 20pt and 30pt from the definitions of \subitem and \subsubitem in article.cls.

\documentclass{article} 
\usepackage{enumitem}
\usepackage[showframe]{geometry}% use showframe for debugging only
\usepackage{xcolor}
\usepackage{tabularx}
\renewcommand*\familydefault{\sfdefault}

\newlength{\datewidth}
\settowidth{\datewidth}{\begin{tabular}{@{}l@{}}% overkill
  11 Nov 2019-- \\
  12 Nov 2019-- \\
  14 Nov 2019-- \\
  13 Nov 2019--
\end{tabular}}
%\settowidth{\datewidth}{22 Nov 2019--}% IIRC 2 is the widest digit

\newcommand{\myitem}[2]% #1 = date, #2 = text
  {\subitem \makebox[\datewidth][r]{#1}\parbox[t]{\dimexpr \linewidth-\datewidth-20pt}{#2}}
\newcommand{\mysubitem}[2]% #1 = heding, #2 = text
  {\sbox0{#1}\subsubitem \usebox0\parbox[t]{\dimexpr \linewidth-\wd0-30pt}{#2}}

\begin{document}
                \begin{center}{\large \textbf{HANDING / TAKING OVER}}\end{center}
            \begin{description}         

\item AON for CHT
\myitem{11 Nov 2019--}{Preetha check progress with IFA}
\myitem{12 Nov 2019--}{Preetha to liaise with IFA}
\myitem{14 Nov 2019--}{ IFA has asked to come on next Wednesday}

\item Video Conferencing with ADGQA
\myitem{13 Nov 2019--}{ pts for discussion}
\mysubitem{Padmavathy for Digital DGQA--}{She will be available for guidance but Kannan should take over \\ \llap{--}if required he can got to Bangalore}
\mysubitem{Component Level Repair CLR--}{  83 items\\ \llap{--}to be decided by CQAL, Bangalore\\Action by Debnath}
\mysubitem{FR 56j--}{  List upto Jun 2020 to be sent \\ \llap{--}list again faxed on 14 Nov 2019\\ Vishwanath case--decision already conveyed as told by Col Vibhor}
\mysubitem{Cover assembly BMP--}{  2017 pending?\\ FFT?\\ Delay to be pinpointed \\Delay in G1 Form? \\Action by Kambli}
\mysubitem{Digital DGQA--}{  Action by  --Kannan}
\end{description}
\end{document}

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.