Skip to content

Instantly share code, notes, and snippets.

@zr-tex8r
zr-tex8r / test-directunicode-full.tex
Created Apr 8, 2017
LaTeX: pLaTeX+pxchfonで源のアレしてみる件
View test-directunicode-full.tex
% upLaTeX文書, 文字コードはUTF-8
\documentclass[uplatex,a4paper]{jsarticle}
% 源ノアレはアレなので 'directunicode*' が必要
\usepackage[directunicode*,noalphabet]{pxchfon}[2017/04/08]% v0.9
\usepackage[english]{babel}
\usepackage[main=japanese]{pxbabel}
% TTC版の源ノアレを使う
\setminchofont [0]{SourceHanSerif-Regular.ttc}
\setkoreanminchofont [1]{SourceHanSerif-Regular.ttc}
\setschineseminchofont[2]{SourceHanSerif-Regular.ttc}
@zr-tex8r
zr-tex8r / kana-mix-tate.tex
Created Apr 16, 2017
LaTeX:LuaLaTeXだとかな混植が簡単にできて最高だという件
View kana-mix-tate.tex
% LuaLaTeX文書,UTF-8
% jlreqクラス・縦組の例
\documentclass[lualatex,tate,paper=a6,twocolumn]{jlreq}
\usepackage{luatexja-fontspec}
\setmainjfont[
YokoFeatures={JFM=jlreq}, %jlreqのJFMを
TateFeatures={JFM=jlreqv}, %維持する
AltFont={% 代替フォント設定
{Range="3040-"30FF, Font=IPAexMincho},
{Range={`☃,`⛄}, Font=SourceHanSans}},
@zr-tex8r
zr-tex8r / README.md
Last active Mar 27, 2019
LaTeX: To make blinking text (if you dare)
View README.md

bxblink Package

LaTeX: To make blinking text (if you dare)

System requirement

  • TeX format: LaTeX.
  • TeX engine: Anything.
  • DVI driver: dvips / dvipdfmx / pdfTeX / XeTeX.
@zr-tex8r
zr-tex8r / newera.tex
Created Mar 26, 2019
LaTeX:BXglyphwikiで新元号するかもしれないやつ
View newera.tex
%#!lualatex
\documentclass[margin=2bp]{standalone}
\usepackage[svgnames]{xcolor}
\usepackage{tikz,tikzducks,luatexja}
\usepackage[cache=5]{bxglyphwiki}
\definecolor{myframe}{rgb}{0.65,0.50,0.35}
\begin{document}
\begin{tikzpicture}[x=1bp,y=1bp]
\useasboundingbox (0,0) rectangle (140,140);
\draw[myframe, line width=6pt, rounded corners=2pt]
@zr-tex8r
zr-tex8r / reviewbreakall.tex
Last active Mar 15, 2019
LaTeX: \reviewbreakall のようなナニカ
View reviewbreakall.tex
\documentclass{article}
\makeatletter %!!!!!!!!!!!!!!!!!!!!!!!!! TeX code BEGIN
\newif\ifreview@ba@break
\def\review@ba@end{\review@ba@end@}
\DeclareRobustCommand{\reviewbreakall}[1]{%
\begingroup
\review@ba@breakfalse
\review@break@all@a#1\review@ba@end
\endgroup
}
@zr-tex8r
zr-tex8r / test.enc
Created Feb 21, 2019
TeX: IPAex明朝で欧文TFMしてdvipdfmxするとアレ
View test.enc
/test [
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
/zero /one /two /three /four /five /six /seven
/eight /nine /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
@zr-tex8r
zr-tex8r / zrmakecmap.lua
Last active Feb 18, 2019
To make CMap files from OpenType font files using texlua
View zrmakecmap.lua
-- zrmakecmap.lua
prog_name = "zrmakecmap"
version = "0.3"
mod_date = "2015/10/09"
verbose = false
sort = false
inencoding = "utf16"
fwid = true
---------------------------------------- preparations
filename, fontname, outname, jis_map = nil
@zr-tex8r
zr-tex8r / test-bad.tex
Created Feb 2, 2019
TeX言語:表組み(alignment)中でチョット複雑なコードを動かすとアレ
View test-bad.tex
% This code gives an error.
\documentclass[a4paper]{article}
\makeatletter %!!!!!!!!!!!!!!!!!!!!!!!!! TeX code BEGIN
\newcount\xx@k \newcount\xx@n
% \EvenOddTable{<max-number>}
\newcommand*\EvenOddTable[1]{%
\global\xx@k=\z@ \global\xx@n=#1\relax
\begin{tabular}{cc}%
Even&Odd\\\hline
\@whilenum{\xx@k<\xx@n}\do{%
@zr-tex8r
zr-tex8r / tckarakasa.sty
Created Feb 5, 2015
LaTeX: Paragraph formatting like “karakasa-renban”
View tckarakasa.sty
% tckarakasa.sty
%% package declaration
\NeedsTeXFormat{pLaTeX2e}
\ProvidesPackage{tckarakasa}[2015/02/05 v0.1]
%% preparations
\def\tckk@pkgname{tckarakasa}
\def\tckk@error{\PackageError\tckk@pkgname}
\providecommand\bxDebug[1]{}
@zr-tex8r
zr-tex8r / Dockerfile
Last active Jan 30, 2019
Docker container that can do SATySFi
View Dockerfile
FROM ocaml/opam2:debian-9-ocaml-4.06.0
USER root
RUN apt update && apt install -y \
build-essential \
autoconf \
git \
m4 \
unzip \
You can’t perform that action at this time.