[texhax] command inserting space

Greg Matheson lang at ms.chinmin.edu.tw
Sun Nov 27 15:01:46 CET 2005


On Sun, 27 Nov 2005, Hartmut Henkel wrote:

> On Sun, 27 Nov 2005, Greg Matheson wrote:

> > But it appears I cannot have a space at the end of my command,
> > and get no space in the printed document. Despite the FAQ saying
> > spaces are gobbled, I find 'f\xx m' is appearing as 'f__ m',
> > rather than 'f__m'.

> so it seems that this space is in your \xx macro definition. Where, one
> can't tell without actually seeing your macro. Maybe there is an
> end-of-line after a closing brace, which can be hidden by a percent
> sign, like }%

I didn't think about that. I tried naming my commands, \0, \1, ..
or \x, \xx, \xxx, ...

\newcommand{\0}[0]{%
}

\newcommand{\x}[0]{%
        \begin{texdraw} \drawdim cm \rlvec(0 -0.5) \rlvec(0.5 0) \rlvec(0 0.5) \rlvec(-0.5 0) \rmove(0.55 0)%
        \end{texdraw}
}

\newcommand{\xx}[0]{%
        \begin{texdraw} \drawdim cm
        \rlvec(0 -0.5) \rlvec(0.5 0) \rlvec(0 0.5) \rlvec(-0.5 0) \rmove(0.55 0) \rlvec(0 -0.5) \rlvec(0.5 0) \rlvec(0 0.5) \rlvec(-0.5 0) \rmove(0.55 0)
	\end{texdraw}
}


-- 
Greg Matheson                    Rather than do things right,
                                 Do the right thing. 
                                 --Anonymous



More information about the texhax mailing list