COMPGROUPS.NET | Search | Post Question | Groups | Stream | About | Register

index with dots

• Follow

Hello!

I am making an index of songs. Ideally, I would like
to have the title on the left and the duration on the
right, connected with dots.

At the moment, I am using \dotfill:

\item Happiness Is Easy\dotfill 6:31
\item I Don't Believe In You\dotfill 5:02
\item Life's What You Make It\dotfill 4:29
\item April 5th\dotfill 5:52
\item Livinggggg In Another World\dotfill 6:58
\item Give It Up\dotfill 5:17
\item Chameleon Day\dotfill 3:20
\item Time It's Time\dotfill 8:14

But it's far from perfect, as you can see here:
http://img185.imageshack.us/img185/8205/indexp.png

When a line break occurs, the track length
is flushed to the left on the next line. Also, because of
the line width is very short, I have a lot of overflows.

things?

Cheers!
Ernest

 0
Reply nfdisco (11) 7/30/2010 2:50:08 PM

In article
ernest <nfdisco@gmail.com> wrote:

> Hello!
>
> I am making an index of songs. Ideally, I would like
> to have the title on the left and the duration on the
> right, connected with dots.
>
> At the moment, I am using \dotfill:
>
> \item Happiness Is Easy\dotfill 6:31
> \item I Don't Believe In You\dotfill 5:02
> \item Life's What You Make It\dotfill 4:29
> \item April 5th\dotfill 5:52
> \item Livinggggg In Another World\dotfill 6:58
> \item Give It Up\dotfill 5:17
> \item Chameleon Day\dotfill 3:20
> \item Time It's Time\dotfill 8:14
>
> But it's far from perfect, as you can see here:
> http://img185.imageshack.us/img185/8205/indexp.png
>
> When a line break occurs, the track length
> is flushed to the left on the next line. Also, because of
> the line width is very short, I have a lot of overflows.
>
> things?
>
> Cheers!
> Ernest

There are two packages that deal with songbooks on CTAN: songs and
songbook.  Maybe those would do the trick.

If not, you can roll your own tables of contents type things using any
of the following:

tocloft
titlesec/titletoc
memoir (which provides all the facilities of tocloft plus more)

Alan

 0

On 30 Jul, 20:52, Alan Munn <am...@msu.edu> wrote:
> In article
>
>
>
> =A0ernest <nfdi...@gmail.com> wrote:
> > Hello!
>
> > I am making an index of songs. Ideally, I would like
> > to have the title on the left and the duration on the
> > right, connected with dots.
>
> > At the moment, I am using \dotfill:
>
> > \item Happiness Is Easy\dotfill 6:31
> > \item I Don't Believe In You\dotfill 5:02
> > \item Life's What You Make It\dotfill 4:29
> > \item April 5th\dotfill 5:52
> > \item Livinggggg In Another World\dotfill 6:58
> > \item Give It Up\dotfill 5:17
> > \item Chameleon Day\dotfill 3:20
> > \item Time It's Time\dotfill 8:14
>
> > But it's far from perfect, as you can see here:
> >http://img185.imageshack.us/img185/8205/indexp.png
>
> > When a line break occurs, the track length
> > is flushed to the left on the next line. Also, because of
> > the line width is very short, I have a lot of overflows.
>
> > things?
>
> > Cheers!
> > Ernest
>
> There are two packages that deal with songbooks on CTAN: songs and
> songbook. =A0Maybe those would do the trick.
>
> If not, you can roll your own tables of contents type things using any
> of the following:
>
> tocloft
> titlesec/titletoc
> memoir (which provides all the facilities of tocloft plus more)
>
> Alan

In the end, I think I've fixed it. Instead of \dotfill now
I use a \dots command that is defined to be
\mbox{}\nobreak\dotfill\nobreak
And I changed the enumerate environment to do
ragged right, so that lines break nicely. This seems to
do it!

Bye.
Ernest

 0

On Jul 31, 9:42=A0am, ernest <nfdi...@gmail.com> wrote:

>
> In the end, I think I've fixed it. Instead of \dotfill now
> I use a \dots command that is defined to be
> \mbox{}\nobreak\dotfill\nobreak

You shoukd be aware that \dots is a basic latex math
command. You shoud be sure you don't need it before
redefining it, and it's probably safer just to use a
different command name.

Dan

 0

3 Replies
172 Views

Similiar Articles:

7/15/2012 2:39:44 PM