From mboxrd@z Thu Jan 1 00:00:00 1970 From: johanna.may@th-koeln.de Subject: change font-size in python plots depending on context Date: Mon, 19 Aug 2019 10:50:45 +0200 Message-ID: <87o90l5yje.fsf@th-koeln.de> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:53537) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1hzdNP-0000is-I8 for emacs-orgmode@gnu.org; Mon, 19 Aug 2019 04:50:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hzdNM-0007LB-Uf for emacs-orgmode@gnu.org; Mon, 19 Aug 2019 04:50:53 -0400 Received: from lvs-smtpgate4.nz.fh-koeln.de ([139.6.1.50]:29371) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hzdNM-0007IV-LT for emacs-orgmode@gnu.org; Mon, 19 Aug 2019 04:50:52 -0400 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org Dear org-mode fans, I have various files that go together in one document, either chapterwise or the whole book. And just as with tikz (latex) I want the font size of python plots to change automatically when the context changes. So I tried to define a variable in one of the header files like this: #+name: fs #+BEGIN_SRC emacs-lisp 10 #+END_SRC I also tried to define it like this #+name: fs #+begin_src python :results output :session :exports none fontsize=10 return fontsize #+end_src And then, in another file (that is being included by the header file) I added :var fontsize=fs to the header and replaced the number by this variable. I understand it complained that fs could not be found if I used C-c C-c directly to test, since apparently the variable fs only belongs to the other buffer (This is the first problem). However, it doesn't work either when I compile everything (the second problem). Probably it is also possible to solve this with some function in elisp. But, I have to admit, that I haven't started learning elisp yet. Does anyone have a solution to this problem? Any hints to helpful blogs or stackexchange pages would be appreciated. I did a search but probably not using the right keywords. Thanks! J