How can I make long words stay on their starting line?

Does anyone know how to make part of very long words stay on the line that
their first letter started on if the long word is not the first word in the
line?

I know that sounded confusing, so let me give an example. Libreoffice Writer
treats URLs as very long words. Say you open a blank document, and then you
type a short word like "office", followed by a long URL onto the first line.
So right now, your document looks like this:

office http://somerandomsuperlongURLthatdoesn/>
'
tmattersomerandomsuperlongURLthatdoesn'tmattersomerandomsuperlongURLthatdoesn'
tmatter.com/

The URL is too long to fit completely on the first line. So if you typed out
this URL character by character, Libreoffice Writer will move the entire URL
to the second line as soon as you reached the end of the first line! I don't
want this to happen. I want whatever fits on the first line to stay on the
first line. So for example, it might look like this:

office http://somerandomsuperlongURLthatdoesn/>
'tmattersomerandomsuperlongURLthatdoesn'tmat
tersomerandomsuperlongURLthatdoesn'tmatter.com/

Is it possible to set Libreoffice Writer to do this? I know it's not default
behavior, but there are situations where I don't want to start a URL on a
completely new line just because it won't completely fit on the line that it
started on. Please help.

Thanks!

Turn off the Autocorrect --> Format>Autocorrect and uncheck the box for "while typing". That fixes a lot of formatting issues I have seen crop up in my typing. This may help with yours. Also, you might want to look into the "Autocorrect options" in that menu as well. There is an URL option there.

