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 / Homuhomu.scala
Created December 17, 2011 22:43 — forked from yuroyoro/Home2Lang.scala
プログラミング言語「ほむほむ」(Grass 同型版)
import java.io.File
import scala.io.Source
import scala.util.matching.Regex
import scala.util.parsing.combinator._
import scala.util.parsing.input.{Position, NoPosition}
sealed abstract class Insn extends ( CED => CED ){
val pos:Position
}
case class App( m:Int, n:Int, pos:Position ) extends Insn{
@zr-tex8r
zr-tex8r / localvalues.tex
Created December 15, 2012 10:17 — forked from anonymous/gist:4292489
TeX: 値の局所化を使ってマクロをネスト可能にする
% 敢えて ToL 文書
\documentclass[a4paper]{jsarticle}
\begin{document}
\makeatletter %!!!!!!!!!!!!!!!!!!!!!!!!!
% 例のアレ
\def\favor#1#2{%
\def\xx@person{#1}%
\def\xx@item{#2}%
\documentclass[a4paper,twocolumn]{article}
\begin{document}
\begin{itemize}
\item Lorem ipsum dolor sit amet, consectetur adipisicing elit,
sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
\item \verb|\paperwidth| = \the\paperwidth.
\item \verb|\textwidth| = \the\textwidth.
\item \verb|\columnwidth| = \the\columnwidth.
\item \rule[.5ex]{\columnwidth}{.8pt}
@zr-tex8r
zr-tex8r / taple.tex
Last active December 10, 2015 19:39 — forked from y-yu/taple.tex
\documentclass{jarticle}
\makeatletter
% registers are ALWAYS allocated globally (darn!)
\newcount\@fuck@i
\newcount\@fuck@ii
\def\tuple#1{%
\begingroup
@zr-tex8r
zr-tex8r / tate.tex
Last active December 11, 2015 19:18 — forked from y-yu/tate.tex
\documentclass[a4paper]{article}
\usepackage{fontspec}
\begin{document}
\newfontfamily\vhiraginoA[Vertical=RotatedGlyphs]{ヒラギノ明朝 Pro W3}
\newfontfamily\vhiraginoB[Script=CJK,Vertical=RotatedGlyphs]{ヒラギノ明朝 Pro W3}
\rotatebox{-90}{\vhiraginoA 漢字alpha漢字}
\rotatebox{-90}{\vhiraginoB 漢字alpha漢字}
\end{document}
@zr-tex8r
zr-tex8r / tascmac.sty
Last active December 12, 2015 07:48 — forked from anonymous/tascmac.sty
% This is a modified version of tascmac.sty, provided as part of
% the pTeX distribution originally authored by ASCII MEDIA WORKS Inc.
% The information of the original file is given below:
%---------------------------------------
% "tascmac" document style option for tate gumi.
%
% Copyright (C) by 1993, ASCII Corporation & Impress Corporation.
%
% 2006/07/14 (ST): itembox, screen environment bug fix.
% 2002/04/01 (KN): ASCII logo macros
% pxpgfmark.sty
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{pxpgfmark}[2013/02/18 v0.1]
\@ifpackageloaded{pgfcore}{}{%else
\PackageError{pxpgfmark}{Package 'pgfcore' must be loaded}\@ehc}
\def\pxqmk@tempa{pgfsys-dvipdfmx.def}
\ifx\pgfsysdriver\pxqmk@tempa
\@tempswatrue
\ifx\pdfsavepos\@undefined \@tempswafalse \fi
\ifx\pdflastxpos\@undefined \@tempswafalse \fi
@zr-tex8r
zr-tex8r / pxtatescale.sty
Last active January 21, 2017 12:39 — forked from anonymous/pxtatescale.sty
例のscaleboxなアレ
% pxtatescale.sty
\NeedsTeXFormat{pLaTeX2e}
\ProvidesPackage{pxtatescale}[2013/03/25 v0.2]
\def\pxqtg@pkgname{pxtatescale}
\@ifpackageloaded{graphics}{}{%else
\PackageError\pxqtg@pkgname{Package 'graphics' not loaded}\@ehc}
\begingroup
\def\pxqtg@try@patch#1#2#3{%
\def\pxqtg@temp{#2}\ifx#1\pxqtg@temp
\gdef#1{#3}%
\documentclass[a4paper]{jsarticle}
\newcount\xxCntA
\newcount\xxCntB
\newcount\xxCntC
%% 例のMJDなアレ
\def\calcJulian#1#2#3#4{%
\xxCntA=#2\relax \xxCntB=#3\relax
\ifnum\xxCntA<1 \xxCntA=1 \fi
\ifnum\xxCntB<1 \xxCntB=1 \fi
\ifnum\xxCntB<3 \advance\xxCntB12 \advance\xxCntA-1 \fi
\documentclass[a4paper,CJK]{bxjsarticle}
\usepackage[whole,autotilde]{bxcjkjatype}
\newcommand*\Pkg[1]{\textsf{#1}}
\newcommand*\Env[1]{\texttt{#1}}
\newcommand*\Opt[1]{\texttt{#1}}
\begin{document}
%---------------------------------------
\title{CJK~パッケージで今度こそ日本語する件}
\author{某~ZR}
\date{2013~年~8~月~2~日}