groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Groff] indentation in bibliographies


From: Matthias-Christian Ott
Subject: Re: [Groff] indentation in bibliographies
Date: Tue, 21 Jul 2009 12:54:55 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

On Tue, Jul 21, 2009 at 12:44:39PM +0200, joerg van den hoff wrote:
> On Mon, 20 Jul 2009 16:57:05 +0200, Matthias-Christian Ott 
> <address@hidden> wrote:
>
>> On Mon, Jul 20, 2009 at 04:20:36PM +0200, Joerg van den Hoff wrote:
>>> I'm using 'refer' (and the ms macros) for generation of auto-numbered 
>>> literature
>>> references (using the refer 'bibliography' request).
>>>
>>> problem: if numbers go beyond 99 there is not enough indentation space,
>>> so I get something like
>>>
>>> ...
>>> 98. some reference
>>> 99. some reference
>>> 100.
>>>    some reference
>>> ...
>>>
>>>
>>> I therefore want to increase the indentation to get
>>>
>>> ...
>>> 98.  some reference
>>> 99.  some reference
>>> 100. some reference
>>> ...
>>>
>>>
>>> but I cannot recall/find how to do this.
>>
>> I believe what you want to do is not really possible, because groff is a
>> single-pass typesetting software.
>
> yes, I know. I actually wanted a way to choose a fixed hard-coded indent.
>
>>
>> I always write ad-hoc macros, so I can't help you with -ms, but here's
>> how I solved the problem:
>>
>> .de ][
>> .br
>> .ps 11p
>> .ft R
>> .ad l
>> .mk
>> .ll 5n
>> [\\*([F]
>> .br
>> .rt
>> .ll
>> .in +5n
>> .if !"\\*([A"" \\*([A:
>> .if !"\\*([T"" \fI\\*([T\fP.
>> .if !"\\*([J"" \{\
>> In: \fI\\*([J\fP.
>> .if !"\\*([N"" \\*([N,
>> .\}
>> .if !"\\*([B"" In: \fI\\*([B\fP.
>> .if !"\\*([I"" \\*([I,
>> .if !"\\*([C"" \\*([C
>> .if !"\\*([D"" \\*([D
>> .ie !"\\*([P"" , S. \\*([P
>> .el \.
>> .if !"\\*([O"" \{\
>> .br
>> \\*([O
>> .\}
>> .br
>> .in
>> .di
>> .ne \\n(dnu
>> .nr fI \\n(.u
>> .nf
>> .Bi
>> .if \\n(fI .fi
>> .rm [A [B [C [D [E [G [I [J [K [L [N [O [P [Q [R [S [T [V [X
>> ..
>> .de ]-
>> .br
>> .di Bi
>> ..
>>
>> It basically puts the bibliography at the end and inserts a "column"
>> with a fixed width which contains the numbers, you have to manually
>> adjust the column width depending on the bibliography size you have. It
>> worked for me with about 150 entries.
>
> this perfectly fits my needs. thanks a lot! I did not look at the ']['  
> macro, so I was hoping that
> there is some 'user-level' switch to adjust the indent via a register.  
> seems not to be the case...

Hmm, I'm not familiar with the -ms source code, but that would be a good
starting point.

> I will see how to adjust your template to my special case. on a first try 
> it works when generating
> postscript and also when formatting with -Tascii, but in the latter case 
> I get warnings:
>
> ./publica:105: warning: only `z' and `u' scale indicators valid in this  
> context
> ./publica:105: warning: macro `[B' not defined
> ./publica:105: warning: macro `[I' not defined
> ./publica:105: warning: macro `[C' not defined
> ./publica:105: warning: macro `[O' not defined
>
> which are absent when using the default device. any idea where these come 
> from?

They belong to refer.

> thanks again (and I Cc this back to the list...)
>
> joerg

Regards,
Matthias-Christian




reply via email to

[Prev in Thread] Current Thread [Next in Thread]