4"5:4'*W։ൃਐలͷ‫ݱ‬ঢ়ใࠂ೥݄೔

4"5:4'*$POG

5BLBTIJ4VXB@gfngfn@bd_gfngfn

֓ཁओʹWͷ։ൃͷਐలใࠂͰ͢w ‫ػޠݴͨ͠૷࣮ʹط‬ೳɿr ۩৅ߏจͷࡉ͔͍มߋr ྻଟ૬ʹΑΔϥϕϧ͖ͭΦϓγϣϯҾ਺ͱϨίʔυr 'JOHNPEVMFTʹ‫ͮ͘ج‬ϞδϡʔϧγεςϜw ଟஈ֊‫ͱࢉܭ‬΋‫ڞ‬ଘՄೳr ਺ࣜίϚϯυͷ৽͍͠ҙຯ࿦w Α͏΍͘਺͕ࣜςΩετग़ྗϞʔυʹ΋ରԠw ͍ۙ͏ͪʢࠓ೥த͘Β͍ʣʹͰ͖ͦ͏ͳ͜ͱɿr ύοέʔδγεςϜͷ࣮૷r ॎॻ͖αϙʔτͷͨΊͷҰൠԽr ϑΥϯτσίʔμɾΤϯίʔμͷ੾ସ͑ɾ‫ػ‬ೳ֦ॆ໨࣍w۩৅ߏจͳͲͷࡉ͔͍มߋwϥϕϧ͖ͭΦϓγϣϯҾ਺ͱϨίʔυ࣮૷ࡁw'JOHNPEVMFTʹΑΔϞδϡʔϧγεςϜw਺ࣜίϚϯυͷ৽͍͠ҙຯ࿦wύοέʔδγεςϜ͍ۙ͏ͪʹ} ࣮૷༧ఆwॎॻ͖αϙʔτͷͨΊͷҰൠԽw·ͱΊ۩৅ߏจͷࡉ͔͍มߋ
module Tree :> sigtype tree ‘aval dfs ‘a : tree ‘a -> list ‘a…
end = structtype tree ‘a =| Empty| Node of ‘a * tree ‘a * tree ‘aval rec dfs t =match t with| Empty -> []| Node(x, t1, t2) ->List.concat[ [ x ], dfs t1, dfs t2 ]
end
…
end
val inline ctx \emph it =let ctx = … inread-inline ctx itw ‫ܕ‬Ҿ਺͸‫ޙ‬ஔr ྫɿlist intɼoption lengthw ίϚϯυ‫ܕ‬΋Ҿ਺Λ‫ޙ‬ஔr ྫɿinline [int, inline-text]

w ‫ܕ‬ม਺ͷશশྔԽͷ໌ࣔw τοϓϨϕϧͷlet͸valʹมߋw let-recˠlet recval recw let-inlineˠval inline
r CMPDL΍NBUI΋ಉ༷w matchʜwithʜendr ͿΒԼ͕ΓʹΑΔᐆດੑ๷ࢭw Ϧετ΍Ϩίʔυͷ۠੾Γ‫߸ه‬͸;Ͱ͸ͳ͘,ʹมߋ۩৅ߏจͷࡉ͔͍มߋ
module Tree :> sig
type tree ‘aval dfs ‘a : tree ‘a -> list ‘a…
end = structtype tree ‘a =| Empty| Node of ‘a * tree ‘a * tree ‘aval rec dfs t =match t with| Empty -> []| Node(x, t1, t2) ->List.concat[ [ x ], dfs t1, dfs t2 ]
end
…
end
val inline ctx \emph it =let ctx = … inread-inline ctx itw ‫ܕ‬Ҿ਺͸‫ޙ‬ஔr ྫɿlist intɼoption lengthw ίϚϯυ‫ܕ‬΋Ҿ਺Λ‫ޙ‬ஔr ྫɿinline [int, inline-text]

