How to selectively disable hyphenation on line-breaks? Or how to disable justification?

I can’t find an option for this. Sometimes you don’t want to hyphenate text at the end of a line, as in titles or section headers, etc… How do you accomplish this in TeXmacs?

I think it is \rigid.
But that may not be what you want, in that it does not break its contents. i think you want to break contents only at white spaces. Let us see if someone else knows.
I think a workaround is putting the text in a table cell.

1 Like

Yes, that is what I want. Typically, titles are not justified and hyphenated. I.e. the right side should be ragged.

I also want to know the solution :eyes:

One horrible way to hack around this might be to insert a language block that doesn’t use hyphenation, like Insert->Language->Chinese.

1 Like

Note: there are functions to create “hyphenless” versions of languages in the C++ source code, but they are not exposed.

and doing it in the macros that define sections

That’s an unexpected one haha but it worked… :scream: and it’s actually easier to apply and more practical than the \rigid block! because <rigid> just completely prevents the line from wrapping and you would need to carefully manually create rigid block at each hyphen broken word on the end of each line, and this turned to be so annoying when you want to insert or delete some words in the paragraph while editing. But using a Chinese block you don’t have to worry the manual layout adjustment anymore and the program automatically handles everything

Thanks so much for coming up with this genius stopgap measure, and let’s see or wait for some specialized solution!

1 Like

What about using the programming mode instead of the text mode?

I think one can use the “verbatim” language, it seems to disable hyphenation.