Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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

share|improve this question
    
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 '12 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 '12 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 '12 at 12:16
add comment

1 Answer

up vote 5 down vote accepted

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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