Hi, I have posted a few examples of Lua callbacks (using a LaTeX environment) on tex.se. Just in case you are bored and try to follow the examples:
http://tex.stackexchange.com/questions/28064/how-to-display-only-certain-lines-of-a-paragraph/28106#28106 http://tex.stackexchange.com/questions/27780/one-letter-word-at-the-end-of-line/28128#28128 http://tex.stackexchange.com/questions/28136/latex-not-hyphenating-properly-text-running-off-page/28178#28178 http://tex.stackexchange.com/questions/28294/can-i-have-the-overfullrule-rule-colored/28299#28299 These are pre_linebreak_filter and post_linebreak_filter callbacks. Patrick
