All the formatting is getting lost . I need to reformat my doc file

While copying and pasting content , I am loosing all the formatting which I did earlier .


image description

Click here to download the original file
original file

The complete doc file . Page number 8,9 lost their formatting
Untitled 2.odt

Someone please help me so that I need not reformat all my previous content while adding new content to my doc file

  • What content did you copy (text, frame), from where (app name)?
  • What kind of formatting is lost? (Font face, size, bolding, indentation,…)

Please observe the boxes . I am a software engineer preparing the documentation for the new technologies I learn . The code goes inside the boxes and the boxes are not staying at their own place . I never had this issue with microsoft office . If Libre office wants then I can buy your software so that I dont face such issues in futture . After all I started loving open source software’s .

From these screenshots we can’t see how you make the boxes or how they are anchored to position. We can see that the formatting is bad, but that doesn’t help. Please upload a sample document in odt format. Edit your question, then attach a file. Do not post an answer. Answers are reserved for solutions.

Floris I edited the question and also I provided the original file

Opened it, looks fine, except that some people recommend to use frames instead of text boxes. When I copy & paste text, the formatting doesn’t get messed up. So, where are you copying from?

Floris Here is the link . I am learning Javascript

Okay, so you make shapes that you put over the text. That’s a bad idea. Insert frames instead.

So, Insert > Frame > Frame. In the dialog box, turn on Autosize for Width. If you want the boxes left aligned, set Position - Horizontal to From left and By to -0.15 cm (the same as the padding on the Borders tab), negative, to align the text with the left margin. You may of course indent the text in the boxes if you don’t mind that. You can even center the frames horizontally. Paste the copied text inside the frames.

Sure I will try your suggestion and hope that the boxes remain in their places . Let me try once

Floris . The previous version of Libreoffice did not had this type of problem

What version? And keep in mind that the vast majority of the people who visit here, aren’t developers. They’re just other users. Meaning to say, they can’t influence the quality of the software.

I just installed the Libre office 5 and problem seems to be solved .

I understand from your sample files you want to enclose some code snippet inside a box.

Adding a rectangle shape over a group of paragraphs is a very bad idea because the paragraph may move with text flow while drawing shapes like rectangles will stay where you put them. There is no way to link shapes to text.

You apparently styled your code snippet wit Preformatted Text. All you need to do in addition is to slightly customise this paragraph style to add a border to it. Go to its Border tab and configure the border to your liking.

However your files are plagued with direct formatting (manual formatting added to the paragraph outside the style mechanism) which will cause you trouble tuning the look of your text because manual formatting takes precedence over styling.

For your defence, M$ Word has a very poor notion of styles (knowing only of paragraph style) and all the rest must be applied manually.

I also noted you are not consistent in your styling: some snippets are Text Body with font face manually changed to monospace. These paragraphs don’t get the border when I configure Preformatted Text. Similarly, paragraph which should be Text Body are Preformatted Text and they are included in the boxed area.

Many paragraphs are Default Paragraph Style. While this is considered legitimate in M$ Word, this is a fault in Writer where common text should be Text Body. Default Paragraph Style is a “technical” style used to set various parameters shared by all other styles and should never be used over any real text in the document.

Don’t vertically space with empty paragraphs. Vertical spacing is an attribute of paragraph styles and should be defined there.

You won’t be able to format “comfortably” your document if you don’t follow a strict styling method. I recommend you read the Writer Guide for an introduction to styles.

To show the community your question has been answered, click the ✓ next to the correct answer, and “upvote” by clicking on the ^ arrow of any helpful answers. These are the mechanisms for communicating the quality of the Q&A on this site. Thanks!

In case you need clarification, edit your question (not an answer which is reserved for solutions) or comment the relevant answer.