[texhax] Vspace Question

Rolf Turner r.turner at auckland.ac.nz
Sun Sep 2 04:52:57 CEST 2012



It seems pretty clear to me that the OP ***did not*** want
to set indentation to be universally zero.  He wanted indentation
to be zero *after setting "\noindent"*, which seems perfectly
reasonable.  And he was *not* getting a zero indentation after
a "\noindent" if the "\noindent" was immediately preceded by
a "\vspace" and the two were wrapped up in a "\newcommand".

There seems to be an indentation --- or a space --- of about the
width of a single letter, at the being of the line following the "\sep"
command.  Such a space is unwanted and I have no explanation
as to why it appears.

There was some recent discussion about the intricacies of
"\vspace", of which I have unfortunately saved no trace.
There *might* be some insight available from that discussion.

A workaround for the OP's problem would be to define "\sep" by

     \newcommand{\sep}[1]{\mbox{}\\[#1]\noindent}

rather than in terms of "\vspace".  This seems to work, at least
in the OP's toy example.

Why things work with "\\[...]'' and not with "\vspace{...}" is
mysterious to me.  Perhaps some knowledgeable denizen of
the list will chip in and explain.  And/or suggest an alternative
(better) strategy.

     cheers,

             Rolf Turner


On 02/09/12 13:26, William F Hammond wrote:
> Zheng writes:
>
>> \documentclass{article}
>> \newcommand{\sep}[1]{\vspace{#1}\noindent}
>> \begin{document}
>> Hello
>>
>> \sep{4mm}
>> some things here
>>
>> \vspace{4mm}\noindent
>> Are texts above truly indent?
>> \end{document}
> I'm not sure exactly what you want.
> Maybe try something like this:
>
> \documentclass{article}
> \setlength{\parskip}{4mm}
> \setlength{\parindent}{0mm}
> \begin{document}
>
> Hello
>
> some things here
>
> Are texts above truly indent?
>
> \end{document}
>



More information about the texhax mailing list