You are not logged in.

#1 2007-08-31 15:44:36

sda00
Member
Registered: 2007-07-25
Posts: 17

Enable UTF-8 for Lyx (Tetex)

Please beg my pardon, but I confused a little bit after installation of "tex-unicode 200417102138-4" from AUR and following all recommendations when I try to export Lyx document containing non english characters to DVI or PDF the following errors occured:

 ÆÙ
       ×ÁÆÙ×ÁÙÆ×ÁÆÙ×ÁÙÆ×Á
If the character is an argument, put it in {}

 ÆÙ
       ×ÁÆÙ×ÁÙÆ×ÁÆÙ×ÁÙÆ×Á
Unicode character 65533 = U+FFFD:
REPLACEMENT CHARACTER
Character is not defined in uni-*.def files.
Enter I!<RET> to define the glyph.

 ÆÙ×Á
         ÆÙ×ÁÙÆ×ÁÆÙ×ÁÙÆ×Á
If the character is an argument, put it in {}

etc.
Documents itself are saved/opened as .lyx without any complains.
I'll highly appreciate any useful advice.

Thanks.

Offline

#2 2007-08-31 20:09:58

mucknert
Member
From: Berlin // Germany
Registered: 2006-06-27
Posts: 510

Re: Enable UTF-8 for Lyx (Tetex)

First, be sure that you have

\usepackage[utf8]{inputenc}

in your Header. Second, be sure that the file is actually encoded in UTF-8 and not in anything else. That's the problem most of the times: there is no guarantee that LyX actually saves the TeX-file in UTF-8. Check back with another Editor and convert if necessary.


Todays mistakes are tomorrows catastrophes.

Offline

#3 2007-08-31 21:16:39

sda00
Member
Registered: 2007-07-25
Posts: 17

Re: Enable UTF-8 for Lyx (Tetex)

\usepackage{ucs}
\usepackage[utf8x]{inputenc}

doesn't work.
yes, lyx saves as koi8-r for example, but when I convert files to utf8 I get garbage in output and export also doesn't work.

Offline

#4 2007-09-01 18:06:16

olegfink
Member
Registered: 2007-02-25
Posts: 11

Re: Enable UTF-8 for Lyx (Tetex)

Which version of LyX are you using?
From my knowledge LyX versions prior to 1.5.0 didn't support Unicode at all. (worked great with default settings for russian -- it was using koi8-r however).
You may try LyX 1.5 series, 1.5beta2 works well with Unicode for me (will now try compiling 1.5.1).

Offline

#5 2007-09-02 01:13:48

sda00
Member
Registered: 2007-07-25
Posts: 17

Re: Enable UTF-8 for Lyx (Tetex)

as I can guess the matter is in tetex, because SuSE provide Lyx 1.4 which works flawlessly (yes, it still saves all documents in koi8-r for example (despite on LANG=en_US.UTF-8), but exports in DVI/PDF pretty well). moreover I just installed new 1.5 Lyx on SuSE - it gave me a garbage in DVI despite on Document Settings...

Offline

#6 2007-09-04 16:41:42

sda00
Member
Registered: 2007-07-25
Posts: 17

Re: Enable UTF-8 for Lyx (Tetex)

looks like I've found a rough solution. we need to install "tex-unicode 200417102138-4" from AUR, then go to Lyx Document -> Settings -> Language and set default language for all documents, for example Russian, set Encoding as LaTeX default, then go to Lyx Document -> Settings -> LaTeX Preamble and put the following lines:

\usepackage{ucs}
\usepackage[koi8-r,utf8x]{inputenc}

and save all of this as Document Defaults. then Lyx Tools -> Preferences -> Outputs -> LaTeX -> TeX Encoding and put in the box the value according to TeX national language standards "T2A" (is ok for russian). reconfigure all of we got and work until we have a final results which should be exported into DVI/PDF etc... all we should do is just convert our working file into UTF:

enca -L russian -x utf8 working_file.lyx

that's it. when we open "working_file.lyx" in Lyx we see the garbage on screen until we make an export into DVI/PDF. results are fine.

Offline

#7 2008-11-16 15:39:51

malexan
Member
From: Pskov, Russia
Registered: 2008-10-01
Posts: 1
Website

Re: Enable UTF-8 for Lyx (Tetex)

Try to install texlive-langcyrillic package from Extra.

Offline

Board footer

Powered by FluxBB