[Solved-ish] .DOC file blank lines bolded, underlined

Discuss the word processor
themadpsychologist
Posts: 5
Joined: Mon Apr 13, 2020 11:50 pm

Re: .DOC file blank lines bolded, underlined

Post by themadpsychologist »

Bill wrote:When you press Enter to start a new paragraph, the format settings are inherited from the previous paragraph. Although underlining and bold are not visible on the previous paragraph, if you click at the end of the previous paragraph and select Format > Character > Font Effects , you will see that "Underlining" is set to "Single" and on Format > Character > Font, "Style" is set to "Bold". If you don't want the blank lines to inherit the direct character formatting settings from the previous paragraph, press CTRL+M to remove the direct formatting.
I type these without bolding or underlining except in very specific places. When I save the document (and had been saving it as .doc, which I now know not to do) and reopen it, bolding and underlining appear. The underlining appearing at the end of the paragraph is exactly the problem I want to solve. I don't know where it's coming from; I didn't put it there.
Zizi64 wrote:You are using the AOO Writer, as if it were a typewriter.
I'll keep that in mind (and have bookmarked your link), but right now, a typewriter into which I can insert images is pretty much all I need.
JeJe wrote:If you mean by blank line a blank paragraph you go through the document with find/replace.

This thread viewtopic.php?f=7&t=37896 says ^$ and regular expressions ticked will find the blank paragraphs. With the cursor in the search for box click on the format button and select bold to look for that. With the cursor in the Replace with box click on normal to replace with that. See attached picture
Noted, thank you. I didn't realize how to search for a blank paragraph.

I still think it shouldn't be doing this in the first place, though.
John_Ha wrote:
themadpsychologist wrote:I'd love to do that, but my prof accepts only submissions in DOC format. :(
It is well past time for you to educate your prof and tell him or her to stop forcing you to use a proprietary "pseudo-standard" which has never been fully documented - see the tutorial for an in depth discussion.

Ask him or her why should every student be forced by him or her to buy MS Office when you can get identical results if he downloads the absolutely free LibreOffice. Has he or she got shares in Microsoft?

He or she is probably not being arrogant or obnoxious - it's just that he or she is ignorant and needs educating.
That would be a good thing for someone to do, but right now I don't think I need him to feel more irritated with me.
Incidentally I converted to LibreOffice this year - you need to do so as well.
I'm open to the possibility. Why so?
I looked at your document. If you place the cursor after the full stop you will see from the menu above that the format there is bold + underline. If you press enter the new line created is set to bold + underline. Set View > Non-printing characters ..., to understand. Although the text in the previous line is not bold+underline, the end of paragraph mark is bold+ underline and this is what carries over to any new line.

Note how the empty paragraph marks are bold and underlined.
I got that. But I didn't put the formatting at the ends of the paragraphs, and I don't know how it got there. It wasn't there when I created the new lines; I pay attention to things like that.
Your document has been edited for over 500 hours so it looks like you are re-using your .doc file for each new document and you are carrying across the problem to the new document.
I don't reuse the files; I just tend to take a long time on the assignments and leave them open while I'm at work or otherwise AFK. I create each new document and save it as .doc separately.
jrkrideau wrote:As Tibour (zizi) says, "You are using the AOO Writer, as if it were a typewriter." You may not have a true "nightmare" but it is scary. It looks like Bill has given you the diagnosis, <i>When you press Enter to start a new paragraph, the format settings are inherited from the previous paragraph.</i>
See previous replies. I want this done with as little effort as possible; I sometimes change layouts from assignment to assignment; and I never apply more than one type of formatting to the same text anyway (for these assignments). All I really want is a typewriter that takes images.
To cure this basically you need to remove all the extraneous manual formatting, and then get rid of those stupid blank lines

Every command below should be done only on a copy of your original file.


Do a Select-All (CNTL-A) and then a CNTL_M to remove all the formatting. Note that AOO Writer text always has a Style. It's just that in this case the only applied paragraph Style in the entire file is Default.

If you turn on View formatting characters or something similar I'm using LibreOffice so I'm not quite sure of the term or click on the pilcrow (¶) you will see the paragraph markers. To tidy up this slightly messy file you really should remove all the blank paragraphs and use styles to set the spacing that you want. See Remove blank lines.

Apache OpenOffice is designed to work with styles is your mean method of formatting. it is possible to do everything manually but despite John_Ha's point of view, my own experience and that of many other users is that Styles work work better than manual formatting. Certainly if you have to translate back into a .doc format, my experience is that the translation is much better using Styles and if you were writing fairly long or technical documents used to Styles makes it much easier to maintain a standard formatting over many pages.

Once you have cleaned up the file, it looks like you probably need about 4 Styles though I may be misinterpreting your edited example. In any case, that is what I have used in my example.

My simple example uses 4 Styles:
Heading1
Heading2
Heading3
Text Body


Talking to my example file, my suggestion would be to apply the Text Body Style to all the text. Then just stepped through the document and apply the 3 Headings Styles that I have set up. Note that I have set set up the styles selecting only the applied style to be displayed in the Styles box. See the bottom of the Styles box.

