Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
🍣🦆

Takayuki YATO zr-tex8r

💭
🍣🦆
View GitHub Profile
@zr-tex8r
zr-tex8r / tcspingif.pl
Last active Sep 24, 2020
tcfaspinを利用した“回るLaTeX文書”からアニメGIF画像を生成する
View tcspingif.pl
#!/usr/bin/env perl
use v5.12;
my $program = "tcspingif";
my $version = "0.5.0";
my $mod_date = "2020/09/25";
use constant DEFAULT_TICKS => 32;
use constant CYCLE => 2; # seconds
my ($ticks, $in_file, $out_file);
my $engine = "pdflatex";
@zr-tex8r
zr-tex8r / japara.lua
Created Jul 20, 2019
Pandoc:Markdownを「ワープロ式」の段落表現で書きたい人のためのLuaフィルタ
View japara.lua
-- japara.lua
--
-- @copyright 2019 Takayuki YATO (aka. "ZR")
-- GitHub: https://github.com/zr-tex8r
-- Twitter: @zr_tex8r
-- This program is distributed under the MIT License.
--
local filter_name = 'japara'
---------------------------------------- 設定
@zr-tex8r
zr-tex8r / moon.tex
Created Sep 9, 2020
🦆見的(素敵🙃
View moon.tex
%#!pdflatex
\documentclass[margin=0]{standalone}
\usepackage{xcolor,tikz,pgfmath,scsnowman,tikzducks}
\usepackage{bxcoloremoji}
%
\definecolor{mydblue}{rgb}{0.10,0.20,0.50}
\definecolor{mysblue}{rgb}{0.20,0.50,1.00}
\definecolor{mybrown}{rgb}{0.60,0.30,0.00}
\definecolor{mykhaki}{rgb}{0.85,0.65,0.30}
\colorlet{myyellow}{yellow!70!brown}
@zr-tex8r
zr-tex8r / test-zrget.lua
Last active Aug 27, 2020
Lua: “zrget” module
View test-zrget.lua
zrget = require 'zrget'
zrget.download(
'https://raw.githubusercontent.com/zr-tex8r/scllmk/master/doc/logo.png',
'logo.png',
function (d) return d:sub(1, 4) == '\137PNG' end)
-- EOF
@zr-tex8r
zr-tex8r / snowmansday2020.tex
Last active Aug 9, 2020
LaTeX: Happy Snowman’s Day 2020
View snowmansday2020.tex
%#!pdflatex
\documentclass[margin=0pt]{standalone}
\usepackage[T1]{fontenc}
\usepackage{lmodern,pifont}
\usepackage{xcolor,scsnowman,tikzducks,pgfmath}
\newcommand*{\cLet}{\pgfmathsetmacro}
\setlength{\unitlength}{1bp}
\colorlet{bgcolor}{blue!30!green!10}
\pagecolor{bgcolor}
%
@zr-tex8r
zr-tex8r / defaults.yaml
Created Jul 27, 2020
Pandoc:節番号のスタイルを変えるやつ
View defaults.yaml
input-files:
- test.md
filters:
- numbering.lua
output-file: test_out.html
standalone: true
table-of-contents: true
toc-depth: 2
number-sections: true
@zr-tex8r
zr-tex8r / defaults.yaml
Last active Jul 27, 2020
Pandoc: 節番号はCSSで付ければいいんじゃないの
View defaults.yaml
input-files:
- test.md
output-file: test_out.html
standalone: true
css: test.css
table-of-contents: true
toc-depth: 2
# avoid pandoc's numbering...
number-sections: false
@zr-tex8r
zr-tex8r / Dockerfile
Created Jul 14, 2020
pandoc/latexをいじって日本語LaTeXできるようにしたやつ
View Dockerfile
FROM pandoc/latex:2.9.2
# Here 'update latex' is needed, because LaTeX in this
# container is of version <2020-02-02> PL2, and LuaTeX-ja
# cannot run with this version.
RUN tlmgr install \
bxjscls \
bxwareki \
everyhook \
ipaex \
@zr-tex8r
zr-tex8r / spaced-ruby.tex
Created Jul 11, 2020
expl3:スペース区切りでモノルビ指定
View spaced-ruby.tex
% https://oku.edu.mie-u.ac.jp/tex/mod/forum/discuss.php?d=2899&parent=16984
\documentclass[uplatex]{jsarticle}
\usepackage{xparse}
\usepackage{okumacro}
\ExplSyntaxOn %!!!!!!!!!!!!!!!!!!!!!!!! expl3 code BEGIN
\seq_new:N \l__sruby_body_seq
\seq_new:N \l__sruby_ruby_seq
@zr-tex8r
zr-tex8r / latex-emoji.lua
Last active Jul 4, 2020
Pandoc: To use color emoji font in convertion from Markdown to LaTeX
View latex-emoji.lua
-- latex-emoji.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 = 'latex-emoji'
---------------------------------------- helpers
You can’t perform that action at this time.