ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* \vspace
@ 2009-11-22 22:52 Wolfgang Schuster
  2009-11-23 10:21 ` \vspace Hans Hagen
  0 siblings, 1 reply; 9+ messages in thread
From: Wolfgang Schuster @ 2009-11-22 22:52 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi Hans,

can you add a \vspace command which behaves like \hspace but for vertical mode,
there are some cases where \blank is not so well suited (i know the \??vs namespace
is already used by \blank)

\def\definevspace
  {\dotripleempty\dodefinevspace}

\def\dodefinevspace[#1][#2][#3]%
  {\ifthirdargument
     \setvalue{\??vs#1:#2}{#3}%
   \else
     \setvalue{\??vs:#1}{#2}%
   \fi}

\unexpanded\def\vspace
  {\dodoubleempty\dohspace}

\def\dovspace[#1][#2]%
  {\ifsecondargument
     \dodovspace[#1][#2]%
   \else\iffirstargument
     \vspace[][#1]%
   \else
     \vspace[][\s!default]%
   \fi\fi}

\def\dodovspace[#1][#2]%
  {\vskip\vspaceamount{#1}{#2}}

\def\vspaceamount#1#2%
  {\executeifdefined{\??vs#1:#2}{\executeifdefined{\??vs:#2}\zeropoint}}

Wolfgang

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2009-11-26 21:19 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-22 22:52 \vspace Wolfgang Schuster
2009-11-23 10:21 ` \vspace Hans Hagen
2009-11-23 10:31   ` \vspace Wolfgang Schuster
2009-11-23 10:52     ` \vspace Hans Hagen
2009-11-23 12:18       ` \vspace Alan BRASLAU
2009-11-26 18:08         ` \vspace Henning Hraban Ramm
2009-11-26 18:42           ` \vspace Hans Hagen
2009-11-26 20:31             ` typescript question Bernhard Rosensteiner
2009-11-26 21:19               ` Hans Hagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).