w ‫ܕ‬ม਺ͷશশྔԽͷ໌ࣔw τοϓϨϕϧͷlet͸valʹมߋ
w let-recˠlet recval recw let-inlineˠval inline
r CMPDL΍NBUI΋ಉ༷

w matchʜwithʜendr ͿΒԼ͕ΓʹΑΔᐆດੑ๷ࢭw Ϧετ΍Ϩίʔυͷ۠੾Γ‫߸ه‬͸;Ͱ͸ͳ͘,ʹมߋ۩৅ߏจͷࡉ͔͍มߋ
module Tree :> sig
type tree ‘aval dfs ‘a : tree ‘a -> list ‘a…
end = structtype tree ‘a =| Empty| Node of ‘a * tree ‘a * tree ‘aval rec dfs t =match t with
| Empty -> []| Node(x, t1, t2) ->List.concat[ [ x ], dfs t1, dfs t2 ]
end
…
end
val inline ctx \emph it =let ctx = … inread-inline ctx itw ‫ܕ‬Ҿ਺͸‫ޙ‬ஔr ྫɿlist intɼoption lengthw ίϚϯυ‫ܕ‬΋Ҿ਺Λ‫ޙ‬ஔr ྫɿinline [int, inline-text]

w ‫ܕ‬ม਺ͷશশྔԽͷ໌ࣔw τοϓϨϕϧͷlet͸valʹมߋ
w let-recˠlet recval recw let-inlineˠval inline
r CMPDL΍NBUI΋ಉ༷w match…with…endr ͿΒԼ͕ΓʹΑΔᐆດੑ๷ࢭw Ϧετ΍Ϩίʔυͷ۠੾Γ‫߸ه‬͸;Ͱ͸ͳ͘,ʹมߋͦͷଞͷඇ‫ͳ׵ޓ‬มߋ
w directഇࢭw .satyhϑΝΠϧͷ಺༰͸ͭͷϞδϡʔϧͷఆٛͷΈʹ‫ݶ‬ఆw page‫ܕ‬ͷഇࢭr A4PaperͳͲͷίϯετϥΫλͰ͸ͳ͘୯ʹPaperSize.a4 : length * lengthͳͲʹΑΔࢦఆʹมߋw graphics‫ܕ‬ͷมߋr ैདྷgraphics list‫ͨͬͩܕ‬஋͕graphics‫ͳʹܕ‬Δ
w graphics list‫ܕ‬ͷ஋ͱgraphics‫ܕ‬ͷ஋ͷҧ͍͕ᐆດͩͬͨͨΊղফr unite-graphics : list graphics -> graphicsͰॏͶ߹ΘͤΔ

