[texhax] raiseboxing \hrulefill in multicolumn{}

Lincoln Turner l.turner at physics.unimelb.edu.au
Mon Aug 23 17:38:51 CEST 2004


In message <opsc6ttxxe1jrmup at mail.student.cbs.dk>you write:
>On Mon, 23 Aug 2004 22:13:02 +1000, Lincoln Turner wrote
>>
>> ... & \multicolumn{4}{c}{\hrulefill Something \hrulefill} & ...
>>
>> does this quite well, the only problem is that the rule is sitting on
>> the baseline. I'd like the rule to be centred, say at half the
>> x-height. The problem is that no amount of \raisebox{}ing seems to help
>> here as all the box commands want a definite width, not a rubber one! On
>> the other hand, the basic TeX commands don't seem to play nicely with
>> rubber lengths.
>
>Try something like
>
>\newcommand*\myhrulefill{%
>   \leavevmode\leaders\hrule depth-2pt height 2.4pt\hfill\kern0pt
>}
>
>TeX then draws a rule which upper border is 2.4pt above the baseline and  
>lower border 2pt above the baseline.
>
>Morten Høgholm

Perfect, worked very nicely thanks!

--
Lincoln Turner



More information about the texhax mailing list