texmacs-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Texmacs-dev] line numbering


From: Massimiliano Gubinelli
Subject: [Texmacs-dev] line numbering
Date: Mon, 16 Nov 2020 07:59:16 +0100

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>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]