Skip to content

Instantly share code, notes, and snippets.

View zr-tex8r's full-sized avatar
💭
🍣🦆⛄

Takayuki YATO zr-tex8r

💭
🍣🦆⛄
View GitHub Profile
@zr-tex8r
zr-tex8r / texmas2024.md
Created December 25, 2024 09:03
TeX: Merry TeXmas 2024

Compile with:

pdflatex "\catcode37=9 \input texmas2024.saty"

@zr-tex8r
zr-tex8r / scmuffler-README.md
Created December 8, 2024 09:23
Typst:ゆきだるま☃のマフラーに色を付ける

scmuffler

Typst:ゆきだるま☃のマフラーに色を付ける

パッケージ読込

[「原ノ味明朝」][haranoaji]フォントがTypstで使用可能である必要がある。

@zr-tex8r
zr-tex8r / scspeedy.lua
Created December 7, 2024 15:09
TeX: LuaLaTeXを爆速にする設定ファイル(※ただし画期的)
-- This is file 'scspeddy.lua'.
local module_name = 'scspeedy'
local version = '2024-12-08'
-- the module
scspeedy = {}
----------------------------------------
-- logging
local function make_message(...)
return module_name..": "..table.concat({...}, ": ")
@zr-tex8r
zr-tex8r / tcmathbold.sty
Created October 14, 2024 07:10
LaTeX: 太字数式(\boldmath)の太字(\mathbf)を極太ウェイトにする
%% This is file 'tcmathbold.sty'.
%% Copyright (c) 024 Takayuki YATO (aka. "ZR")
%% This package is distributed under the MIT License.
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{tcmathbold}[2024/10/10 v0.1]
% とりあえず, "極太"ウェイトの書体として
% "Crimson Pro Black"のフォントを借りることにする.
% Crimson Pro Black (立体) = OT1/CrimsonPro-TLF/ub/n
% Crimson Pro Black (斜体) = OT1/CrimsonPro-TLF/ub/it
@zr-tex8r
zr-tex8r / tcnicenumber.sty
Last active August 28, 2024 14:48
tcnicenumber: 素敵でかつ涼しそうなLaTeXのカウンタ出力命令🦆⛄
%%
%% This is file 'tcnicenumber.sty'.
%%
%% Copyright (c) 2024 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 / ZRJCode.pm
Last active July 20, 2024 11:42
Perl: ZRJCode module: conversion between various Japanese kanji codes
# ZRJCode.pm
#
#### start package
package ZRJCode;
use strict qw( refs vars subs );
our $VERSION = 0.002_03;
our $mod_date = "2024/07/20";
require Exporter;
our @ISA = qw( Exporter );
@zr-tex8r
zr-tex8r / bxjaref-README.md
Last active May 26, 2024 05:16
bxjaref: Typstの参照の出力を日本語の習慣に合わせて調整する

bxjaref

Typst:参照の出力を日本語の習慣に合わせて調整する

基本的な使い方

全項目importの形でパッケージを読み込む。

@zr-tex8r
zr-tex8r / bxbibwrite-README.md
Last active December 12, 2024 08:13
bxbibwrite:Typstで文献リストを直書きするやつ

bxbibwrite

Typst:文献リストを直書きするやつ

基本的な使い方

全項目importの形でパッケージを読み込む。

@zr-tex8r
zr-tex8r / examplezr.typ
Created April 22, 2024 13:08
Linguistics example sentence in Typst🙃
#let use-examples(body) = {
show figure.where(kind: "example"): it => {
assert(it.body.func() == metadata)
// here implicit context is given by show rule
let number = numbering(it.numbering, ..it.counter.get())
grid(
columns: (auto, 1fr),
rows: (auto, auto),
column-gutter: 1em,
row-gutter: 1em,
@zr-tex8r
zr-tex8r / bxbango-README.md
Last active May 26, 2024 05:16
Typst:日本語用にnumberingを拡張したやつ

bxbango

Typst:日本語用にnumberingを拡張したやつ

Typstのnumbering関数の拡張版にあたるja-numbering関数を提供する。この関数は、標準のnumberingがサポートするカウンタスタイルに加えて、日本でよく使われる他のカウンタスタイル(例えば丸数字“①、②、③……”など)をサポートする。

同様の機能をもつ既存パッケージとして[numberingx][]があるが、numberingxが独自の書式文字列の文法を採用しているのに対して、本パッケージはnumbering関数の書式文字列の文法をそのまま踏襲している。すなわち、書式文字列内ではカウンタスタイルの部分は特定のUnicode文字1つ(例えば“①”)で表される。