kakemono 0.22.3

Convert PDF, Word and EPUB documents and web pages to HTML, Markdown, EPUB, LaTeX and JSON in Rust
Documentation
:root{--desk:#e7e8ec;--ui:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;--zoom:1.5;
  --serif:"Times New Roman",Times,"Nimbus Roman","Liberation Serif",serif;
  --psans:Helvetica,Arial,"Nimbus Sans","Liberation Sans",sans-serif;
  --pmono:"Courier New",Courier,"Nimbus Mono PS","Liberation Mono",monospace;
  --math:"STIX Two Math","Cambria Math","Latin Modern Math","Times New Roman",Times,serif}
body.cm{--serif:"P2H LM Roman","Latin Modern Roman","CMU Serif","Computer Modern Serif","Times New Roman",Times,serif;
  --pmono:"P2H LM Mono","Latin Modern Mono","Courier New",Courier,monospace;
  --math:"P2H LM Roman","Latin Modern Math","STIX Two Math","Cambria Math","Times New Roman",Times,serif}
body.tm{--math:"P2H LM Roman","Latin Modern Math","STIX Two Math","Cambria Math","Times New Roman",Times,serif}
@media (prefers-color-scheme:dark){:root{--desk:#24262b}}
*{box-sizing:border-box}
body{margin:0;background:var(--desk)}
.topbar{position:sticky;top:0;z-index:20;display:flex;gap:.8rem;align-items:center;padding:.45rem 1rem;background:#1f2226;color:#e8eaed;
  font-family:var(--ui);font-size:.84rem}
.topbar .t{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:600}
.topbar a{color:#b9c7ff;text-decoration:none}
.topbar button{font:inherit;color:#e8eaed;background:#33373d;border:0;border-radius:6px;padding:.2rem .65rem;cursor:pointer}
.topbar button:hover{background:#454a52}
.pages{padding:1.2rem .6rem 4rem;overflow-x:auto}
.page{container-type:inline-size;position:relative;width:calc(var(--pw)*var(--zoom)*1px);max-width:none;margin:0 auto 1.4rem;background:#fff;
  box-shadow:0 1px 3px rgba(0,0,0,.18),0 8px 24px rgba(0,0,0,.10);overflow:hidden}
body.fit .page{width:min(100%,calc(var(--pw)*var(--zoom)*1px))}
.page>img.bg{position:absolute;inset:0;display:block;width:100%;height:100%;user-select:none;-webkit-user-drag:none;pointer-events:none}
.tl{position:absolute;inset:0;font-family:var(--serif);color:#000;line-height:1;text-rendering:geometricPrecision;
  -webkit-text-size-adjust:none;text-size-adjust:none}
.tl a{color:inherit;text-decoration:none}
.tl a:hover{text-decoration:underline}
.tl sup,.tl sub{font-size:.7em;line-height:0}
.tl .s{font-family:var(--psans)}
.tl .m{font-family:var(--pmono)}
.tl .x{font-family:var(--math)}
.tl .sc{font-variant:small-caps}
.pl,.g,.rt{position:absolute;white-space:pre}
/* Targets of cross references; the margin keeps them clear of the top bar. */
.anc{position:absolute;width:0;height:0;scroll-margin-top:64px}
/* Text inside figures is drawn by the page picture; this copy is for selecting. */
.b[data-kind="figure-text"],.b[data-kind="figure-text"] *{color:transparent!important}
.rt{transform-origin:0 .84em}
.ph,.tab{display:inline-block}
.ph{color:transparent}
/* Stacked glyphs in a line (inline fractions), each at its place in the PDF. */
.sg{display:inline-block;position:relative;white-space:pre}
.g{transform-origin:0 0}
/* Flowing blocks: one line of the PDF per line, until the text changes. */
.fb{position:absolute;clip-path:inset(-20cqw -50cqw 0 -50cqw)}
.fb.one{clip-path:none}
.fb.cont{clip-path:inset(0 -50cqw)}
.fb.cont.tail{clip-path:inset(0 -50cqw -200cqw -50cqw)}
.fb .ln{white-space:pre;position:relative}
/* Only the text font sets the height of a line: fallback fonts (math, sans,
   mono) have other ascents and descents and would push lines off the place
   they have in the PDF. */
.fb .ln,.fb .ln *,.pl *,.rt *,.g *,.tb th *,.tb td *{line-height:0}
.fb .ln::after{content:"\A";white-space:pre}
.fb .ln.hy::after{content:"-\A"}
.fb .ln.end::after{content:none}
/* A line squeezed sideways onto its width (a condensed font in the PDF). */
.pl.sq{transform-origin:0 0}
.fb .ln.sq{display:inline-block;transform-origin:0 0}
.fb .ln.sq::after{content:none}
.fb .ln.sq.hy::after{content:"-"}
/* Reflow mode (after the text was edited or translated). */
.fb.rf .in{text-indent:var(--ti,0);padding-left:var(--pl,0);hyphens:auto;-webkit-hyphens:auto;overflow-wrap:break-word}
.fb.rf[data-align="justify"] .in{text-align:justify}
.fb.rf[data-align="center"] .in{text-align:center}
.fb.rf .ln{white-space:normal;margin-left:0!important;top:0!important;word-spacing:normal!important;letter-spacing:normal!important}
.fb.rf .ln::after{content:none!important}
.fb.rf.nw .ln{white-space:nowrap}
.fb.rf .ln.sq{display:inline}
.fb.rf br.sqbr{display:none}
/* Tables on their original grid. */
.tb{position:absolute}
.tb table{width:100%;height:100%;border-collapse:collapse;table-layout:fixed;border-spacing:0}
.tb th,.tb td{padding:0;font-weight:400;white-space:nowrap;vertical-align:top;line-height:1;overflow:visible}
.tb .mid{vertical-align:middle}
.tb.rf th,.tb.rf td{white-space:normal}
.tb .l{text-align:left}
.tb .c{text-align:center}
.tb .r{text-align:right}
.tb .ra1{border-top:.07cqw solid #000}
.tb .ra2{border-top:.14cqw solid #000}
.tb .rb1{border-bottom:.07cqw solid #000}
.tb .rb2{border-bottom:.14cqw solid #000}
.tb .rl{border-left:.07cqw solid #000}
.tb .rr{border-right:.07cqw solid #000}
.tl ::selection{background:rgba(40,110,255,.25)}
@media print{.topbar{display:none}body{background:#fff}.pages{padding:0}.page{box-shadow:none;margin:0;break-after:page;width:100%!important}}