Page 1 of 2

[Solved] Unformatted notepad text

PostPosted: Sat Mar 21, 2020 5:29 pm
by markhowe
I was surprised there was no previous response to this.
Previously if I composed on notepad and saved it as text it remained unformatted. With recent versions of LO it automatically reverts to the formatting even tho' it says it is 'text'.
At first it may leave it in notepad unformatted, but eventually it irreversibly converts it to a formatted form.
What am I doing wrong. [My whole purpose for using notepad is to get rid of the formatting.]

Re: Unformatted notepad text

PostPosted: Sat Mar 21, 2020 6:15 pm
by thomasjk
When you save the document again in LO do you see this prompt?


Saveasprompt.png

Re: Unformatted notepad text

PostPosted: Sat Mar 21, 2020 8:36 pm
by markhowe
Yes; I choose Text format. It says it is saving in text format but it is not notepad and it puts in the unwanted formatting.
I tried erasing the .txt and saving, but made no difference.

Re: Unformatted notepad text

PostPosted: Sat Mar 21, 2020 8:51 pm
by RoryOF
Erasing .txt won't change a file type or the internal content structure of the file; to change a file type in Open- or Libre-Office, you must use /File /Save as, and select type Text (.txt) from the File type dropdown. It is good also to have "automatic file name extension" checked.

Re: Unformatted notepad text

PostPosted: Sat Mar 21, 2020 9:01 pm
by markhowe
Yes, that used to work but not anymore. My only workaround is to copy and repaste it into notepad and then access it only from notepad. The copy saved in LO .txt always has unwanted formatting.
Are all of you able to save an unformatted notepad file by clicking 'text' and have it save without any formatting??? I cannot.

Re: Unformatted notepad text

PostPosted: Sat Mar 21, 2020 9:37 pm
by RoryOF
I don't use LibreOffice, so I can't speak for that, but I have just checked that OpenOffice does in fact, using the method that I have described, Save a file as plain text.

I have no doubt that LibreOffice will do so just as well; I suspect there may be some problem with your method of working.

Re: Unformatted notepad text

PostPosted: Sat Mar 21, 2020 9:42 pm
by Villeroy
What makes you believe that a file saved with notepad contains any kind of "formatting"? Which formatting attributes do you see in LibreOffice? Post a screenshot of the whole LibreOffice window.

Re: Unformatted notepad text

PostPosted: Sat Mar 21, 2020 9:58 pm
by markhowe
I have tried saving in ANSI, Unicode and UTF-8 and they all save the same as: OpenOffice.org 1.1 text document -- which contains formatting or is formattable.
The only way I can get rid of the formatting is to copy and paste into wordpad and access only from wordpad.

[The default .odt looks the same but saves as: OpenDocument Text -- and is 7Xs the size.]

I would love an option to save in notepad. Perhaps it is not possible now, but it used to be.

Re: Unformatted notepad text

PostPosted: Sat Mar 21, 2020 9:59 pm
by MrProgrammer
markhowe wrote:The copy saved in LO .txt always has unwanted formatting.
No!  If you have saved the document using File → Save As → File type → Text (.txt), the resulting file is incapable of holding any formatting. It is just a collection of characters. The format cannot represent tables, multi-column text, bullets/numbering, indentation, paragraph spacing, etc. unless these are created manually. (Example of manual indentation and columns below; it took me 20 minutes to do this.) A .txt file cannot possibly represent multiple fonts, font effects, hyperlinks, pitcures, etc. Try it.
     He heard quiet steps behind him. That didn't bode           it was a dead-end, he would have to go back the         
     well. Who could be following him this late at way he had come. The steps got louder and louder,
     night and in this deadbeat part of town? And at he saw the black outline of a figure coming around
     this particular moment, just after he pulled off the corner. Is this the end of the line? he
     the big time and was making off with the thought pressing himself back against the wall
     greenbacks. Was there another crook who'd had the trying to make himself invisible in the dark, was
     same idea, and was now watching him and waiting all that planning and energy wasted? He was
     for a chance to grab the fruit of his labor? Or dripping with sweat now, cold and wet, he could
     did the steps behind him mean that one of many law smell the fear coming off his clothes. Suddenly
     officers in town was on to him and just waiting to next to him, with a barely noticeable squeak, a
     pounce and snap those cuffs on his wrists? He door swung quietly to and fro in the night's
     nervously looked all around. Suddenly he saw the breeze. Could this be the haven he'd prayed for?
     alley. Like lightning he darted off to the left Slowly he slid toward the door, pressing himself
     and disappeared between the two warehouses almost more and more into the wall, into the dark, away
     falling over the trash can lying in the middle of from his enemy. Would this door save his
     the sidewalk. He tried to nervously tap his way hide?
     along in the inky darkness and suddenly stiffened:

