Hi everybody,
I want to import a txt-file into LyX. I'm using the report (KOMA-script) class. Now I have sentences like "Zu messen sind Formänderungen an Körperteilen, z.B. Füßen" in a normal .txt-file. As you can see, it contains four special characters. By copy&paste the special characters display but the line breaks don't. So I tried to do it via File->Import->Simple text (I translated it from german so I hope it's the same in the english version).
Now line breaks display but all special characters like german umlauts and also the ° show up as question marks in rhombuses.
Also writing {\"A} in the txt-file instead of Ä does not help.
How can I import text with special characters and line breaks?
Thank you very much!
LyX ⇒ Importing txt-Files with special characters
NEW: TikZ book now 40% off at Amazon.com for a short time.

-
- Posts: 6
- Joined: Fri Feb 10, 2012 3:12 pm
Re: Importing txt-Files with special characters
I've been trying to include .txt files in lyx by keeping accents and special characters, without success. But in the other hand, copy and paste seems to work. I don't know if that's your case, but you can always do a .lyx , copy and paste the german text into it and then use it as a child document (insert - file - child document).
I don't know if that may be a solution for your problems, but that's still not the solution for your question.
So, let's see if the people of the forum can give us some more advices. I am still trying to find a solution.
I don't know if that may be a solution for your problems, but that's still not the solution for your question.
So, let's see if the people of the forum can give us some more advices. I am still trying to find a solution.
Re: Importing txt-Files with special characters
hm_cavalcanti, thanks for your answer. I hope I understood you correctly, but line breaks are not copied with the text in your solution, right?
Anyway, I solved the problem by myself otherwise. I replaced all accents/special characters/etc with distinct strings like ä->aE, °->[dg] and replaced them again after importing.
The only disadvantage is that you have to know before which characters won't work.
Anyway, I solved the problem by myself otherwise. I replaced all accents/special characters/etc with distinct strings like ä->aE, °->[dg] and replaced them again after importing.
The only disadvantage is that you have to know before which characters won't work.
-
- Site Moderator
- Posts: 542
- Joined: Sat Sep 01, 2012 6:38 am
Importing txt-Files with special characters
Hi ion87 and hm_cavalcanti,ion87 wrote:hm_cavalcanti, thanks for your answer. I hope I understood you correctly, but line breaks are not copied with the text in your solution, right?
Anyway, I solved the problem by myself otherwise. I replaced all accents/special characters/etc with distinct strings like ä->aE, °->[dg] and replaced them again after importing.
The only disadvantage is that you have to know before which characters won't work.
Can you please report this bug on the LyX bug tracker? This way it will get fixed for future versions. It is easy to register and post. Go here: http://www.lyx.org/trac
Under component, please choose "tex2lyx".
I believe the main developer of the tex2lyx component is German(-speaking at least) so he should know what's going on and what to do about it.
Also, which versions of LyX are you using?
Thanks,
Scott
Importing txt-Files with special characters
Hi,
I reported the bug and the answer was the following:
scottkosty, if you have contact maybe you can tell them that if the prompt is in german it is not obvious to have to post in english.
Don't know if it's possibile to answer that bug report answer mail.
I reported the bug and the answer was the following:
A bit weird, because the whole page appeared in german but ok^^This is an English bugtracker, please post in English.
Your problem is that the plain text file apparently uses an encoding which
is not detected by LyX. I think the file needs to be encoded in utf8.
scottkosty, if you have contact maybe you can tell them that if the prompt is in german it is not obvious to have to post in english.
