Code Monkey home page Code Monkey logo

Comments (4)

nyuichi avatar nyuichi commented on June 12, 2024 2

I made a PoC of this!

@import: ../base
@import: ../fn
@import: ../inline
@import: ../block
@import: ../pager
@import: ../context
@import: ../option-ext
let satysfi-it ?:text-width math =
let text-width = text-width |> Option.unwrap-or 440pt in
let default-ctx = Context.make text-width in
let ib = default-ctx |> Inline.of-math math in
let (w, h) = (Inline.natural-width ib, Inline.natural-height ib) in
Pager.make-document
(Page.custom w h)
(Fn.const (| text-height = 0pt; text-origin = (0pt, 0pt) |))
(Fn.const (| header-content = Block.nil; header-origin = (0pt, 0pt); footer-content = Block.nil; footer-origin = (0pt, 0pt) |))
(default-ctx |> Block.of-inline false false (Fn.const ib))
in satysfi-it ${1 + 2 = 3}

スクリーンショット 2019-12-17 14 15 19

from satysfi-base.

puripuri2100 avatar puripuri2100 commented on June 12, 2024 1

I closed by mistake.
sorry🙇

from satysfi-base.

zeptometer avatar zeptometer commented on June 12, 2024

Note: Pager.make-document will be useful https://github.com/nyuichi/satysfi-base/blob/master/pager.satyh#L40

from satysfi-base.

zeptometer avatar zeptometer commented on June 12, 2024

Awesome! Feel free to hijack this issue, I'm afraid I'm busy this week.

from satysfi-base.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.