When you open a file without formatting in Writer, Writer will impose formatting, based on the Default paragraph style of your default Writer template. All documents use a template. All text in Writer has a style, even if it didn't originate with one when the file was opened. If you don't like the style which Writer has selected for your unformatted text, you can change it with Format → Styles and Formatting. Read about styles, defaults, and templates in Help → Index or in User Guides (PDF) or searching for topics about them in the Calc Forum.

If you don't like that Writer imposes formatting on all text, you are welcome to use a simpler application, since you don't need most of Writer's capabilities. Surely Windows (I use a Mac) provides facilities for working with unformatted text documents.

If this solved your problem please go to your first post use the Edit button and add [Solved] to the start of the title. You can select the green checkmark icon at the same time.

Re: Unformatted notepad text

PostPosted: Sat Mar 21, 2020 10:08 pm
by markhowe
Villeroy wrote:What makes you believe that a file saved with notepad contains any kind of "formatting"? Which formatting attributes do you see in LibreOffice? Post a screenshot of the whole LibreOffice window.


A file saved with notepad contains NO formatting, but is accessible only thru' notepad. A notepad file saved using LO .txt shouldn't have formatting but does. The way I am seeing it.

A notepad screen is like a blank sheet of paper; nothing on it. An LO screen has margins and formatting tools.

Re: Unformatted notepad text

PostPosted: Sat Mar 21, 2020 10:20 pm
by RoryOF
When you use LO to Save the file as .txt, does it give you a window saying that the file format cannot hold the formatting, as thomasjk posted in the second posting in this thread? If not, you have not correctly changed the Save format, which you must do using /File /Save as, as I outlined earlier.

Re: Unformatted notepad text

PostPosted: Sat Mar 21, 2020 10:47 pm
by markhowe
MrProgrammer wrote:
markhowe wrote:The copy saved in LO .txt always has unwanted formatting.
MrProgrammer wrote:No!  If you have saved the document using File → Save As → File type → Text (.txt), the resulting file is incapable of holding any formatting. It is just a collection of characters. The format cannot represent tables, multi-column text, bullets/numbering, indentation, paragraph spacing, etc. unless these are created manually. It cannot possibly represent multiple fonts, font effects, hyperlinks, pitcures, etc. Try it.


I am now wondering if notepad is only for windows and you all don't know what I am talking about. You cannot save "...the document using File → Save As → File type → Text (.txt)" because you can only use the wordpad option of 'save as' either text or 'all files'. Encoding is ANSI.

But I do know that it now saves as: OpenOffice.org 1.1 text document and has .txt and the result is formattable.

Background: I often need to strip formatting off of a data set for various reasons. Perhaps a column of email addresses to paste into an email. Or perhaps copying data from a bank statement and pasting it into a spreadsheet. I must first strip it and then paste it 'unformatted' into the spreadsheet so that all the data lines up. Or I dictate data into notepad, paste it into a spreadsheet, and perform the operation quicker and easier than dealing with the quirkiness of dictating into the spreadsheet directly. But it is a nuisance to need to strip it again every time I make a change from the file. It would be so easy if I could save it in the notepad form.

Re: Unformatted notepad text

PostPosted: Sat Mar 21, 2020 10:58 pm
by RoryOF
The Save As options and ability to select different file formats are in LibreOffice and OpenOffice.

Re: Unformatted notepad text

PostPosted: Sat Mar 21, 2020 11:15 pm
by markhowe
RoryOF wrote:The Save As options and ability to select different file formats are in LibreOffice and OpenOffice.

All very lovely, but it seems I want to do the opposite; zero, zilch, no format at all. I would think maybe ANSI would be an answer but that isn't one of them.
It would seem to me that you all are bothered by the fact that my "OpenOffice.org 1.1 text document" with suffix " .txt" which I have selected, contains formatting.
What do you get when you save a .txt document as text?

Re: Unformatted notepad text

PostPosted: Sat Mar 21, 2020 11:26 pm
by RoryOF
Attached are two files. Fred.odt contains formatting; I then used /File Save as fred.txt, selecting text (.txt) from the dropdown. The file Fred.txt contains no, repeat _NO_, formatting. Try these yourself

