Instantly share code, notes, and snippets.

View squareroot.saty
@require: stdja
@require: list
% sqrt r = sin(acos(1 - 2r)/2) (for 0 < r < 1)
let sqrt-b r =
sin (acos (1. -. r *. 2.) /. 2.)
% NOTE: behavior undefined
let get-invalid-value () = 0. /. 0.
View fillsnowman.satyh
% fillsnowman.satyh
%
% Copyright (c) 2019 Takayuki YATO (aka. "ZR")
% GitHub: https:%github.com/zr-tex8r
% Twitter: @zr_tex8r
% Distributed under the MIT License.
@require: pervasives
@require: list
View nyc2019.tex
\documentclass{article}
\usepackage[papersize={100mm,148mm},margin=0cm,
noheadfoot]{geometry}
\usepackage{luatexja-fontspec}
\usepackage{amsmath,tikz,graphicx,xcolor,xparse}
\usetikzlibrary{calc}
\newfontface{\fSegoe}{segoeuiz.ttf}
\newfontface{\fUniv}{UniversalisADFStd-BoldCond.otf}
\newfontface{\fNishiki}{Nishiki-teki.ttf}
\newjfontface{\jNishiki}{Nishiki-teki.ttf}
View texmas.readme.md

This is a plain XeTeX documnt, so you must compile it with xetex command.

View bxrawstr.lua
--
-- This is file 'bxrawstr.lua'.
--
-- Copyright (c) 2018 Takayuki YATO (aka. "ZR")
-- GitHub: https://github.com/zr-tex8r
-- Twitter: @zr_tex8r
--
-- This package is distributed under the MIT License.
--
luatexbase.provides_module{
View affsnowman.satyh
% affsnowman.satyh: Affine-transformed snowman pictures
%
% Copyright (c) 2018 Takayuki YATO (aka. "ZR")
% GitHub: https:%github.com/zr-tex8r
% Twitter: @zr_tex8r
% Distributed under the MIT License.
@require: pervasives
@require: list
View scarticle.satyh
% scarticle.satyh: An essential docuemnt class for SATySFi
%
% Copyright (c) 2018 Takayuki YATO (aka. "ZR")
% GitHub: https:%github.com/zr-tex8r
% Twitter: @zr_tex8r
% Distributed under the MIT License.
@require: pervasives
@require: list
View grcnum.tex
\documentclass[a4paper]{article}
\usepackage{fontspec}
\setmainfont{GentiumPlus}
\makeatletter %!!!!!!!!!!!!!!!!!!!!!!!!! TeX code BEGIN
%---------------------------------------補助マクロ
%% ユニークトークン
% \my@nil : 値がないことを表す.
% ※デバッグの便宜のため保護付にする.
View ackermann.tex
\documentclass[a4paper]{article}
\makeatletter %!!!!!!!!!!!!!!!!!!!!!!!!! TeX code BEGIN
%% 変数
\newif\ifmy@ok % 真偽値の返り値専用のスイッチ
\let\my@ret\relax % トークン列返り値専用のマクロ
\newcount\my@m
\newcount\my@mm
\newcount\my@n
\newbox\my@box