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 / ixbm.sty
Last active June 15, 2016 12:15
LuaLaTeX で bm パッケージが動けばいいね
%
% ixbm.sty
%
%% package declaration
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{ixbm}[2016/06/15 v0.3]
\def\ixbm@pkgname{ixbm}
%% preparation
\RequirePackageWithOptions{bm}[2004/02/26]
@zr-tex8r
zr-tex8r / pxeveryshi.sty
Created May 15, 2012 16:13
A package to make everyshi compatible with tate-mode of pTeX.
% pxeveryshi.sty
\NeedsTeXFormat{pLaTeX2e}
\ProvidesPackage{pxeveryshi}
\RequirePackageWithOptions{everyshi}
%
\def\@EveryShipout@Output{%
\setbox8\vbox{%
\yoko
\@EveryShipout@Hook
\@EveryShipout@AtNextHook
@zr-tex8r
zr-tex8r / hyperref-lpfix.sty
Created May 31, 2012 13:55
Patch to correct non-e-TeX support of hyperref
% hyperref-lpfix.sty
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{hyperref-lpfix}[2012/05/30 v0.2]
\RequirePackage{hopatch}
\def\bxqhl@pkgname{hyperref-lpfix}
\def\reserved@a{%
\begingroup
\count@\HOpatch@counter\relax
\advance\count@\ltx@one\relax
\edef\x{\endgroup
@zr-tex8r
zr-tex8r / darkdawn.pl
Created June 16, 2012 03:21
フォントの暗黒度を比較してみる
use strict;
use utf8;
use Data::Dump 'dump';
my $progname = "darkdawn";
#
# List the name of the fonts to be inspected.
# (Use font family names; '/B' means bold version.)
@ARGV = split(m/\n/, <<'END') if (!@ARGV);
GT2000-01
MigMix 1M/B
@zr-tex8r
zr-tex8r / example-perltex.tex
Created June 17, 2012 02:51
Value passing between Perl and LaTeX in PerlTeX
\documentclass{article}
\usepackage{perltex}
\begin{document}
\perldo{
$pvalue = 5;
}
\newcounter{tvalue}
\setcounter{tvalue}{6}
@zr-tex8r
zr-tex8r / goshutex.sty
Created June 17, 2012 05:49
A version of python.sty that runs not Python but Gauche
%% This is a modified version of python.sty by Martin R. Ehmsen.
%% Licensed under GPL v2 or later.
%% You can obtain the original version at:
%% http://mirror.ctan.org/macros/latex/contrib/python.zip
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
\ProvidesPackage{goshutex}[2012/06/17 v0.1 Gauche in LaTeX]
\newwrite\@out
\newwrite\@module
@zr-tex8r
zr-tex8r / sample.tex
Created June 19, 2012 13:48
A sample code of something called "LISP on TeX"
\documentclass{article}
\usepackage[scale=0.8]{geometry}
\usepackage{lisp}
\begin{document}
%% An expression equivalent to
% (let ((two (lambda (s) (lambda (z) (s (s z))))))
% (let ((next (lambda (x) (cons "*" x))))
% (((two (two two)) next) '())))
% in Scheme. It calculates (2^2)^2 and makes an list consisting
% of as many "*"'s as the value (i.e. 16).
@zr-tex8r
zr-tex8r / example1.tex
Created June 24, 2012 14:40
Something about subcommand & object packages
\documentclass{article}
\usepackage{subcommand}
\begin{document}
\def\mycmd{!?}
\subcommand\mycmd[:foo]#1{\textit{foo}(#1)}
\subcommand\mycmd[:fool]#1{\textit{fool}(#1)}
\mycmd:foolish % (\mycmd:fool{i}) + (sh)
\mycmd:footware % (\mycmd:foo{t}) + (ware)
@zr-tex8r
zr-tex8r / zrotfdump.pl
Last active October 6, 2015 11:47
A program to show the mapping between GIDs and glyph names for a given TrueType font
use strict;
my $prog_name = "zrotfdump";
my ($mode, $smode, $font_file);
my @mglist = qw(
.notdef .null nonmarkingreturn space exclam quotedbl numbersign
dollar percent ampersand quotesingle parenleft parenright
asterisk plus comma hyphen period slash zero one two three four
five six seven eight nine colon semicolon less equal greater
question at A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
@zr-tex8r
zr-tex8r / bxpgfooacc.sty
Created June 27, 2012 15:55
To create (expandable) getter in "OOP in LaTeX" with the PGF oo module
%
% bxpgfooacc.sty
%
%% package declaration
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{bxpgfooacc}[2012/06/30]
%% preparation
\def\bxqpu@pkgname{bxpgfooacc}
\def\bxqpu@error{\PackageError\bxqpu@pkgname}