2007/12/19, Steffen Wolfrum <[EMAIL PROTECTED]>:
> ... and what about moving it a bit to the right? 10mm maybe?
>
> Steffen

Hi Steffen,

take a look at the following solution, you can change the distance
to the right margin with the distance (you can also use negativ values),
the width key has no real effect, it changes only the length of the box
for the info text.

\unprotect

\definesystemvariable {vs} % VerSion

\startconstants all
      register: register
         float: float
\stopconstants

\def\dodoversion[#1][#2]%
  {\processaction
     [#1]
     [    \v!final=>\chardef\conceptmode\zerocount
                    \overfullrule\zeropoint,
        \v!concept=>\chardef\conceptmode\plusone,  % simple banner
           \v!file=>\chardef\conceptmode\plustwo,  % full banner
      \v!temporary=>\chardef\conceptmode\plusthree % full banner plus
                    \overfullrule5\points]%        % info in the margin
   \getparameters[\??vs][#2]%
   \doifelse\@@vsreference\v!yes
     {\let\referenceinfo\doreferenceinfo}
     {\let\referenceinfo\gobbletwoarguments}%
   \doifelse\@@vsregister\v!yes
     {\let\registerinfo\doregisterinfo}
     {\let\egisterinfo\gobbletwoarguments}%
   \doifelse\@@vsfloat\v!yes
     {\let\floatreference\dofloatreference}
     {\let\floatreference\gobbletwoarguments}}

\def\doversion[#1][#2]%
  {\ifsecondargument
     \dodoversion[#1][#2]%
   \else
     \doifassignmentelse{#1}
       {\dodoversion[][#1]}
       {\dodoversion[#1][]}%
   \fi}

\def\version
  {\dodoubleempty\doversion}

\def\doreferenceinfo{\dotestinfo\referenceinfobox}
\def\doregisterinfo  {\dotestinfo\registerinfobox}
\def\dofloatinfo     {\dotestinfo\floatinfobox}

\def\doaddstatusinfo#1%
  {\setbox#1\vbox to \paperheight
     {\vsmashbox#1\box#1%
      \offinterlineskip
      \vskip\topspace
      \hsize\paperwidth
      \hfill\hbox{\placetestinfo\hskip\@@vsdistance}\vss
      \settexthoffset\hskip\texthoffset % brrrr
     %\tlap{\placeversioninfo}\vskip.5cm}}
      \vbox to 1cm{\vss\placeversioninfo\vss}}}

\def\dotestinfo#1#2#3%
  {\ifinpagebody\else\ifnum\conceptmode=\plusthree
     \begingroup
       [EMAIL PROTECTED]
       \xdef\extratestinfo
         {#2\space\ascii}%
       \gdef\totaltestinfo
         {\global\setbox#1\vbox
            {\unvbox#1\relax
             \infofont \setupinterlinespace
             \hbox
               {\strut
                \expanded{\doboundtext{\extratestinfo}{\@@vswidth}{..}}%
                \quad}}}%
     \endgroup
     \ifinner
       \aftergroup\totaltestinfo
     \else
       \totaltestinfo
     \fi
   \fi\fi}

\version
  [\v!final]
  [\c!reference=\v!yes,
   \c!register=\v!yes,
   \c!float=\v!yes,
   \c!distance=.5cm,
   \c!width=12em]

\protect

\version[temporary][reference=no,distance=-5pt]
%\version[temporary]
%\version[reference=no]

\definepapersize[test][width=157mm,height=232mm]
\setuppapersize[test][test]

\setuplayout
  [width=113mm,
   backspace=20mm,
   location=middle]

%\showframe

\starttext
\dorecurse{10}{text\footnote{note\index{keyword}}\par}
\stoptext

@Hans: Is \conceptmode a global macro I could myself in a third party module.

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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to