Beginning simple typesetter
This commit is contained in:
parent
0b5f46044e
commit
71fb6b0594
2
Makefile
2
Makefile
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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]
|
|
@ -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
|
Loading…
Reference in New Issue