[texhax] Text vertical shifting

Oleg Katsitadze olegkat at gmail.com
Fri Jul 3 18:40:32 CEST 2009


On Mon, Jun 15, 2009 at 01:30:10PM +0100, Rodolfo Medina wrote:
> ...but with some undesired side effect: 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?
>
> Thanks for any help
> Rodolfo
>
>
>
> \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
> }

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}}
}

HTH,
Oleg


More information about the texhax mailing list