Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have this code

\documentclass[paper=a4, paper=portrait, pagesize=auto]{scrartcl}

\usepackage[inline]{enumitem}   
\setlist[enumerate,1]{label=\textit{\alph*)}}
\usepackage[table]{xcolor}
\definecolor{orange}{HTML}{FFC296}
\begin{document} 


\section{Student 93b427156c}
\begin{description}
    \item[number] 93b4s27156c              
    \item[name] Note that this analysis of a formative as a pair of sets of features is necessary
to impose an interpretation on an important distinction in language use.
\end{description}
\end{document}

I want to display them like tables so that the data does not come under the header. So, basically, like two columns, so that headers are on left and content on right in separate columns.

Something like this:

enter image description here

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

I hope I understood the question correct

Using the package enumitem you can specify the label position and the alignment of the label by \SetLabelAlign

\documentclass[paper=a4, paper=portrait, pagesize=auto]{scrartcl}

\usepackage[inline]{enumitem}   
\usepackage[table]{xcolor}
\definecolor{orange}{HTML}{FFC296}
\begin{document} 
\SetLabelAlign{rightbox}{\hss\llap{#1\quad}}
\setlist[description,1]{align=rightbox,labelsep=0pt,leftmargin=0pt}
\section{Student 93b427156c}
\begin{description}
    \item[number] 93b4s27156c              
    \item[name] Note that this analysis of a formative as a pair of sets of features is necessary
to impose an interpretation on an important distinction in language use.
\end{description}
\end{document}

enter image description here

share|improve this answer
    
thanks buddy , that is working right , but is there any way to make the labels come under STudent and move the description right , so thay all align –  user17 May 3 '13 at 2:59
    
@user17: And the number of the section shall go to the margin? Can you provide a small picture? –  Marco Daniel May 3 '13 at 7:45
    
yes u r right , something like this i.stack.imgur.com/FgjAv.png on top –  user17 May 3 '13 at 7:52
    
@user17: I don't know whether I understand you. Here an example \documentclass[paper=a4, paper=portrait, pagesize=auto]{scrartcl}\renewcommand*{\othersectionlevelsformat}[3]{\makebox[0p‌​t][r]{#3\autodot\enskip}}\usepackage{enumitem}\usepackage{showframe}\begin{docume‌​nt}\setlist[description,1]{labelwidth=*,leftmargin=2cm,}\section{Student 93b427156c} \begin{description}\item[number] 93b4s27156c\item[name] Note that this analysis of a formative as a pair of sets of features is necessary to impose an interpretation on an important distinction in language use.\end{description}\end{document} –  Marco Daniel May 3 '13 at 8:12
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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