Skip to content

Instantly share code, notes, and snippets.

@h-kitagawa
h-kitagawa / jlreq-ghost.tex
Created February 3, 2022 10:55
和文ゴーストの実験(LuaTeX-ja: cb77093 コミット以降)
%#! lualatex
\documentclass{ltjsarticle}
\usepackage{graphicx}
\makeatletter
\newluafunction\ltj@@ghost@jachar@inner
\directlua{%
local GHOST_JACHAR = luatexbase.newuserwhatsitid('ghost of a jachar', 'luatexja')
luatexja.userid_table.GHOST_JACHAR = GHOST_JACHAR
local dnode = node.direct
@h-kitagawa
h-kitagawa / ptex_kanjicnv_test.sh
Created June 21, 2021 10:07
pTeX の \euc, \kuten 等のプリミティブに変な値を与えてみる
#!/bin/sh
#pushd /tmp/tlwork/texk/web2c/
#make -j4 eptex && sudo cp eptex /opt/texlive/2021/bin/x86_64-linux/
#popd
eptex -ini -etex -kanji-internal=euc -jobname=eptex-euc eptex.ini
eptex -ini -etex -kanji-internal=sjis -jobname=eptex-sjis eptex.ini
cat > test.tex << "EOF"
\ifnum`あ="A4A2 \def\XC{EUC:: }\else\def\XC{SJIS:: }\fi %"
\def\typeout#1{\immediate\write17{\XC \detokenize{#1}--> #1}}
@h-kitagawa
h-kitagawa / HaranoAjiGothic.fontspec
Created April 4, 2020 03:18
HaranoAji{Mincho,Gothic}.fontspec の実験
\defaultfontfeatures[HaranoAjiGothic]
{
Extension = .otf,
UprightFont = *-Regular,
BoldFont = *-Bold,
%%FontFace = {l}{\shapedefault}{ *-Light },
FontFace = {eb}{\shapedefault}{ *-Heavy }
}
@h-kitagawa
h-kitagawa / adj_hlist.tex
Last active August 1, 2019 02:19
ボックスの最初・末尾が JFM グルー・カーンがある場合のテストソース
\jfont\test=jgktest\test
\tracingonline1 \showboxbreadth10000 \showboxdepth=10000
\def\out#1{\setbox0=\hbox{#1}\showbox0 }
\inhibitxspcode`Γ=3 \inhibitxspcode`γ=3
\out{あΓあγあ}% 通常
\out{aΓaγa}% 通常
% \hbox{Γ}: 前後に kern あり
\out{a\hbox{Γ}a} % ボックス周囲に xkanjiskip なし
@h-kitagawa
h-kitagawa / platex84.tex
Created June 12, 2019 04:58
platex/#84 に対する修正実験
\documentclass{minimal}
\makeatletter
\ifdefined\kanjiskip
\unless\ifdefined\ucs % (e-)pTeX only
%%%% EUC-JP が内部漢字コードであることを想定
\begingroup
\catcode`\"=12
\catcode`\<=12
\catcode`\.=12
@h-kitagawa
h-kitagawa / ot1piyo.fd
Last active March 30, 2018 07:06
pLaTeX の \fontfamily で .fd を探索する件
\DeclareFontFamily{OT1}{piyo}{}
\DeclareFontShape{OT1}{piyo}{m}{n}{<->cmfi10}{}
\endinput
@h-kitagawa
h-kitagawa / pdfprimitive-integrate_prim_eqtb_into_eqtb-r45691_tests.diff
Last active November 10, 2017 01:51
\pdfprimitive で cur_tok を正しく設定させるテスト
diff --git a/texk/web2c/eptexdir/tests/pdfprimitive-eptex.log b/texk/web2c/eptexdir/tests/pdfprimitive-eptex.log
index 898df1856..4bce55512 100644
--- a/texk/web2c/eptexdir/tests/pdfprimitive-eptex.log
+++ b/texk/web2c/eptexdir/tests/pdfprimitive-eptex.log
@@ -1,25 +1,26 @@
+This is e-pTeX, Version 3.14159265-p3.7.2-170924-2.6 (utf8.euc) (TeX Live 2018/dev) (preloaded format=eptex 2017.11.5) 6 NOV 2017 06:36
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
-**pdfprimitive-eptex
@h-kitagawa
h-kitagawa / atbegshi_tate.tex
Created September 2, 2017 21:11
atbegshi.sty + 縦組クラス
\documentclass{tarticle}
\usepackage[word]{continue}% これは atbegshi 依存
\usepackage{etoolbox}
\makeatletter
\patchcmd{\AtBegShi@Output}%
{\let\AtBegShi@OrgProtect\protect}%
{\setbox\z@\hbox\bgroup\yoko\let\AtBegShi@OrgProtect\protect}%
{}{}
@h-kitagawa
h-kitagawa / ntxexxk.diff
Created February 11, 2016 00:29
bigdelims 指定時の newtxmath, newpxmath における \big サイズの括弧の位置調整
--- ntxexx.vpl 2016-02-11 09:27:02.878569138 +0900
+++ ntxexxk.vpl 2016-02-11 06:37:52.946088886 +0900
@@ -112,20 +112,22 @@
)
)
(CHARACTER O 6
- (CHARWD R 0.371)
+ (CHARWD R 0.461)
(CHARHT R 0.056)
(CHARDP R 0.914)
@h-kitagawa
h-kitagawa / map_add
Last active December 15, 2015 11:29
OTF パッケージで gt/eb をよりきちんと扱うテスト
% example
otf-cjge-h Identity-H KozGoPro-Heavy.otf
otf-cjge-v Identity-V KozGoPro-Heavy.otf
otf-ujge-h UniJIS-UTF16-H KozGoPro-Heavy.otf
otf-ujge-v UniJIS-UTF16-V KozGoPro-Heavy.otf
otf-ujgen-h UniJIS2004-UTF16-H KozGoPro-Heavy.otf
otf-ujgen-v UniJIS2004-UTF16-V KozGoPro-Heavy.otf
hgothebn-h H KozGoPro-Heavy.otf
hgothebn-v V KozGoPro-Heavy.otf