In [1]:
(*有關於LaTeX使用於斷行的演算法
首先我們要制定一個字元(包含斷行後新生的連字號,以及空白)在斷行前、斷行後的寬度
*)
In [3]:
(*假設這段字元 wordList,SP表達半形空白,HY表達連字號*)
let wordList = ["no"; "HY"; "thing"; "SP"; "can"; "SP"; "stop";"SP"; "the"; "SP"; "cro"; "HY"; "co";"HY" ;"dile"; "cross"; "SP"; "it."] ;;
Out[3]:
val wordList : string list = ["no"; "HY"; "thing"; "SP"; "can"; "SP"; "stop"; "SP"; "the"; "SP"; "cro"; "HY"; "co"; "HY"; "dile"; "cross"; "SP"; "it."]
In [ ]: