Skip to content

Instantly share code, notes, and snippets.

View aminophen's full-sized avatar
☃️
☃️⛄️🍣🦆🐦🤯🤮😱🤔🙃

Hironobu Yamashita aminophen

☃️
☃️⛄️🍣🦆🐦🤯🤮😱🤔🙃
View GitHub Profile
@aminophen
aminophen / 20200119-pgfmath-unit.tex
Last active January 30, 2020 13:33
pgfmath: add pTeX-specific units and pdfTeX-specific units
\documentclass[dvipdfmx]{article}
\usepackage{tikz}
\makeatletter % TEX CODE BEGIN
%
\usepackage{etoolbox}
%
% missing for pdfTeX and LuaTeX:
\pgfmath@tokens@make{unit}{{nc}{nd}}% double character units are ok
%
@aminophen
aminophen / latex2e-base-dtx.diff
Last active January 29, 2020 11:49
LaTeX2e diffs (toward 2020-02-02, checked 2020-01-29)
diff --git a/base/alltt.dtx b/base/alltt.dtx
index c106b5a..2c9e22a 100644
--- a/base/alltt.dtx
+++ b/base/alltt.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 1993-2019
+% Copyright (C) 1993-2020
% The LaTeX3 Project and any individual authors listed elsewhere
@aminophen
aminophen / 20191115-babel-italian.md
Last active November 15, 2019 16:40
\usepackage[italian]{babel} error on platex

Description of the error

When using platex or uplatex, the following document throws an error:

\documentclass{article}
\usepackage[italian]{babel}
\begin{document}
a
\end{document}
@aminophen
aminophen / showcjk.tex
Created October 28, 2019 14:42
upTeX の \...cjktoken の状態取得
%#!euptex
\font\x=ec-lmr10\x
\def\SHOWCJKTOKEN{{%
\kansujichar1="2603\relax
\kcatcode"2603=18\relax
{\forcecjktoken \xdef\Xa{\kansuji1}}%
{\disablecjktoken \xdef\Xb{\kansuji1}}%
\edef\Xc{\kansuji1}%
\kcatcode"2603=15\relax
@aminophen
aminophen / zrlistttc.lua
Last active September 1, 2019 13:45 — forked from zr-tex8r/zrlistttc.lua
Lua: To list the font names (and other information) of all the fonts in a TTC/OTC file
-- zrlistttc.lua
-- ref. zrdecompttc.lua
prog_name = 'zrlistttc'
version = '0.4'
mod_date = '2019/08/31'
----------------------------------------
verbose = false
ttc_index = nil
content = { 6 }
langid = nil
@aminophen
aminophen / 20190830-dvipsk-forcejfm.patch
Last active August 30, 2019 15:55
dvips: JFM 由来の VF からは OFM が参照されないようにするパッチ
Index: protos.h
===================================================================
--- protos.h (revision 51992)
+++ protos.h (working copy)
@@ -409,5 +409,6 @@
/* global variables from tfmload.c */
extern FILE *tfmfile;
+extern Boolean force_jfm;
@aminophen
aminophen / otf-cidtfm.diff
Created August 22, 2019 13:34
OTF パッケージの otf-cjXX-X.tfm を作り直すパッチ
diff --git a/japanese-otf/makeotf b/japanese-otf/makeotf
index 7b134c9..4a828a6 100755
--- a/japanese-otf/makeotf
+++ b/japanese-otf/makeotf
@@ -157,7 +157,8 @@ cp hminr-v.tfm tfm/hirakaku-w3-v.tfm
cp hminr-v.tfm tfm/hirakaku-w6-v.tfm
cp hminr-v.tfm tfm/hiramaru-w4-v.tfm
echo "making ofm file for dvipdfmx in CVS"
-perl script/mkcidofm.pl
+#perl script/mkcidofm.pl
@aminophen
aminophen / ptex-improper.tex
Created June 23, 2019 16:36
pTeX: test for "Improper alphabetic or KANJI constant" error
%#!eptex -ini or ptex -ini
\scrollmode
\let\dump\relax
\input plain
% 11
\showthe\catcode`A
% 13
@aminophen
aminophen / 20190321-consult.txt
Last active March 22, 2019 06:33
forum:2586 の回答案
【最初に,「よくわかる方」向けに】
各所で TLContrib から macOS 専用パッケージをインストールする方法が書かれていますが,
現在は TeX Live 2018 が終了していて 2019 pretest 期間中である
(→ そのため TLContrib も 2019 の準備が始まっています)
ことから,tlmgr が安全に動くかどうか(少なくとも私は)よくわかっていません。
そのため,tlmgr を使わずに手動でファイルをダウンロードするという方針で書いています。
パス設定(本来 TeX と無縁の Unix の領分)のところについて,
「多分大丈夫だろう」とかテキトーなことを書いていますが,
正直なところ,これで失敗した場合は私には教える力がありません。

TeX Live のネットワークインストールで発生する問題のリスト

(1) インストール途中に CheckSum が一致しないと即終了してしまう。

install-tl-windows.exe を公式サイトからとってきて実行したとする。

Installing [1348/3742, time/total: 01:52:51/05:30:13]: fonts-churchslavonic [1970k]
Installing [1349/3742, time/total: 01:53:18/05:30:52]: fonts-tlwg [12389k]
TLUtils::check_file: removing C:\Users\winuser\AppData\Local\Temp\oQa4p4EP1F\0BKbEClhmT/fonts-tlwg.tar.xz, checksums differ: