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 problems with my custom list and the space from the leftmargin:

in order to illustrate, list and space

I do not understand why [*] does not begin at the labelwidth which must be 1<><><><> long by definition. You can change the number of <> to see the listparindent is invariable....

What I want is that all the coloured arrows being where the blue one begins. I also want to put the label 1<><><><> at say a unknown value X cm [say 2cm] from the leftmargin. I do not care where the text actually begins.

I have a MWE:

%\RequirePackage{fix-cm}
\documentclass[twoside, a4paper, 11pt]{article}




\newcounter{list1}
\setcounter{list1}{0}

\newenvironment{mylist}

% level = 0
\begin{list}
{
{\arabic{list1}<><><><>}
}
{
%\let\makelabel\descriptionlabel
%\setlength{\labelwidth}{0ex}
%\setlength{\leftmargin}{\leftmargini}
\setlength{\rightmargin}{0ex}
\setlength{\labelsep}{0cm}
\setlength{\itemindent}{1\parindent}
%\setlength{\listparindent}{\labelwidth}
\setlength{\listparindent}{1\parindent}
\setlength{\itemsep}{0ex}
\setlength{\topsep}{0\parskip plus 0.5\parskip minus 0.5\parskip}
\setlength{\parsep}{1\parskip plus 0.5\parskip minus 0.5\parskip}
\setlength{\partopsep}{0\parskip}
\usecounter{list1}
}


\begin{document}








\small

here are many font families e.g. Computer Modern, Times, Arial and Courier. Those families can be grouped into three main categories: roman (rm) or serif, sans serif (sf) and monospace (tt) (see Typeface for more details). Each font family comes with the default design which falls into one of those categories
\begin{mylist}
\item  However, it is interchangeable among them. Computer Modern Roman is the default font family for LaTeX. Fonts in each family also have different properties (size, shape, weight, etc.). Families are meant to be consistent, so it is highly discouraged to change fonts individually rather than the whole family.

[*]However, it is interchangeable among them. Computer Modern Roman is the default font family for LaTeX. Fonts in each family also have different properties (size, shape, weight, etc.). Families are meant to be consistent, so it is highly discouraged to change fonts individually rather than the whole family.
\item However, it is interchangeable among them. Computer Modern Roman is the default font family for LaTeX. Fonts in each family also have different properties (size, shape, weight, etc.). Families are meant to be consistent, so it is highly discouraged to change fonts individually rather than the whole family.
\end{mylist}
However, it is interchangeable among them. Computer Modern Roman is the default font family for LaTeX. Fonts in each family also have different properties (size, shape, weight, etc.). Families are meant to be consistent, so it is highly discouraged to change fonts individually rather than the whole family.

\end{document}
share|improve this question
add comment

1 Answer 1

Your original definition has errors: you are defining an environment, but didn't provide the correct syntax for the start part and forgot the end part.

I'd suggest you to use the enumitem package to easily define your list:

\documentclass[twoside, a4paper, 11pt]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{enumitem}

\newlist{mylist}{enumerate}{2}
\setlist[mylist,1]{label=\arabic*<><><><>,leftmargin=*}

\begin{document}

\small

here are many font families e.g. Computer Modern, Times, Arial and Courier. Those families can be grouped into three main categories: roman (rm) or serif, sans serif (sf) and monospace (tt) (see Typeface for more details). Each font family comes with the default design which falls into one of those categories
\begin{mylist}
\item  However, it is interchangeable among them. Computer Modern Roman is the default font family for LaTeX. Fonts in each family also have different properties (size, shape, weight, etc.). Families are meant to be consistent, so it is highly discouraged to change fonts individually rather than the whole family.

[*]However, it is interchangeable among them. Computer Modern Roman is the default font family for LaTeX. Fonts in each family also have different properties (size, shape, weight, etc.). Families are meant to be consistent, so it is highly discouraged to change fonts individually rather than the whole family.
\item However, it is interchangeable among them. Computer Modern Roman is the default font family for LaTeX. Fonts in each family also have different properties (size, shape, weight, etc.). Families are meant to be consistent, so it is highly discouraged to change fonts individually rather than the whole family.
\end{mylist}
However, it is interchangeable among them. Computer Modern Roman is the default font family for LaTeX. Fonts in each family also have different properties (size, shape, weight, etc.). Families are meant to be consistent, so it is highly discouraged to change fonts individually rather than the whole family.

\end{document}

enter image description here

Using labelindent=<length> (as in labelindent=3cm) and possibly changing leftmargin=* to leftmargin=<length> (as in leftmargin=4cm), if required, you can obtain the result you required in the second part of your question.

share|improve this answer
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.