w ਺ࣜจࣈΫϥεͷ௥Ճr MathSansSerif΍MathTypewriterͳͲछྨɼ6OJDPEF४‫ڌ‬໨࣍w۩৅ߏจͳͲͷࡉ͔͍มߋwϥϕϧ͖ͭΦϓγϣϯҾ਺ͱϨίʔυ࣮૷ࡁw'JOHNPEVMFTʹΑΔϞδϡʔϧγεςϜw਺ࣜίϚϯυͷ৽͍͠ҙຯ࿦wύοέʔδγεςϜ͍ۙ͏ͪʹ} ࣮૷༧ఆwॎॻ͖αϙʔτͷͨΊͷҰൠԽw·ͱΊैདྷͷΦϓγϣϯҾ਺ैདྷͷ SATYSFI ʹ΋ϥϕϧͳ͠ΦϓγϣϯҾ਺ ?:(…) ͸͋ͬͨ+section?:(`sec:sample`)?:(`Sample`){Sample}<ʢষͷຊจʣ>
LATEX ͷPDF ͷ outline ʹ൛໘্ʹ\label ૬౰ষ୊ͱͯ͠ग़͢จࣈྻ૊Ήষ୊cf. LATEXɿ ‫׳‬शతʹ֯‫Ͱހׅ‬༩͑Δ( \parbox[c]{6zw}{…}, $\sqrt[3]{2}$ෆศͳ఺ɿ• ॱ൪ʹҙຯ͕͋ΓɼͲͷࢦఆΛԿ൪໨ʹ͢΂͖͔ղΓͮΒ͍• खલͷ΋ͷΛলུ͢Δͱ͖͸ ?* Ͱ “໌ࣔతʹলུ” ͢Δඞཁ͋Γ+section?*?:(`Sample`){Sample}<ʢষͷຊจʣ>(ϥϕϧ͖ͭΦϓγϣϯҾ਺+section?(ref = `sec:sample`, outline = `Sample`){Sample}<ʢষͷຊจʣ>•?(label1 = arg1, …, labeln = argn) ͷ‫༻࢖Ͱܗ‬– ͻͱͭ΋ࢦఆ͠ͳ͍৔߹͸શମΛলུ• ॱ൪͸ࣗ༝ඒ఺ɿ• ϥϕϧ໊͕ͭ͘ͷͰ୯७ʹԿʹؔ͢Δࢦఆ͔Θ͔Γ΍͍͢• ॱෆಉͳͷͰҰ෦লུ࣌ʹ΋͗ͪ͜ͳ͍ํ๏ΛͱΔඞཁͳ͠• ૬มΘΒͣ੩తʹ‫͖͕ͭܕ‬ɼ૝ఆ͍ͯ͠ͳ͍ϥϕϧ໊Λࢦఆͨ͠৔߹΍Ҿ਺ͷ‫͍͔͓͕͠ܕ‬৔߹͸‫ܕ‬Τϥʔ–+section : block [ ?(ref : string, outline : string) inline-text,block-text ]ΦϓγϣϯҾ਺ʹର͢Δଟ૬ੑw ίϚϯυ͚ͩͰͳ͘Ұൠͷവ਺΋ΦϓγϣϯҾ਺ΛऔΕΔ
let increment ?(diff = diff-opt) n =match diff-opt with
| None-> n + 1| Some(d) -> n + dend– increment : ?(diff : int) int -> intΦϓγϣϯҾ਺ʹର͢Δଟ૬ੑ

w ίϚϯυ͚ͩͰͳ͘Ұൠͷവ਺΋ΦϓγϣϯҾ਺ΛऔΕΔ
let increment ?(diff = diff-opt) n =match diff-opt with
| None-> n + 1| Some(d) -> n + dend

– increment : ?(diff : int) int -> intw ߴ֊വ਺ͷͨΊʹɼྻଟ૬<(BTUFS+POFT>ͷ࢓૊Έ͕͋Δr ͪΐͬͱͨ͠ಠࣗͷ‫ܕ‬γεςϜ
let use-optional f = f ?(foo = 42) 57 + 1

w use-optional : ∀ρ. (?(foo : int, ρ) int -> int) -> intw ρ͕ྻม਺‫ܕ‬ྻτ ::= ?(r) τ → τ | {r} | ⋯r ::= l : τ, r | ⋅ | ρϨίʔυ‫ܕ‬΋ྻۭྻ໨࣍w۩৅ߏจͳͲͷࡉ͔͍มߋwϥϕϧ͖ͭΦϓγϣϯҾ਺ͱϨίʔυ࣮૷ࡁw'JOHNPEVMFTʹΑΔϞδϡʔϧγεςϜw਺ࣜίϚϯυͷ৽͍͠ҙຯ࿦wύοέʔδγεςϜ͍ۙ͏ͪʹ} ࣮૷༧ఆwॎॻ͖αϙʔτͷͨΊͷҰൠԽw·ͱΊैདྷͷϞδϡʔϧγεςϜͷ՝୊struct … end ʹΑΔϞδϡʔϧͷΈΛѻ͏ैདྷͷ4"5:4'*ͷϞδϡʔϧγεςϜͰ͸ΧϓηϧԽೳྗʹ‫ݶ‬ք͕͋ͬͨw ྫɿϚοϓʢʹࣙॻɼ࿈૝഑ྻʣͷΧϓηϧԽ͕ࠔ೉w ྫɿίʔυϒϩοΫΛ૊ΉίϚϯυΛఏ‫͢ڙ‬ΔϞδϡʔϧr ίϚϯυͷ‫"Ͱܗ‬1*Λఏ‫͠ڙ‬Α͏ͱ͢ΔͱɼϑΥϯτઃఆ΍എ‫ܠ‬৭΋Ϟδϡʔϧ಺ͰܾΊଧͪʹͳͬͯ͠·͍ɼϢʔβଆ͔Βมߋͮ͠Β͍@require: code⋮
+Code.code(```print(“Hello!”)```);৽͍͠ϞδϡʔϧγεςϜ
• F-ing modules [Rossberg, Russo & Dreyer 2014] ͱ͍͏ཧ࿦ʹ४‫ͨ͠ڌ‬ϞδϡʔϧγεςϜΛ࠾༻– ϑΝϯΫλͱ‫ݺ‬͹ΕΔ “ϞδϡʔϧΛड͚औͬͯϞδϡʔϧΛฦ͢େ͖ͳؔ਺” ͷ‫ػ‬ೳ͕ೖΔ– ࣮ମΛެ։ͨ͠‫ܕ‬ͷఆ͕ٛͰ͖ΔΑ͏ʹͳΔ@require: code⋮
module TerminalSettings = struct
val font-family = `Menlo`
val text-color = RGB(0.0, 1.0, 0.0)
val fill-color = Gray(0.25)
endϑΝϯΫλCode.MakeʹελΠϧઃఆͷϞδϡʔϧΛ౉͠ɼઃఆ͕൓ө͞Εͨ݁ՌΛ
Terminalͱ͍͏Ϟδϡʔϧͱͯ͠࢖͏module Terminal = Code.Make TerminalSettings⋮+Terminal.show(```$ gcc hello.c -o hello```);

࠷ۙͷࠩ෼ɿϞδϡʔϧͱଟஈ֊‫ͱࢉܭ‬ͷ‫ڞ‬ଘ͸ഇࢭʣw Ϟδϡʔϧࣗମ͸εςʔδΛ΋ͨͳ͍ʢैདྷͷw ͭͷ … தʹෳ਺εςʔδͷ஋͕‫ڞ‬ଘͰ͖Δw ࣮͸࿦จ͕ͭॻ͚Δ͘Β͍ͷ޻෉͕ඞཁͩͬͨ
@stage:structend

module Timestamp :> sig
type tval advance_by_seconds : int -> t -> t~val generate : string -> code t…
end = structtype t = int % ಺෦ද‫ݱ‬͸ Unix time
val advance_by_seconds n t = …
~val generate s =match parse_iso8601_datetime s with| …
endval beginning_of_satysfi_conf_2022 =~(Timestamp.generate`2022-09-24T17:30:00+09:00`)ઈର࣌ࠁΛѻ͏Ϟδϡʔϧ
Timestampʹɼ࣌ࠁจࣈྻ͔ΒTimestamp.t‫ܕ‬ͷ஋Λੜ੒͢ΔϚΫϩΛɼந৅ԽΛյͣࣗ͞વʹ௥ՃͰ͖Δ໨࣍w۩৅ߏจͳͲͷࡉ͔͍มߋwϥϕϧ͖ͭΦϓγϣϯҾ਺ͱϨίʔυ࣮૷ࡁw'JOHNPEVMFTʹΑΔϞδϡʔϧγεςϜw਺ࣜίϚϯυͷ৽͍͠ҙຯ࿦wύοέʔδγεςϜ͍ۙ͏ͪʹ} ࣮૷༧ఆwॎॻ͖αϙʔτͷͨΊͷҰൠԽw·ͱΊ਺ࣜίϚϯυͷҙຯ࿦ͷมߋw ैདྷͷ਺ࣜίϚϯυɿr ΠϯϥΠϯϒϩοΫίϚϯυͱ͸ҟͳΓɼDPOUFYUΛड͚औΒͳ͍r ͜Ε͸͜ΕͰѱ͘ͳ͍͕ɼςΩετग़ྗϞʔυʹࣗવʹ֦ுͰ͖ͳ͔ͬͨw ৽͍͠਺ࣜίϚϯυɿr DPOUFYUΛड͚औΔr math-text‫ͱܕ‬math-boxes‫ͱܕ‬Λ۠ผw ${ … }ʹmath-text‫͕ͭ͘ܕ‬– read-math : context -> math-text -> math-boxesͰม‫׵‬r ςΩετग़ྗϞʔυΛࣗવʹαϙʔτ৽͍͠਺ࣜίϚϯυͷఆࣜԽw DPOUFYUΛड͚औΔ

w math-text‫ͱܕ‬math-boxes‫ͱܕ‬Λ۠ผr ${ … }ʹmath-text‫͕ͭ͘ܕ‬w read-math : context -> math-text -> math-boxesͰม‫׵‬w embed-math : context -> math-boxes -> inline-boxesͰຒΊࠐΉ
val math ctx \frac (mt1 : math-text) (mt2 : math-text) =math-frac ctx (read-math ctx mt1) (read-math ctx mt2)

𝛤

val math ctx \Gamma =let s =
match get-math-char-class ctx with| MathItalic -> ` ` % U+1D6E4…
endin
math-char ctx MathOrd s෼਺ͷϓϦϛςΟϰ
math-frac :context ->math-boxes -> %෼ࢠ
math-boxes -> %෼฼
math-boxesఴࣈɾࢦ਺Λѻ͑ΔίϚϯυ
w val math ctx \cmd x … x with sub sup = eͱ͍͏ߏจͰ
1n\cmdΛఆٛ͢Δͱɼఴࣈɾࢦ਺͕͍ͭͨ৔߹ʹͦΕΒ͕sub, sup : option math-textʹ౉͞Εͯ࢖͑Δw ैདྷ͸math-pull-in-scriptsͱ͍͏ϓϦϛςΟϒͰ࣮‫ݱ‬
val math ctx \sum with sub sup =let mb-op = math-big-char ctx MathOp `∑` inlet mb =match sub with
| None-> mb-op| Some(mt1) -> math-lower ctx mb-op (fun ctx -> read-math ctx mt1)
endinmatch sup with| None-> mb| Some(mt2) -> math-upper ctx mb (fun ctx -> read-math ctx mt2)
endςΩετϞʔυͰͷ਺ࣜίϚϯυఆٛw math-boxesͷ୅ΘΓʹstring͕ίϚϯυఆٛͷ໭Γ஋ͷ‫ͳͱܕ‬Δ
w stringify-math : text-info -> math-text -> stringͰจࣈྻԽ
val math tinfo \frac mt1 mt2 =let f = stringify-math tinfo in`\frac{` ^ (f mt1) ^ `}{` ^ (f mt2) ^ `}`val math tinfo \Gamma =`\Gamma `#໨࣍w۩৅ߏจͳͲͷࡉ͔͍มߋwϥϕϧ͖ͭΦϓγϣϯҾ਺ͱϨίʔυ࣮૷ࡁw'JOHNPEVMFTʹΑΔϞδϡʔϧγεςϜw਺ࣜίϚϯυͷ৽͍͠ҙຯ࿦wύοέʔδγεςϜ͍ۙ͏ͪʹ} ࣮૷༧ఆwॎॻ͖αϙʔτͷͨΊͷҰൠԽw·ͱΊύοέʔδγεςϜͷඞཁੑw ैདྷ͸ύοέʔδͷ֓೦͕ᐆດr .satyhϑΝΠϧΛʮύοέʔδϑΝΠϧʯͱ‫ݺ‬ΜͰ͍Δ΋ͷͷɼ࣮ଶ͸ύοέʔδͱ͍͏‫Ͱ͡ײ‬΋ͳ͍

r 4BUZSPHSBQIPT͕ѻ͏୯Ґʢ㲈01".ύοέʔδʣ͕
ࣄ্࣮4"5:4'*ͷύοέʔδʹͳ͓ͬͯΓɼͪ͜Βͷํ͕ଥ౰ͦ͏w Ϟδϡʔϧύοέʔδͱ͸Կ͔ʁr Ϟδϡʔϧɿw ࣮૷ͷந৅Խʹؔ͢Δ୯Ґr ύοέʔδɿw ϦϦʔεʹؔ͢Δ୯ҐΛͳ͢Ϟδϡʔϧͷू·Γw ͲͷϞδϡʔϧΛ֎෦ʹެ։͢Δ͔΋੍‫ޚ‬w ϦϦʔεͷ੍‫ޚ‬͸4BUZSPHSBQIPTͱͷ෼୲͕ඇࣗ໌͕ͩɼগͳ͘ͱ΋֤ύοέʔδ͕ͲͷϞδϡʔϧΛެ։͢Δ͔ͷ੍‫ޚ‬͸ඞཁύοέʔδγεςϜͷઃ‫ܭ‬Ҋw֤ύοέʔδ͸͚ͭͩϞδϡʔϧΛެ։͢Δr ‫ݪ‬ଇͱͯ͠ύοέʔδͱಉ໊Λਪ঑r ଞͷϞδϡʔϧ͸ͦͷೖΕࢠͷϞδϡʔϧͱͯ͠ެ։͢Ε͹0,w ྫɿsatysfi-baseύοέʔδͷIntϞδϡʔϧͳΒBase.Intw ࢖͏ଆͰదٓopen BaseͳͲͱ͢Δ

w ~/.satysfi౳ҎԼͰ͸ύοέʔδ͝ͱʹσΟϨΫτϦΛ෼͚Δͱ͢Δ

r ‫ߦݱ‬ͷ4BUZSPHSBQIPTͱಉ༷

w ҎԼͷ಺༰Λ‫ؚ‬ΉઃఆϑΝΠϧΛύοέʔδͷσΟϨΫτϦ௚Լʹஔ͘r ιʔεϑΝΠϧͷ͋ΔσΟϨΫτϦr ެ։͢ΔͨͩͭͷϞδϡʔϧr ґଘ͢Δଞͷύοέʔδ

packages/base/satysfi.yaml
src/base.satyh
int.satyg…
easytable/
satysfi.yamlsrc/…

4BUZSPHSBQIPTͱͷ੹຿ͷ‫ڥ‬ք͸Ͳ͔͜ʁw ੹຿ͷ‫ڥ‬քΛܾΊΔͷ͕೉͍͠
w ‫ݱ‬ঢ়ͷ૝ఆɿr Ϟδϡʔϧͷެ։ඇެ։୯Ґͱͯ͠ͷύοέʔδ͸4"5:4'*͕୲͏
r ϦϦʔεͷ୯Ґͱͯ͠ͷύοέʔδ͸4BUZSPHSBQIPT͕୲͏
w satysfi.yaml΋Satyristes͔Βੜ੒͞ΕΔͱΑ͍ͷ͔΋w ͔͠͠ɼྫ͑͹ܰྔͳจॻͰ͸ϑΝΠϧ๯಄Ͱύοέʔδͷόʔδϣϯ੍໿͕ࢦఆͰ͖Δͱ‫͔͍͠خ‬΋ʁr ࣮‫͢ݱ‬Δʹ͸4"5:4'*͕ϦϦʔεͷ୯Ґ·Ͱҙࣝ͢Δඞཁ͋Γ#[dependencies([(`base`, `~1.0.0`),(`std-ja-report`, `>= 0.5.0 && < 0.5.5`),])]
require open Baserequire open StdJaReport໨࣍w۩৅ߏจͳͲͷࡉ͔͍มߋwϥϕϧ͖ͭΦϓγϣϯҾ਺ͱϨίʔυ࣮૷ࡁw'JOHNPEVMFTʹΑΔϞδϡʔϧγεςϜw਺ࣜίϚϯυͷ৽͍͠ҙຯ࿦wύοέʔδγεςϜ͍ۙ͏ͪʹ} ࣮૷༧ఆwॎॻ͖αϙʔτͷͨΊͷҰൠԽw·ͱΊॎॻ͖΍-5335-ͷͨΊͷҰൠԽ• จࣈମ‫ܥ‬ͷํ޲ੑ (directionality) ͷఆࣜԽͷલྫɿ– UTN #22: Robust Vertical Text Layout [Etemad 2005]– TEX Τϯδϯͷ֦ுͷҰछ Omega [Plaice & Haralambous 1994–2000]• ͍ͣΕ΋ҎԼͷ 3 ཁૉʹΑͬͯํ޲ੑΛ෼ྨɿ– Beginning of the page•ஈམͷ։࢝ଆ͕ࢴ໘্ͷઈରํ޲ͱ্ͯ͠ԼࠨӈͷͲΕ͔•ԤจɾΞϥϏΞจࣈɿ ্ɼॎॻ͖࿨จɿ ӈɼϞϯΰϧจࣈɿ ࠨ– Beginning of the line•ߦͷ։࢝ଆ͕ࢴ໘্ͷઈରํ޲ͱ্ͯ͠ԼࠨӈͷͲΕ͔•

ඞͣ beginning of the page ͱ 90 ౓Λͳ͢ 2 ௨Γͷ͏ͪͲͪΒ͔•Ԥจɿ ࠨɼΞϥϏΞจࣈɿ ӈɼॎॻ͖࿨จɾϞϯΰϧจࣈɿ ্– Top of the line••ߦதͷ֤จࣈ͕ͲͪΒΛ্ଆͱΈͳͯ͠ฒͿ͔‫ج‬ຊతʹ͸্͕ͩɼྫ͑͹ॎॻ͖࿨จதͷԤจ͸ӈ౗͠ʹͳΔͷͰӈॎॻ͖΍-5335-ͷͨΊͷҰൠԽ• จࣈମ‫ܥ‬ͷํ޲ੑ (directionality) ͷఆࣜԽͷલྫɿ– UTN #22: Robust Vertical Text Layout [Etemad 2005]– TEX Τϯδϯͷ֦ுͷҰछ Omega [Plaice & Haralambous 1994–2000]• ͍ͣΕ΋ҎԼͷ 3 ཁૉʹΑͬͯํ޲ੑΛ෼ྨɿ– Beginning of the page•ஈམͷ։࢝ଆ͕ࢴ໘্ͷઈରํ޲ͱ্ͯ͠ԼࠨӈͷͲΕ͔•ԤจɾΞϥϏΞจࣈɿ ্ɼॎॻ͖࿨จɿ ӈɼϞϯΰϧจࣈɿ ࠨ– Beginning of the line•••͜Ε͚ͩ͸‫ܕ‬ϨϕϧͰ΋۠ผ͠ɼߦͷ։࢝ଆ͕ࢴ໘্ͷઈରํ޲ͱ্ͯ͠ԼࠨӈͷͲΕ͔
ಉ͡ beginning of the page Λ΋ͭඞͣ beginning of the page ͱ 90 ౓Λͳ͢ 2 ௨Γͷ͏ͪͲͪΒ͔ϘοΫεྻͰͳ͍ͱԤจɿ ࠨɼΞϥϏΞจࣈɿ ӈɼॎॻ͖࿨จɾϞϯΰϧจࣈɿ ্݁߹Ͱ͖ͳ͍Α͏ʹ͢Δ– Top of the line••ߦதͷ֤จࣈ͕ͲͪΒΛ্ଆͱΈͳͯ͠ฒͿ͔‫ج‬ຊతʹ͸্͕ͩɼྫ͑͹ॎॻ͖࿨จதͷԤจ͸ӈ౗͠ʹͳΔͷͰӈॎॻ͖ͷ‫ܕ‬ϨϕϧͰͷఆࣜԽw ϖʔδ։࢝ํ޲d ::= @T|@R|@L | δΛಋೖr #FHJOOJOHPGUIFQBHFΛද͢r δ͸ϖʔδ։࢝ํ޲ม਺ɼଟ૬ੑʹ࢖͏w ςΩετ΍ϘοΫεͷ‫ܕ‬͸ϖʔδ։࢝ํ޲ΛҾ਺ʹ΋ͭΑ͏ʹҰൠԽr inline-textd΍block-boxesdͱ͍͏۩߹r ίϚϯυ΋inlined[ … ]‫ͳʹͲͳܕ‬Δr ैདྷ͸͢΂ͯd = @Tʹ‫ݶ‬ఆ͞Ε͍ͯͨͱߟ͑Δας ϖỹ δ։࢝ε ํ޲ϑ ӈỸΠϖʔδ։࢝ํ޲ɿ্

: inline-boxes @T: inline-boxes @Rॎॻ͖ͷ‫ܕ‬ϨϕϧͰͷఆࣜԽ#FHJOOJOHPGUIFQBHF͕૬౳͍͠ϘοΫεಉ͔࢜݁͠߹Ͱ͖ͳ͍͜ͱΛ੩తʹอূ͢Δʹ͸Ͳ͏͢Δ͔ʁϖʔδ։࢝ํ޲ม਺Ͱ‫ܕ‬Λଟ૬ʹ͢Δʂ

w (++) : ∀δ. inline-boxes δ -> inline-boxes δ -> inline-boxes δͦͷଞɼԤจΛॎॻ͖࿨จதʹຒΊࠐΉ৔߹ͳͲ͸໌ࣔతʹม‫׵‬w top : bop @T
w right : bop @R
w rotate-to : ∀δ ∀δ′. bop δ′ -> inline-boxes δ -> inline-boxes δ′￼￼￼rotate-to right ibͰib : inline-boxes @TΛճసͯ͠@RʹͰ͖Δ

໨࣍w۩৅ߏจͳͲͷࡉ͔͍มߋwϥϕϧ͖ͭΦϓγϣϯҾ਺ͱϨίʔυ࣮૷ࡁw'JOHNPEVMFTʹΑΔϞδϡʔϧγεςϜw਺ࣜίϚϯυͷ৽͍͠ҙຯ࿦wύοέʔδγεςϜ͍ۙ͏ͪʹ} ࣮૷༧ఆwॎॻ͖αϙʔτͷͨΊͷҰൠԽw·ͱΊ

·ͱΊ
4"5:4'*WʹೖΔ༧ఆͷ‫ػ‬ೳͷ͏ͪɼ࣮૷͕‫ͨྃ͠׬‬΋ͷͱ͍ۙ͏ͪʹ࣮૷Ͱ͖ͦ͏ͳ΋ͷΛ঺հ͠·ͨ͠w ࣮૷‫ྃ׬‬෼ɿr ۩৅ߏจͷࡉ͔͍มߋr ྻଟ૬ʹΑΔϥϕϧ͖ͭΦϓγϣϯҾ਺ͱϨίʔυr 'JOHNPEVMFTʹ‫ͮ͘ج‬ϞδϡʔϧγεςϜw ଟஈ֊‫ͱࢉܭ‬΋‫ڞ‬ଘՄೳr ਺ࣜίϚϯυͷ৽͍͠ҙຯ࿦w Α͏΍͘਺͕ࣜςΩετग़ྗϞʔυʹ΋ରԠw ͍ۙ͏ͪʢࠓ೥த͘Β͍ʣʹͰ͖ͦ͏ɿr ύοέʔδγεςϜͷ࣮૷r ॎॻ͖αϙʔτͷͨΊͷҰൠԽr ϑΥϯτσίʔμɾΤϯίʔμͷ੾ସ͑ɾ‫ػ‬ೳ֦ॆ