Re: Unformatted notepad text

PostPosted: Sun Mar 22, 2020 12:15 am
by markhowe
OK thanks, will do.
I would like to know if anyone out there uses notepad??? I tho't it was common. Very primitive!

Re: Unformatted notepad text

PostPosted: Sun Mar 22, 2020 12:33 am
by RusselB
Opening Fred.txt using Notepad on my Windows 10 system showed exactly what I expected.
A couple of long strings of characters that wrapped at the edge of the screen due to the Word Wrapping option in Notepad, which made it look like more lines.
Disabling the Word Wrapping showed the actual text to be two lines.

Notepad has been part of the Windows OS since version 2.0 (yes, I remember using that version.)

If you feel/think that you have a file that is saved using File -> Save As with the Text (*.txt) option and it contains formatting, then please upload that file so that we can examine it.

Re: Unformatted notepad text

PostPosted: Sun Mar 22, 2020 1:09 am
by Bill
markhowe wrote:But I do know that it now saves as: OpenOffice.org 1.1 text document and has .txt and the result is formattable.

Did you make LO the default program for opening .txt files? If so, change the default program back to Notepad and see what happens to the "file type". A "file type" is not the same thing as a "file format". The "file type" can change when the default program is changed. The change in "file type" does not change the "file format" in any way.

Any document, including plain text documents can be formatted when opened in LO. However, the formatting will not be saved when the text document is saved.

Re: Unformatted notepad text

PostPosted: Sun Mar 22, 2020 5:15 am
by markhowe
RusselB wrote:Opening Fred.txt using Notepad on my Windows 10 system showed exactly what I expected.
A couple of long strings of characters that wrapped at the edge of the screen due to the Word Wrapping option in Notepad, which made it look like more lines.
Disabling the Word Wrapping showed the actual text to be two lines.

Notepad has been part of the Windows OS since version 2.0 (yes, I remember using that version.)

If you feel/think that you have a file that is saved using File -> Save As with the Text (*.txt) option and it contains formatting, then please upload that file so that we can examine it.


File; save as; txt is the ONLY way to save notepad. This is what was filed.
I too have noted that 'word wrap' has unintended consequences so I generally try to avoid that, especially when printing.!!
Again, I was able to save using OO/LO priorly, but not recently.
I hope it shows up as:: OpenOffice.org 1.1 text document :: which is what I see.

Re: Unformatted notepad text

PostPosted: Sun Mar 22, 2020 5:27 am
by markhowe
Bill wrote:
markhowe wrote:But I do know that it now saves as: OpenOffice.org 1.1 text document and has .txt and the result is formattable.

Did you make LO the default program for opening .txt files? If so, change the default program back to Notepad and see what happens to the "file type". A "file type" is not the same thing as a "file format". The "file type" can change when the default program is changed. The change in "file type" does not change the "file format" in any way.

Any document, including plain text documents can be formatted when opened in LO. However, the formatting will not be saved when the text document is saved.

Thank you Bill, but I don't think there is such a thing as a 'notepad' program, format or anything. Does the concept of 'devoid of " make sense to anyone??

Re: Unformatted notepad text

PostPosted: Sun Mar 22, 2020 6:35 am
by Bill
markhowe wrote:I don't think there is such a thing as a 'notepad' program, format or anything.

Then please explain what you meant when you said "I composed on notepad". Notepad is s program that has been included in Windows since 1985. Are you not using Windows?

markhowe wrote:Does the concept of 'devoid of " make sense to anyone??

Devoid of what? The Notepad program?

Re: Unformatted notepad text

PostPosted: Sun Mar 22, 2020 6:44 am
by RoryOF
markhowe wrote:I hope it shows up as:: OpenOffice.org 1.1 text document :: which is what I see.


The uploaded file is a plain text file with no formatting.

Re: Unformatted notepad text

PostPosted: Sun Mar 22, 2020 7:25 am
by Bill
markhowe wrote:File; save as; txt is the ONLY way to save notepad.

Are you using "notepad" to mean a plain text file with no formatting? Notepad is the name of a program which saves plain text files with no formatting. "Notepad" is not the file format.

markhowe wrote:I hope it shows up as:: OpenOffice.org 1.1 text document :: which is what I see.

"OpenOffice.org 1.1 text document" should only be seen by Windows users who have made AOO or LO the default program for opening .txt files. On my Manjaro system, the file type is "plain text document" no matter what program I set as the default program. The test document you uploaded is a "plain text document" and contains no formatting.

