1

I created a personal list with tocloft package. Here is the beginning of code :

\documentclass[a4paper,oneside]{article}
\usepackage[french]{babel}
\usepackage{textpos}
\usepackage{tocloft}
\pagestyle{empty}

\newcommand{\listMyItemsname}{My List of Items}

\newlistof{MyItems}{exp}{\listMyItemsname}

\newcommand{\MyItem}[1]{%
\refstepcounter{MyItems}
\par\noindent\textbf{#1}
\addcontentsline{exp}{MyItems}
{#1}\par}

and I would like the list of content of this list (imported from an external file) to be located at a special place in a textblock envronnement from the textpos package.

\begin{document}

\begin{textblock*}{190mm}[0,0](0mm,80mm)
\listMyItemsname
\end{textblock*}

\MyItem{item A}
\MyItem{item B}
\MyItem{item C}

\end{document}

The problem is, after compiling, I get :

enter image description here

and, I would like to obtain something like this :

enter image description here

Normaly, the \listMyItemsname command should print the list of contents of MyItems like \tableofcontent and show the items entry in list.

Do you know what is wrong with my code ?


Note that I want my items to be read in an external file after the textblock environnement and I wish to generate the list of content of several lists in differents text blocks

closed as unclear what you're asking by user31729, Mensch, Svend Tveskæg, user13907, Zarko Apr 28 '16 at 17:47

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • You're positioning the textblock on the page which is completely independent of the text, even if the \MyItem commands appear later. The textblock will even be overprinted if there are more \MyItem usages. I don't think textpos is really useful here. And you should use \listofMyItems, not \listMyItemsname – user31729 Apr 20 '16 at 5:59
  • Are there any news here? – user31729 Apr 22 '16 at 7:21