Thanks for the reply, but even after unchecking "while typing" under Format
--> Autocorrect, my long word was still bumped down to the next line after
it could no longer fit in the line it started on. The URL option may do
something with URLs, but it won't help the more general problem of long
words getting automatically bumped to the next line (I tested with a word
that wasn't a URL).

Hi. I don't suppose you want hyphenation either?
steve

Hi

Thanks for the reply, but even after unchecking "while typing" under Format
--> Autocorrect, my long word was still bumped down to the next line after
it could no longer fit in the line it started on. The URL option may do
something with URLs, but it won't help the more general problem of long
words getting automatically bumped to the next line (I tested with a word
that wasn't a URL).

If you want to hyphenate a word try TOOL >> LANGUAGE >> HYPHENATION

Thanks for the suggestions so far. I guess hyphenation could be useful in
some cases, but it seems to be more of a luxury for me to have that feature
at the moment because I'm still not sure how the Tools --> Language -->
Hyphenation option works.

However, I did look into the Word Wrap option. All the options under Format
--> Wrap are greyed out, and I think this is why:

http://user.services.openoffice.org/en/forum/viewtopic.php?f=7&t=32373&start=0

I think that Word Wrap option refers to wrapping around pictures, and not
what I want to do (leave the first part of the long word on the line it
started on). I think this is why it's greyed out by default; I would have to
paste a picture and select it or something in order to set those Word Wrap
options.

Ron, I think your workaround is very clever, and it worked perfectly with
URLs at least. After inserting a space to split the URL, I basically created
2 separate URLs that I could fix by editing the hyperlink. In fact, I can
generalize this option to long words that aren't URLs; it would actually be
easier in those cases because I would just have to choose a place to split
the word and not have to worry about fixing the hyperlinks to make them
clickable.

But is there a less time consuming and more standardized option? The short
term problem with this workaround is that I have to guess at where the word
should be split. It would be easier of Libreoffice Writer gave the option of
allowing the long word to continue until no more characters fit in the
original line instead of just bumping the whole word down to the next line,
because then I won't have to figure out the exact point at which no more
characters would fit. Splitting it with a space means the user is left to do
all the work that could be automated by Libreoffice.

The lack of this feature bothers me so much that I'm tempted to learn C++
just to add it :frowning:

Hi :slight_smile:
The
Tools - language - Hyphenation seems to be like a spell-check or grammar-check
that you run through after finishing editing a document, or after you already
have a chunk of text to test it on to see how it behaves. It doesn't seem to be
something that stays on during edits.

Regards from
Tom :slight_smile:

never punctual wrote:

Thanks for the suggestions so far. I guess hyphenation could be useful in
some cases, but it seems to be more of a luxury for me to have that feature
at the moment because I'm still not sure how the Tools --> Language -->
Hyphenation option works.

However, I did look into the Word Wrap option. All the options under Format
--> Wrap are greyed out, and I think this is why:

http://user.services.openoffice.org/en/forum/viewtopic.php?f=7&t=32373&start=0

I think that Word Wrap option refers to wrapping around pictures, and not
what I want to do (leave the first part of the long word on the line it
started on). I think this is why it's greyed out by default; I would have to
paste a picture and select it or something in order to set those Word Wrap
options.

Ron, I think your workaround is very clever, and it worked perfectly with
URLs at least. After inserting a space to split the URL, I basically created
2 separate URLs that I could fix by editing the hyperlink. In fact, I can
generalize this option to long words that aren't URLs; it would actually be
easier in those cases because I would just have to choose a place to split
the word and not have to worry about fixing the hyperlinks to make them
clickable.

But is there a less time consuming and more standardized option? The short
term problem with this workaround is that I have to guess at where the word
should be split. It would be easier of Libreoffice Writer gave the option of
allowing the long word to continue until no more characters fit in the
original line instead of just bumping the whole word down to the next line,
because then I won't have to figure out the exact point at which no more
characters would fit. Splitting it with a space means the user is left to do
all the work that could be automated by Libreoffice.

The lack of this feature bothers me so much that I'm tempted to learn C++
just to add it :frowning:

--
Unsubscribe instructions: E-mail to users+help@global.libreoffice.org
In case of problems unsubscribing, write to postmaster@documentfoundation.org
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

Hi never punctual,
I think hyphenation is probably what you're looking for. It can be
applied manually or automatically. I just tested it with your
superduperlongURL and it looks like it works. It is described in the
wiki, I suggest you read it there:
http://help.libreoffice.org/Writer/Hyphenation

In summary (taken from the wiki page):

To Automatically Hyphenate Text in a Paragraph:
    1. Right-click in a paragraph, and choose Paragraph.
    2. Click the Text Flow tab.
    3. In the Hyphenation area, select the Automatically check box.
    4. Click OK.

To Automatically Hyphenate Text in Multiple Paragraphs:
If you want to automatically hyphenate more than one paragraph, use a
paragraph style.
For example, enable the automatic hyphenation option for the "Default"
paragraph style, and then apply the style to the paragraphs that you
want to hyphenate.
    1. Choose Format - Styles and Formatting, and then click the
Paragraph Styles icon.
    2. Right-click the paragraph style that you want to hyphenate, and
then choose Modify.
    3. Click the Text Flow tab.
    4. In the Hyphenation area, select the Automatically check box.
    5. Click OK.
    6. Apply the style to the paragraphs that you want to hyphenate.

To Manually Hyphenate Single Words:
To quickly insert a hyphen, click in the word where you want to add
the hyphen, and then press Ctrl+Hyphen(-).

Regards
Stephan

Hi

In the past using different software (Ami Pro & lotus smartsuite) I had created a text box to go past the margins or reduced the font size to keep it on the same line (or both); it works for me as I don't particularly like word wrapping or word splitting. But these 2 ideas might help in the mean time.

John B

First of all, I want to thank every person who replied to my topic. This is
actually my first time using mailing lists and I have to admit that I was
initially skeptical that I would get any replies at all, but I was totally
wrong!

Stephan's reply really made me reconsider what exactly I wanted Libreoffice
to do. I thought about my original post a bit more, and I realized that it
doesn't make a lot of sense to have a long word split into two pieces as if
they were two separate words. A hyphen is used in most books to indicate
that the word started at the end of the line actually continues on into the
next line. I also realized that the only reason I didn't want hyphenation
initially was because of URLs, but of course those aren't a problem anymore
because of Ron's clever workaround.

So basically, I consider my problem completely resolved now, thanks to all
the replies. I only have one final question about what Stephan wrote. I went
to the wiki page and I understood every part of your summary except the last
part on manually hyphenating single words. I tried Ctrl and -, and I got
some very small hyphen in the middle of the word where my cursor was. It
almost seemed to overlap the letters instead of forcing the letters apart a
little bit to make space for the hyphen. So what exactly is the point of
using Ctrl and - and how is it different from using just -?

never punctual wrote:

So basically, I consider my problem completely resolved now, thanks to all
the replies. I only have one final question about what Stephan wrote. I went
to the wiki page and I understood every part of your summary except the last
part on manually hyphenating single words. I tried Ctrl and -, and I got
some very small hyphen in the middle of the word where my cursor was. It
almost seemed to overlap the letters instead of forcing the letters apart a
little bit to make space for the hyphen. So what exactly is the point of
using Ctrl and - and how is it different from using just -?

Hi never punctual,
the manual hyphenation is different from a normal "-" (I think I'm
going to refer to that as a dash) in that it only actually includes
the "-" when it is needed (i.e. at the end of the line).

If you insert a normal dash in a word, then you have something like
"broken-word", even if the word is in the middle of the line (not at
the end). If you insert a manual hyphen, then it inserts a little
grey box that just indicates to the user (person editing the document)
that a manual hyphen has been inserted. If that word is in the middle
of the page (not at the end), then no hyphen will be printed (or
exported to pdf), so it will look like "brokenword". If the word is
at the end of the line, then it will insert the hyphen and break the
word between the two lines, so it will look like "broken- <next line>
word".

The manual hyphen only puts the dash there when the word is at the end
of the line. So you don't have to keep checking if you need the dash
every time you edit something (making the line longer or shorter)

If my explanation is unclear, feel free to ask for clarification.

Regards
Stephan

In most word processors and editors I've used back in the dark ages--say,
more than five years ago (and some sane versions still do) you could simply
type <CTRL>-<ENTER> (i.e., tap the 'ENTER' key while holding down the 'CTRL'
key) at the point where you wanted to break the line and continue typing the
same line. It's worth a try; You'd be surprised how many tricks from the
DOS-era still work. Best of luck.

Hi,

Thanks for the suggestions so far. I guess hyphenation could be useful in
some cases, but it seems to be more of a luxury for me to have that feature
at the moment because I'm still not sure how the Tools --> Language -->
Hyphenation option works.

  Sorry, I should have been clearer. When I tested it, it worked on the
entire document without having to select any text. It appears to work
much like spell checking typically does.

Thanks Stephan! I had to try out what you said, but I think understand what
manual hyphenation does now. My testing revealed that I didn't need to check
whether you need the dash every time you make the line longer or shorter
because:

1. If you don't need the dash, the whole word will appear on the starting
line, and the grey box stays invisible.
2. If you do need the dash, the word will be broken at the point where you
hyphenated it
3. If you made the starting line so long that the piece before the invisible
manual hyphen won't fit on the starting line anymore, the manual hyphen
becomes invisible again and the whole word gets moved to the next line
instead.

Please correct me if I'm wrong, but I think I understand how manual
hyphenation works now! Honestly I thought your explanation was better than
the wiki's explanation.

By the way I tried out Ctrl + Enter, and all it did was move my cursor down
to the next page.

Finally, I think I still don't understand exactly how Tools --> Language -->
Hyphenation works, but I think I got a little closer. It just says
"hyphenation complete" when I go to it without typing anything, but if I
type something and add a manual hyphenation somewhere, that function seems
to let me choose where to put a hyphen in a word (the equal signs are places
where I can place the hyphen) even if I don't select any text. But this
option seems a bit inflexible because I can only insert hyphens at the equal
signs, and nowhere else. Am I missing something?

never punctual wrote:

Please correct me if I'm wrong, but I think I understand how manual
hyphenation works now!

From how you explain it, it looks like you understand, yes.

By the way I tried out Ctrl + Enter, and all it did was move my cursor down
to the next page.

I think the key combination should be SHIFT+ENTER. The other key
combination (CTRL+ENTER) is actually for "Insert page break".

Finally, I think I still don't understand exactly how Tools --> Language -->
Hyphenation works, but I think I got a little closer. It just says
"hyphenation complete" when I go to it without typing anything, but if I
type something and add a manual hyphenation somewhere, that function seems
to let me choose where to put a hyphen in a word (the equal signs are places
where I can place the hyphen) even if I don't select any text. But this
option seems a bit inflexible because I can only insert hyphens at the equal
signs, and nowhere else. Am I missing something?

Honestly, I haven't really used hyphenation before (especially the
"Tools -> Language -> Hyphenation" function), so I can't really help
you there. Nevertheless, I agree with planas in an earlier post...
"It appears to work
much like spell checking typically does". Looks like you run it after
you've mostly completed your document, then it suggests "manual"
hyphenations.

But I do suggest adding automatic hyphenation to your paragraph style
if you want it to automatically hyphenate your text. If you have
automatic hyphenation, then you don't need to add manual hyphenation
to words. It is described in the wiki page listed earlier
(http://help.libreoffice.org/Writer/Hyphenation) but I'll just quickly
mention it here:
1. Open up "Styles and formatting" by pressing F11 (if it is not already open).
2. Select the paragraph style that should get automatic hyphenation
(e.g. Default). This can be done by selecting the paragraph in the
text, or by selecting the style manually in "Styles and formatting"
3. On the selected style name (within "Styles and formatting") do the
following: Right-click -> Modify...
4. Select the "Text flow" tab.
5. Under the section "Hyphenation" (at the very top) tick the box
labelled "Automatically".
6. Click OK (you can modify the other hyphenation options if you
want, but I think the default values are fine).
The paragraphs style you modified should now automatically hyphenate.

The steps mentioned above are for my system, I'm not sure if they are
identical on other operating systems.

Regards
Stephan