Hi Hans,

I just installed the latest beta (14.09.2005) and realised, that
\limitatefirstline is still unchanged. Just read my last mail from the
12th for the details. Sorry for stealing your time.

So I have either to change the description on the wiki, or you have to
change the macro :)

Greetings,

Peter


P.S.:

This is the version I'am currently using (but with 6ex instead of 2ex
tolerance). Using a variable value for the tolerance would make it even
more flexible and user friendly.


\def\limitatefirstline#1#2#3%
 {\hbox\bgroup\strut\dontcomplain
  \setbox\scratchbox\hbox{\begstrut#1\endstrut}%
  \ifdim\wd\scratchbox>#2\relax
    \setbox\scratchbox\hbox{#3}%
    \hsize#2\relax
    \advance\hsize-\wd\scratchbox
    \setbox\scratchbox\vbox{\forgetall\veryraggedright#1}%
    \setbox\scratchbox\vsplit\scratchbox to \lineheight
    \vbox
      {\unvbox\scratchbox
       \global\setbox\plusone\lastbox
       \global\setbox\plusone\hbox{\strut\unhbox\plusone}%
       \hbox % to #2
         {\ifx\clip\undefined
            \box\plusone
          \else\ifdim\wd\plusone>\hsize

\lower\strutdepth\hbox{\clip[\c!width=\hsize,\c!height=\lineheight]{\hbox{\raise\strutdepth\box\plusone}}}%
          \else\ifdim\wd\plusone<\dimexpr\hsize-6ex\relax

\lower\strutdepth\hbox{\clip[\c!width=\hsize,\c!height=\lineheight]{\hbox{\raise\strutdepth\hbox{\begstrut#1\endstrut}}}}%
          \else
            \box\plusone
          \fi\fi\fi
          \removeunwantedspaces#3}}% \removeunwantedspaces\hss#3}}%
  \else
    #1%
  \fi
  \egroup}
_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

Reply via email to