名前: 山本和義 日時: 2009-02-12 03:34:08 IPアドレス: 218.226.114.*
数式famの制限についてちょっと遊んでみました(時期的には古い話題になるかも しれませんが).TeXフォーラムの方で関連する質疑応答がなされているのですが, 直接の回答にはならないと思うのでこちらに貼ってみます.使用している TeXシステムは,2008年2月頃の W32TeX のフルインストールです. 最初は lambda でやっていたのですが,class7の処理が思い通りに行かず, luatex でやってみたらOKでした.luatex では plain TeX しか用意されて いないので,LaTeX の format を作り(素直にやったらハイフネーションパターン の読み込みではねられるので,英語だけにしたらできた),下の文書ソースを 処理したところ,16個超の数式フォントが使用できました. ソースの \mbfl{L\ fam=\the\fam\ } のところが,標準の TeX の限界です. 最後に数式fam255番の luatex の限界をつけてみました.では,文書ソース です. 注意.luatex で LaTeX の format を作成して実行してください. 標準の latex or platex ではエラーになります. %%%% test.tex %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \documentclass{article} \makeatletter \def\document@select@group#1#2#3#4{% \ifx\math@bgroup\bgroup\else\relax\expandafter\@firstofone\fi {% \ifmmode % \ifnum\csname c@mv@\math@version\endcsname<\sixt@@n% 16個ではなく \ifnum\csname c@mv@\math@version\endcsname<256% 256個にする \begingroup \escapechar\m@ne \getanddefine@fonts{\csname c@mv@\math@version\endcsname}#3% \globaldefs\@ne \math@fonts \endgroup \expandafter\extract@alph@from@version \csname mv@\math@version\expandafter\endcsname \expandafter{\number\csname c@mv@\math@version\endcsname}% #1% \global\advance\csname c@mv@\math@version\endcsname\@ne \else \let#1\relax \@latex@error{Too many math alphabets used in version \math@version}% \@eha \fi \else \expandafter\non@alpherr\fi #1{#4}% }% } \makeatother \DeclareMathAlphabet{\mbfa}{OT1}{cmr}{m}{n} \DeclareMathAlphabet{\mbfb}{OT1}{cmr}{bx}{n} \DeclareMathAlphabet{\mbfc}{OT1}{cmr}{bx}{n} \DeclareMathAlphabet{\mbfd}{OT1}{cmr}{bx}{n} \DeclareMathAlphabet{\mbfe}{OT1}{cmr}{bx}{n} \DeclareMathAlphabet{\mbff}{OT1}{cmr}{bx}{n} \DeclareMathAlphabet{\mbfg}{OT1}{cmr}{bx}{n} \DeclareMathAlphabet{\mbfh}{OT1}{cmr}{bx}{n} \DeclareMathAlphabet{\mbfi}{OT1}{cmr}{bx}{n} \DeclareMathAlphabet{\mbfj}{OT1}{cmr}{bx}{n} \DeclareMathAlphabet{\mbfk}{OT1}{cmr}{bx}{n} \DeclareMathAlphabet{\mbfl}{OT1}{cmr}{bx}{n}% ここで15番 \DeclareMathAlphabet{\mbfm}{OT1}{cmss}{m}{n} \DeclareMathAlphabet{\mbfn}{OT1}{cmss}{m}{n} \DeclareMathAlphabet{\mbfo}{OT1}{cmss}{m}{n} \DeclareMathAlphabet{\mbfp}{OT1}{cmss}{m}{n} \pagestyle{empty} \begin{document} \font\fontA=cmr10 $ \mbfa{A} \mbfb{B} \mbfc{C} \mbfd{D} \mbfe{E} \mbff{F} \mbfg{G} \mbfh{H} \mbfi{I} \mbfj{J} \mbfk{K} \mbfl{L\ fam=\the\fam\ } \mbfm{M} \mbfn{N} \mbfo{O} \mbfp{P} \ \textfont255=\fontA \fam255 roman $ \end{document} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% log file はこんな感じです. %%%% LaTeX2e on LuaTeX での log %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% This is LuaTeX, Version snapshot-0.20.2-2007121821 (Web2C 7.5.6) (format=latex 2009.2.12) 12 FEB 2009 03:30 **test.tex (test.tex LaTeX2e <2005/12/01> Babel <v3.8h> and hyphenation patterns for english, loaded. (e:/usr/local/share/texmf/tex/latex/base/article.cls Document Class: article 2005/09/16 v1.4f Standard LaTeX document class (e:/usr/local/share/texmf/tex/latex/base/size10.clo File: size10.clo 2005/09/16 v1.4f Standard LaTeX file (size option) ) \c@part=\count79 \c@section=\count80 \c@subsection=\count81 \c@subsubsection=\count82 \c@paragraph=\count83 \c@subparagraph=\count84 \c@figure=\count85 \c@table=\count86 \abovecaptionskip=\skip41 \belowcaptionskip=\skip42 \bibindent=\dimen102 ) (test.aux) LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 48. LaTeX Font Info: ... okay on input line 48. LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 48. LaTeX Font Info: ... okay on input line 48. LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 48. LaTeX Font Info: ... okay on input line 48. LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 48. LaTeX Font Info: ... okay on input line 48. LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 48. LaTeX Font Info: ... okay on input line 48. LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 48. LaTeX Font Info: ... okay on input line 48. LaTeX Font Info: External font `cmex10' loaded for size (Font) <7> on input line 50. LaTeX Font Info: External font `cmex10' loaded for size (Font) <5> on input line 50. [1 ] (test.aux) ) Here is how much of TeX's memory you used: 246 strings out of 95377 2396 string characters out of 1186604 100000,74296 words of node,token memory allocated node memory in use: 263 words out of 100000 rapidly available: 2:12, 3:19, 4:16, 5:48, 6:7, 7:1, 8:7 nodes current usage: 2 hlist, 1 vlist, 1 rule, 2 glue, 40 glue_spec, 1 write, 2 dir n odes 3626 multiletter control sequences out of 65536+50000 32 fonts using 222609 bytes 23i,4n,17p,133b,120s stack positions out of 3000i,500n,5000p,200000b,5000s Output written on test.dvi (1 page, 444 bytes). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1つの数式モードで使える数式フォントが16種類であるという仕様が息苦しいことは 事実なので,pTeX でもそれなりの拡張がなされることを期待したいですね.
この書き込みへの返事: