From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id WCSPHBw6y15ZWAAA0tVLHw (envelope-from ) for ; Mon, 25 May 2020 03:23:08 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id gBOGGBw6y150CgAAB5/wlQ (envelope-from ) for ; Mon, 25 May 2020 03:23:08 +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 E83129404C5 for ; Mon, 25 May 2020 03:23:07 +0000 (UTC) Received: from localhost ([::1]:40250 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jd3hh-0002zd-OY for larch@yhetil.org; Sun, 24 May 2020 23:23:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45316) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jd3hM-0002zL-QP for emacs-orgmode@gnu.org; Sun, 24 May 2020 23:22:44 -0400 Received: from mail-ed1-x531.google.com ([2a00:1450:4864:20::531]:38664) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jd3hL-0003c1-Mg for emacs-orgmode@gnu.org; Sun, 24 May 2020 23:22:44 -0400 Received: by mail-ed1-x531.google.com with SMTP id h16so13861002eds.5 for ; Sun, 24 May 2020 20:22:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=KPo3GFxcl1HW1OPctsI3wlO9/XX2+0S/oPRF/Uusaok=; b=RP1RDUGkwfRg61dnEKDk6kwltyvOBYIFmrArTelmmmCZqh3PIQcAEriZ5njqclQehc saiDmqQAbh7jBKhoJ78B0vkaDi3VDsms9kYF8HrzV2CwX2QJjGBZER56PcLSmF6xOWF5 JAjPz619xRTCtQB+t+TLsk5edCe6QYP2frM8CtM+kNfgEjFy1Ni7PDlDG4LjJVfLwzQo /YrXnqUMCCXjLXvtpmiFFtgNwMEqFjhUdbgo/v7lwSCmjrJmSUkYe/G1imYzEhfJz4fU f3hwNm25gcmXSZU43648YmoZpg1Sy9N4YE2SSsegDR2z59K6jHMDbjKCVn42/+RPglCJ /YKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=KPo3GFxcl1HW1OPctsI3wlO9/XX2+0S/oPRF/Uusaok=; b=k3+hagYp3CCWexGBbdXx/BDz5/0zL2N7K/Zhln6fx7q5P9p/J4pKChhqHNLHQ/IzSx 9O4aCy3+rFd9DcCLL6k3ZRnOu5/J2MgSCe/iKTB+K5ntvXIp0Axm74a/pS1f5E1AAIF2 k+4Cs3l/AjQGUL8XatFyMfKEiHZKMzyZmMv0eI0/X7wTjbp3m1iBp55/Kb9QyY8COGc9 a4+v8vLbW+JG2VS7p1LYgpxQhXHbqaEvfKExJLCE8QSt8drgUx5IoJfLUIvQOzvPcxhp fvBgB6nv7obAzNFB4qeWXPPUfZ67euvtGswkY7GIkxWTqpEeP0O6RvEeP7oBi4qAYGjO OVBw== X-Gm-Message-State: AOAM530tVs3rn+pX9hNOzvshIOVHVOyPMpSclXLafyRS9yBpXPqLXGuT /PBpBUW4dOfGppPL2k4oXgwPbugFiXzZ+FrhXWQ5UrpK7P4= X-Google-Smtp-Source: ABdhPJzabgqUid5NMnio8OzRcchW4RHPnYlBL9P11LblM7exsQaAdNVF69/5Jn2SHpnaMfvdbo+MuetAdLdcmI8tthQ= X-Received: by 2002:a50:d513:: with SMTP id u19mr13821717edi.173.1590376961766; Sun, 24 May 2020 20:22:41 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a17:907:9e8:0:0:0:0 with HTTP; Sun, 24 May 2020 20:22:40 -0700 (PDT) In-Reply-To: References: From: Vladimir Nikishkin Date: Mon, 25 May 2020 11:22:40 +0800 Message-ID: Subject: Re: 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::531; envelope-from=lockywolf@gmail.com; helo=mail-ed1-x531.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=RP1RDUGk; 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: 1esUKBEpgu1h Additionally, what does the :buffer on header argument do? I seem to see it in the examples, but can't find in the info document. 2020-05-25 11:10 GMT+08:00, Vladimir Nikishkin : > 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 > -- Yours sincerely, Vladimir Nikishkin