3

I would like to try to patch amsppt.sty AMSTeX style file to make it usable with XeTeX and non-Latin languages (Cyrillic). It looks like i need to replace the following CM fonts or font families with Unicode aware ones : cmcsc10, cmti7, cmr8, cmr6, cmmi8, cmmi6, cmsy8, cmsy6, cmbx8, cmbx6, cmti8, cmsl8, cmtt8, cmcsc10, cmex10, cmex10, cmmibfam, cmmib, cmbsyfam, cmbsy, cmcsc8, cmex8, cmex7.

Whis ones can i use instead, and where can i get them?

Another part of this question is how to use new fonts in amsppt.sty. The lines where the fonts are selected look like this:

\font@\sevenit=cmti7 \relax
jarnosc
  • 4,266
Alexey
  • 2,099
  • Did you try cm-unicode? – Bernard Jun 24 '15 at 07:40
  • I tried, assuming that cmcsc10 would be called cmuncsc10, cmti7 would be called cmunti7, etc., but such fonts do not exist in cm-unicode or are named differently. – Alexey Jun 24 '15 at 08:17
  • Cm-unicode has no more font files per size, e.g. you have a cmunti.otf file only. As for cmcsc, I don't know if it has been converted (its only version 0.7). For now it seems small caps are obtained by scaling uppercase letters. Why don't you use the Latin Modern fonts, which are very close to Computer Modern, and are much more complete? They're the default for XeLaTeX. – Bernard Jun 24 '15 at 08:47
  • It was suggested to me to use cm-unicode in an answer to my question. I will try to see how to use Latin Modern. I hope i will find the ones that contain Cyrillics. – Alexey Jun 24 '15 at 09:38
  • Could you tell me, please, how Latin Modern fonts with Cyrillics are called, and which package they are in? – Alexey Jun 24 '15 at 09:46
  • Maybe use Latin Modern as a base with cm-unicode for Cyrillics? Loading fontspec will enable Latin Modern as default. – cfr Jun 24 '15 at 15:56
  • fontspec seems to be a LaTeX/XeLaTeX package, how to load it in plain XeTeX? – Alexey Jun 24 '15 at 16:08
  • Do you plan to use Cyrillic letters in formulas? – egreg Jun 24 '15 at 16:15
  • No, i there shouldn't be any. (There can be Cyrillic text in formulas, but i guess this is a different story.) – Alexey Jun 24 '15 at 16:19

1 Answers1

2

I prepared a file amspptfont.tex with the following contents

\chardef\atfontcatcode=\catcode`\@
\catcode`@=11

% the plain fonts
\font@\tenrm="[cmunrm]" at 10pt
\font@\sevenrm="[cmunrm]" at 7pt
\font@\fiverm="[cmunrm]" at 5pt

\font@\tenbf="[cmunbx]" at 10pt
\font@\sevenbf="[cmunbx]" at 7pt
\font@\fivebf="[cmunbx]" at 5pt

\font@\tentt="[cmuntt]" at 10pt

\font@\tensl="[cmunsl]" at 10pt

\font@\tenit="[cmunti]" at 10pt

% the amsppt fonts
\font@\tensmc="[cmunrm]:+smcp" at 10pt \relax
\font@\sevenit="[cmunti]" \relax
\font@\eightrm="[cmunrm]" at 8pt \relax
\font@\sixrm="[cmunrm]" at 6pt \relax
\font@\eightbf="[cmunbx]" at 8pt \relax
\font@\sixbf="[cmunbx]" at 6pt \relax
\font@\eightit="[cmunti]" at 8pt \relax
\font@\eightsl="[cmunsl]" at 8pt \relax
\font@\eighttt="[cmuntt]" at 8pt \relax
\font@\eightsmc="[cmunrm]:+smcp" at 8pt \relax

\catcode`@=\atfontcatcode

Then the following test file

\input amstex
\documentstyle{amsppt}
\input amspptfont

\document

Добро пожаловать в русский Викисловарь — многофункциональный многоязычный словарь и тезаурус, 
в обсуждении и пополнении которого может участвовать каждый.

\proclaim{Proposition 2.5} Let $S_1,\dots,S_m$ be the components
of a $J$-holomorphic cusp-curve $S$ and suppose that each
component $S_i$ is \rom(a multiple covering of\rom) a regular
curve and that Assumption \rom{(1.4a)} is satisfied. \dots
\endproclaim

\define\test#1{%
  {\tt\string#1}{#1 Test of the font}\par
}

\test\tenrm
\test\sevenrm
\test\fiverm

\test\tenbf
\test\sevenbf
\test\fivebf

\test\tentt

\test\tensl

\test\tenit

\test\tensmc
\test\sevenit
\test\eightrm
\test\sixrm
\test\eightbf
\test\sixbf
\test\eightit
\test\eightsl
\test\eighttt
\test\eightsmc

\enddocument

produces the following output

enter image description here

I didn't even try math symbol fonts, which would require very extensive work with Latin Modern Math.

egreg
  • 1,121,712
  • Thanks, i will see if this example can help me to move on. Спасибо :). – Alexey Jun 24 '15 at 21:40
  • You may add \uselanguage{russian} somewhere in your example to enable hyphenation. – Alexey Jun 25 '15 at 07:09
  • If you add $\bar A$ to your example, there will be an error. It seems to be this bug, discussed also here. – Alexey Jun 25 '15 at 07:15
  • @Alexey Sorry, but it seems that the bug is still there. On the other hand, if I add \input luaotfload.sty at the beginning and run luatex, there's no error, but no bar accent either. :-( – egreg Jun 25 '15 at 08:53
  • By the way, what does \font@ mean? Why is it not \font? – Alexey Jun 25 '15 at 15:58
  • @Alexey It has to do with \syntax: \font@ registers the font selection command for being set equal to \dummy if only syntax check is desired. – egreg Jun 25 '15 at 16:00
  • To try to hack this, how can i inspect the default value of \font@\somefont? – Alexey Jun 30 '15 at 21:58
  • @Alexey Not sure to understand. – egreg Jun 30 '15 at 21:58
  • I am trying to experiment with different setups. For example, i see that amsppt, cmunrm, and $\bar A$ produce the error only when used all together. Any two of them work without errors (but not necessarily displaying Cyrillics). I would like to see how, for example, \tenrm is defined if i did not define it myself. – Alexey Jun 30 '15 at 22:12
  • @Alexey \tenrm is in plain.tex and is cmr10. To inspect what external file a symbolic font name refers to, say \expandafter\show\the\font in a test document. – egreg Jun 30 '15 at 22:13
  • How can i inspect it to be sure? Doesn't it depend on whether i use XeTeX or Plain TeX? I would like to also inspect the default math fonts if i do not use amsppt. – Alexey Jun 30 '15 at 22:15
  • Ah, ok, i'll try \expandafter\show\the\font. – Alexey Jun 30 '15 at 22:21
  • @Alexey \show\tenrm would output \tenrm=select font cmr10 – egreg Jun 30 '15 at 22:39