From be5b9c3a9a61fe00b44cb6c0abb02d17ba4641d2 Mon Sep 17 00:00:00 2001 From: Daniel Weschke Date: Fri, 26 Dec 2025 16:45:01 +0100 Subject: [PATCH] add option to change bgcolor for gpl-term function --- settings/org-settings.el | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/settings/org-settings.el b/settings/org-settings.el index cf8a7ec6..1951c7be 100644 --- a/settings/org-settings.el +++ b/settings/org-settings.el @@ -861,10 +861,11 @@ See also: http://www.gnuplot.info/docs_5.2/Gnuplot_5.2.pdf#section*.519 (concat filename (by-backend (latex ".tikz") (article-latex ".tikz") (t ".svg")) ) ;;(by-backend (latex "") (t (concat filename ".svg"))) ) - (defun gpl-term (lsize osize) + (defun gpl-term (lsize osize &optional bg) "\ LSIZE: latex export size OSIZE: other export size +BG: optional argument, e.g.: \"ffffff\", defaults to \"11000000\". returns: term settings for the org src gnuplot header :term - for LaTeX export it is set to: lua tikz size LSIZE color colortext @@ -873,10 +874,12 @@ returns: term settings for the org src gnuplot header :term usage: #+HEADER: :term (gpl-term \"15cm,12cm\" \"380,300\") " (concat - ;;(by-backend (latex "epslatex size ") (t "svg size ")) (by-backend (latex "lua tikz size ") (article-latex "lua tikz size ") (t "svg size ")) (by-backend (latex lsize) (article-latex lsize) (t osize)) - (by-backend (latex " color") (article-latex " color") (t " mouse standalone background '#11000000'")))) + (by-backend + (latex " color") + (article-latex " color") + (t (concat " mouse standalone background '" (or bg "#11000000") "'"))))) ) (use-package ob-latex