Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Indexed list

0 views
Skip to first unread message

Charles Casimiro Cavalcante

unread,
Jul 23, 2008, 8:18:47 PM7/23/08
to
Dear TeXperts,

I am trying to build a listing enviroment that produces an indexed
text at the end, as the following silly example:

\begin{enumerate}
\item First
\item Second
\end{enumerate}

1. First (Doc. #1)
2. Second (Doc. #2)

The text would be good if numbered (indexed) by section, e.g.

1. First (Doc. #3.1)
2. Second (Doc. #3.2)

And also the counter only reset when section change.

Does anyone have an idea? A package maybe?

Best regards,

Charles

Robin Fairbairns

unread,
Jul 24, 2008, 9:18:36 AM7/24/08
to
Charles Casimiro Cavalcante <charles....@gmail.com> writes:
>Dear TeXperts,

ugh. surely we can be addressed in a way that seems less to imply
that were the sort of slimy thing that crawls across the garden?

you omit more than you tell us. how do you create these documents?
where do the numbers come from, in the first place? how does the
stuff, that you propose to put in your list, arise?

a minimal example, with 1- or 2-line "documents" would seem in order.
with the sort of information we can glean from that, i'm sure what you
want is do-able.

see http://www.tex.ac.uk/cgi-bin/texfaq2html?label=minxampl for
details of how to create a minimal example.
--
Robin Fairbairns, Cambridge

David Kastrup

unread,
Jul 24, 2008, 9:28:02 AM7/24/08
to
rf...@cl.cam.ac.uk (Robin Fairbairns) writes:

> Charles Casimiro Cavalcante <charles....@gmail.com> writes:
>>Dear TeXperts,
>
> ugh. surely we can be addressed in a way that seems less to imply
> that were the sort of slimy thing that crawls across the garden?

While exercise 1 of the TeXbook clearly frowns upon the term "TeXpert",
I was not aware of those implications.

--
David Kastrup

Charles Casimiro Cavalcante

unread,
Jul 24, 2008, 3:01:08 PM7/24/08
to
Hum... I will then try to explain what I want.

I have to produce a document which is, basically a list of several
different activities, each item has to be associated to a document
which has to be identified by a number. Thus I would like something
like:

\begin{document}

\section{Introduction}
A lot of text

\begin{enumerate}
\item First activity
\item Second activity
\end{enumerate}

\section{Didactical activities}

\begin{enumerate}
\item First didactical activity
\item Second didactical activity
\end{enumerate}

\end{document}

The output I want would be something

1. Introduction

1.1. First activity [Doc. 1.1]
1.2. Second activity [Doc. 1.2]


2. Didactical activities

2.1. First didactical activity [Doc 2.1]
2.2. Second didactical activity [Doc. 2.2]


I hope this makes my description a little bit clearer.

BR

Charles
On 24 jul, 10:18, r...@cl.cam.ac.uk (Robin Fairbairns) wrote:

Ulrike Fischer

unread,
Jul 25, 2008, 3:06:23 AM7/25/08
to
Am Thu, 24 Jul 2008 12:01:08 -0700 (PDT) schrieb Charles Casimiro
Cavalcante:

> Hum... I will then try to explain what I want.

Please learn to quote. Don't top post.

>
> I have to produce a document which is, basically a list of several
> different activities, each item has to be associated to a document
> which has to be identified by a number. Thus I would like something
> like:
>
> \begin{document}

Make complete example starting with \documentclass as the class is often
important (and it makes it easier to test a solution).

>
> \section{Introduction}
> A lot of text
>
> \begin{enumerate}
> \item First activity
> \item Second activity
> \end{enumerate}
>
> \section{Didactical activities}
>
> \begin{enumerate}
> \item First didactical activity
> \item Second didactical activity
> \end{enumerate}
>
> \end{document}
>
> The output I want would be something
>
> 1. Introduction
>
> 1.1. First activity [Doc. 1.1]
> 1.2. Second activity [Doc. 1.2]
>
>
> 2. Didactical activities
>
> 2.1. First didactical activity [Doc 2.1]
> 2.2. Second didactical activity [Doc. 2.2]
>
>
> I hope this makes my description a little bit clearer.


\documentclass{article}

\renewcommand\theenumi{\arabic{section}.\arabic{enumi}}
\newcommand\Doc{[Doc. \theenumi]}

\begin{document}

\section{Introduction}
A lot of text

\begin{enumerate}
\item First activity \Doc
\item Second activity \Doc
\end{enumerate}

\section{Didactical activities}

\begin{enumerate}
\item First didactical activity \Doc
\item Second didactical activity \Doc
\end{enumerate}

\end{document}

Adding the \Doc automatically is probably possible too, but I think it a
bit of a pain.


--
Ulrike Fischer

0 new messages