Closed mroman42 closed 4 months ago
One option is to add a custom tikzset
to the texfrag-header. The following changes the color of all nodes to white
:
(eval-after-load "preview"
'(add-to-list 'preview-default-preamble "\\PreviewEnvironment{tikzpicture}" t))
(defcustom custom-texfrag-header
"
\\documentclass{article}
\\usepackage{amsmath,amsfonts}
\\usepackage[utf8]{inputenc}
\\usepackage[T1]{fontenc}
\\usepackage{tikz}
\\usetikzlibrary{positioning}
\\usetikzlibrary{fit}
\\tikzset{every node/.style={white}}
"
"LaTeX header inserted by the function `texfrag-header-function' into the LaTeX buffer."
:group 'texfrag
:type 'string)
(add-hook 'markdown-mode-hook
(lambda ()
(setq texfrag-header-function (lambda () custom-texfrag-header))
))
@mroman42 Is @dozed solution feasible for you?
Yes, thank you, @dozed. I used a macro file loaded on each file for a while; at some point, I just started using a white background anyway.
\tikzset{color=localblack}
\tikzset{every picture/.style={color=localblack,draw}}
I will just close the issue (cc @TobiasZawada).
Equations on a dark background take a white color, as they should (#19). However, tikz figures over a dark background are still drawn in black.
Is there a way to override this mechanism?