9

In lineno package guide, I found:

Attaching line numbers after TeX has broken the paragraph into lines is already quite a difficult job for TeX. Why? Because TeX does not normally give you any control after line breaking. lineno.sty does it by pretending that the current page ends after each and every line. This keeps TeX quite busy, but works.

I know the package everyshi which offers \EveryShipout, \AtNextShipout and \AtBeginDocument.

Is there a package that provides \EveryShipoutLine, \AtNextShipoutLine and \AtBeginParagrapheLine?

Otherwise, I have to improve my knowledge of TeX and dissect the lineno package.

Addition, an example of usage : Exemple

3
  • What is it that you would like to do with them? LuaTeX offers "callback filters" that provide functionality such as you describe, see for example This, but whatever work you want done would need to be coded in lua(/tex).
    – Scott H.
    Nov 1, 2012 at 2:27
  • My idea is to use a larger font size for the first line and decreased the size of a few lines to complete the normal size. Or a line of color and the second in another color. I read the article and I come back.
    – La Raison
    Nov 1, 2012 at 10:53
  • If you turn your comment in response, I'll vote for it. I have work to do before we can understand all the subtleties of Tex, Latex and LuaTEX! but I'm working on it!
    – La Raison
    Nov 1, 2012 at 12:16

1 Answer 1

7

LuaTeX provides callbacks from which the lines of a paragraph (and paragraphs themselves among other things) can be intercepted and manipulated. I'm just fiddling around with this myself, here are some resources that I found useful (in order):

  1. LuaTeX: What it takes to make a paragraph-Isambert
  2. The chickenize package
  3. Three things you can do with LuaTeX that would be extremely painful otherwise-Isambert

The chickenize package is more of an instructional tool than anything else, it describes how to use callbacks and implements all sorts of strange things with them. On this site, searching for post_linebreak_filter etc. will give you some further examples.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.