Re: [Groff] moving TOC to start

2005-09-29 Thread Tadziu Hoffmann
[Replying to his message, I had mailed Jon directly instead of the groff list. With his permission, I'm posting his reply here.] > > > I do exactly what Werner is suggesting for my TOC, and it > > > works out very well. My chapter and section macros write out > > > title and page information to

Re: [Groff] moving TOC to start

2005-09-29 Thread Tadziu Hoffmann
> > > The problem with groff's `write' requests is that they > > > don't work, if the user fails to specify the `-U' flag, > > > when invoking groff. > > > > > > This flag activates the so called `unsafe' mode. While it > > > probably isn't the case, this carries the connotation that > > > it ma

Re: [Groff] moving TOC to start

2005-09-29 Thread Werner LEMBERG
> > The `XS', `XA' and `XE' macros collect the TOC entries into a > > diversion, which is flushed when `TC' is called; to cover the > > entire document, this has to come at the end. This is the way > > `ms' has always worked, both in groff and traditional troff > > implementations > > Just rank s

Re: [Groff] moving TOC to start

2005-09-29 Thread Werner LEMBERG
> The problem with groff's `write' requests is that they don't work, > if the user fails to specify the `-U' flag, when invoking groff. > > This flag activates the so called `unsafe' mode. While it probably > isn't the case, this carries the connotation that it makes groff in > some way harmful,

Re: [Groff] moving TOC to start

2005-09-29 Thread Werner LEMBERG
[About a two-pass run of groff to produce a TOC at any location within a document] > I can certainly see the advantages of this approach -- it does > however place an additional burden on either the document author, or > the author of some additional macro package, to manage the details. Which on

Re: [Groff] moving TOC to start

2005-09-29 Thread Werner LEMBERG
> Would it not, perhaps, be better to provide a separate generalised > TOC processing macro module, `gentoc.tmac' say, which could then be > .mso'd by ms, mm, or any other macro package wishing to exploit its > functionality? Yes! Something similar to my `ul' package for underlining. Wern

Re: [Groff] moving TOC to start

2005-09-29 Thread Tadziu Hoffmann
> Can a diversion be spit out and fed to another one? Yes, that's no problem. The only thing to keep in mind when "replaying" one diversion into another is to do this (normally) in no-fill mode, so as not to re-format already-formatted material. If you want to save material unformatted for form

Order status (sgviwqkizc)

2005-09-29 Thread Patricia
Let's be having you! Cialis SOFTTABS is the new impotence treatment drug that everyone is talking about. It has benefits over Viagra and other ED treatment solutions. Price for medium package is $ 2.49 per 20mg pill. Shop here Flavour: Mint Lemon Banana Strawberry Shipping world wide. So lon

Re: Re: [Groff] moving TOC to start

2005-09-29 Thread M Bianchi
On Thu, Sep 29, 2005 at 10:53:59AM +0100, Keith MARSHALL wrote: > : > Not a big deal, I know, but `unsafe' is a rather unfortunate choice > of name for this `extended functionality' mode of groff's. The problem is you have to think like a nasty person. If I can convince you to run groff i

Тренинг_тренеров_(hw)

2005-09-29 Thread Умар Ашотович
~~~ Приглашаем на программу: «ТРЕНИНГ ТРЕНЕРОВ. РАЗРАБОТКА И ПРОВЕДЕНИЕ ТРЕНИНГА. БАЗОВЫЕ НАВЫКИ»   «Тренинг тренеров» - это программа, участие в которой позволяет начинающим тренерам освоить технологии разработки и ведения тренингов, приобрести знани

Re: [Groff] moving TOC to start

2005-09-29 Thread Tadziu Hoffmann
> >> since a diversion isn't paginated until it is flushed out, > >> how would we capture TOC entries, with proper page number > >> references, while collecting the main body diversion? > > > > Simple: you create a temporary page diversion for collecting > > text. When that is full, you increm

Re: [Groff] moving TOC to start

2005-09-29 Thread Larry McVoy
On Thu, Sep 29, 2005 at 04:08:50PM +0100, Keith MARSHALL wrote: > >> since a diversion isn't paginated until it is flushed out, > >> how would we capture TOC entries, with proper page number > >> references, while collecting the main body diversion? > > > > Simple: you create a temporary page di

Re: [Groff] moving TOC to start

2005-09-29 Thread Keith MARSHALL
>> since a diversion isn't paginated until it is flushed out, >> how would we capture TOC entries, with proper page number >> references, while collecting the main body diversion? > > Simple: you create a temporary page diversion for collecting > text. When that is full, you increment your own

Re: [Groff] moving TOC to start

2005-09-29 Thread Jon Snader
On Thu, Sep 29, 2005 at 10:53:59AM +0100, Keith MARSHALL wrote: > > The problem with groff's `write' requests is that they don't work, > if the user fails to specify the `-U' flag, when invoking groff. > > This flag activates the so called `unsafe' mode. While it probably > isn't the case, this

Re: [Groff] moving TOC to start

2005-09-29 Thread Tadziu Hoffmann
> since a diversion isn't paginated until it is flushed out, > how would we capture TOC entries, with proper page number > references, while collecting the main body diversion? Simple: you create a temporary page diversion for collecting text. When that is full, you increment your own page cou

Re: [Groff] moving TOC to start

2005-09-29 Thread Jon Snader
On Thu, Sep 29, 2005 at 08:11:53AM +0200, Werner LEMBERG wrote: > > > Uh, oh, I wasn't aware that you use this indeed very nasty strategy > within pdfroff. As Tadziu suggested in another mail, groff should > behave like LaTeX (and I was incorrectly assuming that the ms macros > already do someth

Re: [Groff] moving TOC to start

2005-09-29 Thread Keith MARSHALL
> Just rank speculation, in the way of throwing out crazy ideas... > > Is there any merit to the idea of diverting an *entire* document > and inserting a TOC in the right place just before printing the > whole thing? They say that "great minds think alike", but then it is also said that "fools sel

Re: [Groff] moving TOC to start

2005-09-29 Thread Egil Kvaleberg
On Thu, 2005-09-29 at 10:53 +0100, Keith MARSHALL wrote: > Not a big deal, I know, but `unsafe' is a rather unfortunate choice > of name for this `extended functionality' mode of groff's. The command allows unsafe behaviour in the same manner as, I believe, 'Word' macros, so the name is appropria

Re: [Groff] moving TOC to start

2005-09-29 Thread Larry Kollar
> Would it not, perhaps, be better to provide a separate generalised > TOC processing macro module, `gentoc.tmac' say, which could then > be .mso'd by ms, mm, or any other macro package wishing to exploit > its functionality? I *like* this idea. The devil, as usual, is in the (implementation) deta

Re: [Groff] moving TOC to start

2005-09-29 Thread Keith MARSHALL
Egil Kvaleberg wrote, quoting me: >> Not a big deal, I know, but `unsafe' is a rather unfortunate choice >> of name for this `extended functionality' mode of groff's. > > The command allows unsafe behaviour in the same manner as, I believe, > 'Word' macros, so the name is appropriate IMHO. Word ma

Re: [Groff] moving TOC to start

2005-09-29 Thread Larry Kollar
> The `XS', `XA' and `XE' macros collect the TOC entries into a > diversion, which is flushed when `TC' is called; to cover the entire > document, this has to come at the end. This is the way `ms' has > always worked, both in groff and traditional troff implementations Just rank speculation, in t

Re: [Groff] moving TOC to start

2005-09-29 Thread Keith MARSHALL
Werner Lemberg wrote: > Indeed. It would be great if you can volunteer to add something > like this to the ms macros. A further thought. Would it not, perhaps, be better to provide a separate generalised TOC processing macro module, `gentoc.tmac' say, which could then be .mso'd by ms, mm, or any

Re: [Groff] moving TOC to start

2005-09-29 Thread Keith MARSHALL
Werner Lemberg wrote, quoting Tadziu Hoffman: >> To be honest, my method has been pretty much obsoleted by groff's >> "write" requests. It had been based on the fact that troff had had >> no capability for writing larger blocks of text (i.e., multi-line >> chunks) to external files. >> >> Here is

Re: [Groff] moving TOC to start

2005-09-29 Thread Keith MARSHALL
>> After generating the reference dictionary, pdfroff then performs two >> further passes, one to capture the table of contents into its own >> PostScript file, the second to capture the document body text. > > Uh, oh, I wasn't aware that you use this indeed very nasty strategy > within pdfroff...

Re: [Groff] moving TOC to start

2005-09-29 Thread Werner LEMBERG
> I'm not sure that you've fully understood my proposal; I think I have :-) > this is exactly how pdfroff currently works, and I don't foresee any > change in this strategy, in respect of resolving references or index > entries. Excellent. > After generating the reference dictionary, pdfroff t

Re: [Groff] moving TOC to start

2005-09-29 Thread Werner LEMBERG
> To be honest, my method has been pretty much obsoleted by groff's > "write" requests. It had been based on the fact that troff had had > no capability for writing larger blocks of text (i.e., multi-line > chunks) to external files. > > Here is a toy model of a much better approach. [...] > >