Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
🍣🦆

Takayuki YATO zr-tex8r

💭
🍣🦆
View GitHub Profile
@zr-tex8r
zr-tex8r / intersection.tex
Created Jan 23, 2021
昇順の整数のリストが複数あったとき、それらの共通部分を抜き出すやつ(わかりにくい)
View intersection.tex
\documentclass{article}
\makeatletter %!!!!!!!!!!!!!!!!!!!!!!!!! TeX code BEGIN
\newif\ifxx@ok
\newcommand*\xxLetIntersectionTo[2]{%
\let\xx@ret\relax
\@tfor\xx@l:=#2\do{%
\ifx\xx@ret\relax \edef\xx@ret{\xx@l}%
\else \xx@intersect@two \fi}%
\let#1\xx@ret}
\def\xx@head#1#2{\edef\xx@next{\noexpand\xx@head@a#2}\xx@next\relax#1}
@zr-tex8r
zr-tex8r / 01sample.tex
Last active Jan 21, 2021
例のdvipdfmxのCMapのアレ
View 01sample.tex
% upLaTeX文書
% KleeOne-Regular.ttf と Adobe-Japan1-KleeOne-Regular を配置する
\documentclass[uplatex,dvipdfmx,a4paper]{jsarticle}
\usepackage{otf}
\usepackage[noalphabet]{pxchfon}% unicodeは無し
\setminchofont{KleeOne-Regular.ttf}% クレー One
\begin{document}
\CID{1481}城市\ajSnowman\ajLig{ウルシ}\CID{7652}飾区
\ajMaruHira{1}\ajKuroMaruHira{42}\ajKakuKata{1}\ajKuroKakuKata{42}%
\ajMaru{12}\ajMaru{34}\ajMaru{56}
@zr-tex8r
zr-tex8r / wdsnowman2021.tex
Created Jan 17, 2021
LaTeX: Happy World Day of Snowman!
View wdsnowman2021.tex
\documentclass[margin=0pt]{standalone}
\usepackage{xcolor,tikz,scsnowman}
\usetikzlibrary{calc}
\newcommand*{\cLet}{\pgfmathsetmacro}
\cLet{\yA}{115}\cLet{\yB}{15}\cLet{\vSS}{12}
\cLet{\vRA}{1}\cLet{\vRB}{5}\cLet{\vRS}{3}
\cLet{\vT}{\number\faStopTicks/\number\faAllTicks}
\cLet{\vA}{-mod(\vT*\vRA,1)*360}
\cLet{\vB}{-mod(\vT*\vRB,1)*360}
\cLet{\vS}{-mod(\vT*\vRS,1)*360}
@zr-tex8r
zr-tex8r / bxkvcmd-sty
Created Jan 4, 2021
LaTeX:key-value型の引数指定をもつユーザ命令を(LaTeXレベルで)定義する
View bxkvcmd-sty
%%
%% This is file 'bxkvcmd.sty'.
%%
%% Copyright (c) 2021 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 / nyc2021.tex
Created Jan 1, 2021
LaTeX: New year post card of the year 2021
View nyc2021.tex
\documentclass{article}
\usepackage[papersize={100mm,148mm},margin=0cm,
noheadfoot]{geometry}
\usepackage{luatexja-fontspec}
\usepackage{amsmath,tikz,graphicx,xcolor,xparse}
\usetikzlibrary{calc,positioning}
\newfontface{\fRobo}{RobotoSlab-Bold.otf}
\newfontface{\fChicago}{QTChicagoland.otf}
\newfontface{\fNishiki}{Nishiki-teki.ttf}
\newjfontface{\jNishiki}{Nishiki-teki.ttf}
View texmas2020.tex
^^`^^;^^`\^^$^^%^^&\!^^;\^^$^^%^^&^^=^^`\!\^^:#1^^;^^=^^`%^^'^^`1~^^`^^"
\!\[{^^2}\!\<{%% --:--:--:--:--:--:--:-- 2 @ 2 @ --:--:--:--:--:--:--:--
\^^#^^3^^.^^!^^-^^%}\!\]{^^3}\^^:?\!\>{\^^%^^.^^$^^#^^3^^.^^!^^-^^%}%**%
\!\={\^^,^^%^^4}\=\?\^^#^^!^^4^^#^^/^^$^^%\=\#\^^:\?`*\?`\^\?`.\?`\*%[#\
\?`/\?`\^\!\|{^^5}\=\@\^^%^^$**%**&\?`\@\?`//*\=\+%+5.//)=\?..{**!};@^^:
\..!^^$//6..!^^.//#..%\=\&\..'//,^^/.."^^!//,\#6\=\%\^^,**#..#///..$**%%
\@\_{\<..,**/..7^^%\[^^#..!\]..%\>}\!\^^!{\?\(\?`+\%\(\)\+\(\@^^.//%%7;)
\+\)\@**.^^%}\=\^^"\**!\=\^^#\..!\!\..${\^^!\**"\..#}\=\..%\..$%.:8:*:8:
\@\({\**$//!**9}\@\){\<//9..%**!\[\>}\!\**'{{\)`/\+\)\@...**%\(\)\+\(\)%
\//$\..%\^^!\..$\+\)\?`\^\//$\^^%\_{\&\!\..:@^^:{%%.(.**$!\\;//:%@>./++.
@zr-tex8r
zr-tex8r / scframe.satyh
Created Dec 21, 2020
SATySFi: To make an animated GIF image of a spinning snowman
View scframe.satyh
% scframe.satyh
%
% Copyright (c) 2020 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 / yubaba.lua
Created Dec 12, 2020
Pandoc: Pandocで湯婆婆するLuaフィルタ
View yubaba.lua
-- yubaba.lua
--
-- @copyright 2020 Takayuki YATO (aka. "ZR")
-- GitHub: https://github.com/zr-tex8r
-- Twitter: @zr_tex8r
-- This program is distributed under the MIT License.
--
local filter_name = 'yubaba'
---------------------------------------- 設定
@zr-tex8r
zr-tex8r / lua-ul-japanese-1.tex
Created Oct 28, 2020
LaTeX: To combine ul-lua and LuaTeX-ja
View lua-ul-japanese-1.tex
% LuaLaTeX document
\documentclass[a6paper]{ltjsarticle}%for Japanese
\usepackage{lua-ul}
\begin{document}% mix of Japanese and English phrases
色は匂へど、
\underLine{散りぬるを(alas)、
「我が世」誰ぞ、“常”ならむ?
有為の奥山今日越えて(go on!)、
浅き夢見じwow yeah}酔ひもせず……。
\end{document}
@zr-tex8r
zr-tex8r / snowingsnowman.tex
Created Oct 17, 2020
LaTeX:TeXでつくる「雪降りナントカ」
View snowingsnowman.tex
% tcspingif -e pdflatex -t 32 -b 0.75 snowingsnowman.tex
\documentclass[margin=0pt]{standalone}
\usepackage[svgnames]{xcolor}
\usepackage{tikz,pgfmath,scsnowman}
\newcommand*{\cLet}{\pgfmathsetmacro}
%
\cLet{\vES}{40}
\cLet{\xE}{160}\cLet{\yE}{160}
%
\cLet{\vT}{\number\faStopTicks/\number\faAllTicks}