Skip to content

Instantly share code, notes, and snippets.

@zr-tex8r
zr-tex8r / scarticle.satyh
Last active Dec 23, 2018
SATySFi:非常に画期的な文書クラス
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
@zr-tex8r
zr-tex8r / grcnum.tex
Created Dec 15, 2018
LaTeX: TeXでもイオニア式記数法したい件
View grcnum.tex
\documentclass[a4paper]{article}
\usepackage{fontspec}
\setmainfont{GentiumPlus}
\makeatletter %!!!!!!!!!!!!!!!!!!!!!!!!! TeX code BEGIN
%---------------------------------------補助マクロ
%% ユニークトークン
% \my@nil : 値がないことを表す.
% ※デバッグの便宜のため保護付にする.
@zr-tex8r
zr-tex8r / ackermann.tex
Created Dec 11, 2018
LaTeX: TeXでもアッカーマン関数したい件
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
@zr-tex8r
zr-tex8r / texfile.lua
Created Dec 5, 2018
To pass to the TeX command a file name containing dangerous characters
View texfile.lua
local ptn = '[\\{}#^~%%]' -- dangerous characters
local fa, c = arg[#arg]:gsub(ptn, '~\\%1')
if c > 0 then
arg[#arg] = [[\bgroup\escapechar-1\let~\string\xdef\x{]]..
fa..[[}\egroup\input\x\relax]]
end
arg[0] = nil
os.exec(arg)
@zr-tex8r
zr-tex8r / hello.tex
Created Dec 1, 2018
LaTeX: Which kind of “LaTeX” am I using?
View hello.tex
%%
%% This is file 'hello.tex'.
%%
%% Copyright (c) 2018 Takayuki YATO (aka. "ZR")
%% GitHub: https://github.com/zr-tex8r
%% Twitter: @zr_tex8r
%%
%% This file is distributed under the MIT License.
%%
\documentclass[a4paper]{article}
@zr-tex8r
zr-tex8r / scplain.bst
Created Nov 29, 2018
LaTeX: 文献一覧を本質的にする文献スタイル
View scplain.bst
ENTRY
{ title }
{}
{}
FUNCTION {cr} { write$ newline$ }
FUNCTION {open.trashbox}
{ "\let\sczbpXbl\list\let\sczbpXel\endlist" cr
"\def\list#1#2{\setbox0\vbox\bgroup" cr
@zr-tex8r
zr-tex8r / dciequduck.sty
Last active Nov 27, 2018
LaTeX: To add numbering to inline math in “duck-loving” way
View dciequduck.sty
%%
%% This is file 'dciequduck.sty'.
%%
%% Copyright (c) 2018 Takayuki YATO (aka. "ZR")
%% GitHub: https://github.com/zr-tex8r
%% Twitter: @zr_tex8r
%%
%% This package is distributed under the MIT License.
%%
@zr-tex8r
zr-tex8r / stupdmap.cfg
Last active Oct 21, 2018
Lua: SATySFi用のupdmapみたいなやつ(未完成)
View stupdmap.cfg
# stupdmap.cfg
# To be placed in ~/.satysfi/dist/stupdmap
Nishiki-teki = C:/windows/fonts/nishiki-teki.ttf
View make-satysfi.sh
#!/bin/bash
set -eux
sudo apt -y update
sudo apt -y install build-essential git m4 unzip curl ruby
yes '' | sh <(curl -sL https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh)
opam init --auto-setup --comp 4.06.0 --disable-sandboxing
eval $(opam env)
You can’t perform that action at this time.