9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: pmarin.mail@gmail.com (pmarin)
Subject: [9fans] troff macro II
Date: Fri, 25 Mar 2011 21:49:57 +0100	[thread overview]
Message-ID: <AANLkTi=Gnht8uA7M_88fkw1OQZHC4ztcW-7vx8QQuUU0@mail.gmail.com> (raw)
In-Reply-To: <AANLkTikngetRqqUO8DCRQRPeTQAUTP4HOMwBKLL3xTnU@mail.gmail.com>

Read carefully the section 9, 10 and 11 of "A TROFF Tutorial"[1]. I
think is exactly what you are looking for.

[1] http://www.kohala.com/start/troff/v7man/trofftut/trofftut.ps



On Thu, Mar 24, 2011 at 5:54 PM, Rudolf Sykora <rudolf.sykora at gmail.com> wrote:
> Hello 9fans,
>
> since in the previous thread started by me ('troff macros for
> typesetting books/longer texts') nobody touched my question about
> producing wanted headings, I started experimenting, but so far has not
> been quite successful.
>
> Since text to appear in my headings is to mirror section names, like
> '1.2', and a beginning of such a section appears somewhere lower on a
> page---definitely below the page heading---, I must create a page
> heading just after the very page is filled, i.e., as I feel, the
> heading could actually be produced when the ms .BT macro (usually used
> to typeset footings) is called. So I naively tried to redefine the .BT
> macro, actually, by just appending 4 extra lines:
>
> .de BT
> .nr PX \\n(.s
> .nr PF \\n(.f
> .ft 1
> .ps \\n(PS
> 'lt \\n(LTu
> .po \\n(POu
> .if \\n%>0 .tl \(ts\\*(LF\(ts\\*(CF\(ts\\*(RF\(ts
> .ft \\n(PF
> .ps \\n(PX
> .\" ?ABOVE IS THE ORIGINAL, BELOW MY APPENDIX
> .mk
> \v'|0.5i'
> .tl 'a'b'c'
> .rt
> ..
>
> Please consider this just as an experiment (no point-size changes,...).
> This for some reason doesn't work.
> Since some of you probably have experience, could sb. tell what is wrong?
>
> Thank you
> Ruda
>
>



  parent reply	other threads:[~2011-03-25 20:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-24 16:54 Rudolf Sykora
     [not found] ` <AANLkTin9Kh3O6qP-tw2VEUSiQsq+K97LXEsCgGOvcwHC@mail.gmail.com>
     [not found]   ` <AANLkTint2rqA6PxTGxaUa49DVaPD-Ocgpy8y4UEVG84z@mail.gmail.com>
2011-03-24 17:36     ` Gregory Pavelcak
2011-03-25 18:21       ` Rudolf Sykora
2011-03-25 20:49 ` pmarin [this message]
2011-03-25 21:52 ` pmarin
2011-03-26  0:10   ` Rudolf Sykora
2011-03-26  1:02     ` pmarin
2011-03-26  1:14       ` pmarin

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='AANLkTi=Gnht8uA7M_88fkw1OQZHC4ztcW-7vx8QQuUU0@mail.gmail.com' \
    --to=pmarin.mail@gmail.com \
    /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).