From e8eaa51371e36a037948fb6eb541fce3883d3d96 Mon Sep 17 00:00:00 2001 From: "Yann Esposito (Yogsototh)" Date: Sat, 29 Feb 2020 16:46:07 +0100 Subject: [PATCH] tangle displayed correctly --- project.el | 8 +++++--- project.el.sig | Bin 586 -> 586 bytes src/css/mk.css | 12 +++++++++--- src/demo.org | 12 ++++++++++++ src/posts/0010-Haskell-Now/index.org | 7 ------- 5 files changed, 26 insertions(+), 13 deletions(-) diff --git a/project.el b/project.el index 63143ea..e400f67 100644 --- a/project.el +++ b/project.el @@ -350,9 +350,11 @@ Return output file name." "Add a link just before source code block with tangled files. BACKEND is the export backend. Used as symbol." (while ;; (re-search-forward ) - (re-search-forward "^\\( *\\)#\\+begin_src .*:tangle \\([^\\s\\n]*\\)" nil t) - (replace-match "\\1{{{lnk(\\2)}}}\n3\n\\&"))) + (re-search-forward "^\\( *\\)#\\+begin_src .*:tangle \\([^\s\n]*\\)" nil t) + (replace-match "\\1#+CAPTION: [[./\\2][=\\2=]]\n\\&"))) -(add-hook 'org-export-before-processing-hook 'my-add-link-to-tangled-files) +(setq org-export-before-processing-hook nil) +(add-hook 'org-export-before-processing-hook + 'my-add-link-to-tangled-files) (provide 'her-esy-fun-publish) diff --git a/project.el.sig b/project.el.sig index 4ef72ea0f0e0654bf4718a087f38b6d3fe669fa9..7fd3340746f13283c3b801d984a828863567682b 100644 GIT binary patch delta 534 zcmV+x0_pwA1j+=EBLiB8GLa@Af9=K({0@z*6rCvZ*B_ZcS+8gCsGYa~7foxu)xU*x zZwA@bb=$GhAJr?1ph>XMI5G55crfcg2d`0V13>9q^oYq^1zRi!Tf2pLd1lPn5 z*d!loE$=BOeqMtHq)Fd6w0flK&=J@JXvlwd+?F*lmbskvhA7Ji1#_Cs-sdcUxM^gyn8eYi zol-psOotkesMr#{`i7`}e}4Joi>D4L+r^}-F*+M54eHq3NSa>!Xg7wFawF(Z9Cr4peoP;*D`qJAJIrzGUw2D~8;{5~DX=xsg!Ffwv z;RfgJyxj_GuCypvKe?NnDIga!au%Upp#Itm=i}JKGKGvFHb!GkUZI1L7e}*=x*7l8AgX~`89AS55nV2S$SUM)AY!YM_T8H)d5|-0r zWHCANh#Ci00y+#G@M&+4H>K!;Zyi%C5$?@@5^g!eoA5mXY?Q7)`o4EZP9I+U@f4pF z4(GJ(_>ZNiNO7O9(idt8DEZK3H5%Q(f(aNzE#ZRuf@zFcFsnR}f5of72iF>v(>iVg z4uaVJc!y0RnX;Djc}3!FdM(ALCyKsIlsOv|Mb*YyQ=UHe5i(t;g|z~al;i^TBqXhP>viM8|=R+}|sn+}ugKLEP$Db!3Xzb()+`1C81K)B<@GugA}5@hmRq9RY?`A=Zlo^#A|> diff --git a/src/css/mk.css b/src/css/mk.css index b6d9bc7..530fcb1 100644 --- a/src/css/mk.css +++ b/src/css/mk.css @@ -242,7 +242,12 @@ figure, .figure { cursor: pointer; font-style: italic; } - +label + pre { + margin-top: 0; +} +label { + padding-left: 1.5em; +} /* colors theme */ /* --------------------------------------------------------------------------- */ /* Dark theme selected */ @@ -369,8 +374,9 @@ li .keywords { .main ol > li:before, ol > li:before, pre::after,pre::before,hr:after, .main pre::after,.main pre::before,.main hr:after, -blockquote:after, .main blockquote:after - { +blockquote:after, .main blockquote:after, +label, label a, .main label, .main label a +{ color: var(--fg0); } nav a, nav a:visited, .main nav a,.main nav a:visited { diff --git a/src/demo.org b/src/demo.org index 691bda7..26507ce 100644 --- a/src/demo.org +++ b/src/demo.org @@ -271,6 +271,18 @@ main = do putStrLn $ "Hello " <> name <> "!" #+end_src +** Tangled +:PROPERTIES: +:CUSTOM_ID: tangled +:END: + +#+begin_src clojure :tangle my-dir/pprint.clj :mkdir t +(defn clj-fn + "A clojure function with syntax highlighting" + [arg] + (clojure.pprint/pprint arg)) +#+end_src + #+begin_src haskell :tangle hello_world.hs -- main hello world main :: IO () diff --git a/src/posts/0010-Haskell-Now/index.org b/src/posts/0010-Haskell-Now/index.org index b0f46a1..0d963b2 100644 --- a/src/posts/0010-Haskell-Now/index.org +++ b/src/posts/0010-Haskell-Now/index.org @@ -157,13 +157,6 @@ The article contains five parts: - *Start swimming*: Start a new project. -** Helpers :noexport: -:PROPERTIES: -:CUSTOM_ID: helpers -:END: - -#+MACRO: lnk @@html:$1 ⤓@@ - ** Install :PROPERTIES: :CUSTOM_ID: install