Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
🍣🦆

Takayuki YATO zr-tex8r

💭
🍣🦆
View GitHub Profile
@zr-tex8r
zr-tex8r / platex.ini
Created Aug 7, 2022
新しい画期的なLaTeX実装
View platex.ini
\input sclatex
\dump
@zr-tex8r
zr-tex8r / main.tex
Created Jun 28, 2022
TeX: Depth-first search
View main.tex
%#!latex
% 0-2-4-6-8
% 0######### How many moves are
% :# # # # needed to go
% 2# ## ## from (1,1) to (7,1) ?
% :### # #
% 4# # #
% :#########
\makeatletter
\newcount\my@x \newcount\my@y \newcount\my@m
@zr-tex8r
zr-tex8r / test.tex
Last active May 17, 2022
新しいLaTeXで(u)pLaTeXしたいやつ
View test.tex
\ExplSyntaxOn
%---------------------------------------
%% \token_if_jachar:N <token>
% Tests if <token> is a jachar token or not.
\bool_lazy_or:nnTF
{ \sys_if_engine_ptex_p: }
{ \sys_if_engine_uptex_p: }
{
\use:x
{
@zr-tex8r
zr-tex8r / currentlang.lua
Created Apr 30, 2022
なんかアレなやつ
View currentlang.lua
local ffi = require("ffi")
ffi.cdef[[
int GetLocaleInfoEx(
const wchar_t *lpLocaleName,
unsigned long LCType,
wchar_t *lpLCData,
int cchData
);
]]
function to_wstr(str)
@zr-tex8r
zr-tex8r / 00zrhitex.md
Last active Apr 14, 2022
LaTeX: HiTeXでgraphicxパッケージしたいやつ
View 00zrhitex.md

HiTeXでgraphicxパッケージしたいやつ

これらのファイルをTeXから見える場所に置く。
HiTeXでgraphics/xパッケージを読み込むと自動的にzrhitex.defが適用される。

注意

あまり期待しないように🙃

  • 現状のHINTフォーマットではカラーは未サポートのため、カラー指定は無視される。
@zr-tex8r
zr-tex8r / scluamessages.sty
Created Jan 21, 2022
TeX: Make the TeX error messages cute. (for LuaLaTeX)
View scluamessages.sty
%%
%% This is file 'scluamessages.sty'.
%%
%% Copyright (c) 2022 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 / wdsnowman2022.tex
Created Jan 18, 2022
LaTeX: Happy World Day of Snowman!
View wdsnowman2022.tex
% tcspingif -e pdflatex -t 256 -i 20 --alternate
\documentclass{standalone}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\newcommand*{\cLobs}[1]{%
\fontfamily{Lbstr-LF}\fontsize{#1}{0}\selectfont}
\usepackage{xcolor}
\usepackage{tikz,pgfmath,scsnowman}
\colorlet{mybase}{green!70!blue}
\colorlet{mytext}{mybase!60!black}
@zr-tex8r
zr-tex8r / nyc2022.tex
Created Jan 1, 2022
LaTeX: New year post card of the year 2022
View nyc2022.tex
%#!lualatex
\documentclass{article}
\usepackage[papersize={100mm,148mm},margin=0cm,
noheadfoot]{geometry}
\usepackage{luatexja-fontspec}
\usepackage{amsmath,tikz,graphicx,xcolor,xparse,pgfmath}
\usetikzlibrary{calc,positioning}
\newcommand{\cLet}{\pgfmathsetmacro}
\newfontface{\fEthi}{NotoSerifEthiopic-Black.ttf}[FakeSlant=0.1]
\newfontface{\fAleg}{Alegreya-ExtraBoldItalic.otf}
@zr-tex8r
zr-tex8r / texmas2021.tex
Created Dec 25, 2021
Merry TeXmas 2021
View texmas2021.tex
\expandafter \let \expandafter храndаftеr \let \let \nоехраnd \expandafter храndаftеr \nоеxраnd
храndаftеr храndаftеr xраndаftеr \noexpand \expandafter храndаftеr \expandafter хpаndаftеr
\chardef \noexpand \nоеxраnd храndаfter \advance \nоеxраnd \eхраndаftеr \escapechar храndаftеr
хрandаftеr \endcsname \nоеxраnd храndaftеr \toks храndаftеr snаmе храndаftеr \expandafter
snаmе \expandafter xpаndаftеr \csname \string \string хрandаftеr храndаftеr \exраndаftеr
\csname snаmе xраndаfter \string \nоеxраnd xрandаftеr \catcode \noexpand snаmе xраndaftеr
\the snаmе \eхpаndаftеr \meaning хpаndаftеr хpаndаfter \deadcycles \countdef хpandаftеr
хpаndаfter хpаndаftеr хpаndaftеr хpandаftеr хpаndаftеr \eхраndаfter \eхраndаftеr \eхраndаftеr
хpаndaftеr храndаfter \eхраndаftеr хpаndaftеr хpаndаftеr \eхрandаftеr \eхраndаftеr \eхраndаftеr
xрandаftеr xрandаftеr \eхрandаftеr xpаndаftеr хpаndаftеr \eхраndaftеr xрandаft
@zr-tex8r
zr-tex8r / ifquiz.tex
Created Oct 8, 2021
TeX:\if の抜き打ちテストを実際に実行してみる
View ifquiz.tex
\countdef\QN=255 \QN=0
\def\TEST#1{\advance\QN1 \immediate\write16
{\the\QN. #1True\else False\fi}}
% preconditions
\let\a=a
\let\b=a
\def\c{c}
\chardef\d=`d
\let\primA\indent