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 / okashi.lua
Created January 26, 2020 05:55
Lua:単価が異なるお菓子をどういう組み合わせで買えば目標の合計値になるか問題
function okashi(total, prices)
local count, solved = solve(total, prices)
print_solution(count, solved, total, prices)
end
function print_solution(count, solved, total, prices)
if solved then
for i = 1, #prices do
io.stdout:write(("%d円のが%d個"):format(prices[i], count[i]))
if i ~= #prices then io.stdout:write("、") end
@zr-tex8r
zr-tex8r / okashi.tex
Last active May 26, 2020 06:28
expl3:単価が異なるお菓子をどういう組み合わせで買えば目標の合計値になるか問題
% upLaTeX文書
\documentclass[uplatex,a4paper]{jsarticle}
\usepackage{xparse}
\ExplSyntaxOn
\int_new:N \l_xx_total_int
\clist_new:N \l_xx_price_clist
\prop_new:N \l_xx_count_prop
\bool_new:N \l_xx_solved_bool
\int_new:N \l_xx_instid_int
@zr-tex8r
zr-tex8r / ascmac.map
Created January 13, 2020 14:38
LaTeX:ascmacでType1したい
ascgrp TeX-ascgrp <ascgrp.pfb
ascii10 TeX-ascii10 <ascii10.pfb
ascii36 TeX-ascii36 <ascii36.pfb
@zr-tex8r
zr-tex8r / nyc2020.tex
Created January 1, 2020 04:14
LaTeX: New year post card of the year 2020
\documentclass{article}
\usepackage[papersize={100mm,148mm},margin=0cm,
noheadfoot]{geometry}
\usepackage{luatexja-fontspec}
\usepackage{amsmath,tikz,graphicx,xcolor,xparse,tikzducks}
\usetikzlibrary{calc}
\newfontface{\fNotoSC}{NotoSansCherokee-Bold.ttf}
\newfontface{\fNotoS}{NotoSans-ExtraBoldItalic.ttf}
\newfontface{\fAdv}{texgyreadventor-regular.otf}
\newfontface{\fNishiki}{Nishiki-teki.ttf}
@zr-tex8r
zr-tex8r / ixquickmacro.sty
Created December 30, 2019 21:58
LaTeX: to define a macro that needs only one expansion to get the result
%%
%% This is file 'ixquickmacro.sty'.
%%
%% Copyright (c) 2019 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 / noujolais.lua
Created December 20, 2019 14:15
Pandoc:ヌジョレーボーボーするLuaフィルタ
-- noujolais.lua
--
-- @copyright 2019 Takayuki YATO (aka. "ZR")
-- GitHub: https://github.com/zr-tex8r
-- Twitter: @zr_tex8r
-- This program is distributed under the MIT License.
--
---------------------------------------- ヌジョレーボーボー
-- 準備
@zr-tex8r
zr-tex8r / tl-scheme-basic.txt
Created November 23, 2019 04:09
List of TeXLive-packages contained in the scheme-basic
- scheme-basic
- collection-basic
- collection-latex
- texlive.infra
- amsfonts
amsfonts:texmf-dist/tex/latex/amsfonts/amsfonts.sty
amsfonts:texmf-dist/tex/latex/amsfonts/amssymb.sty
amsfonts:texmf-dist/tex/latex/amsfonts/cmmib57.sty
amsfonts:texmf-dist/tex/latex/amsfonts/eucal.sty
amsfonts:texmf-dist/tex/latex/amsfonts/eufrak.sty
@zr-tex8r
zr-tex8r / pxchfon.cfg
Created November 12, 2019 06:13
LaTeX:pxchfonのカスタムプリセット定義
% カスタムのプリセットの定義をpxchfon.cfgという名前のファイルに
% 気記述して, TeXから見える場所に配置する.
% ※pxchfon 1.6版が必要.
% 単ウェイト設定の例
\pxchfonDeclareOneWeightPreset{soeikakupoptai}
{:0:hgrpp1.ttc}% 明朝・単ウェイト
{:0:hgrpp1.ttc}% ゴシック・単ウェイト
% 多ウェイト設定の例
@zr-tex8r
zr-tex8r / 1satysfi.satyh
Created November 10, 2019 15:41
1から始めるSATySFI「1SATySFi」
% 1satysfi.satyh: A kiritampo-oriented md-docuemnt class for SATySFi
%
% 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
@zr-tex8r
zr-tex8r / texadvent.md
Last active December 25, 2023 13:18
TeX & LaTeX Advent Calendar 実績

TeX & LaTeX Advent Calendar

「とっておきの TeX/LaTeX ネタを皆で持ち寄って楽しむ」 というコンセプトの技術系アドベントカレンダーです。

2012 年から始まっており、以降毎年開催されています。

最新のやつ