Re: Unformatted notepad text

PostPosted: Sun Mar 22, 2020 11:08 am
by RoryOF
It came to me overnight that there might be a difference of understanding here as to what "Formatting" means.

When one writes, that is a stream of text, and to save that, purely as that stream of text, with no added emphasis, one uses a plain text format. The only information that file can contain, besides ordinary punctuation, is Enter characters, which one might see as extreme punctuation, inserted to mark a pause for breath or a change of subject. When one edits a file in such an editor, one can make no emphasis (Formatting) and it does not allow saving in any format that preserves such formatting, as it knows nothing about that.

If one wants to add emphasis to the stream of text, such as bold, italics etc, that is what we term formatting, and to save the extra information one must use an editor that permits such formatting, such as OO or LO; also, to preserve the formatting one must Save in the more complex format, in this case .odt.

However, the plain text file can be displayed in different ways by different applications, depending on how they are set up. Notepad, mousepad or other plain text editors will display using whatever default font they are setup to use; often this is something like Times New Roman or Arial and in the width of window they have been setup to use, perhaps wrapping the text to fit to that window. They make no change to the original text file. This is similar to someone reading your text: you will do it in your local accent, Lupp with a German intonation, Zizi64r with Hungarian overtones, I with Irish overtones. We are all working from the same text, and we haven't altered it.

A formatted text is displayed by OO or LO using the default settings of those programs. Each person will have different choices made for their version of the program, and the program will display the formatted text using those options. First it will show the body of the text in the preferred font of the user; this might be simple or complex, depending on that user. It could be, as before Times new Roman or Arial; on my computers more likely to be Georgia. Then it will look at the formatting information contained in the file, and mark each area accordingly, in bold, italic or as the case may be.

There is also other formatting information such as paragraph marks, paragraph justification, footnotes. It will interpret these as the User has set it to do. In many cases, Users will require a white space (think blank line) below each paragraph. If so, it will insert that. My preference is for a slight indent on the first line of a paragraph, so the file will display differently on my computer and on that other computer. But it is the same file!

