From: Benn Newman <benn.newman@snc.edu>
To: 9fans@9fans.net
Subject: Re: [9fans] troff: references
Date: Sat, 25 Jul 2009 11:56:51 -0500 [thread overview]
Message-ID: <20090725165651.GA9351@SDF.LONESTAR.ORG> (raw)
In-Reply-To: <a560a5d00907231313p26641f7eh54f63a4bec637506@mail.gmail.com>
On Thu, 23 Jul 2009 22:13:50 +0200, rudolf.sykora@gmail.com wrote:
> Hello,
>
> is there anything ready for troff/eqn that could help me with
> 1) automatic equation numbering with possible setting a label to an
> equation by means of which one could forward/backward reference the
> equation?
> 2) setting a label somewhere in the text, so one can reference it and
> obtain e.g. a page on which the label is?
>
> Thanks
> Ruda
>
Hello
I am not aware of anything specificallyto meet your need, but I can get you started.
To automatically number equations:
.nr En 0 1 \" En: equation number, 0: starting number, 1: auto-incrementer
.EQ "" \n+(En
e = m c sup 2
.EN
.am EQ \" This will print the equation number and page number to stderr
.tm eqn: \\$2 \\n%
..
See CSTR 128, `Tools for Printing Indexes' by Jon Bentley and bwk,
particularly section 2., `Typical Use' <http://www.kohala.com/start/troff/cstr128.ps>.
Then you would have a macro, .En equation-number, that would use the label in t.out and match it with its page number using a preprocessor.
Then mix this all up to do exactly what you want to do.
--
Benn Newman
next prev parent reply other threads:[~2009-07-25 16:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.2318.1248394094.1513.9fans@9fans.net>
2009-07-23 20:13 ` Rudolf Sykora
2009-07-25 16:56 ` Benn Newman [this message]
2009-07-27 9:30 ` Darren Bane
2009-07-27 10:26 ` cej
2009-07-27 10:34 ` Francisco J Ballesteros
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090725165651.GA9351@SDF.LONESTAR.ORG \
--to=benn.newman@snc.edu \
--cc=9fans@9fans.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).