emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: johanna.may@th-koeln.de
To: emacs-orgmode@gnu.org
Subject: change font-size in python plots depending on context
Date: Mon, 19 Aug 2019 10:50:45 +0200	[thread overview]
Message-ID: <87o90l5yje.fsf@th-koeln.de> (raw)

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

             reply	other threads:[~2019-08-19  8:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-19  8:50 johanna.may [this message]
2019-08-19 11:10 ` change font-size in python plots depending on context Fraga, Eric
  -- strict thread matches above, loose matches on Subject: below --
2019-08-19 16:50 Thomas S. Dye
2019-08-20  9:25 ` johanna.may

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87o90l5yje.fsf@th-koeln.de \
    --to=johanna.may@th-koeln.de \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).