3

How do I create a list/table where the item names (first column) occurs inside the page margin (outside the usual area where text would be located) and is right aligned?

Example of desired behaviour:

...

enter image description here

...

I have read the documentation for enumitem, but can't see an appropriate command for the style argument.

xyz
  • 331
  • does http://tex.stackexchange.com/questions/33334/description-list-with-right-alignment-of-labels?rq=1 help? – d-cmst Nov 26 '13 at 09:00
  • @dcmst: that link deals with right align, but I want it in the page margin – xyz Nov 26 '13 at 09:11
  • 2
    so you should really add a minimal working example (MWE) – d-cmst Nov 26 '13 at 09:13
  • 2
    To be honest I don't think a MWE is necessary here. The picture should be enough. – Vivi Nov 26 '13 at 09:16
  • 2
    @Vivi in the linked answer the list is inside the margin, since the OP says he still want the text inside the margin, I assume there are some differences with respect to the liked qeustion. Otherwise this is a duplicate. – d-cmst Nov 26 '13 at 09:17
  • @dcmst: the linked answer does not have the list inside the margin, as shown by the pictured solution where the section heading is not aligned with the start of the second column. – xyz Nov 26 '13 at 09:25
  • So you mean outside the margin? Ahhhhh, ok, nevermind then – d-cmst Nov 26 '13 at 09:27
  • @dcmst: thanks for your comment, I can understand how my question could be misinterpreted and have updated it for clarity. However, I still believe 'inside the margin' is the correct phrase: as it is describes the space around the printed or written matter – xyz Nov 26 '13 at 09:47
  • 1
    You are free to believe whatever you like, don't worry. However, this would not have happened if you had posted a MWE in the first place. My impression was the the picture showed a faulty behavior and you wanted to move the description inside the margin. – d-cmst Nov 26 '13 at 09:51
  • @dcmst: could you please clarify what you mean by post a MWE when I am unable to get code to produce the desired formatting in the first place and it is not a debugging issue? (Interested for future posts) – xyz Nov 26 '13 at 10:25
  • post some code that shows your attempt to reach your goal and does not work (sometimes called a NotWE). It would make clear where your description actually is and where you want to move it. This way you will overcome potential ambiguities that come with pictures that can be interpreted both as a faulty behaviour (as I did) or as a goal (as you intended) or with words like inside/outside – d-cmst Nov 26 '13 at 10:34

1 Answers1

3

This will work only for short labels.

\documentclass{article}

\usepackage{enumitem,showframe}

\SetLabelAlign{parright}{\parbox{\labelwidth}{\makebox[0pt][r]{#1\hspace{1em}}}}

\newlist{mydescription}{description}{1}
\setlist[mydescription,1]{style=multiline,topsep=10pt,leftmargin=*,labelsep=0pt,font=\color{blue}\normalfont,%
    align=parright}

\begin{document}

\section{Experience}
\begin{mydescription}
  \item[hyperref] Some dummy text here to fill the space. Some dummy text here to fill the space. Some dummy text here to fill the space.Some dummy text here to fill the space.
  \item[showkeys - keys] Software Developer  
\end{mydescription}

\end{document}

enter image description here