line numbering

Massimiliano Gubinelli <[email protected]>
Newsgroups gmane.editors.texmacs.devel
Message-ID <[email protected]>
Dear Joris,  dear all,
 there were a question on the forum about line numbering (number every line on a page). I was thinking that was not possible without hacking the typesetter, but of course was not true. :) It came to my mind that there were the \datoms primitive and this seemed to be a nice application. I gave a 10 min try and seems to be *partially* working.

Also seems to show some problems : the numbering of sections inside the \datom is  not correctly positioned (very strange).
Maybe this is due to the fact that I used \shift. One would also have to give a size 0 to the numbers so that it does not affect the rest of the line. 


It would be nice to detect the beginning of a new page in order to reset the counter.

Max



<TeXmacs|1.99.15>

<style|generic>

<\body>
  <\hide-preamble>
    <new-counter|line-nr>

    <assign|line-nr-shift|-1em>

    <assign|number-line|<macro|<inc-line-nr><the-line-nr>>>

    <assign|decorate-line|<macro|body|<shift|<number-line>|<line-nr-shift>|><arg|body>>>

    \;
  </hide-preamble>

  <\datoms|<macro|x|<decorate-line|<arg|x>>>>
    Here is a sufficiently long paragraph. Here is a sufficiently long
    paragraph. Here is a sufficiently long paragraph. Here is a sufficiently
    long paragraph. Here is a sufficiently long paragraph. Here is a
    sufficiently long paragraph.

    <section|fkdjfksjdfksdjkfjksdjkfjsdk>

    dflfksldkfds

    <\equation*>
      x<rsup|2>+y<rsup|2>\<leqslant\>3
    </equation*>

    dsdklsakdlaskdlas

    slkdlkasldkaslkdas

    dsamd,aslkdlakla

    ss

    sss

    \;

    \;
  </datoms>

  \;
</body>

<\initial>
  <\collection>
    <associate|page-medium|paper>
  </collection>
</initial>

<\references>
  <\collection>
    <associate|auto-1|<tuple|1|?|../.TeXmacs/texts/scratch/no_name_14.tm>>
  </collection>
</references>
_______________________________________________
Texmacs-dev mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/texmacs-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.