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.

How can I make TeX/LaTeX insert the token \special{lb} into the generated DVI command stream whenever a linebreak occurs?

The listings package with its prebreak/postbreak option seems already close to the effect I want, however I need this \special to show up always, not only in case of a particular listing and I need this as a separate modification not as part of a package which might have side-effects.

The DVI commands are read as part of a postprocessing so I really need to see when TeX does a linebreak.

share|improve this question
    
LuaTeX might help. –  Leo Liu Jun 16 '13 at 16:09
1  
Welcome to TeX.SX! You can have a look on our starter guide to familiarize yourself further with our format. –  karlkoeller Jun 16 '13 at 16:12
    
LuaTeX is not an option for non-technical reasons. –  user1162623 Jun 16 '13 at 20:13

1 Answer 1

This is simply impossible. One should hook in the paragraph making algorithm, and this is not available to the user.

The only way is to use LuaTeX, that opens all the algorithms and procedures to user intervention.

share|improve this answer

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.