1

I use

\begin{itemize}
  \item \makebox[2.5cm][l]{some text} some very long text. some very long text. some very long text. some very long text.
\end{itemize}

to produce

enter image description here

The problem is that I want the second line of the item to be aligned with the second part of the item. So "some text" acts somehow like the item bullet. So I kind of want \makebox{} to also work in 'the vertical direction', such that no text is placed below this.

1
  • Please clarify what you mean by "I want the second line of the item to be aligned with the second part of the item". By "second part", do you mean the material after the boxed material?
    – Mico
    Commented Jan 12, 2017 at 7:32

1 Answer 1

1

There are serveral solutions for such a thing, here are two. First using labeling environment of scrextend or any KOMA-Script class, second using a environment derived from description using enumitem:

\documentclass{article}
\renewcommand{\familydefault}{\sfdefault}% you are using a sans serif font

% use package scrextend to have the labeling environment of KOMA-Script
\usepackage{scrextend}
\setkomafont{labelinglabel}{$\triangleright$\enskip}% ugly hack to have a
                                % triangle before the item

% use package enumitem to have an extended description environment
\usepackage{enumitem}
\newcommand*{\descriptionlabelwith}[2]{\hspace\labelsep
  \normalfont#1\enskip #2}
\newlist{itemdesc}{description}{1}% currently only one level is definded
\setlist*[itemdesc,1]{font=\normalfont,format=\descriptionlabelwith{$\triangleright$},leftmargin=27mm,labelwidth=*}

\begin{document}
\begin{labeling}{\hspace{2.5cm}}
\item[some text] some very long text. some very long text. some very long text. some very long text.
\end{labeling}

\begin{itemdesc}
\item[some text] some very long text. some very long text. some very long text. some very long text.
\end{itemdesc}

\end{document}

solution using labeling or enumitem

2
  • Sorry for not being clear, but the triangle was already made by the \begin{itemize} environment. So I just need to create some text [spaces] some very long text, in which "some text" works as a label as in a description
    – Jamgreen
    Commented Jan 12, 2017 at 13:19
  • @Jamgreen: And why not making a special list for this? Commented Jan 12, 2017 at 13:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .