emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* pgfplots and tikz break LaTeX inline overlay colors
@ 2016-07-03 17:10 Ulrich J. Herter
  2016-07-25 13:07 ` Nicolas Goaziou
  0 siblings, 1 reply; 6+ messages in thread
From: Ulrich J. Herter @ 2016-07-03 17:10 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1696 bytes --]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Hi everyone,

Today I found a strange issue which I couldn't find a solution for:

When using pgfplots and tikz LaTeX packages for graphics in a
document, the colouring of LaTeX overlays in org-mode is broken. The
font colour of snippets is always black, super hard to read in on a
dark colour scheme. See attached images.

Steps to reproduce:
- - Do C-c C-x C-l on one of the formulas.
- - When pgfplots or tikz is loaded, the :foreground setting in
org-format-latex-options is ignored...

Any help with that would be much appreciated!

Thanks
Uli


Minimal example:
- --------------------------8<-------------------------------------
#+LATEX_HEADER: \usepackage{pgfplots}
# #+LATEX_HEADER: \usepackage{tikz}

Formula: $$1+1=2$$
Inline Latex snippet: $$1+1=2$$

#+begin_src emacs-lisp :results pp
(print org-format-latex-options)
#+end_src

#+RESULTS:
: (:foreground auto :background default :scale 3 :html-foreground
"Black" :html-background "Transparent" :html-scale 1.0 :matchers
: 	     ("begin" "$1" "$" "$$" "\\(" "\\["))
- ------------------------>8---------------------------------------


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQErBAEBCAAVBQJXeUccDhx1amhAcG9zdGVvLmRlAAoJEG7lIfkMHh7QYQoH/1sE
joMoWd78gXkwvihQzqTe2BwbEmK2qwwFJ+BroPLm3vb+O5c/vDlPVVPDfOw0e1yh
46W3vEWM4O2YQYXbNHyiR33I6LdY6A7fA6eeXzQ8eVCWggTahUfom3papowpOsqf
YhOxZsNNa5jE314MG+oJSt2kq9rY29pc9c6WsUG5Ajxk67idb87yjN8phHQbnsV5
iUQWiecIrpRsQdfaTWO/2yYU3ZctXRbOD0L/Cn49s0iuBZEZfNvdA8/FANQciSjQ
QuYiUXNZS/o6P2p7uW4uj351IwxNlrdO0eYr7p3iS1KX8x4GB047JccSBgxr9w0C
N5cQ+fptUbSuxJSju98=
=E4Fj
-----END PGP SIGNATURE-----

[-- Attachment #2: SnipNoPgfplots.png --]
[-- Type: image/png, Size: 64981 bytes --]

[-- Attachment #3: SnipWithPgfplots.png --]
[-- Type: image/png, Size: 65246 bytes --]

[-- Attachment #4: SnipNoPgfplots.png.sig --]
[-- Type: application/pgp-signature, Size: 302 bytes --]

[-- Attachment #5: SnipWithPgfplots.png.sig --]
[-- Type: application/pgp-signature, Size: 302 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: pgfplots and tikz break LaTeX inline overlay colors
  2016-07-03 17:10 pgfplots and tikz break LaTeX inline overlay colors Ulrich J. Herter
@ 2016-07-25 13:07 ` Nicolas Goaziou
  2016-07-25 14:32   ` Ulrich J. Herter
                     ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Nicolas Goaziou @ 2016-07-25 13:07 UTC (permalink / raw)
  To: Ulrich J. Herter; +Cc: emacs-orgmode

Hello,

"Ulrich J. Herter" <ujh@posteo.de> writes:

> When using pgfplots and tikz LaTeX packages for graphics in a
> document, the colouring of LaTeX overlays in org-mode is broken. The
> font colour of snippets is always black, super hard to read in on a
> dark colour scheme. See attached images.
>
> Steps to reproduce:
> - Do C-c C-x C-l on one of the formulas.
> - When pgfplots or tikz is loaded, the :foreground setting in
> org-format-latex-options is ignored...
>
> Any help with that would be much appreciated!

I cannot reproduce it in development version, where formula display
mechanism was rewritten recently.

Could you update Org and try again?

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: pgfplots and tikz break LaTeX inline overlay colors
  2016-07-25 13:07 ` Nicolas Goaziou
