From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jarmo Hurri Subject: Re: Latex preview foreground color problem Date: Wed, 01 Aug 2018 09:07:58 +0300 Message-ID: <87muu6liv5.fsf@iki.fi> References: <87y3dtgitb.fsf@iki.fi> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57164) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fkkIv-0002Fi-9b for emacs-orgmode@gnu.org; Wed, 01 Aug 2018 02:08:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fkkIs-0000Gn-4s for emacs-orgmode@gnu.org; Wed, 01 Aug 2018 02:08:13 -0400 Received: from [195.159.176.226] (port=40386 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fkkIr-00009e-Sa for emacs-orgmode@gnu.org; Wed, 01 Aug 2018 02:08:10 -0400 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1fkkGg-0001aD-3Z for emacs-orgmode@gnu.org; Wed, 01 Aug 2018 08:05:54 +0200 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 Eric S Fraga writes: > On Monday, 30 Jul 2018 at 12:43, Jarmo Hurri wrote: >> In my emacs config file I now have: >> >> (plist-put org-format-latex-options :foreground "white") >> (plist-put org-format-latex-options :scale 2) > > This works for me but in the context that I also change the background > to black (which does not necessarily match my Emacs background...). Try > that just to see? It may be a LaTeX issue. This seems to be a compatibility issue with the forest package in Latex. The problem is demonstrated and explained in the org file below. I don't know yet what the solution is. Jarmo # --------------------------------------------------------------------- #+LATEX_HEADER: \usepackage{forest} * \LaTeX{} fragments: package ~forest~ confuses foreground color setting Interestingly enough, the foreground color set by #+BEGIN_SRC elisp (plist-put org-format-latex-options :foreground "White") #+END_SRC does /not/ change the foreground color in this simple invariant equation \[ ab^n = ab\cdot b^{n-1} \] if ~usepackage{forest}~ is included in \LaTeX{} header. When package ~forest~ is not used, setting the color works just fine. To make things a bit more complicated, after commenting or uncommenting the ~LATEX_HEADER~ line, you need to remove the contents of directory ~ltximg~ in the working directory to see the difference, because the system caches the generated images of the equations there.