[texhax] Text vertical shifting

Rodolfo Medina rodolfo.medina at gmail.com
Fri Jul 3 22:43:11 CEST 2009


On Mon, Jun 15, 2009 at 01:30:10PM +0100, Rodolfo Medina wrote:

>> [...] I'm attaching test.tex, to be processed simply with: `tex test'.  If
>> you uncomment the lines 5,6,7,8,9,10 the whole text is shifted down.
>>
>> How can that be avoided?
>>
>> [...]
>>
>> \def\beginsection#1 {%
>>   \vskip0pt plus.3\vsize\vskip0pt plus-.3\vsize
>>   \bigskip\bigskip\vskip\parskip
>>   \leftline{#1}
>> %     \vtop to 0pt
>> %     \bgroup
>> %     \strut
>> %     \vskip 2\baselineskip
>> %     \vss
>> %     \egroup
>> }



Oleg Katsitadze <olegkat at gmail.com> writes:

> I think what you need is \vadjust:
>
> \def\beginsection#1 {%
>   \vskip0pt plus.3\vsize\vskip0pt plus-.3\vsize
>   \bigskip\bigskip\vskip\parskip
>   \leftline{#1\vadjust{\vtop to 0pt
>      \bgroup
>      \strut
>      \vskip 2\baselineskip
>      \vss
>      \egroup}}
> }



Thanks for your help.  Also without \vadjust, the problem seems to be solved
putting \vtop inside \leftline:

\def\beginsection#1 {%
  \vskip0pt plus.3\vsize\vskip0pt plus-.3\vsize
  \bigskip\bigskip\vskip\parskip
  \leftline{#1
     \vtop to 0pt
     \bgroup
     \strut
     \vskip 2\baselineskip
     \vss
     \egroup
}}


Rodolfo



More information about the texhax mailing list