From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 2DNGJlM3y16FKAAA0tVLHw (envelope-from ) for ; Mon, 25 May 2020 03:11:15 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id GGMIIlM3y14HIQAAbx9fmQ (envelope-from ) for ; Mon, 25 May 2020 03:11:15 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id D1A9B940308 for ; Mon, 25 May 2020 03:11:14 +0000 (UTC) Received: from localhost ([::1]:37956 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jd3WC-0001HC-Bl for larch@yhetil.org; Sun, 24 May 2020 23:11:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44776) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jd3Vr-0001Gr-Ni for emacs-orgmode@gnu.org; Sun, 24 May 2020 23:10:51 -0400 Received: from mail-ed1-x532.google.com ([2a00:1450:4864:20::532]:44978) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jd3Vq-0001rs-IQ for emacs-orgmode@gnu.org; Sun, 24 May 2020 23:10:51 -0400 Received: by mail-ed1-x532.google.com with SMTP id d24so13812453eds.11 for ; Sun, 24 May 2020 20:10:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=EZJV2NXFZvO/lChplRBT9VSqHNWOa9QtTKGhp1AzM00=; b=iWnNbcOOyTsUXrUZRm+qYa2A5y4dhwBO5MX6wYjAO+ajmAAjTUaAul2nr9o7L8SBxb mtjBg9VQ7rwktpqHgt749Luk5/HrAWENjGvfOyezgozDA5+n0O/ECzn/Twl+MQsN2OoI sYxbVf92OtvqaJ7vixjf33oAh0yNxTn6gOpp2JR2ZGIqVpc7+uhZxOTHZCyCEYWQ1/HF ydXdU7hzkJDBTaVANYtHpM1BwSCJmfLrhv1WMxcvNc9ArEvU1RIHpoLLGgb2rs1PvbIs c/fcA8xtlUcB7Q99kVNmqY9F6pycd+sMblR8oR3akriceqeIPBUD6lnvgKHCezXA8a9h 3TSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=EZJV2NXFZvO/lChplRBT9VSqHNWOa9QtTKGhp1AzM00=; b=CsI7NDsSNP5dMMcZqjX06UauCPr5/y8lMgUS51DF+kyfbLTSK9tR/685Dhq7yuJvRN GQxnV8WmvxVHpLs5VKcUGcn+dDh3NIwAYnz/fp0k5Me18lQfjtVd09jKvnm//JtwXjIE M2nqabRB11cXABF5Wrc+1TT/LUwQfgZsLqC1yFC5C64/0FyihTu97WMPuoizSXfPhkRS bABNx90CDFYswSO9ka4AZGjCH+GyRxg+vS6iR3neolu4/oIqTbAQnaHRnlhs3jmL370H o5qWzRE4OEpFsaaVN/7qnaVXJdijUkTKVED8NY3etZzudrgEAt0DbvmXQe81gMcXNOfw yxmw== X-Gm-Message-State: AOAM530czCJmuOJg9FSA9Huz4MNfju5cMuaBw9CMwWoZQEFjft3vBuNi uAOQMbSRkljz7BMdd/jt7mu26SCcy/dwhine0/rkBlFNBmk= X-Google-Smtp-Source: ABdhPJzSjW9OKSnYOvPhf18g6YEj74J+q75A4QAg5COAJUdKwFrwQZRuSl6HHamqPniUIkzK6rRMWy456cADwlG6p5c= X-Received: by 2002:aa7:c6c6:: with SMTP id b6mr13075299eds.53.1590376248441; Sun, 24 May 2020 20:10:48 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a17:907:9e8:0:0:0:0 with HTTP; Sun, 24 May 2020 20:10:47 -0700 (PDT) From: Vladimir Nikishkin Date: Mon, 25 May 2020 11:10:47 +0800 Message-ID: Subject: How do I make TikZ pictures (babel) that are both viewable as block results, _and_ properly exportable? (invert colours?) To: emacs-orgmode Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2a00:1450:4864:20::532; envelope-from=lockywolf@gmail.com; helo=mail-ed1-x532.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=iWnNbcOO; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: -1.71 X-TUID: gGDGBA85u0tf Hello, everyone So... I have the following block: #+name: figure-1-2 #+header: :imagemagick yes :iminoptions -density 600 :imoutoptions -geometry 300 #+header: :fit yes :headers '("\\usepackage{tikz}") #+header: :buffer on #+begin_src latex :results value graphics file :exports both :file figure-1-2-tree.png \usetikzlibrary{trees} \begin{tikzpicture}[color=gray] \node {sqrt} % root child { node {sqrt-iter} child[sibling distance=5cm] { node{ good-enough } child[sibling distance=2cm] { node { square } } child[sibling distance=2cm] { node { abs } } } child { node{ improve } child { node { average } } } }; \end{tikzpicture} #+end_src Note the [color=gray] parameter to the tikzpicture environment. I use a dark theme (arguably more merciful for the eyes when spending a lot of time working with computers). Therefore, when I type C-c at a picture block, I'm want to be getting a picture that is decently viewable on a black background. But when I am exporting the document, I expect to print it on a white piece of paper, so I want the pictures to be viewable too. These two requirements are contradictory to each other, so I need some additional level of abstraction somewhere here. But where? [color=gray] is a workaround, as it is visible on both the black background and the white background. If I don't find anything better, I will just either let it be, or replace it with [color=blue]. But ideally, I'd like to export black-on-white pictures to LaTeX, and keep white-on-black when using the org document directly. Has this been already solved by some canned recipe? I'm getting lost in too many levels of abstraction: GTK Theme -> Emacs Theme -> org -> TikZ -> LaTeX -> Viewer -- Yours sincerely, Vladimir Nikishkin