This commit is contained in:
2026-02-23 16:25:17 -07:00
parent b5a5721eed
commit 9ac8577478
3 changed files with 19 additions and 14 deletions

View File

@@ -1,7 +1,9 @@
(ns net.deertopia.doerg.common
(:require [babashka.process :as p]
[clojure.string :as str]
[clojure.tools.logging :as l]))
[clojure.tools.logging :as l]
[clojure.java.io :as io])
(:import (java.io FilterInputStream)))
(defn deref-with-timeout [process ms]
(let [p (promise)
@@ -18,6 +20,17 @@
:timed-out-after-milliseconds ms}))
@p)))
#_
(defn tee-to-logs [input output]
(Thread. (fn []
(io/copy (l/log-stream :debug)))))
(defrecord TeeInputStream
[out]
FilterInputStream)
(extend)
(defn invoke [opts & cmd]
(l/info (str/join " " (cons "$" cmd)))
(let [r (apply p/shell

View File

@@ -90,17 +90,6 @@
(sp/view #(update % :children seq))
sp/STAY))
#_
(defn- gather-footnotes [doc]
(->> doc
(sp/select
[element/children-walker element/footnotes-section?
element/children-walker
#(element/of-type? % "footnote-definition")
(sp/view (fn [d]
{(:label d) d}))])
(apply merge)))
(defn- contains-footnote-refs? [node]
(some #(element/of-type? % "footnote-reference")
(:children node)))

View File

@@ -6,9 +6,12 @@
;;; XeLaTeX
(def scale-divisor 66873.46948423679)
(def ^:private scale-divisor 66873.46948423679)
(def font-size 10)
(def ^:private font-size 10)
(def ^:private tightpage-regexp
#"^Preview: Tightpage (-?[0-9]+)\s*(-?[0-9]+)\s*(-?[0-9]+)\s*(-?[0-9]+)")
(defn- invoke-xelatex [& {:keys [file output-dir]}]
(let [{:keys [out]} (common/invoke