-
document
: config list?→ block-text → block-text → document
document
?:cfgs from to で全ての宛先面の印刷からなる文書を出力する。cfgs には設定項目のリストを指定し、既定値は空リスト(つまり既定の設定を使う)である。
from は高々1個の+address-from
コマンドのみからなるブロックテキストで、この+address-from
の出力は全てのページ(宛先面)に共通して配置される。
% hanoi.satyh: Tower of Hanoi with graphics | |
% | |
% Copyright (c) 2022 Takayuki YATO (aka. "ZR") | |
% GitHub: https://github.com/zr-tex8r | |
% Twitter: @zr_tex8r | |
% Distributed under the MIT License. | |
%=========================================================== module Hanoi | |
module Hanoi : sig |
let text-box-board w h ib = | |
let (tw, th, _) = get-natural-metrics ib in | |
let gtxt = draw-text ((w -' tw) *' 0.5, (h -' th) *' 0.5) ib in | |
inline-graphics w h 0pt (fun p -> [shift-graphics p gtxt]) | |
let text-board ctx w h fname fsize str = | |
let ctx = ctx |> (set-font-size fsize) | |
|> (set-font Latin (fname, 1., 0.)) in | |
let ib = read-inline ctx (embed-string str) in | |
text-box-board w h ib |
let_=`888888888888888888888888888888888888888888888888888888888888888888888 | |
~#;}-\$"@`let([(-*);(-/)],nj,(^/)::(&/+-'+.>.*:/),(&-),(!))=((*)::[(/)],(!) | |
,[`@.]='}#*?;@=#\:<\=$<"|&^?"}~{?;ve;;`;`).':_,,`],[],8)let(*)o(*/)=((o)):: | |
(*/)let([(//);(/-)],[_;(^-);(&/.''<);rec-;(^--)],(/<+->),(/),_::(^*-)::_)=( | |
[(!)-(!);(!)-/(!)],(^/)*`ドド`*`スコ`*`スコ`*`スコ`*(&-),(!)-*8,(let-rec(>) | |
`@`i=i|(-)r=(-)^(r)in(>)),(^/)*`ラブ注入♡`*[`\-,::]${'<@,_>:~}"#_#"(`])let | |
(-:)(*<*+-)(*>-)=(*<*+-)-((*<*+-)-/(*>-)-*(*>-))let-rec(!->)|8=(^-)|_=(^--) | |
let((/--)::[(/->);(/.>);(/.-)],ov)=([(/-)+(/-);(!)>>(/-);(!)-(/-);(/<+->)-* | |
(/<+->)],{,'=~[__]:?(})let((!),(/.--)::[(/.*-);(/.->)],_)=(nj,[(/.>)-*(/.>) | |
-*(/.>)-*(/.>)-*(/.>);((/-)<<((/->)-*(!)-(/-)))-(/-);(!)-*((/--)-*8+(/-))<< |
% Compile this file with 'pdftex' command! | |
%% \DequeNew\DEQ : Makes a new deque \DEQ. | |
%% \DequePushBack\DEQ{<text>} : Pushes-back <text> to \DEQ. | |
%% \DequePushFront\DEQ{<text>} : Pushes-front <text> to \DEQ. | |
%% \DequePopBack\DEQ : Pops-back from \DEQ and sets the popped text | |
% to \DequePopped. | |
%% \DequePopFront\DEQ : Pops-front from \DEQ and sets the popped text | |
% to \DequePopped. |
\input sclatex | |
\dump |
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{ |
%#!latex | |
% 0-2-4-6-8 | |
% 0######### How many moves are | |
% :# # # # needed to go | |
% 2# ## ## from (1,1) to (7,1) ? | |
% :### # # | |
% 4# # # | |
% :######### | |
\makeatletter | |
\newcount\my@x \newcount\my@y \newcount\my@m |
% | |
% bxhanoi.sty : The "Tower of Hanoi" puzzle shown in graphics | |
% | |
%% package declaration | |
\NeedsTeXFormat{LaTeX2e} | |
\ProvidesPackage{bxhanoi}[2012/02/01] | |
%% variables | |
\newcount\bxhp@step |