File: tex.ml

package info (click to toggle)
mlpost 0.9-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,844 kB
  • sloc: ml: 21,094; javascript: 4,047; makefile: 430; ansic: 34; lisp: 19; sh: 15
file content (19 lines) | stat: -rw-r--r-- 438 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
open Mlpost
open Concrete
open Command
open Picture
open CPoint
open Ctypes

let s = "Bonjour les amis $42_{la reponse}$"

let p =
  let t = tex s in
  let bs = baselines s in
  let { x = left } = cpoint_of_point (west t) in
  let { x = right } = cpoint_of_point (east t) in
  let pl = List.map (fun e -> Path.path [ (left, e); (right, e) ]) bs in
  let pl = List.map Path.draw pl in
  seq (t :: pl)

let () = Metapost.emit "baselines" p