TeX Liveを使っている人向けの情報です。 ちなみに某科学類の計算機にはTeX Live(2013)がインストールされています。
ここで紹介しているパッケージは全てTeX Liveに入っているので、 特別な操作をしなくてもそのままコンパイルできます。
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use utf8; | |
use CGI; | |
use CGI::Carp qw(fatalsToBrowser); | |
use File::Copy; |
\linespace{\section{見出し}} % 自動で何行取るのか計算される | |
\linespace[3]{\section{見出し}} % 何行取るか手動で入れる |
type tree = | |
T of int * child list | |
and | |
child = unit -> tree | |
let rec mktree n = | |
let f i = fun () -> mktree i in | |
(T (n, [f (n * 2); f (n * 3); f (n * 5)])) | |
let less (T(v1, _)) (T(v2, _)) = v1 < v2 |
% need color package | |
\definecolor{solarized@base03}{HTML}{002B36} | |
\definecolor{solarized@base02}{HTML}{073642} | |
\definecolor{solarized@base01}{HTML}{586e75} | |
\definecolor{solarized@base00}{HTML}{657b83} | |
\definecolor{solarized@base0}{HTML}{839496} | |
\definecolor{solarized@base1}{HTML}{93a1a1} | |
\definecolor{solarized@base2}{HTML}{EEE8D5} | |
\definecolor{solarized@base3}{HTML}{FDF6E3} |
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
my $pdffile = $ARGV[0]; | |
my $output = $ARGV[1] ? $ARGV[1] : "."; | |
my ($pagesize) = `pdfinfo $pdffile` =~ m/Pages:\s* (\d+)/x; | |
my $tenth = int($pagesize / 10); |
type sym = Eps | Char of char | |
type reg = | |
Lit of char | |
| Alt of reg * reg | |
| Con of reg * reg | |
| Star of reg | |
module SymSet = Set.Make(struct | |
type t = sym |
type alphabet = | |
Char of char | |
| Choice of bit | |
| Log of bit | |
and | |
bit = bool | |
let one = true | |
let zero = false |
abstract CharArray(String) { | |
inline function new(x) { | |
this = x; | |
} | |
public function get() { return this; } | |
@:from public static inline function fromString(x : String) : CharArray { | |
return new CharArray(x); | |
} |
enum StreamCell<T> { | |
Cons(x : T, t : Stream<T>) : StreamCell<T>; | |
Nil : StreamCell<T>; | |
} | |
typedef Stream<T> = Void -> StreamCell<T> | |
class LazyList<T> { | |
private var body : Stream<T>; | |
private static var nil = function () : StreamCell<T> { | |
return Nil; |