9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] troff diversions
@ 2009-05-15 12:43 Gregory Pavelcak
  0 siblings, 0 replies; only message in thread
From: Gregory Pavelcak @ 2009-05-15 12:43 UTC (permalink / raw)
  To: 9fans

I think of myself as pretty proficient with troff, but I never get
diversions right.

One fairly useless task I set for myself was to write a smart quote
macro. By that I mean that I want the macro to put the quoted text
into a diversion, check how many lines the quote would be when
formatted as a block quote, and then output a block quote if the
number of lines is >= block-quote-threshhold or output an
inline quote if it's not.

Actually this is not so useless if you are writing something that may
or may not be published in a variety of places that have different
page layout conventions for block quotes, and you're a lazy person
who doesn't want to make adjustments to even the rare borderline
case by hand.

Do you see what I have in mind? Any ides on how to achieve it?

Thanks.

Greg



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-05-15 12:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-15 12:43 [9fans] troff diversions Gregory Pavelcak

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).