[texhax] Variable indentation of paragraph titles
Stanislaw Romanski
s.romanski at datos.pl
Sat Sep 22 17:43:16 CEST 2007
Hi !
You probably look for something like this:
========================================================================
% -------------------------------------------
\def\myTitle#1#2{\setbox0=\hbox{\the#1. }\leavevmode\hangindent\wd0\hangafter
1 \box0 #2.\par}
% -------------------------------------------
\hsize = 3in
\parindent 0pt
\newcount\paragraphCount
\paragraphCount = 0
\advance\paragraphCount by 1
xxxxxxxxxx
\myTitle{\paragraphCount}{This is the title of paragraph 1, which is very
very long, so I don't know
how to handle it with TeX}
xxxxxxxxxx
\paragraphCount = 12
\myTitle{\paragraphCount}{This is the title of paragraph 12, which has a
different indentation
because of `12' in place of `1'}
xxxxxxxxxx
\bye
========================================================================
Cheers,
Stanislaw Romanski
----- Original Message -----
From: "Rodolfo Medina" <rodolfo.medina at gmail.com>
To: <texhax at tug.org>
Sent: Saturday, September 22, 2007 3:55 PM
Subject: [texhax] Variable indentation of paragraph titles
> Hi to all TeX users.
>
> With plain TeX:
> I wish to have something like that:
>
>
> ------------------------->%---------------------------------------------------
>
> 1. This is the title of paragraph 1, which is very very long, so I don't
> know
> how to handle it with TeX.
>
> 12. This is the title of paragraph 12, which has a different
> indentation
> because of `12' in place of `1'.
>
> -------------------------%<---------------------------------------------------
>
>
> Can anybody suggest how to get that? The title should be flush right;
> whereas
> the number should be flush left; and the same glue should be between the
> number
> and the title.
>
> Thanks for any reply,
> Rodolfo
>
> _______________________________________________
> TeX FAQ: http://www.tex.ac.uk/faq
> Mailing list archives: http://tug.org/pipermail/texhax/
> More links: http://tug.org/begin.html
>
> Automated subscription management: http://tug.org/mailman/listinfo/texhax
> Human mailing list managers: postmaster at tug.org
>
More information about the texhax
mailing list