Skip to main content
Participating Frequently
Aug 3, 2007 5:44 PM UTC
Answered

Slash Breaking

This came up in a thread in the main FrameMaker forum: I'd like to be able to allow line breaks at slashes in some instances and suppress them in other instances within the same document. This could be by including a nonbreaking slash special character, similar to nonbreaking hyphens and spaces, or perhaps a simpler and more comprehensive solutiion would be a tool to suppress line breaks within a selected string, regardless of what characters it includes.
This topic is closed to new replies. Start a new post to keep the conversation going.
Orly5E82Correct answer
Inspiring
Jun 8, 2023 9:19 AM UTC

I've since also tried:

  • Remove / from the text options (so default / use is non-breaking).
  • Create a variable for the {hopefully} breaking instances:
    Name: U+002F SOLIDUS (breaking)
    Def: \u200c/\u200c
    (U+200c being ZERO WIDTH NON-JOINER)

Doesn't work.
FM doesn't honor the semantics of \u200c.


You steered me in the right direction. 

I made a variable of my RX/TX so that an end-of-line doesn't break at the slash. 

Placing a \ in front of the slash prevents it from breaking. 

Using Variable def = RX\/TX 

thanks!

10 replies

Participant
Dec 11, 2008 8:54 PM UTC
I notice that this is old thread, but I, too, would find a non-breaking slash character handy, along with a non-breaking period/full-stop/dot/whatever you want to call it.

These would be very helpful when including code samples, as well as in other instances. I often find I have to spend a lot of time reformatting code just to avoid awkward line breaks. Being able to update some of it with non-breaking slashes and dots would really help with this.
Translate
Bob_Niland
Community Expert
Community Expert
Jun 16, 2011 4:52 PM UTC

I notice that this is old thread, but I, too, would find a non-breaking  slash character handy, along with a non-breaking  period/full-stop/dot/whatever you want to call it.

The non-breaking period seems to be an easier case. If the problem is a leading and/or trailing space, use non-breaking spaces (Ctrl-Space).

Slash is tougher, and I solved my one instance of it by using a completely different presentation, requiring no slashes.

But in experimenting, I found that an italicized or oblqued "|" would not break, nor would a math "fraction" (\xda). If I were using either hack, I'd be tempted to put the whole mess in a variable, say char.sym.slash.NB.

Another approach might be to find a comparable glyph in some non-Latin region of Unicode space. I need to stay 7.1-compatible, and didn't explore this.

It appears that the normal slash character is being special-cased for line breaks, and is always used if needed for line breaks, even if surrounded by non-breaking stuff, and even if Hyphenation is turned off.

Translate
Arnis Gubins
Inspiring
Jun 16, 2011 7:09 PM UTC

One has always been able to turn off the line-breaking at a slash character by removing it from the Text Options panel "Allow Line Breaks After" item.

Translate
Participating Frequently
Aug 4, 2008 7:26 PM UTC
can you define the instances of each...I think this is possible by post-processing the file...to 'fix' the slashes - if the cases are element or paragraph style related. It is a simple case of MIF manipulation.
Let me know more details on exactly what you want and perhaps I can provide a solution
David@mifmasaters.com - www.mifmasters.com
Translate