Beginning simple typesetter

This commit is contained in:
John Whitington 2021-11-15 17:42:17 -08:00
parent 0b5f46044e
commit 71fb6b0594
3 changed files with 30 additions and 1 deletions

View File

@ -1,7 +1,7 @@
# Build the cpdf command line tools and top level # Build the cpdf command line tools and top level
MODS = cpdfyojson cpdfxmlm \ MODS = cpdfyojson cpdfxmlm \
cpdfunicodedata cpdferror cpdfjson cpdfstrftime cpdfcoord cpdfattach \ cpdfunicodedata cpdferror cpdfjson cpdfstrftime cpdfcoord cpdfattach \
cpdfpagespec cpdfposition cpdf cpdffont cpdfcommand cpdfpagespec cpdfposition cpdf cpdffont cpdftype cpdfcommand
SOURCES = $(foreach x,$(MODS),$(x).ml $(x).mli) cpdfcommandrun.ml SOURCES = $(foreach x,$(MODS),$(x).ml $(x).mli) cpdfcommandrun.ml

15
cpdftype.ml Normal file
View File

@ -0,0 +1,15 @@
(* cpdftype.ml *)
type box =
Text of string
| Glue of float
| Newline
| Font of string
| BoldOn
| BoldOff
| ItalicOn
| ItalicOff
type t = box list
let typeset papersize boxes =
[Pdfpage.blankpage papersize]

14
cpdftype.mli Normal file
View File

@ -0,0 +1,14 @@
(* Simple typesetter *)
type box =
Text of string
| Glue of float
| Newline
| Font of string
| BoldOn
| BoldOff
| ItalicOn
| ItalicOff
type t = box list
val typeset : Pdfpaper.t -> t -> Pdfpage.t list