* [Comm] LaTeX, плакат, большие шрифты... :( @ 2006-06-15 10:26 Yury Aliaev 2006-06-15 13:41 ` [Comm] Проблемы шрифтов больших размеров (попытка разобраться) Yury Aliaev 2006-06-16 10:19 ` [Comm] Ура! Я победил! Yury Aliaev 0 siblings, 2 replies; 5+ messages in thread From: Yury Aliaev @ 2006-06-15 10:26 UTC (permalink / raw) To: ALT Linux Community Добрый день, Сообщество! Я столкнулся со следующей проблемой: пытаюсь с помощью пакета a0poster нарисовать в LaTeX'е плакат для конференции, а при компиляции файла tex выдаёт дословно следующее: [mutabor@nort poster]$ latex poster.tex This is TeX, Version 3.14159 (Web2C 7.4.4) (./poster.tex LaTeX2e <2001/06/01> Babel <v3.7h> and hyphenation patterns for american, french, german, ngerman, r ussian, ukrainian, nohyphenation, loaded. (./a0poster.cls Document Class: a0poster 2004/01/31 v1.22b a0poster class (GK, MW) (/usr/share/texmf/tex/latex/base/article.cls Document Class: article 2001/04/21 v1.4e Standard LaTeX document class (/usr/share/texmf/tex/latex/base/size10.clo)) Package a0poster Warning: Unknown Option dvips on input line 88. (./a0size.sty)) (/usr/share/texmf/tex/latex/base/inputenc.sty (/usr/share/texmf/tex/latex/cyrillic/koi8-r.def)) (/usr/share/texmf/tex/generic/babel/babel.sty (/usr/share/texmf/tex/generic/babel/english.ldf (/usr/share/texmf/tex/generic/babel/babel.def)) (/usr/share/texmf/tex/generic/babel/russianb.ldf (/usr/share/texmf/tex/latex/cyrillic/t2aenc.def))) (/usr/share/texmf/tex/latex/graphics/epsfig.sty (/usr/share/texmf/tex/latex/graphics/graphicx.sty (/usr/share/texmf/tex/latex/graphics/keyval.sty) (/usr/share/texmf/tex/latex/graphics/graphics.sty (/usr/share/texmf/tex/latex/graphics/trig.sty) (/usr/share/texmf/tex/latex/config/graphics.cfg) (/usr/share/texmf/tex/latex/graphics/dvips.def)))) (/usr/share/texmf/tex/latex/misc/float.sty) (/usr/share/texmf/tex/latex/cite/cite.sty) (./a0poster.sty (/usr/share/texmf/tex/latex/graphics/color.sty (/usr/share/texmf/tex/latex/config/color.cfg) (/usr/share/texmf/tex/latex/graphics/dvipsnam.def)) (/usr/share/texmf/tex/latex/base/ifthen.sty)) (./poster.aux (/usr/share/texmf/tex/latex/cyrillic/t2acmr.fd)) LaTeX Font Warning: Font shape `T2A/cmr/m/n' in size <61.92> not available (Font) size <35.83> substituted on input line 14. LaTeX Font Warning: Font shape `T2A/cmr/bx/n' in size <61.92> not available (Font) size <35.83> substituted on input line 14. LaTeX Font Warning: Font shape `T2A/cmr/bx/n' in size <80> not available (Font) size <35.83> substituted on input line 14. LaTeX Font Warning: Font shape `T2A/cmr/m/n' in size <43> not available (Font) size <35.83> substituted on input line 14. (/usr/share/texmf/tex/latex/cyrillic/t2acmtt.fd) LaTeX Font Warning: Font shape `T2A/cmtt/m/n' in size <43> not available (Font) size <35.83> substituted on input line 14. [1] (./poster.aux) LaTeX Font Warning: Size substitutions with differences (Font) up to 44.17pt have occurred. ) Output written on poster.dvi (1 page, 1060 bytes). Transcript written on poster.log. [mutabor@nort poster]$ Естественно, что шрифты в плакате оказываются меньше желаемых. Интересно, с каких это пор tex разучился масштабировать шрифты? И можно ли как-нибудь побороть такое его поведение? Заранее спасибо за советы, Юрий. ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Comm] Проблемы шрифтов больших размеров (попытка разобраться) 2006-06-15 10:26 [Comm] LaTeX, плакат, большие шрифты... :( Yury Aliaev @ 2006-06-15 13:41 ` Yury Aliaev 2006-06-16 10:19 ` [Comm] Ура! Я победил! Yury Aliaev 1 sibling, 0 replies; 5+ messages in thread From: Yury Aliaev @ 2006-06-15 13:41 UTC (permalink / raw) To: ALT Linux Community, freepublish Пытаясь разобраться с проблемой, я нарыл некоторые вещи: Во-первых, рассмотрим файл описания одного из семейств шрифтов в LaTeX, про который говорится, что "типа там нету нужного размера", например /usr/share/texmf/tex/latex/cyrillic/t2acmr.fd. Там, в частности, есть такая строчка: \providecommand{\EC@family}[5]{% \DeclareFontShape{#1}{#2}{#3}{#4}% {<5><6><7><8><9><10><10.95><12><14.4>% <17.28><20.74><24.88><29.86><35.83>genb*#5}{}} Не понятно, почему там указаны только отдельные значения размеров шрифтов (шрифты-то масшатбируемые), а главное -- всё заканчивается 35,83-мя пунктами, в то время как мне нужно до 80. Ладно, пытаюсь сделать грязный хак и добавить в список параметров <80>. Запускаю LaTeX, он пытается генерить шрифты и... обламывается! Оставив записку примерно такого содержания (там размер не 80, а меньше, но это без разницы)(привожу имеющий отношение к делу фрагмент): (/usr/share/texmf/fonts/source/lh/base/lkligtbl.mf) ! Enormous number has been reduced. <scantokens> 4100 <to be read again> / use_driver->...base);else:gensize:=scantokens(ss)/ 100;ss:="input ec"&(substr... l.259 use_driver(fonteq) ; I can't handle numbers bigger than about 4095.99998; so I've changed your constant to that maximum amount. >> 40.96 Дальше я выяснил, что в файлике /usr/share/texmf/fonts/source/lh/base/fikparm.mf есть такие строчки: ss:=substring(length(param_base)-ii,length(param_base)) of param_base; if (genmode="ex") or (genmode="ec"): % - set gensize for ec parameter files if (ss="8") or (ss="10"): % for EC slitex fonts exbase:=1; %!!! THAT'S TRICK: we don't need exbase at all gensize:=scantokens(ss); ss:="input "& (substring(0,fonteq-2) of param_base) & "ec" & (substring(fonteq,length(param_base)) of param_base); else: gensize:=scantokens(ss)/100; Получаем следующее: прога kpathsea, отвечающая за управление шрифтами, создаёт файл исходника шрифта, именуемый /var/lib/texmf/source/lh/lh-t2a/larm4100.mf, который она и подсовывает бедному metafont'у. А в его скриптах и имеются вышепроцитированные строчки, смысл которых сводится к тому, что из имени файла вычисляется значение размера шрифта. Делается это так: выделяется цифровая часть (в данном случае -- 4100), делится на 100 и получаем размер шрифта: 41,00. Но не тут-то было! Оказывается, metafont не умеет работать с числами, большими чем 4096. Тут-то облом и наступает :( Получается порочная схема, на позволяющая сгенерировать шрифт размером больше 40 пунктов. Наверное, никому из пользователей ALT Linux до меня это не было нужно, раз никто не наткнулся. Я считаю, что проблема достаточно серьёзная, и её нужно решить, хотя чувствую, что для этого придётся основательно покопаться в кишках ТеХ'а. Всё сказанное относится к ТеХ'у из комплекта Мастера 2.4. Возможно, в сизифе это уже решено (проверю на днях). Тогда всё заметно упрощается т.к. достаточно будет спортировать TeX из Сизифа. Всех благ! Юрий. ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Comm] Ура! Я победил! 2006-06-15 10:26 [Comm] LaTeX, плакат, большие шрифты... :( Yury Aliaev 2006-06-15 13:41 ` [Comm] Проблемы шрифтов больших размеров (попытка разобраться) Yury Aliaev @ 2006-06-16 10:19 ` Yury Aliaev 2006-06-16 14:45 ` Alexej Kryukov 1 sibling, 1 reply; 5+ messages in thread From: Yury Aliaev @ 2006-06-16 10:19 UTC (permalink / raw) To: ALT Linux Community Путём раскидывания мозгами по окружающей обстановке я всё же добился желаемого. В уже цитируемом файле /usr/share/texmf/tex/latex/cyrillic/t2acmr.fd. (и некоторых других) в строчку \providecommand{\EC@family}[5]{% \DeclareFontShape{#1}{#2}{#3}{#4}% {<5><6><7><8><9><10><10.95><12><14.4>% <17.28><20.74><24.88><29.86><35.83>genb*#5}{}} я внёс кое-какие изменения. Теперь это место выглядит так: \providecommand{\EC@family}[5]{% \DeclareFontShape{#1}{#2}{#3}{#4}% {<5><6><7><8><9><10><10.95><12><14.4>% <17.28><20.74><24.88><29.86><35.83>genb*#5 <43.00> <51.6> <61.92> <74.3> <89.16> <107.0>#53583}{}} Т.е. теперь шрифты нужных мне больших размеров просто масштабируются из 36-пунктового, а не генерируются каким-то извращённым имхо способом. Возможно, в этом есть Великий СмысЬлЪ, но меня устроил и тот выход, который я нашёл. Конечно, это грязный хак, но в условиях цейтнота с таким приходится мириться. В будущем я планирую разобраться, как заставить нормально обрабатывать подобные ситуации стилевой файл самого a0poster (пока он работает только с cmr), и если мне удастся добиться кошерного решения этой проблемы (и ещё некоторых сопутствующих), то пакет a0poster появится в Сизифе. На сем позвольте раскланяться, Юрий. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Comm] Ура! Я победил! 2006-06-16 10:19 ` [Comm] Ура! Я победил! Yury Aliaev @ 2006-06-16 14:45 ` Alexej Kryukov 2006-06-16 15:38 ` Yury Aliaev 0 siblings, 1 reply; 5+ messages in thread From: Alexej Kryukov @ 2006-06-16 14:45 UTC (permalink / raw) To: ALT Linux Community On Friday 16 June 2006 14:19, Yury Aliaev wrote: > Т.е. теперь шрифты нужных мне больших размеров просто масштабируются > из 36-пунктового, Модифицировать fd-файлы из стандартной поставки -- это, конечно, не дело. Можно было поступить проще: использовать cm-super и дополнительно загружать входящий в состав этого пакета стилевой файл type1ec. Насколько я понимаю, там команда \EC@family как раз переопределена желаемым для Вас образом. Или же можно было просто отказаться от CM-шрифтов в пользу любых масштабируемых: использовать, напр., пакет pscyr или literat. > а не генерируются каким-то извращённым имхо > способом. Способ не извращенный. Дело в том, что в традиционном типографском деле шрифты разных кеглей отличались не только размером, но и пропорциями (а иногда и деталями рисунка). Так вот, формат METAFONT был задуман именно так, чтобы эти особенности передать. Отсюда и дискретность номеров кеглей в fd-файлах. Другое дело, что на практике от этого пользы мало, т. к. сам формат, по сути дела, мертв, и с PostScript-шрифтами, хоть они этим достоинством и не обладают, работать намного удобнее. -- Regards, Alexey Kryukov <anagnost {at} yandex {dot} ru> Moscow State University Historical Faculty ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Comm] Ура! Я победил! 2006-06-16 14:45 ` Alexej Kryukov @ 2006-06-16 15:38 ` Yury Aliaev 0 siblings, 0 replies; 5+ messages in thread From: Yury Aliaev @ 2006-06-16 15:38 UTC (permalink / raw) To: ALT Linux Community Alexej Kryukov scripsit: > Модифицировать fd-файлы из стандартной поставки -- это, конечно, не Знамо что не дело. А кому щас легко! > дело. Можно было поступить проще: использовать cm-super и дополнительно > загружать входящий в состав этого пакета стилевой файл type1ec. > Насколько я понимаю, там команда \EC@family как раз переопределена > желаемым для Вас образом. Если бы я узнал это сутками раньше... > > Или же можно было просто отказаться от CM-шрифтов в пользу любых > масштабируемых: использовать, напр., пакет pscyr или literat. cm-super как раз масштабируемые. В принципе... > > >>а не генерируются каким-то извращённым имхо >>способом. > > > Способ не извращенный. Дело в том, что в традиционном типографском > деле шрифты разных кеглей отличались не только размером, но и > пропорциями (а иногда и деталями рисунка). Так вот, формат METAFONT > был задуман именно так, чтобы эти особенности передать. Отсюда и > дискретность номеров кеглей в fd-файлах. Другое дело, что на практике > от этого пользы мало, т. к. сам формат, по сути дела, мертв, и > с PostScript-шрифтами, хоть они этим достоинством и не обладают, > работать намного удобнее. Это я знаю. Извратом мне показалось наличие дискретного набора кеглей и способ генерации шрифтов через gen, к тому же этот способ принципиально не позволяет иметь шрифты больше 40 пунктов. Помнится в emTeX'е тоже использовались обычные metafont'овские шрифты, но способ их генерации был попроще и не выдавал фортели, подобные описанному. Насколько я понимаю, в LaTeX можно обойтись и без этого, просто привязав разные диапазоны метрик к разным описаниям. Позднее я понял, что в стандартном LaTeXе другие размеры просто не нужны, а те пакеты, которые из используют, должны о них сами позаботиться. В a0poster были прибиты гвоздями ComputerModern, и пока не требуется кириллица (а авторы пакета -- немцы), всё шло хорошо... ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2006-06-16 15:38 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2006-06-15 10:26 [Comm] LaTeX, плакат, большие шрифты... :( Yury Aliaev 2006-06-15 13:41 ` [Comm] Проблемы шрифтов больших размеров (попытка разобраться) Yury Aliaev 2006-06-16 10:19 ` [Comm] Ура! Я победил! Yury Aliaev 2006-06-16 14:45 ` Alexej Kryukov 2006-06-16 15:38 ` Yury Aliaev
ALT Linux Community general discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 community community/ http://lore.altlinux.org/community \ mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com public-inbox-index community Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.community AGPL code for this site: git clone https://public-inbox.org/public-inbox.git