美文网首页
编译knuth关于 virtual font 的 web 文档

编译knuth关于 virtual font 的 web 文档

作者: 千羽之城88 | 来源:发表于2022-05-29 10:33 被阅读0次

    去年某个时间,想看看 knuth 是如何定义虚拟字体的,奈何\LaTeX社区不太好找资源,很难找到相关文档,在 ctan 的网站找到一份文档,类似这种样子:

    %--- an excerpt from VFtoVP.web ------------------------------------------->----

    @* Virtual fonts. The idea behind .{VF} files is that a general
    interface mechanism is needed to switch between the myriad font
    layouts provided by different suppliers of typesetting equipment.
    Without such a mechanism, people must go to great lengths writing
    inscrutable macros whenever they want to use typesetting conventions
    based on one font layout in connection with actual fonts that have
    another layout. This puts an extra burden on the typesetting system,
    interfering with the other things it needs to do (like kerning,
    hyphenation, and ligature formation).

    地址在这里: https://ctan.math.utah.edu/ctan/tex-archive/help/virtual-fonts.knuth

    看着是 web编程 的文档,于是用 weave 转换一下:

    weave vf.web
    

    得到了错误提示:

    This is WEAVE, Version 4.4 (TeX Live xxxx)
    *1*5
    Writing the output file...*1
    ! Name does not match. (l.79)
    @<Glob...@>
    = *5
    ! Name does not match. (l.180)
    @<Glob...@>
    =
    ! Name does not match. (l.183)
    @ @<Set init...@>
    =
    Writing the index...Done.
    (Pardon me, but I think I spotted something wrong.)

    错误暂时解决不了,不过顺利得到了一份 vf.tex 的文档,用 plain \TeX 编译:

    tex vf.tex
    

    (./vf.tex (/usr/local/texlive/xxxx/texmf-dist/tex/plain/knuth-lib/webmac.tex)
    *1 [1] [2] [3] *5 [4] [5] [6]
    ! Undefined control sequence.
    l.384 ...PtoVF} will compute the checksum that \MF
    \ would compute from the
    ?
    [7] [8] [9] Index: [10] Section names: Table of contents: (./CONTENTS.tex)
    [0] )
    Output written on vf.dvi (11 pages, 39248 bytes).
    Transcript written on vf.log.

    文档中引用的 \MF 命令没有被定义,于是搜索一下 texlive 下的所有文档发现如下定义:

    \font\tenlogo=logo10 % font used for the METAFONT logo
    \def\MF{{\tenlogo META}\-{\tenlogo FONT}}
    \def\MP{{\tenlogo META}\-{\tenlogo POST}}
    

    将命令添加到 vf.tex 文档中,编译成功。

    image.png

    相关文章

      网友评论

          本文标题:编译knuth关于 virtual font 的 web 文档

          本文链接:https://www.haomeiwen.com/subject/oddgprtx.html