You really need to have at least a basic understanding of what Styles do. See /Intrduction to Styles.

Look, I appreciate the amount of effort you have put into this, but I'm not wanting to go over the whole document and restyle every single variable. The blank lines are solely to indicate boundaries between the exercises, and adding extra spacing to the paragraphs won't help that. If my prof doesn't care about doing this right, why should I? I was just wondering whether there was a way to prevent formatting from being added without my consent.

Is there any particular reason why you are using MathType? It might be better, though not necessarily easier, to use the built-in AOO Math module. It might help ensure a better translation into a .doc format.

Again, required by my professor. Otherwise, I'd use OpenOffice Math or something.

And I strongly second John_Ha's point though tactfull suggestions are probably a good start. :)
It is well past time for you to educate your prof and tell him or her to stop forcing you to use a proprietary "pseudo-standard" which has never been fully documented

Possibly true, but there are many things I should do and don't. I just want to be done with this course.

John_Ha wrote:Another thought. It is much nicer to set the Gap after paragraph to be, say, 2mm with Format > Paragraph > Indents&Spacing. Each paragraph then has a 2mm gap after it which is far nicer than the much larger complete line spacing.

I can see how that could be more efficient. Thank you.

RoryOF wrote:My preference is not to add white space after a paragraph, but instead to use a 12 pt (or whatever type size in use) indent on the first line of each paragraph.

Indentation would be a good idea were I writing paragraphs of text. Formatting this nicely looks much easier in the version I uploaded than in the version I'm actually working with. It's a madhouse of MathType pastings and individual problem part headings.

John_Ha wrote:
themadpsychologist wrote:What on Earth is going on?

I worked out what you have done.

1. Type Fred, press enter
2. Type Fred, press enter
3. Type Fred, press enter

All typing in regular.

4. Bold the second line
5. Select Fred in the second line and delete it.

All the text disappears but the bold format remains.

6. Press enter at the location of the new blank line and type Bill.

Bill is bold because the blank line is set to bold even though there are no characters in it and the next line inherits the bold formatting.

Good hypothesis, but I didn't do that. I'm compunctually meticulous with my formatting.

jrkrideau wrote:Something I forgot until John_Ha mentioned "house style". Are you following a specific scientific Style Manual such as Vancouver or APA or even,uggh, Chicago on a regular basis?

If so, it might be worth setting up an AOO Writer template with all Styles and other formatting needed. This can save an immense amount of time.


If you are dealing with extensive reference lists or bibliographies, something like Zotero can save literally hours of work is many cases. If your prof is antiquated enough to be demanding .doc files they almost certainly do not know about bibliographic management software.

I'm afraid not. Most of the formatting I do is italicizing the letters of functions and variables. The rest is bolding or (not and) underlining section, problem, and problem section headings.

Bill wrote:After further testing, it appears that if any direct formatting is applied at the beginning of a paragraph in a doc file, the direct formatting will also be applied at the end of the previous paragraph when the doc file is imported by AOO Writer. This unwanted application of the direct formatting to the previous paragraph does not happen with odt files, so this may be a bug in the AOO doc import filter.

Ooh, good to know. That explains a few of my observations. Thank you.

John_Ha wrote:And a message to the original poster. Don't save as .doc files! While this seems to be a bug, AOO tries to warn you but you have presumably switched off the warning.

I got that now. I knew I had to save the document as .doc eventually, but did not know at the time that I should edit as .odf first.
I have OpenOffice 4.1.7 on Windows 10 Professional. I'm going to dual-boot Mint one of these days.
User avatar
Zizi64
Volunteer
Posts: 11360
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: .DOC file blank lines bolded, underlined

Post by Zizi64 »

I got that now. I knew I had to save the document as .doc eventually, but did not know at the time that I should edit as .odf first.
You need use the .odt file extension for the textual documents.

.odt = Open Document Text
.odf = Open Document Formula
.ods = Open Document Spreadsheet
and more standardized types of the group:

ODF = Open Document Format (it is an ISO Standard!)
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
themadpsychologist
Posts: 5
Joined: Mon Apr 13, 2020 11:50 pm

Re: .DOC file blank lines bolded, underlined

Post by themadpsychologist »

You're right; my bad.
I have OpenOffice 4.1.7 on Windows 10 Professional. I'm going to dual-boot Mint one of these days.
Bill
Volunteer
Posts: 8934
Joined: Sat Nov 24, 2007 6:48 am

Re: .DOC file blank lines bolded, underlined

Post by Bill »

John_Ha wrote:
Bill wrote:After further testing, it appears that if any direct formatting is applied at the beginning of a paragraph in a doc file, the direct formatting will also be applied at the end of the previous paragraph when the doc file is imported by AOO Writer. This unwanted application of the direct formatting to the previous paragraph does not happen with odt files, so this may be a bug in the AOO doc import filter.
Bill

