Hello.

I'm maintaining LyX package for KSI Linux (russian/ukrainian Linux
distribution) and have to patch source to support our languages.
Maybe some parts of my patches will be acceptable for inclusion in
official source tree?...

lyx-1.0.4pre4-ru.patch description:

 * added support for cyrillic inputenc encodings
  (koi8-r, koi8-u, cp1251, cp866).
 * enabled support of cyrillic letters in math mode
  (we need that).

If cyrillic encodings will be accepted, we can also include
in distribution russian ru_splash.lyx (lyx-1.0.4pre4-rusplash.patch).
Note it uses `koi8-r' encoding.

-- 
With Best Wishes,
Const


diff -urN lyx-1.0.4pre4.orig/src/formula.C lyx-1.0.4pre4/src/formula.C
--- lyx-1.0.4pre4.orig/src/formula.C	Thu Jul 29 00:22:57 1999
+++ lyx-1.0.4pre4/src/formula.C	Mon Aug 16 14:51:58 1999
@@ -1079,7 +1079,7 @@
        
     default:
       if ((action==-1  || action==LFUN_SELFINSERT) && arg)  {
-	 char c = arg[0];
+	 unsigned char c = arg[0];
 	 LockedInsetStoreUndo(Undo::INSERT);
 	 
 	 if (c==' ' && mathcursor->getAccent()==LM_hat) {
@@ -1091,7 +1091,7 @@
 	     break;
 	 } 
 	 if (isalpha(c)) {
-	     if (isascii(c) && mathcursor->getLastCode()==LM_TC_TEX) { 
+	     if (mathcursor->getLastCode()==LM_TC_TEX) { 
 	       mathcursor->MacroModeOpen();
 	       mathcursor->clearLastCode();
 	       varcode = LM_TC_MIN;
@@ -1104,9 +1104,7 @@
 	    }
 
 //	     fprintf(stderr, "Varcode %d ", varcode);
-	    if (isascii(c) 
-		|| (varcode == LM_TC_TEXTRM && !mathcursor->InMacroMode()))
-	      mathcursor->Insert(c, (greek_kb_flag) ? LM_TC_SYMB: varcode);
+	    mathcursor->Insert(c, (greek_kb_flag) ? LM_TC_SYMB: varcode);
 	    varcode = LM_TC_MIN;
 	    if (greek_kb_flag<2) greek_kb_flag = 0;
 	 } else 
diff -urN lyx-1.0.4pre4.orig/src/lyx_gui.C lyx-1.0.4pre4/src/lyx_gui.C
--- lyx-1.0.4pre4.orig/src/lyx_gui.C	Fri Feb  5 18:46:00 1999
+++ lyx-1.0.4pre4/src/lyx_gui.C	Mon Aug 16 14:50:32 1999
@@ -460,7 +460,8 @@
 	}
 
 	fl_addto_choice(fd_form_document->choice_inputenc,
-			"default|latin1|latin2|latin5");
+			"default|latin1|latin2|latin5"
+			"|koi8-r|koi8-u|cp866|cp1251");
 
         for (n=0; tex_graphics[n][0]; n++) {
 	    fl_addto_choice(fd_form_document->choice_postscript_driver,
diff -urN lyx-1.0.4pre4.orig/src/math_parser.C lyx-1.0.4pre4/src/math_parser.C
--- lyx-1.0.4pre4.orig/src/math_parser.C	Mon May 17 22:25:44 1999
+++ lyx-1.0.4pre4/src/math_parser.C	Mon Aug 16 14:51:58 1999
@@ -166,7 +166,7 @@
 static int yylex(void)
 {
    static int init_done = 0;
-   char c;
+   unsigned char c;
    
    if (!init_done) LexInitCodes();
    
diff -urN lyx-1.0.4pre4.const/lib/examples/ru_splash.lyx lyx-1.0.4pre4/lib/examples/ru_splash.lyx
--- lyx-1.0.4pre4.const/lib/examples/ru_splash.lyx	Thu Jan  1 07:00:00 1970
+++ lyx-1.0.4pre4/lib/examples/ru_splash.lyx	Fri Jul 30 16:07:02 1999
@@ -0,0 +1,129 @@
+#This file was created by <const> Thu May 27 14:26:22 1999
+#LyX 1.0 (C) 1995-1999 Matthias Ettrich and the LyX Team
+\lyxformat 2.15
+\textclass article
+\language russian
+\inputencoding koi8-r
+\fontscheme default
+\graphics default
+\paperfontsize default
+\spacing single 
+\papersize Default
+\paperpackage a4
+\use_geometry 0
+\use_amsmath 0
+\paperorientation portrait
+\secnumdepth 3
+\tocdepth 3
+\paragraph_separation indent
+\defskip medskip
+\quotes_language french
+\quotes_times 2
+\papercolumns 1
+\papersides 1
+\paperpagestyle default
+
+\layout Title
+
+Добро пожаловать в LyX!
+\layout Section*
+
+Главные N вещей, которые нужно знать при работе в LyX
+\layout Enumerate
+
+LyX поставляется с прекрасным набором документации --- пользуйтесь ей! Начните
+ с выбора пункта меню
+\family sans 
+ Помощь->Введение
+\family default 
+, где вы сможете найти очень краткое введение в систему документации.
+ Затем изучите принципы работы в LyX, выбрав в меню пункт
+\family sans 
+ Помощь->Самоучитель
+\family default 
+.
+\layout Enumerate
+
+Мы называем LyX 
+\begin_inset Quotes fld
+\end_inset 
+
+процессором документов
+\begin_inset Quotes frd
+\end_inset 
+
+.
+ Эта программа отличается по замыслу от обычных 
+\begin_inset Quotes fld
+\end_inset 
+
+текстовых процессоров
+\begin_inset Quotes frd
+\end_inset 
+
+; с помощью LyX процесс создания документа упрощается.
+ Но не пугайтесь, если этот процесс несколько отличается от того, к которому
+ вы привыкли.
+ Возникшие у вас вопросы может прояснить документация
+\begin_float footnote 
+\layout Standard
+
+Мы, кажется, уже упоминали, что документацию читать очень полезно?
+\end_float 
+.
+\layout Enumerate
+
+Вывод программы LyX выглядит потрясающе! Чтобы сейчас же в этом убедиться,
+ выберите пункт меню 
+\family sans 
+Файл->Просмотреть
+\protected_separator 
+dvi
+\family default 
+.
+\layout Enumerate
+
+LyX может имитировать всю (или почти всю) функциональность системы LaTeX.
+ И, кроме того, LyX может импортировать файлы, созданные для LaTeX.
+ Опытные пользователи LaTeX могут лишь бегло просмотреть остальную часть
+ 
+\emph on 
+Самоучителя
+\emph default 
+, и приступить к чтению главы 
+\begin_inset Quotes fld
+\end_inset 
+
+LyX для пользователей LaTeX
+\begin_inset Quotes frd
+\end_inset 
+
+.
+ (Всем остальным: не беспокойтесь, вам необязательно знать LaTeX для работы
+ в LyX.)
+\layout Enumerate
+
+LyX содержит множество возможностей для чтения или создания документов на
+ языке, отличном от английского.
+ В дополнение к этому, назначения клавиш, набор кнопок панели управления
+ и многие другие свойства программы допускают очень гибкую настройку (в
+ основном, с помощью правки вашего файла 
+\family typewriter 
+lyxrc
+\family default 
+).
+ Для более подробной информации найдите в меню пункт 
+\family sans 
+Помощь->Настройка
+\family default 
+.
+\layout Enumerate
+
+Страница LyX в Internet находится по адресу
+\family typewriter 
+ www.lyx.org
+\family default 
+.
+ Вы можете найти информацию о программе LyX, подписаться на списки рассылки,
+ ознакомиться с графическими образами экрана LyX, и многое другое.
+\the_end

Reply via email to