There is an attempt by Petr Olšák for Czech and Slovak, but it requires an extension to TeX and is not for the faint of heart. Get used to type w~ and you'll be OK.
–
egregMar 6 '12 at 10:24

1

you mean without any sort of document markup? that would require to automatically analyse text. Not impossible in theory, but certainly nothing that LaTeX is being set up for I'd say.
–
Frank MittelbachMar 6 '12 at 10:26

4

Paul Isambert's xesearch package might be up to the task (the user manual is worth seeing, with some nice effects).
–
Bruno Le FlochMar 6 '12 at 10:46

1

I think I've seen some Lua-based approach with a similar case (I of course can't remember the detail).
–
Joseph Wright♦Mar 6 '12 at 10:55

1

Why not just do the replacement with a preprocessing script? I bet you could even use write a arara rule to run the script prior to compiling.
–
StrongBadFeb 18 '13 at 23:54

2 Answers
2

Well, I know about a few "solutions" (in quotation marks, since - as was mentioned in the comments - this is something quite difficult to do automatically).

The impnattypo package (http://ctan.org/pkg/impnattypo). Requires lualatex, and (among other interesting things) puts hard spaces after one-letter words. (Notice that your example was hypercorrect (see http://en.wikipedia.org/wiki/Hypercorrection), in a sense that in fact you may put "na" at the end of the line in Polish typography (as opposed to "a", "i", "o", "w" and "z"; I'm not sure about "we" and "ze"). While putting a tie ("~") after "na" etc. might be a good idea in some cases, I wouldn't advise to do it automatically - it'd be better to have each case judged by a human.)

There is a set of macros (for plain or LaTeX, I believe) by Przemysław Scherwentke, described in the GUST Bulletin 23 (2006), pp. 109-110. AFAIR they work even with plain vanilla Knuthian TeX, but do their job by messing with active characters, which might be a bit dangerous. AFAIK it is not available on the web, but I could scan it for you and send in an email if you want.

And finally, there are numerous scripts and plugins for editors to do this. As a heavy emacs addict, I know only of (two) emacs solutions. There is sierotki.el, which does two things: first, it may make your space key "electric", so that a space after a one-letter word automatically becomes a tie; second, it has a function tex-hard-spaces, which does a query-replace-regexp with suitable parameters. Actually, in current versions of sierotki.el, tex-hard-spaces is just an alias for the latter solution: tildify-buffer, which is a better one, since it can automatically detect things like math mode or verbatim, and not touch these. One (very little) problem with tildify-buffer might be its default configuration, which is suited for the Czech language; however, adapting it to Polish is a question of editing one regexp.