I created a .doc with LO and AOO opened it OK. But when I saved the .doc file with AOO and opened it with AOO, the direct formatting had been added to the previous paragraph. It appears therefore that the AOO export filter is at fault.
You're right. It is the export filter in AOO.
Last edited by Bill on Wed Apr 15, 2020 4:26 am, edited 1 time in total.
AOO 4.1.14 on Ubuntu MATE 22.04
Bill
Volunteer
Posts: 8934
Joined: Sat Nov 24, 2007 6:48 am

Re: .DOC file blank lines bolded, underlined

Post by Bill »

themadpsychologist wrote:
Bill wrote:When you press Enter to start a new paragraph, the format settings are inherited from the previous paragraph. Although underlining and bold are not visible on the previous paragraph, if you click at the end of the previous paragraph and select Format > Character > Font Effects , you will see that "Underlining" is set to "Single" and on Format > Character > Font, "Style" is set to "Bold". If you don't want the blank lines to inherit the direct character formatting settings from the previous paragraph, press CTRL+M to remove the direct formatting.
I type these without bolding or underlining except in very specific places. When I save the document (and had been saving it as .doc, which I now know not to do) and reopen it, bolding and underlining appear. The underlining appearing at the end of the paragraph is exactly the problem I want to solve. I don't know where it's coming from; I didn't put it there.
I haven't been able to duplicate the problem as you describe it. For me, if there's no direct formatting on a blank line and no direct formatting at the end of the previous paragraph when the document is saved, then the direct formatting doesn't appear on the blank lines or at the end of the previous paragraph when the document is reopened. The direct formatting only appears at the end of the previous paragraph when the direct formatting is applied to the blank line first and only after the document is saved and reopened. Did you try the quick fix I posted? It works for me.
AOO 4.1.14 on Ubuntu MATE 22.04
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: [Solved-ish] .DOC file blank lines bolded, underlined

Post by John_Ha »

In this long thread there are several important points.

1 There is a bug in AOO when saving .doc files where formatting in wrongly added the the End of Paragraph mark on a previous line.

2 The poster has made this much worse because he is re-using the old .doc file for the new .doc file so is carrying over on the problem. He should create a template and use the template for each new file - this prevents the carry-over.

3 The poster should be working and saving as a .odt file and consider the .odt file the master. He should create a copy as a .doc file for his irrational professor.

4 View > Non printing characters ..., shows what is happening and should always be used to diagnose / understand why a file is doing something.
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
themadpsychologist
Posts: 5
Joined: Mon Apr 13, 2020 11:50 pm

Re: .DOC file blank lines bolded, underlined

Post by themadpsychologist »

Bill wrote:
themadpsychologist wrote:
Bill wrote:When you press Enter to start a new paragraph, the format settings are inherited from the previous paragraph. Although underlining and bold are not visible on the previous paragraph, if you click at the end of the previous paragraph and select Format > Character > Font Effects , you will see that "Underlining" is set to "Single" and on Format > Character > Font, "Style" is set to "Bold". If you don't want the blank lines to inherit the direct character formatting settings from the previous paragraph, press CTRL+M to remove the direct formatting.
I type these without bolding or underlining except in very specific places. When I save the document (and had been saving it as .doc, which I now know not to do) and reopen it, bolding and underlining appear. The underlining appearing at the end of the paragraph is exactly the problem I want to solve. I don't know where it's coming from; I didn't put it there.
I haven't been able to duplicate the problem as you describe it. For me, if there's no direct formatting on a blank line and no direct formatting at the end of the previous paragraph when the document is saved, then the direct formatting doesn't appear on the blank lines or at the end of the previous paragraph when the document is reopened. The direct formatting only appears at the end of the previous paragraph when the direct formatting is applied to the blank line first and only after the document is saved and reopened. Did you try the quick fix I posted? It works for me.
I'll try it when I get a chance. I'll see whether that works when simply turning off underlining and bolding doesn't.
John_Ha wrote:In this long thread there are several important points.

1 There is a bug in AOO when saving .doc files where formatting in wrongly added the the End of Paragraph mark on a previous line.
OpenOffice and .doc files just don't play well. I know that from experience.
2 The poster has made this much worse because he is re-using the old .doc file for the new .doc file so is carrying over on the problem. He should create a template and use the template for each new file - this prevents the carry-over.
I'm not. I create a new document every time.
3 The poster should be working and saving as a .odt file and consider the .odt file the master. He should create a copy as a .doc file for his irrational professor.
Got that, thanks.
4 View > Non printing characters ..., shows what is happening and should always be used to diagnose / understand why a file is doing something.
I already knew and regularly do that, but thanks.

The first word processor I used was Microsoft Works Word Processor, which had non-printing characters shown and the font size set to 10 by default. I've been using OpenOffice for years, and LibreOffice before that. I might not have the technical knowledge that many here do, but I'm also not quite a newbie. In hindsight, I probably should have stated that right at the beginning of the thread.
I have OpenOffice 4.1.7 on Windows 10 Professional. I'm going to dual-boot Mint one of these days.
Post Reply