diff --git a/doerg/doerg-tex/index.js b/doerg/doerg-tex/index.js index ea6e854..d9156c3 100755 --- a/doerg/doerg-tex/index.js +++ b/doerg/doerg-tex/index.js @@ -34,13 +34,13 @@ function do_command (cmd) { return null } } catch (e) { + console.error (e) return {type: "error", error: e} } } function main () { const options = commandLineArgs (cli_spec) - console.error (options) macros = load_preambles (options.preamble) const decoder = new DecoderStream () const encoder = new EncoderStream () diff --git a/doerg/src/net/deertopia/doerg/repl.clj b/doerg/src/net/deertopia/doerg/repl.clj index 613032b..fd407e6 100644 --- a/doerg/src/net/deertopia/doerg/repl.clj +++ b/doerg/src/net/deertopia/doerg/repl.clj @@ -18,7 +18,7 @@ "/home/msyds/org/20250512144715-natural_transformation_category_theory.org" #_ "/home/msyds/org/20251021155921-path_action.org" - "/tmp/t.org") + "test/net/deertopia/doerg/tex-test.org") (defn- force-create-sym-link [path target] (fs/delete-if-exists path) diff --git a/doerg/src/net/deertopia/doerg/tex.clj b/doerg/src/net/deertopia/doerg/tex.clj index 39403f2..bbe4f95 100644 --- a/doerg/src/net/deertopia/doerg/tex.clj +++ b/doerg/src/net/deertopia/doerg/tex.clj @@ -212,7 +212,7 @@ (if (re-matches #"(?s)\\begin\{.+?}(.*?)\\end\{.+?}" s) (render-temml-display s) (if-let [[_ inner] (re-matches #"(?s)\\\((.*)\\\)" s)] - (render-temml-inline s) + (render-temml-inline inner) (throw (ex-info "weird" {:snippet s})))))) ;; hackky.... diff --git a/doerg/test/net/deertopia/doerg/tex-test.org b/doerg/test/net/deertopia/doerg/tex-test.org new file mode 100644 index 0000000..50c3f97 --- /dev/null +++ b/doerg/test/net/deertopia/doerg/tex-test.org @@ -0,0 +1,21 @@ +#+title: aghhh +#+latex_header: \usepackage{ifxetex} + +- blah blah prose prose prose \(c = \sqrt{x^2 + y^2}\), alal. +- this thing is \(x\) +- another thing \(y\) +- this thing is also \(x\) and uses the same svg +- ifxetex: \(\ifxetex alalala\fi \) + +balahahahahahaj +\begin{align*} +x &= y +\\ &= zzz. +\end{align*} +awawawa + +cool ass tbale +\begin{tabular}{|c|c|c|} +blah & glah & zlah +\\ abdwa & www &dj +\end{tabular}