[Tex/LaTex] Allow line break, but without inserting a dash

hyphenationline-breakingpunctuation

I have a sentence that contains a number of long dataset names. I would like to allow LaTeX to break these names at certain positions that I would like to specify somehow just like I can use \- to allow a word break with hyphenation. But: I would like LaTeX not to insert a dash (which could be mistaken as belonging to the dataset name). How can I do this?

(Something similar is realized in the url package so I guess I could just read that code 🙂 I would not like to use the url package here to be able to make a syntactical (and typographic) difference between urls and datset names.)

Best Answer

You could insert \allowbreak whereever a break without hyphen shall be allowed, such as

long\allowbreak word