Now take your plain text file and give it to OO or LO. There is no formatting information in that file - there can be none. The only information is that there are Enter characters, breaking the file into paragraphs - hopefully logical chunks. OO or LO will display that file as best they can, in their default window. They will use their default font (equivalent to their local accent). They have no instructions (formatting in the file) to tell them anything about your text, so they will display it wrapped to their page size, assuming that you want the entire text visible (that was why you wrote it, wasn't it?) and they will mark paragraphs by breaking off the display of a paragraph and starting a new one. Each paragraph will be marked by either the white line below, or by an indent - as the User has told them to do by default.

If you now edit the file in such an editor, it applies certain standard formattings - when you press Enter, it will change a paragraph to Text Body style; if you enter a line on its own and press Ctrl 1, it will mark that as Heading 1, and change the type accordingly. When you go to Save your file, it will normally default to a format that will preserve such formatting (usually .odt). Should you wish your file Saved in a format that is only plain text, you must use /File /Save As, and select Text (.txt) from the File type dropdown; it will then strip out all the formatting it and you have put in during your editing. Note that simply changing the file extension, as by substituting .txt for .odt, does not change the internal format of the file, any more than dressing a donkey in striped pyjamas will turn him into a zebra.

There are reasons why one might occasionally wish to Save a file as merely a plain text stream, but if you always want a plain text file, then OO or LO are the wrong editors to use - it would be better to standardise on a plain text editor such as Notepad, mousepad or similar.

Re: Unformatted notepad text

PostPosted: Sun Mar 22, 2020 1:55 pm
by keme
RoryOF wrote:
markhowe wrote:I hope it shows up as:: OpenOffice.org 1.1 text document :: which is what I see.


The uploaded file is a plain text file with no formatting.

I can confirm RoryOF's finding.

So what's up here?
You have configured your system to use openoffice.org to open txt files.
This may happen in a number of ways, e.g. when you install OpenOffice with advanced options enabled and select to connect all available formats to this suite.

To fix
Use File - Open from within the Notepad app. You will be fine...
... or ...
Set Notepad as the default app for opening .txt files:
  • Right click one of the offending files, and select Open with ... - Pick a different app.
  • Select Notepad from the list
  • tick the box to always open with this app.

And if that doesn't get you anywhere, consider ...

markhowe wrote:
Bill wrote:
markhowe wrote:But I do know that it now saves as: OpenOffice.org 1.1 text document and has .txt and the result is formattable.

....

Thank you Bill, but I don't think there is such a thing as a 'notepad' program, format or anything. Does the concept of 'devoid of " make sense to anyone??

Please:
Don't tell us what you think or what you know. Tell us what you do and what you see.
What do you do when you save from Writer?
  • Select a storage format from a dropdown?
  • Type a filename extension?
  • Tick the option for automatic file type?
  • Something else?
Where do you get the OpenOffice.org 1.1 text document tag? File manager, notepad, or somewhere else?
Did you try to open your "offending" file from within notepad (menu option File - Open)?
markhowe wrote:... I would like to know if anyone out there uses notepad??? I tho't it was common. Very primitive!

This type of tool is quite common among developers and everyone doing work on web pages. Everyone in those groups will know about notepad, though most will use better tools for their own work (anywhere from the basic notepad++ to advanced IDE tools with integrated debugger/compile/test functions - Eclipse and Netbeans perhaps the best known free/opensource titles), all of them saving plaintext files. The only kind of formatting in use is layout measures by way of newlines, tabs and spaces.

Re: Unformatted notepad text

PostPosted: Sun Mar 22, 2020 2:55 pm
by Villeroy
Open the Windows Explorer that displays all drives, folders, files.
Menu Tools>"Folder Options", tab "View" has an option "Hide extensions of known file types" which is turned on by default. Turn it off in order to see the full names of your files.
Hiding the most important parts of the file names is a major source of confusion and a security problem since WIndows 95.
Not knowing about the file name extensions you may save files with the wrong extension or with no extension at all which may lead to all kinds of confusion and bad behaviour.

Re: Unformatted notepad text

PostPosted: Sun Mar 22, 2020 5:38 pm
by markhowe
Villeroy wrote:Open the Windows Explorer that displays all drives, folders, files.
Menu Tools>"Folder Options", tab "View" has an option "Hide extensions of known file types" which is turned on by default. Turn it off in order to see the full names of your files.
.

Under the 'view' tab I see 'hide selected items' with 3 boxes labeled 'Item check boxes', 'File name extensions', 'hidden items'. None of the boxes are checked so I assume none are hidden. I always see .txt or .pdf or .odt etc. Is that what you mean?

Re: Unformatted notepad text

PostPosted: Sun Mar 22, 2020 5:56 pm
by Villeroy
If you always see .txt etc everything is fine with that. By default Windows hides away extensions confusingly. In order to open all .txt files with Notepad or some better text editor, right-click any such file, choose "Open With...", select the preferred program and check "always use this program" (or similar). Writer should not be the preferred application for plain text files unless you want to add some juice to the text and save it as a full featured office document.

Re: Unformatted notepad text

PostPosted: Sun Mar 22, 2020 6:20 pm
by markhowe
keme wrote:
RoryOF wrote:
markhowe wrote:I hope it shows up as:: OpenOffice.org 1.1 text document :: which is what I see.



Please:
Don't tell us what you think or what you know. Tell us what you do and what you see.
What do you do when you save from Writer?
  • Select a storage format from a dropdown? Y
  • Type a filename extension? N
  • Tick the option for automatic file type? Y[ sometimes]
  • Something else?
Where do you get the OpenOffice.org 1.1 text document tag? File manager, notepad, or somewhere else?
Did you try to open your "offending" file from within notepad (menu option File - Open)?


I find a lot of value in this post. Thank you
When I want a stripped file I compose in notepad and save in notepad but store the file in a folder where it gets the aforementioned 'type'. The folder is in an external drive [or not] with many different file types.
If I open it from notepad it is fine but if I open it from the folder it is not fine. The aforementioned "OpenOffice.org 1.1 Text Document" type opens with formatting.
Now I wonder if I am seeing something different than you all. I am now going to take my test text .txt document, format it a bunch, and upload it to you all. You will see it is .txt but will know that I formatted a bunch. Do you see formatting? or not? It was loaded with color, italics, bold, etc when I uploaded it. You are telling me it cannot have that if it is .txt.

Re: Unformatted notepad text

PostPosted: Sun Mar 22, 2020 6:23 pm
by RoryOF
Absolutely no formatting at all, whether opened with mousepad or OpenOffice. This is a plain text file. If you download it, and open in OpenOffice (use /File /Open in OpenOffice) you will see no formatting.