dvi2html
DVIをhtmlに変換するlibrary
kisonecat/dvi2html
PyDVIのコードをTSに移植したdvi-parserをforkして作られたもの
TODOは全て完了しているようだが、ところどころ文法がミスったままになっている
live demo
TFM fontをjsonにするツールが内封されてる
kpathseaを使う
forksてDeno/web browserで動くようにしたtakker.icon
https://github.com/takker99/dvi2html
実装したいこと
pluginをstreamっぽく数珠つなぎにしたい
あと型定義が微妙
本家をDenoから使用する方法
esm.shからは取得できない
変なJSファイルが出来上がる
2023-12-18 16:07:52 まとものなのができたかも?
https://esm.sh/gh/artisticat1/dvi2html@3d631d7671/src
16:17:42 だめ。https://esm.sh/v135/.@latest/denonext/fonts.json.js が400 bad requestになる
コードから改変する必要がある
forks
https://github.com/drgrice1/dvi2html/tree/ww-modifications
https://github.com/jhoobergs/dvi2html/tree/fix/compilation がベースっぽい
https://github.com/artisticat1/dvi2html/tree/ww-modifications
svgへの変換周りのバグ修正
https://github.com/Dardey/dvi2html/commit/ea744dff8de1590a5843e5353f00a28bcdfe90c1
CRLF周りのバグ修正
kisonecat側の変更点
型定義周りの変更
https://github.com/drgrice1/dvi2html/commit/5c27139371c5d788f2bcc185bf545c889441d52c
ロジックの変更
https://github.com/drgrice1/dvi2html/commit/01594883d5dc03989d71bc5c6e011a8a5c427b7b
https://github.com/drgrice1/dvi2html/commit/63ff28b22db2b3be356d7e208b67dde7d3d36d23
use font encoding tables
glyphとencodingを事前に取り出すような設計に変わっている
texglyphlist.txtとglyphlist.txtから情報を入手している
AGL fileというもの
Adobe Glyph List Specification(AGL Spec)で記述されたファイル
glyphlist.txtはPostScript グリフ名を Unicode に対応付ける https://texwiki.texjp.org/?dvipdfmx%2Fフォントの設定#d0149545のに必要
https://github.com/adobe-type-tools/agl-aglfn
dvipdfmxエラー対策
PDFで文字をコピペできるようにするやつ。なくてもrenderingはできる
texglyphlist.txtはLCDF Typetoolsが提供しているglyphlist
https://github.com/kohler/lcdf-typetools
https://www.tug.org/texlive/Contents/live/texmf-dist/fonts/map/glyphlist/texglyphlist.txt
cmb10 etc.の.encファイルはf7b6d320.enc
冒頭コメントに対応するfont nameが記載されている
esint10やline10も含めて、dvips-all.encに全部含まれている?
font nameとencodingとの対応はマップファイル (TeX)から作ったと思われる
https://texwiki.texjp.org/?dvipdfmx%2Fフォントの設定
https://ameblo.jp/akenji/entry-10858791644.html
.encの説明
https://texwiki.texjp.org/?TeXとフォント#b9fac2f6
.pfbなどはdvipsの解説に載ってる
https://tug.org/texinfohtml/dvips.html
他には特になし
related
https://github.com/jhoobergs/dvi2html-rs
rustで書き換えた上でwasmにしたもの
special/にあるものは、\special{}を解釈するためのコード
special 命令 - TeX Wiki
dvisvgm:rawの解説
Parameter text may also contain the expressions {?x}, {?y}, {?color}, and {?matrix} that expand to the current x or y coordinate, the current color, and current transformation matrix, respectively. Character sequence {?nl} expands to a newline character.
References
dvipdfmx/フォントの設定 - TeX Wiki
tools/glyphs.jsを読むのに必要
2022-01-09 11:58:13 一部のfontのdvip encファイルを読み込めない
存在しないみたい
元repoのownerはちゃんとテストしたのか?takker.icon
あとcommit名と内容が一致していなくてcommit historyが読みにくい
2022-01-09 12:08:08 これを触るのはしばらくやめる
時間が取られるだけで何もできない
TeXの構造複雑過ぎ
#2024-07-09 15:30:17
#2023-12-24 19:37:41
#2023-12-23 06:13:39
#2023-12-22 00:33:00
#2023-12-20 16:44:40
#2023-12-18 14:31:14
#2022-01-09 11:04:45
#2021-12-29 19:41:11