How to open a LaTeX file (.tex) as a text document

Discuss the word processor
Post Reply
mullf
Posts: 6
Joined: Sun Jan 18, 2009 9:53 pm

How to open a LaTeX file (.tex) as a text document

Post by mullf »

I use OpenOffice to edit my LaTeX source files, .tex files. I used to have OpenOffice 2.0.3 and it always recognized the .tex files as text files and treated them appropriately. I just "upgraded" to OpenOffice 3.0.0, and now Writer recognized SOME .tex files as text files, but treats some as non-text files, and includes random strike-through and underlining that I assume comes from treating it as a non-text file. Also, when I open one of the .tex documents that it does recognize as text, it always gives me a "ASCII Filter Options" dialog first I have to click. How do I get the program to recognize all .tex documents as text documents and eliminate the dialog? Or should I just go back to OpenOffice 2.0.3?

Thank you!

Title Edited. A descriptive title for posts helps others who are searching for solutions and increases the chances of a reply. (Hagar, Moderator).
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: How to open a LaTeX file (.tex) as a text document

Post by Villeroy »

Search http://extensions.services.openoffice.org for LaTeX. Your old version had some additional extensions, filters or macros installed. May be you used some Linux version with this extra feature. http://go-oo.org has native LaTeX support, I believe. Most Linux distributions put the fork from go-oo.org into their packages.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
mullf
Posts: 6
Joined: Sun Jan 18, 2009 9:53 pm

Re: How to open a LaTeX file (.tex) as a text document

Post by mullf »

The real issue has nothing to do with LaTeX (despite the inaccurate retitling of my post), it is that the program is not recognizing a text file as text. It happens to have the extension .tex. If there was a way to tell it to treat .tex files the same way as .txt files it would be fine. But for some .tex files it does not treat them as text files and the other it gives that ASCII dialog. Is there no way to tell the program what extensions to treat as text files?
OOo 3.0.X on MS Windows Vista
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: How to open a LaTeX file (.tex) as a text document

Post by Villeroy »

When you see that ASCII import dialog, the program has no idea what the file is supposed to be and asks you about how to treat the thing. Does the file open as desired when you pick a plain text format from that list? What happens when you append .txt to the file name?
Why do you load source code into a word processor? Formatting, tables and footnotes in source code are pointless.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
mullf
Posts: 6
Joined: Sun Jan 18, 2009 9:53 pm

Re: How to open a LaTeX file (.tex) as a text document

Post by mullf »

It does .txt files fine and if I add .txt it will do it fine. I use OpenOffice for the spell check.
OOo 3.0.X on MS Windows Vista
mullf
Posts: 6
Joined: Sun Jan 18, 2009 9:53 pm

Re: How to open a LaTeX file (.tex) as a text document

Post by mullf »

> When you see that ASCII import dialog, the program has no idea what the file is supposed to be and asks you about how to treat the thing.

Why isn't there a box to check that says don't ask me again/always treat files with this extension this way?
OOo 3.0.X on MS Windows Vista
mullf
Posts: 6
Joined: Sun Jan 18, 2009 9:53 pm

Re: How to open a LaTeX file (.tex) as a text document

Post by mullf »

Well, I reinstalled the 2.0.3 Writer for .tex files and have all the 3.0.0 for other Office stuff. However, the idiot 2.0.3 installer would not install when a newer version is installed, so I had to uninstall 3.0.0, then install the 2.0.3 Writer, then reinstall 3.0.0. I would recommend getting rid of that screwy feature. Why shouldn't you be able to install in older version of something if you wish? Especially since the new version doesn't require you to uninstall the older version, so the overall program set is exactly the same, but with more work for the user.

It really is disappointing how many program "upgrades" break things that worked perfectly well in previous versions. :-/
User avatar
Hagar Delest
Moderator
Posts: 32650
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: How to open a LaTeX file (.tex) as a text document

Post by Hagar Delest »

mullf wrote:The real issue has nothing to do with LaTeX (despite the inaccurate retitling of my post), it is that the program is not recognizing a text file as text. It happens to have the extension .tex. If there was a way to tell it to treat .tex files the same way as .txt files it would be fine. But for some .tex files it does not treat them as text files and the other it gives that ASCII dialog.
That's not really what I understood from your first post and even the following ones since it works fine for .txt files. If you're not happy with the title, just change it yourself.
mullf wrote:Why isn't there a box to check that says don't ask me again/always treat files with this extension this way?
Then ask for it: [Tutorial] Reporting bugs or suggestions.
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: How to open a LaTeX file (.tex) as a text document

Post by Villeroy »

Villeroy wrote:When you see that ASCII import dialog, the program has no idea what the file is supposed to be and asks you about how to treat the thing.
Sorry, wrong assumption of mine. I refered to another filter options dialog. I should have tried som .tex file. OOo asks for the details of plain text (line feed, encoding).
Why isn't there a box to check that says don't ask me again/always treat files with this extension this way?
Because the program is so bloated already and developers are rare? Do you really want a configuration option for each and every feature?
I mean, the simple dialog makes sense since plain text is not just plain text, particularly not across different systems and cultures. NOT showing that dialog can be a far more difficult problem for other users.
How many times do you load a *.tex file per day? Is it really worth to be worried about 3 or 4 more clicks? If the shown options are the right ones, it's just a matter of a single deystoke on the Enter key.

Are you aware that OOo utilises an open source program named "hunspell" for spell checking? As far as I know, you can install that program and use the very same spell checking with the same dictionaries across different applications (firefox, thunderbird, OOo, your favorite LaTeX editor,...).
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
mullf
Posts: 6
Joined: Sun Jan 18, 2009 9:53 pm

Re: How to open a LaTeX file (.tex) as a text document

Post by mullf »

> Do you really want a configuration option for each and every feature?

No, I want it to not ask me at all, like 2.0.3 Writer. Adding an extra step is not an "upgrade".

Anyway, I'll stick to 2.0.3 Writer for .tex files.

Thank you!
OOo 3.0.X on MS Windows Vista
Post Reply