@ 2016-07-25 14:32   ` Ulrich J. Herter
       [not found]   ` <3a1bbecd238c4a48bca81bf9d773a6f0@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
  2016-07-25 15:15   ` Ulrich J. Herter
  2 siblings, 0 replies; 6+ messages in thread
From: Ulrich J. Herter @ 2016-07-25 14:32 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 3005 bytes --]

Hi Nicolas,

thanks for looking into this!

Am Montag, den 25.07.2016, 15:07 +0200 schrieb Nicolas Goaziou:
"Ulrich J. Herter" <ujh@posteo.de> writes:

When using pgfplots and tikz LaTeX packages for graphics in a
document, the colouring of LaTeX overlays in org-mode is broken.
The
font colour of snippets is always black, super hard to read in on a
dark colour scheme. See attached images.

Steps to reproduce:
- Do C-c C-x C-l on one of the formulas.
- When pgfplots or tikz is loaded, the :foreground setting in
org-format-latex-options is ignored...

Any help with that would be much appreciated!

I cannot reproduce it in development version, where formula display
mechanism was rewritten recently.

Could you update Org and try again?

I'm sorry, but I'm still getting this error in release_8.3.5-1000-
g9d3a4a.dirty (installed from Arch linux AUR), I attached a screenshot.
Could it be something with my config? The striped .emacs along with the
examples below.

--------------------.emacs---8<----------------------------------------
(require 'org-install)

(custom-set-variables
 '(custom-enabled-themes (quote (tsdh-dark))))

(require 'org)
(require 'ox-latex)

(add-hook 'org-mode-hook 'turn-on-org-cdlatex)
(setq org-latex-create-formula-image-program 'dvipng)
(setq org-highlight-latex-and-related '(latex script entities))
(plist-put org-format-latex-options :scale 3)

(add-to-list 'org-latex-default-packages-alist '("" "caption" nil))
(add-to-list 'org-latex-packages-alist '("" "parskip" nil))
(add-to-list 'org-latex-packages-alist '("" "xcolor" nil))
(add-to-list 'org-latex-packages-alist '("" "siunitx" t))
(add-to-list 'org-latex-packages-alist '("" "minted" nil)) ; Code
listings
(setq org-latex-listings 'minted)
(setq org-latex-minted-options
              '(("frame" "lines") ("linenos=true") ("stepnumber" "5")
("framesep" "6pt")
    ("mathescape" "true") ("fontsize" "\\footnotesize")))

(add-to-list 'org-latex-classes
          '("koma-article"
             "\\documentclass{scrartcl}"
             ("\\section{%s}" . "\\section*{%s}")
             ("\\subsection{%s}" . "\\subsection*{%s}")
             ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
             ("\\paragraph{%s}" . "\\paragraph*{%s}")
             ("\\subparagraph{%s}" . "\\subparagraph*{%s}")))
--------------------.emacs--->8----------------------------------------


--------------------example1.org---8<----------------------------------
# #+LATEX_HEADER: \usepackage{pgfplots,tikz}
$$(a+b)^2=a^2+2ab+b^2$$
----
----------------example1.org--->8----------------------------------

--------------------example2.org---8<----------------------------------
#+LATEX_HEADER: \usepackage{pgfplots,tikz}
$$a^2+b^2=c^2$$
--------------------example2.org--->8----------------------------------


Thanks and regards
Uli

[-- Attachment #2: Bildschirmfoto vom 2016-07-25 16-07-28.png --]
[-- Type: image/png, Size: 48767 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: pgfplots and tikz break LaTeX inline overlay colors
       [not found]   ` <3a1bbecd238c4a48bca81bf9d773a6f0@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
@ 2016-07-25 14:38     ` Eric S Fraga
  2016-07-25 15:18       ` Ulrich J. Herter
  0 siblings, 1 reply; 6+ messages in thread
From: Eric S Fraga @ 2016-07-25 14:38 UTC (permalink / raw)
  To: Ulrich J. Herter; +Cc: emacs-orgmode@gnu.org

Ulrich,

I may be completely off-base here but there are settings for controlling
what the LaTeX snippets look like and these may affect your case.  I
used to use the following when I had emacs with a dark background:

#+begin_src emacs-lisp :results none
  (setq org-format-latex-options '(:foreground "white" :background "black" :scale 3 :html-foreground "Black" :html-background "Transparent" :html-scale 1.0 :matchers ("begin" "$1" "$" "$$" "\\(" "\\["))
        org-latex-create-formula-image-program 'imagemagick
        org-tree-slide-heading-emphasis t
        )
#+end_src

Maybe play with these, specifically the first line?

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.94.1, Org release_8.3.4-1049-g481709

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: pgfplots and tikz break LaTeX inline overlay colors
  2016-07-25 13:07 ` Nicolas Goaziou
  2016-07-25 14:32   ` Ulrich J. Herter
       [not found]   ` <3a1bbecd238c4a48bca81bf9d773a6f0@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
@ 2016-07-25 15:15   ` Ulrich J. Herter
  2 siblings, 0 replies; 6+ messages in thread
From: Ulrich J. Herter @ 2016-07-25 15:15 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 3106 bytes --]

Hi Nicolas,

sorry for the previous mail, somehow I lost the formatting.

Am Montag, den 25.07.2016, 15:07 +0200 schrieb Nicolas Goaziou:
> "Ulrich J. Herter" <ujh@posteo.de> writes:
> 
> > 
> > When using pgfplots and tikz LaTeX packages for graphics in a
> > document, the colouring of LaTeX overlays in org-mode is broken.
> > The
> > font colour of snippets is always black, super hard to read in on a
> > dark colour scheme. See attached images.
> > 
> > Steps to reproduce:
> > - Do C-c C-x C-l on one of the formulas.
> > - When pgfplots or tikz is loaded, the :foreground setting in
> > org-format-latex-options is ignored...
> > 
> > Any help with that would be much appreciated!
> 
> I cannot reproduce it in development version, where formula display
> mechanism was rewritten recently.
> 
> Could you update Org and try again?
> 
I'm sorry, but I'm still getting this error in release_8.3.5-1000-
g9d3a4a.dirty (installed from Arch linux AUR), I attached a screenshot.
Could it be something with my config? The striped .emacs along with the
examples below.


Thanks and regards
Uli


--------------------.emacs---8<----------------------------------------
(require 'org-install)

(custom-set-variables
 '(custom-enabled-themes (quote (tsdh-dark))))

(require 'org)
(require 'ox-latex)

(add-hook 'org-mode-hook 'turn-on-org-cdlatex)
(setq org-latex-create-formula-image-program 'dvipng)
(setq org-highlight-latex-and-related '(latex script entities))
(plist-put org-format-latex-options :scale 3)

(add-to-list 'org-latex-default-packages-alist '("" "caption" nil))
(add-to-list 'org-latex-packages-alist '("" "parskip" nil))
(add-to-list 'org-latex-packages-alist '("" "xcolor" nil))
(add-to-list 'org-latex-packages-alist '("" "siunitx" t))
(add-to-list 'org-latex-packages-alist '("" "minted" nil)) ; Code
listings
(setq org-latex-listings 'minted)
(setq org-latex-minted-options
              '(("frame" "lines") ("linenos=true") ("stepnumber" "5")
("framesep" "6pt")
    ("mathescape" "true") ("fontsize" "\\footnotesize")))

(add-to-list 'org-latex-classes
          '("koma-article"
             "\\documentclass{scrartcl}"
             ("\\section{%s}" . "\\section*{%s}")
             ("\\subsection{%s}" . "\\subsection*{%s}")
             ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
             ("\\paragraph{%s}" . "\\paragraph*{%s}")
             ("\\subparagraph{%s}" . "\\subparagraph*{%s}")))
--------------------.emacs--->8----------------------------------------


--------------------example1.org---8<----------------------------------
# #+LATEX_HEADER: \usepackage{pgfplots,tikz}
$$(a+b)^2=a^2+2ab+b^2$$
--------------------example1.org--->8----------------------------------

--------------------example2.org---8<----------------------------------
#+LATEX_HEADER: \usepackage{pgfplots,tikz}
$$a^2+b^2=c^2$$
--------------------example2.org--->8----------------------------------

[-- Attachment #2: Bildschirmfoto vom 2016-07-25 16-07-28.png --]
[-- Type: image/png, Size: 48767 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: pgfplots and tikz break LaTeX inline overlay colors
  2016-07-25 14:38     ` Eric S Fraga
@ 2016-07-25 15:18       ` Ulrich J. Herter
  0 siblings, 0 replies; 6+ messages in thread
From: Ulrich J. Herter @ 2016-07-25 15:18 UTC (permalink / raw)
  To: emacs-orgmode

Hi Eric,

thanks for the reply.

Am Montag, den 25.07.2016, 15:38 +0100 schrieb Eric S Fraga:
> 
> #+begin_src emacs-lisp :results none
>   (setq org-format-latex-options '(:foreground "white" :background
> "black" :scale 3 :html-foreground "Black" :html-background
> "Transparent" :html-scale 1.0 :matchers ("begin" "$1" "$" "$$" "\\("
> "\\["))
>         org-latex-create-formula-image-program 'imagemagick
>         org-tree-slide-heading-emphasis t
>         )
> #+end_src
> 
Well, thats what I tried first. It didn't have any effect when the
pgfplots and tikz packages were loaded. Something seems to overwrite
the font color, I assume.

Regards
Uli

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-07-25 15:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-03 17:10 pgfplots and tikz break LaTeX inline overlay colors Ulrich J. Herter
2016-07-25 13:07 ` Nicolas Goaziou
2016-07-25 14:32   ` Ulrich J. Herter
     [not found]   ` <3a1bbecd238c4a48bca81bf9d773a6f0@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
2016-07-25 14:38     ` Eric S Fraga
2016-07-25 15:18       ` Ulrich J. Herter
2016-07-25 15:15   ` Ulrich J. Herter

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).