Don't split words on certain lettersAdd tags
5 posts
• Page 1 of 1
Don't split words on certain lettersHi,
I'm writing a document in latex. It's in my native language, Slovenian. And the rules for splitting words across multiple lines are a little bit different: the splitted word in new line should not start with letters: a,e,i,o,u and there are some other rules. Is there any way to let Latex know about these rules? Does latex have a command, which can declare appropriate rules in any language, including Slovenian? If not, how can I prevent Latex from splitting words on such letters. And I want a solution that affects whole document correctly, I don't want to mark each word separately. Thanks
Re: Don't split words on certain lettersHi Eleanor,
I recommend to use babel:
or polyglossia, the latter with XeTeX.You could implement your own special hyphenation rules using the pre_linebreak_filter callback (or a token_filter callback) with LuaTeX. Or, with XeTeX, your could use \XeTeXinterchartoks. In any way, you could insert \nobreak commands.Stefan LaTeX Community Administrator
Re: Don't split words on certain lettersHi, thanks for quick reply.
I'm already using:
And from your answer I guess, this should be enough. But it isn't. The words are still splitted wrongly. A small example is the following code:
When running pdflatex test.tex, the third column contains the following text:
Notice that the word "zlonamerne" is splitted on the 'a' boundary. The letter 'a' should not be put into the next line, but should be on the previous line or the word should be put into the new line alltogether. Any ideas?
Re: Don't split words on certain lettersSure, the other ideas I listed above. Perhaps have a look at the links to XeTeX and LuaTeX, to evaluate if it's worth working it out.
Stefan LaTeX Community Administrator
|






babel