From mboxrd@z Thu Jan 1 00:00:00 1970 From: johanna.may@th-koeln.de Subject: Re: change font-size in python plots depending on context Date: Tue, 20 Aug 2019 11:25:26 +0200 Message-ID: <87blwk5gue.fsf@th-koeln.de> References: <87mug5yu8m.fsf@tsdye.online> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:35968) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i00OW-0004WB-Sc for emacs-orgmode@gnu.org; Tue, 20 Aug 2019 05:25:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i00OU-0003Ht-4A for emacs-orgmode@gnu.org; Tue, 20 Aug 2019 05:25:35 -0400 Received: from lvs-smtpgate1.nz.fh-koeln.de ([139.6.1.47]:8044) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i00OT-0003Eh-RX for emacs-orgmode@gnu.org; Tue, 20 Aug 2019 05:25:34 -0400 In-reply-to: <87mug5yu8m.fsf@tsdye.online> 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-org list Hi there, thanks to Thomas and Eric. I actually found a rather stupid mistake: I was already using a var (for the png filename generation) and the header did not read the next :var. So I added ,fs=fontsize to the first :var and now it works. I will have a look Eric's function of how to get the value of e.g. fontsize and so on (btw, I also need textwidth and textheight from somewhere). I also found a python pgf package but I couldn't figure out fast how to implement that (it sounds as if instead of png a pgf is generated and then everything has the right latex layout, so pretty cool, but it seemed not so easy to implement). So long, cheers! J Thomas S. Dye writes: > Aloha Johanna May, > > This works: > > #+name: fs > #+BEGIN_SRC emacs-lisp > 10 > #+END_SRC > > #+RESULTS: fs > : 10 > > #+header: :var fontsize=fs() :results output > #+begin_src python > print(fontsize) > #+end_src > > #+RESULTS: > : 10 > > Note "fs()" instead of "fs". > > All the best, > Tom -- Prof. Dr. Johanna May Stellvertretende Institutsleiterin CIRE Fakultät für Informations-, Medien- und Elektrotechnik (F07) Institut für Elektrische Energietechnik (IET) Cologne Institute for Renewable Energy (CIRE) Lehrgebiete: Energieeffizienz und Grundlagen Elektrotechnik T: +49 221-8275-2697 M: +49 174 891 9002 E: johanna.may@th-koeln.de Technische Hochschule Köln Campus Deutz Betzdorfer Str. 2 50679 Köln Raum: HW2-40 www.th-koeln.de