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 / moon.tex
Created September 9, 2020 12:44
お🦆見的⛄(素敵🙃)
%#!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 / snowmansday2020.tex
Last active August 9, 2020 10:03
LaTeX: Happy Snowman’s Day 2020
%#!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 / tcspingif.pl
Last active August 9, 2023 05:12
tcfaspinを利用した“回るLaTeX文書”からアニメGIF画像を生成する
#!/usr/bin/env perl
use v5.12;
my $program = "tcspingif";
my $version = "0.8.1";
my $mod_date = "2023/08/08";
use constant DEFAULT_TICKS => 32;
use constant CYCLE => 2; # seconds
my ($ticks, $in_file, $out_file);
my $engine = "pdflatex";
@zr-tex8r
zr-tex8r / defaults.yaml
Created July 27, 2020 07:13
Pandoc:節番号のスタイルを変えるやつ
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 July 27, 2020 06:40
Pandoc: 節番号はCSSで付ければいいんじゃないの
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 July 14, 2020 05:21
pandoc/latexをいじって日本語LaTeXできるようにしたやつ
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 July 11, 2020 13:04
expl3:スペース区切りでモノルビ指定
% 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 January 7, 2023 03:57
Pandoc: To use color emoji font in convertion from Markdown to LaTeX
-- 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
@zr-tex8r
zr-tex8r / 00do.sh
Created May 9, 2020 14:44
An example of pandoc_remove_codelisting_filter
#!/bin/bash
pandoc --filter=pandoc-crossref --filter=pandoc_remove_codelisting_filter -N test.md -s -o test-output.tex
@zr-tex8r
zr-tex8r / filter.lua
Last active February 22, 2020 06:02
Pandoc:新しいPandocでCSVをpandoc.readするテスト
function CodeBlock(block)
if block.classes:includes("csvin", 1) then
return pandoc.read(block.text, "csv").blocks[1]
end
end