Command/determinenoflines

From Wiki
Jump to navigation Jump to search


\determinenoflines

Summary

The command \determinenoflines calculates the number of lines of the given text.

Settings

\determinenoflines{...}
{...}content

Description

From Dain88, March 2021.

Examples

Example 1

  • \setuppapersize[A7,landscape]
    \startbuffer
      \input tufte
    \stopbuffer
    
    \starttext
    \determinenoflines{\getbuffer}
    
    The number of the lines given text is $\the\noflines$.
    
    \getbuffer
    \stoptext
    

Interesting example of Hans

  • \def\determinednoflines#1%
     {\localcontrolled{\determinenoflines{#1}}\noflines}
    
    \startbuffer
       \input tufte
    \stopbuffer
    
    \starttext
    
    %\fillinrules[n=\determinednoflines{\getbuffer},
    %width=fit]{first}
    %\fillinrules[n=\determinednoflines{\getbuffer},
    %width=broad]{first}
    %\fillinrules[n=\determinednoflines{\getbuffer},
    %width=3cm]{first}
    \fillinrules[n=\determinednoflines{\getbuffer},
    width=3cm,distance=.5em,separator=:]{first}
    \fillinrules[n=\determinednoflines{\getbuffer}]{first}{last}
    
    \stoptext
    
    

Notes

See also

Help from ConTeXt-Mailinglist/Forum

All issues with: