* plantuml tikz format support
@ 2023-08-23 12:57 Nan JunJie
2023-08-24 7:57 ` Ihor Radchenko
0 siblings, 1 reply; 4+ messages in thread
From: Nan JunJie @ 2023-08-23 12:57 UTC (permalink / raw)
To: emacs-orgmode
I'd like to add a patch to support plantuml tikz format. We can use it
like this:
#+begin_src plantuml :file file.tikz
...
#+end_src
#+results:
[[file.tikz]]
So that file.tikz will be treat as tikz picture and input.
Here the patch:
From c97e5f421202ac2bfd16174c2d4be4059b0aa4c8 Mon Sep 17 00:00:00 2001
From: Nan Jun Jie <nanjunjie@139.com>
Date: Wed, 23 Aug 2023 20:23:40 +0800
Subject: [PATCH] Add plantuml tikz tex support
Via the use of plantuml -tlatex:nopreamble option, tikz tex can be
\input in the export latex, so that it will be compiled as tikz
picture, just like the png or svg format.
---
lisp/ob-plantuml.el | 1 +
1 file changed, 1 insertion(+)
diff --git a/lisp/ob-plantuml.el b/lisp/ob-plantuml.el
index 3202c6e41..b5cc9322e 100644
--- a/lisp/ob-plantuml.el
+++ b/lisp/ob-plantuml.el
@@ -143,6 +143,7 @@ This function is called by `org-babel-execute-src-block'."
("eps" '("-teps"))
("pdf" '("-tpdf"))
("tex" '("-tlatex"))
+ ("tikz" '("-tlatex:nopreamble"))
("vdx" '("-tvdx"))
("xmi" '("-txmi"))
("scxml" '("-tscxml"))
--
2.40.1
--
∧ ∧︵
ミ^ō^ミ灬)~
https://nanjj.github.io
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: plantuml tikz format support
2023-08-23 12:57 plantuml tikz format support Nan JunJie
@ 2023-08-24 7:57 ` Ihor Radchenko
2023-08-29 12:51 ` 13910969806
[not found] ` <87y1hxqn0l.fsf@139.com>
0 siblings, 2 replies; 4+ messages in thread
From: Ihor Radchenko @ 2023-08-24 7:57 UTC (permalink / raw)
To: Nan JunJie; +Cc: emacs-orgmode
Nan JunJie <nanjunjie@139.com> writes:
> I'd like to add a patch to support plantuml tikz format. We can use it
> like this:
>
> #+begin_src plantuml :file file.tikz
> ...
> #+end_src
>
> #+results:
> [[file.tikz]]
>
> So that file.tikz will be treat as tikz picture and input.
Thanks!
This looks reasonable. May you also update etc/ORG-NEWS and
https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-plantuml.html
page, documenting the changes. The Worg page source live in
https://git.sr.ht/~bzg/worg
Another possibility could be supporting :results latex header argument
and output a latex export block.
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: plantuml tikz format support
2023-08-24 7:57 ` Ihor Radchenko
@ 2023-08-29 12:51 ` 13910969806
[not found] ` <87y1hxqn0l.fsf@139.com>
1 sibling, 0 replies; 4+ messages in thread
From: 13910969806 @ 2023-08-29 12:51 UTC (permalink / raw)
To: yantar92; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 2018 bytes --]
Ihor Radchenko <yantar92@posteo.net> writes:
Thanks!
This looks reasonable. May you also update etc/ORG-NEWS and
https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-plantuml.html
page, documenting the changes. The Worg page source live in
https://git.sr.ht/~bzg/worg
Another possibility could be supporting :results latex header argument
and output a latex export block.
The org-mode part:
From 3c27bb94cb5a2cd66a5336dc9c69e3ca03232a91 Mon Sep 17 00:00:00 2001
From: Nan Jun Jie <nanjunjie@139.com>
Date: Wed, 23 Aug 2023 20:23:40 +0800
Subject: [PATCH] Add plantuml tikz format support
Via the use of plantuml -tlatex:nopreamble option, tikz tex can be
\input in the export latex, so that it will be compiled as tikz
picture, just like the png or svg format.
---
etc/ORG-NEWS | 4 ++++
lisp/ob-plantuml.el | 1 +
2 files changed, 5 insertions(+)
diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index 4db9d258a..d38520307 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -593,6 +593,10 @@ return a matplotlib Figure object to plot. For output results, the
current figure (as returned by =pyplot.gcf()=) is cleared before
evaluation, and then plotted afterwards.
+*** =ob-plantuml.el=: Support tikz file format output
+=ob-plantuml.el= now output tikz format via `-tlatex:nopreamble`
+option. So that the output tikz file can be input into the exported
+latex correctly.
** New functions and changes in function arguments
*** =TYPES= argument in ~org-element-lineage~ can now be a symbol
diff --git a/lisp/ob-plantuml.el b/lisp/ob-plantuml.el
index 3202c6e41..b5cc9322e 100644
--- a/lisp/ob-plantuml.el
+++ b/lisp/ob-plantuml.el
@@ -143,6 +143,7 @@ This function is called by `org-babel-execute-src-block'."
("eps" '("-teps"))
("pdf" '("-tpdf"))
("tex" '("-tlatex"))
+ ("tikz" '("-tlatex:nopreamble"))
("vdx" '("-tvdx"))
("xmi" '("-txmi"))
("scxml" '("-tscxml"))
--
2.40.1
--
https://nanjj.srht.site
∧ ∧︵
ミ^ō^ミ灬)~
https://nanjj.github.io
[-- Attachment #2: Type: text/html, Size: 2358 bytes --]
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: plantuml tikz format support
[not found] ` <87jztgga4s.fsf@localhost>
@ 2023-10-20 11:55 ` Ihor Radchenko
0 siblings, 0 replies; 4+ messages in thread
From: Ihor Radchenko @ 2023-10-20 11:55 UTC (permalink / raw)
To: Nan JunJie; +Cc: emacs-orgmode
Ihor Radchenko <yantar92@posteo.net> writes:
>> From 3c27bb94cb5a2cd66a5336dc9c69e3ca03232a91 Mon Sep 17 00:00:00 2001
>> From: Nan Jun Jie <nanjunjie@139.com>
>> Date: Wed, 23 Aug 2023 20:23:40 +0800
>> Subject: [PATCH] Add plantuml tikz format support
>
> There is something off with the email formatting - I cannot apply it
> using git-am. May you re-send as an attachment?
I have addressed my own comments and applied the amended patch on your
behalf.
Applied, onto main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=7ceefaf2d
You are now listed as an Org contributor.
https://git.sr.ht/~bzg/worg/commit/a85a664c
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-10-20 11:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-23 12:57 plantuml tikz format support Nan JunJie
2023-08-24 7:57 ` Ihor Radchenko
2023-08-29 12:51 ` 13910969806
[not found] ` <87y1hxqn0l.fsf@139.com>
[not found] ` <87jztgga4s.fsf@localhost>
2023-10-20 11:55 ` Ihor Radchenko
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).