LINUX.ORG.RU
ФорумTalks

Lout и русский


0

0

Одно время назад я отписывался тут на тему поддержки кириллицы в lout (система верстки такая, если кто не в курсе. Маленькая и легкая, в отличие от LaTeX, плюс синтаксис проще чем у troff в разы, слегка похож на ФП, что ли). Вот, что выяснилось из разговора с разработчиком:

Ilya,

There was a time when Lout supported Russian, but then something happened about the fonts, and it stopped. It's years ago now and I forget the details. At that time there was one very active Russian Lout user (Valeriy Ushakov - I'm sure his connection would be evident from a web search so I'm not giving away any secret), but I have not heard from him for several years.

If you think there is a technical problem with the Lout list, try sending a message to it or emailing Greg Woods. I don't know whether it's broken or just not being used much. But you are welcome to email me directly.

Follows these steps to add fonts:

(1) Lout uses font metrics files to find out how big each character is. (Lout does not know what each character looks like, it only knows its size.) Look in subdirectory «fonts» of the Lout distribution for examples of these files, and put your own alongside them. Where you get them from, I don't know.

(2) You need to now tell Lout that these fonts are available. You do that by defining a database, like «fontdefs.ld» in directory «data» of the Lout distribution, and include that by means of a @SysDatabase or @Database command at the top of your document, like the one at the end of file include/doc. You can have your own separate database file alongside fontdefs.ld, you might call it russian_fontdefs.ld.

(3) You will probably also need an LCM file to map character codes to character glyphs. Look in directory «maps» for examples of those, there are already two koi8 ones there.

(4) Unless the fonts are resident on your system (I guess, if you are Russian, they might be) you need to get Lout to include them in the PostScript that it generates. This is because, even though Lout itself does not care what the characters look like, obviously your PostScript renderer needs to know. To include fonts in the PostScript output, you take the PostScript form of the font (and again, I don't know where you get that from) and use Lout's @PrependGraphic command to include it at the top of each document. In practice you would make a file of these @PrependGraphic commands, call it «russian», say, and place

@Include { «russian» }

at the top of your Lout source files.

Of course, all this is old technology, it assumes 8-bit chars and knows nothing about Unicode. Lout does not and will not support Unicode.

I remain committed to supporting the current functionality, and that includes new releases as required. But they are quite rare these days, Lout is basically doing most of what it can do, and doing it as well as it will ever do it.

These days my new development energy goes into the system that will eventually replace Lout. It's called Nonpareil and you can read about it by going to

http://www.it.usyd.edu.au/~jeff

and following the Nonpareil link. However, Nonpareil is years away, and I have become seriously side-tracked into an enabling technology I need: modern object-oriented type systems, which are in a terrible state at the moment.

Jeff

Собственно, вопрос - какой шрифт посоветуете, и где его взять? Приглашаю поучавствовать всех интересующихся.

P.S.: Пардон за кучу текста

★★

> Собственно, вопрос - какой шрифт посоветуете, и где его взять?

cm-super (ни в коем случае не урезанную версию, где нет кириллицы). Из стандартной поставки LaTeX, вот только поставка lout перестанет быть компактной, зато станет хоть на что-нибудь годной.

Evgueni ★★★★★
()

Насколько я помню, lout не поддерживает Unicode.
В остальном программа замеteчательная, а из-за своей компактности еще и предпочтительнее LaTeX.
В свое время не перешел на lout только из-за поддержки русского и украинского.



yaroslav
()

>Приглашаю поучавствовать всех интересующихся

Мыло в профиле, или yaroslav [dog] jabber.ua
Хочу поучаствовать, очень интересно.

yaroslav
()
Ответ на: комментарий от yaroslav

> В остальном программа замеteчательная, а из-за своей компактности еще и предпочтительнее LaTeX.

Она компактна, потому что мало чего умеет. А довесить ей хотя бы шрифты и от компактности останутся только рожки да ножки.

Сам по себе TeX очень компактен, но он только и умеет как разбивать абзацы на строки, правда делает это лучше всех.

Evgueni ★★★★★
()
Ответ на: комментарий от Evgueni

Evgueni, признаюсь, в первый раз слышу об этой программе. Только что просмотрел описание - возможно мне подойдет. В любом случае буду ознакамливаться подробнее.

yaroslav
()
Ответ на: комментарий от yaroslav

Там проблема с кириллическими шрифтами, а именно раньше использовалась версия с очевидно подозрительным прошлым, поэтому во всех современных дистрибутивах её выкинули. То есть есть для печати кириллицы есть два выхода

а) найти тот шрифт и поставить в ручную - это не сложно

б) взять какой-либо из свободных и приучить программу к нему.

Хотя возможно эта проблема решена - имеет смысл посмотреть как сделано у ALT.

Evgueni ★★★★★
()
Ответ на: комментарий от Evgueni

Лично мне lout нужен не столько как система верстки, сколько замена ворд процессору. Потому его функционала достаточно. Человеку, который много общается с LaTeX наверно сложно понять, почему LaTeX в данном случае будет overkill.

NoMad ★★
() автор топика
Ответ на: комментарий от NoMad

Quote:

Человеку, который много общается с LaTeX наверно сложно понять, почему LaTeX в данном случае будет overkill.

Во-во. Та же проблема. WYSIWYG в лице офисных пакетов неудобен, а LaTeX просто избыточен для меня.

GotF ★★★★★
()
Ответ на: комментарий от NoMad

Это заначка от 2002 года. И не думал что кому то пригодится

rapid
()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.