From unknown Mon Jun 16 23:49:02 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#51610 <51610@debbugs.gnu.org> To: bug#51610 <51610@debbugs.gnu.org> Subject: Status: 13.0.14; PGF background interferes with preview background Reply-To: bug#51610 <51610@debbugs.gnu.org> Date: Tue, 17 Jun 2025 06:49:02 +0000 retitle 51610 13.0.14; PGF background interferes with preview background reassign 51610 auctex submitter 51610 Marten Lienen severity 51610 normal tag 51610 wontfix thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 05 10:51:09 2021 Received: (at submit) by debbugs.gnu.org; 5 Nov 2021 14:51:09 +0000 Received: from localhost ([127.0.0.1]:46800 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mj0Ye-0002Lg-20 for submit@debbugs.gnu.org; Fri, 05 Nov 2021 10:51:09 -0400 Received: from lists.gnu.org ([209.51.188.17]:58832) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mizUh-0006P2-V8 for submit@debbugs.gnu.org; Fri, 05 Nov 2021 09:43:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56702) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mizUg-0003uA-SF for bug-auctex@gnu.org; Fri, 05 Nov 2021 09:42:59 -0400 Received: from mail-pl1-x62f.google.com ([2607:f8b0:4864:20::62f]:43646) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mizUZ-0001dd-PH for bug-auctex@gnu.org; Fri, 05 Nov 2021 09:42:58 -0400 Received: by mail-pl1-x62f.google.com with SMTP id y1so11076652plk.10 for ; Fri, 05 Nov 2021 06:42:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=rWvLqfUhFY+gI8HS88AlB6VtB6EaCeOeHwnXIq2qK3k=; b=GBUim9TafvttZ0YihErdZlIugudU3XWHSy5595C/rtEiU+a2s8tFlxGYP/hSjDHVqe kp8sBnUQDvHyfDgCOBKJ5pEGwZaXOKuanCwslkxTQWyN75J4hUkD4ABrMF0QVRSKoaN9 aLjn2b5PP/RzFM4OP3T6v1W8hNboG5U7lMV/hlFCn0qkfIpqluUlEVtsfzHxrGGqF3kk o4Rjh1b4hPwZe6nxj7AYBn4kxzhk9InQULAszssrdL7B/p0/gxGmG7MAKUCu2d4sRPrJ VwvNCSIZOcTYa1cTPYZ9yTUjbQzobp43MW0ZQ//+2lYBkglfUoGnDSYM3CTSKVMtMFC0 sIrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=rWvLqfUhFY+gI8HS88AlB6VtB6EaCeOeHwnXIq2qK3k=; b=CyvukzJnhsAW9VLiaAG5zRSLgAWo8/5Yw9vvyKnetXUVnEYX1LYn4CihnEiXt4P+ok Z4xTRiLYKRyTjxDINWZF1+SkrL9XKFlvc0g9jFoELWrtlkuzbTGHmy+x7vggjEkJcCi3 rtnnDFROs9FWwRwviYB3ZCmsY8MHQRtr6fZCPQZmXd0E/3sT5GqAgYuaTtui/xfiHLtz uwR8AGc8TxhPIpJ+e/D4fDeTxMdpeuwByQDdFPpapowY2oEz4D786S0sdOWb40DPOteg N4EzwjMeajS6x9YqI+uiN0HWrwKjy9sTORLcM0KfeMCOBhk8cBKRzKm5FT6R/gnq2elP 6t0g== X-Gm-Message-State: AOAM533oGAo2AI2FOaEf133/a1w7x/VyzQulhevZ8LdeNiXeLL/Ne/Gk npgS4Q2ImSPFgcXM0wrPd7z25tlDodP7jtrEYeYTaOzm19U= X-Google-Smtp-Source: ABdhPJw9yZ24ld2iup54Z5lTLlEcEkxYTR+AvykW9Ad/BGilNO0mzVycSt2lLGw28vSYy2H+yh90YLaLEA4sHtvq6IU= X-Received: by 2002:a17:90a:917:: with SMTP id n23mr30361222pjn.131.1636119768674; Fri, 05 Nov 2021 06:42:48 -0700 (PDT) MIME-Version: 1.0 From: Marten Lienen Date: Fri, 5 Nov 2021 14:42:37 +0100 Message-ID: Subject: 13.0.14; PGF background interferes with preview background To: bug-auctex@gnu.org Content-Type: multipart/alternative; boundary="0000000000009f372105d00ad1e1" Received-SPF: pass client-ip=2607:f8b0:4864:20::62f; envelope-from=marten.lienen@gmail.com; helo=mail-pl1-x62f.google.com 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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, T_SPF_TEMPERROR=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Fri, 05 Nov 2021 10:51:06 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --0000000000009f372105d00ad1e1 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable The example latex document that I have pasted below contains a simple PGF figure (just an empty square background) that I generated with matplotlib. If you set your emacs to a dark theme, you will see that the previews are dark-on-light if the preview includes the figure but light-on-dark if it is not included. So `preview-region` with the region just including the \section and first equation environment generates exactly the expected preview, but `preview-buffer` inverts the colors in *all* previews, i.e. the section header and equation are now dark on light background, which does not mesh well with a dark emacs theme. Best, Marten \documentclass{article} \usepackage{tikz} \begin{document} \section{PGF screws up Background} \begin{equation*} f(x) =3D \int_{0}^{\infty} \exp(-x^{2}) \mathrm{d}x \end{equation*} \begin{figure}[htbp] \centering \begingroup% \makeatletter% \begin{pgfpicture}% \pgfpathrectangle{\pgfpointorigin}{\pgfqpoint{1.666667in}{1.000000in}}% \pgfusepath{use as bounding box, clip}% \begin{pgfscope}% \pgfsetbuttcap% \pgfsetmiterjoin% \definecolor{currentfill}{rgb}{1.000000,1.000000,1.000000}% \pgfsetfillcolor{currentfill}% \pgfsetlinewidth{0.000000pt}% \definecolor{currentstroke}{rgb}{1.000000,1.000000,1.000000}% \pgfsetstrokecolor{currentstroke}% \pgfsetstrokeopacity{0.000000}% \pgfsetdash{}{0pt}% \pgfpathmoveto{\pgfqpoint{0.000000in}{0.000000in}}% \pgfpathlineto{\pgfqpoint{1.666667in}{0.000000in}}% \pgfpathlineto{\pgfqpoint{1.666667in}{1.000000in}}% \pgfpathlineto{\pgfqpoint{0.000000in}{1.000000in}}% \pgfpathclose% \pgfusepath{fill}% \end{pgfscope}% \end{pgfpicture}% \makeatother% \endgroup% \caption{A PGF figure.} \label{fig:pgf-figure} \end{figure} \begin{equation*} f(x) =3D \int_{0}^{\infty} \exp(-x^{2}) \mathrm{d}x \end{equation*} \end{document} --------------------------- Emacs : GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.20, cairo version 1.16.0) of 2020-09-19 Package: 13.0.14 Run buffer contents: Running `Preview-LaTeX' on `example' with ``pdflatex -interaction=3Dnonstopmode -file-line-error \&prv_example "/AUCTEXINPUT{" example.tex "}"'' This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020/Debian) (preloaded format=3Dpdflatex) restricted \write18 enabled. entering extended mode LaTeX2e <2020-10-01> patch level 4 L3 programming layer <2021-01-09> xparse <2020-03-03> CUSTOMISED FORMAT. Preloaded files: . article.cls 2020/04/10 v1.4m Standard LaTeX document class size10.clo 2020/04/10 v1.4m Standard LaTeX file (size option) tikz.sty 2020/12/27 v3.1.8b (3.1.8b) pgf.sty 2020/12/27 v3.1.8b (3.1.8b) pgfrcs.sty 2020/12/27 v3.1.8b (3.1.8b) pgfrcs.code.tex pgfcore.sty 2020/12/27 v3.1.8b (3.1.8b) graphicx.sty 2020/09/09 v1.2b Enhanced LaTeX Graphics (DPC,SPQR) keyval.sty 2014/10/28 v1.15 key=3Dvalue parser (DPC) graphics.sty 2020/08/30 v1.4c Standard LaTeX Graphics (DPC,SPQR) trig.sty 2016/01/03 v1.10 sin cos tan (DPC) graphics.cfg 2016/06/04 v1.11 sample graphics configuration pdftex.def 2020/10/05 v1.2a Graphics/color driver for pdftex pgfsys.sty 2020/12/27 v3.1.8b (3.1.8b) pgfsys.code.tex pgfsyssoftpath.code.tex 2020/12/27 v3.1.8b (3.1.8b) pgfsysprotocol.code.tex 2020/12/27 v3.1.8b (3.1.8b) xcolor.sty 2016/05/11 v2.12 LaTeX color extensions (UK) color.cfg 2016/01/02 v1.6 sample color configuration pgfcore.code.tex pgfcomp-version-0-65.sty 2020/12/27 v3.1.8b (3.1.8b) pgfcomp-version-1-18.sty 2020/12/27 v3.1.8b (3.1.8b) pgffor.sty 2020/12/27 v3.1.8b (3.1.8b) pgfkeys.sty pgfkeys.code.tex pgfmath.sty pgfmath.code.tex pgffor.code.tex tikz.code.tex . (./example.tex (/usr/share/texlive/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def) No file example.aux. (/usr/share/texlive/texmf-dist/tex/context/base/mkii/supp-pdf.mkii [Loading MPS to PDF converter (version 2006.09.02).] ) (/usr/share/texlive/texmf-dist/tex/latex/epstopdf-pkg/epstopdf-base.sty (/usr/share/texlive/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg)) (/home/ml/.emacs.d/straight/build/auctex/latex/preview.sty (/usr/share/texlive/texmf-dist/tex/generic/luatex85/luatex85.sty) (/home/ml/.emacs.d/straight/build/auctex/latex/prtightpage.def) (/home/ml/.emacs.d/straight/build/auctex/latex/prauctex.def No auxiliary output files. (/home/ml/.emacs.d/straight/build/auctex/latex/prauctex.cfg)) (/home/ml/.emacs.d/straight/build/auctex/latex/prfootnotes.def) Preview: Fontsize 10pt P... [...] ....9 \begin{equation*} ./example.tex:10: Missing $ inserted. $ l.10 f(x) =3D \int _{0}^{\infty} \exp(-x^{2}) \mathrm{d}x ./example.tex:11: Missing $ inserted. $ l.11 \end{equation*} ./example.tex:11: Preview: Snippet 2 ended.(563432+233020x6750219). <-><-> l.11 \end{equation*} [2] ./example.tex:13: Preview: Snippet 3 started. <-><-> l.13 \begin{figure} [htbp] ./example.tex:41: Preview: Snippet 3 ended.(6305509+0x22609920). <-><-> l.41 \end{figure} [3] ./example.tex:43: Preview: Snippet 4 started. <-><-> l.43 \begin{equation*} ./example.tex:43: Undefined control sequence. \equation* ...oindent }{\endgroup }\pr@\equation* l.43 \begin{equation*} ./example.tex:44: Missing $ inserted. $ l.44 f(x) =3D \int _{0}^{\infty} \exp(-x^{2}) \mathrm{d}x ./example.tex:45: Missing $ inserted. $ l.45 \end{equation*} ./example.tex:45: Preview: Snippet 4 ended.(563432+233020x6750219). <-><-> l.45 \end{equation*} [4] ) (see the transcript file for additional information)<= /usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy10.pfb> Output written on example.pdf (4 pages, 61267 bytes). Transcript written on example.log. TeX Output exited as expected with code 1 at Fri Nov 5 14:33:08 Running `Preview-PDF2DSC' with ``pdf2dsc example.pdf example.prv/tmpo0zR3C/preview.dsc'' Preview-PDF2DSC finished at Fri Nov 5 14:33:08 Running `Preview-Ghostscript' with ``/usr/bin/rungs -sOutputFile\=3Dexample.prv/tmpo0zR3C/pr1-\%d.png -q -dDELAYSAFER -dNOPAUSE -DNOPLATFONTS -dPrinted -dTextAlphaBits\=3D4 -dGraphicsAlphaBits\=3D4 -sDEVICE\=3Dpng16m -r244.974x244.343 -dDELAYBIND'' Preview-Ghostscript finished at Fri Nov 5 14:33:08 current state: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (setq AUCTeX-version "13.0.14" LaTeX-command-style '(("" "%(PDF)%(latex) %(file-line-error) %(extraopts) %(output-dir) %S%(PDFout)") ) image-types '(svg png gif tiff jpeg xpm xbm pbm) preview-image-type 'png preview-image-creators '((dvipng (open preview-gs-open preview-dvipng-process-setup) (place preview-gs-place) (close preview-dvipng-close)) (png (open preview-gs-open) (place preview-gs-place) (close preview-gs-close)) (jpeg (open preview-gs-open) (place preview-gs-place) (close preview-gs-close)) (pnm (open preview-gs-open) (place preview-gs-place) (close preview-gs-close)) (tiff (open preview-gs-open) (place preview-gs-place) (close preview-gs-close)) ) preview-dvipng-image-type 'png preview-dvipng-command "dvipng -picky -noghostscript %d -o %m/prev%%03d.png" preview-pdf2dsc-command "pdf2dsc %(O?pdf) %m/preview.dsc" preview-gs-command "/usr/bin/rungs" preview-gs-options '("-q" "-dDELAYSAFER" "-dNOPAUSE" "-DNOPLATFONTS" "-dPrinted" "-dTextAlphaBits=3D4" "-dGraphicsAlphaBits=3D4") preview-gs-image-type-alist '((png png "-sDEVICE=3Dpng16m") (dvipng png "-sDEVICE=3Dpng16m") (jpeg jpeg "-sDEVICE=3Djpeg") (pnm pbm "-sDEVICE=3Dpnmraw") (tiff tiff "-sDEVICE=3Dtiff12nc")) preview-fast-conversion t preview-prefer-TeX-bb nil preview-dvips-command "dvips -Pwww -i -E %d -o %m/preview.000" preview-fast-dvips-command "dvips -Pwww %d -o %m/preview.ps" preview-scale-function 'cqql-preview-scale-up preview-LaTeX-command '("%`%l \"\\nonstopmode\\nofiles\\PassOptionsToPackage{" ("," . preview-required-option-list) "}{preview}\\AtBeginDocument{\\ifx\\ifPreview\\undefined" preview-default-preamble "\\fi}\"%' \"\\detokenize{\" %(t-filename-only) \"}\"") preview-required-option-list '("active" "tightpage" "auctex" (preview-preserve-counters "counters")) preview-preserve-counters nil preview-default-option-list '("displaymath" "floats" "graphics" "textmath" "sections" "footnotes") preview-default-preamble '("\\RequirePackage[" ("," . preview-default-option-list) "]{preview}[2004/11/05]") preview-LaTeX-command-replacements nil preview-dump-replacements '(preview-LaTeX-command-replacements ("\\`\\([^ ]+\\)\\(?: +\\(?:\\(--?kanji[=3D ][= ^ ]+\\)\\|\\(--?output-directory[=3D ][^ ]+\\)\\|-\\(?:[^ \\\"]\\|\\\\.\\|\"[^\"]*\"\\)*\\)\\)*\\(.*\\)\\'" "\\1 -ini \\2 \\3 -interaction=3Dnonstopmode \"&\\1\" " preview-format-name ".ini \\4") ) preview-undump-replacements '(("\\`\\([^ ]+\\)\\(?: +\\(?:\\(--?kanji[=3D ][^ ]+\\)\\|\\(--?output-directory[=3D ][^ ]+\\)\\|-\\(?:[^ \\\"]\\|\\\\.\\|\"[^\"]*\"\\)*\\)\\)*.* \"\\\\input\" \"\\\\detokenize{\" \\(.*\\) \"}\"\\'" "\\1 \\2 \\3 -interaction=3Dnonstopmode -file-line-error= " preview-format-name " \"/AUCTEXINPUT{\" \\4 \"}\"") ) preview-auto-cache-preamble t preview-TeX-style-dir "/home/ml/.emacs.d/straight/build/auctex/latex" ) Output from running `/usr/bin/rungs -h': GPL Ghostscript 9.54.0 (2021-03-30) Copyright (C) 2021 Artifex Software, Inc. All rights reserved. Usage: gs [switches] [file1.ps file2.ps ...] Most frequently used switches: (you can use # in place of =3D) -dNOPAUSE no pause after page | -q `quiet', fewer messages -gx page size in pixels | -r pixels/inch resolutio= n -sDEVICE=3D select device | -dBATCH exit after last fil= e -sOutputFile=3D select output file: - for stdout, |command for pipe, embed %d or %ld for page # Input formats: PostScript PostScriptLevel1 PostScriptLevel2 PostScriptLevel3 PDF Default output device: x11alpha Available devices: alc1900 alc2000 alc4000 alc4100 alc8500 alc8600 alc9100 ap3250 appledmp atx23 atx24 atx38 bbox bit bitcmyk bitrgb bitrgbtags bj10e bj10v bj10vh bj200 bjc600 bjc800 bjc880j bjccmyk bjccolor bjcgray bjcmono bmp16 bmp16= m bmp256 bmp32b bmpgray bmpmono bmpsep1 bmpsep8 ccr cdeskjet cdj1600 cdj50= 0 cdj550 cdj670 cdj850 cdj880 cdj890 cdj970 cdjcolor cdjmono cdnj500 cfax chp2200 cif cljet5 cljet5c cljet5pr coslw2p coslwxl cups declj250 deskje= t devicen dfaxhigh dfaxlow display dj505j djet500 djet500c dl2100 dnj650c epl2050 epl2050p epl2120 epl2500 epl2750 epl5800 epl5900 epl6100 epl6200 eplcolor eplmono eps2write eps9high eps9mid epson epsonc escp escpage faxg3 faxg32d faxg4 fmlbp fmpr fpng fs600 gdi hl1240 hl1250 hl7x0 hocr hpdj1120c hpdj310 hpdj320 hpdj340 hpdj400 hpdj500 hpdj500c hpdj510 hpdj520 hpdj540 hpdj550c hpdj560c hpdj600 hpdj660c hpdj670c hpdj680c hpdj690c hpdj850c hpdj855c hpdj870c hpdj890c hpdjplus hpdjportable ibmpr= o ijs imagen inferno ink_cov inkcov itk24i itk38 iwhi iwlo iwlq jetp3852 jj100 jpeg jpegcmyk jpeggray la50 la70 la75 la75plus laserjet lbp310 lbp320 lbp8 lex2050 lex3200 lex5700 lex7000 lips2p lips3 lips4 lips4v lj250 lj3100sw lj4dith lj4dithp lj5gray lj5mono ljet2p ljet3 ljet3d ljet= 4 ljet4d ljet4pjl ljetplus ln03 lp1800 lp1900 lp2000 lp2200 lp2400 lp2500 lp2563 lp3000c lp7500 lp7700 lp7900 lp8000 lp8000c lp8100 lp8200c lp8300= c lp8300f lp8400f lp8500c lp8600 lp8600f lp8700 lp8800c lp8900 lp9000b lp9000c lp9100 lp9200b lp9200c lp9300 lp9400 lp9500c lp9600 lp9600s lp9800c lps4500 lps6500 lq850 lxm3200 lxm5700m m8510 md1xMono md2k md50Eco md50Mono md5k mgr4 mgr8 mgrgray2 mgrgray4 mgrgray8 mgrmono miff2= 4 mj500c mj6000c mj700v2c mj8000c ml600 necp6 npdl nullpage oce9050 ocr oki182 oki4w okiibm oprp opvp paintjet pam pamcmyk32 pamcmyk4 pbm pbmraw pcl3 pclm pcx16 pcx24b pcx256 pcxcmyk pcxgray pcxmono pdfimage24 pdfimage32 pdfimage8 pdfocr24 pdfocr32 pdfocr8 pdfwrite pdfwrite pdfwrit= e pgm pgmraw pgnm pgnmraw photoex picty180 pj pjetxl pjxl pjxl300 pkm pkmraw pksm pksmraw plan plan9bm planc plang plank planm plib plibc plib= g plibk plibm png16 png16m png256 png48 pngalpha pnggray pngmono pngmonod pnm pnmraw ppm ppmraw pr1000 pr1000_4 pr150 pr201 ps2write psdcmyk psdcmyk16 psdcmykog psdrgb psdrgb16 pwgraster pxlcolor pxlmono r4081 rinkj rpdl samsunggdi sj48 spotcmyk st800 stcolor t4693d2 t4693d4 t4693d= 8 tek4696 tiff12nc tiff24nc tiff32nc tiff48nc tiff64nc tiffcrle tiffg3 tiffg32d tiffg4 tiffgray tifflzw tiffpack tiffscaled tiffscaled24 tiffscaled32 tiffscaled4 tiffscaled8 tiffsep tiffsep1 txtwrite uniprint x11 x11alpha x11cmyk x11cmyk2 x11cmyk4 x11cmyk8 x11gray2 x11gray4 x11mon= o xcf xcfcmyk xes xpswrite Search path: /usr/share/ghostscript/9.54.0/Resource/Init : /usr/share/ghostscript/9.54.0/lib : /usr/share/ghostscript/9.54.0/Resource/Font : /usr/share/ghostscript/fonts : /var/lib/ghostscript/fonts : /usr/share/cups/fonts : /usr/share/ghostscript/fonts : /usr/local/lib/ghostscript/fonts : /usr/share/fonts Ghostscript is also using fontconfig to search for font files For more information, see /usr/share/doc/ghostscript/Use.htm. On debian system you may need to install ghostscript-doc package. Please report bugs to bugs.ghostscript.com. --0000000000009f372105d00ad1e1 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
The example latex document that I have pasted below c= ontains a simple PGF figure (just an empty square background) that I genera= ted with matplotlib. If you set your emacs to a dark theme, you will see th= at the previews are dark-on-light if the preview includes the figure but li= ght-on-dark if it is not included. So `preview-region` with the region just= including the \section and first equation environment generates exactly th= e expected preview, but `preview-buffer` inverts the colors in *all* previe= ws, i.e. the section header and equation are now dark on light background, = which does not mesh well with a dark emacs theme.

= Best,
Marten

\documentclass{article}=
\usepackage{tikz}
\begin{document}
\section{PGF screws up Backgro= und}
\begin{equation*}
=C2=A0 f(x) =3D \int_{0}^{\infty} \exp(-x^{2})= \mathrm{d}x
\end{equation*}
\begin{figure}[htbp]
=C2=A0 \centerin= g \begingroup%
=C2=A0 \makeatletter%
=C2=A0 \begin{pgfpicture}%
= =C2=A0 =C2=A0 \pgfpathrectangle{\pgfpointorigin}{\pgfqpoint{1.666667in}{1.0= 00000in}}%
=C2=A0 =C2=A0 \pgfusepath{use as bounding box, clip}%
=C2= =A0 =C2=A0 \begin{pgfscope}%
=C2=A0 =C2=A0 =C2=A0 \pgfsetbuttcap%
=C2= =A0 =C2=A0 =C2=A0 \pgfsetmiterjoin%
=C2=A0 =C2=A0 =C2=A0 \definecolor{cu= rrentfill}{rgb}{1.000000,1.000000,1.000000}%
=C2=A0 =C2=A0 =C2=A0 \pgfse= tfillcolor{currentfill}%
=C2=A0 =C2=A0 =C2=A0 \pgfsetlinewidth{0.000000p= t}%
=C2=A0 =C2=A0 =C2=A0 \definecolor{currentstroke}{rgb}{1.000000,1.000= 000,1.000000}%
=C2=A0 =C2=A0 =C2=A0 \pgfsetstrokecolor{currentstroke}%=C2=A0 =C2=A0 =C2=A0 \pgfsetstrokeopacity{0.000000}%
=C2=A0 =C2=A0 =C2= =A0 \pgfsetdash{}{0pt}%
=C2=A0 =C2=A0 =C2=A0 \pgfpathmoveto{\pgfqpoint{0= .000000in}{0.000000in}}%
=C2=A0 =C2=A0 =C2=A0 \pgfpathlineto{\pgfqpoint{= 1.666667in}{0.000000in}}%
=C2=A0 =C2=A0 =C2=A0 \pgfpathlineto{\pgfqpoint= {1.666667in}{1.000000in}}%
=C2=A0 =C2=A0 =C2=A0 \pgfpathlineto{\pgfqpoin= t{0.000000in}{1.000000in}}%
=C2=A0 =C2=A0 =C2=A0 \pgfpathclose%
=C2= =A0 =C2=A0 =C2=A0 \pgfusepath{fill}%
=C2=A0 =C2=A0 \end{pgfscope}%
= =C2=A0 \end{pgfpicture}%
=C2=A0 \makeatother%
=C2=A0 \endgroup%
= =C2=A0 \caption{A PGF figure.}
=C2=A0 \label{fig:pgf-figure}
\end{fig= ure}
\begin{equation*}
=C2=A0 f(x) =3D \int_{0}^{\infty} \exp(-x^{2})= \mathrm{d}x
\end{equation*}
\end{document}

= ---------------------------

Emacs =C2=A0: GNU Emacs 27.1 (buil= d 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.20, cairo version 1.16.0)
= =C2=A0of 2020-09-19
Package: 13.0.14

Run buffer contents:

= Running `Preview-LaTeX' on `example' with ``pdflatex =C2=A0 -intera= ction=3Dnonstopmode -file-line-error \&prv_example "/AUCTEXINPUT{&= quot; example.tex "}"''
This is pdfTeX, Version 3.1415= 9265-2.6-1.40.21 (TeX Live 2020/Debian) (preloaded format=3Dpdflatex)
= =C2=A0restricted \write18 enabled.
entering extended mode
LaTeX2e <= ;2020-10-01> patch level 4
L3 programming layer <2021-01-09> xp= arse <2020-03-03>
CUSTOMISED FORMAT. Preloaded files:
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 .
=C2=A0article.cls =C2=A0 =C2=A02020/04/10 v1.4m S= tandard LaTeX document class
=C2=A0 size10.clo =C2=A0 =C2=A02020/04/10 v= 1.4m Standard LaTeX file (size option)
=C2=A0 =C2=A0 tikz.sty =C2=A0 =C2= =A02020/12/27 v3.1.8b (3.1.8b)
=C2=A0 =C2=A0 =C2=A0pgf.sty =C2=A0 =C2=A0= 2020/12/27 v3.1.8b (3.1.8b)
=C2=A0 pgfrcs.sty =C2=A0 =C2=A02020/12/27 v3= .1.8b (3.1.8b)
pgfrcs.code.tex
=C2=A0pgfcore.sty =C2=A0 =C2=A02020/12= /27 v3.1.8b (3.1.8b)
graphicx.sty =C2=A0 =C2=A02020/09/09 v1.2b Enhanced= LaTeX Graphics (DPC,SPQR)
=C2=A0 keyval.sty =C2=A0 =C2=A02014/10/28 v1.= 15 key=3Dvalue parser (DPC)
graphics.sty =C2=A0 =C2=A02020/08/30 v1.4c S= tandard LaTeX Graphics (DPC,SPQR)
=C2=A0 =C2=A0 trig.sty =C2=A0 =C2=A020= 16/01/03 v1.10 sin cos tan (DPC)
graphics.cfg =C2=A0 =C2=A02016/06/04 v1= .11 sample graphics configuration
=C2=A0 pdftex.def =C2=A0 =C2=A02020/10= /05 v1.2a Graphics/color driver for pdftex
=C2=A0 pgfsys.sty =C2=A0 =C2= =A02020/12/27 v3.1.8b (3.1.8b)
pgfsys.code.tex
pgfsyssoftpath.code.te= x =C2=A0 =C2=A02020/12/27 v3.1.8b (3.1.8b)
pgfsysprotocol.code.tex =C2= =A0 =C2=A02020/12/27 v3.1.8b (3.1.8b)
=C2=A0 xcolor.sty =C2=A0 =C2=A0201= 6/05/11 v2.12 LaTeX color extensions (UK)
=C2=A0 =C2=A0color.cfg =C2=A0 = =C2=A02016/01/02 v1.6 sample color configuration
pgfcore.code.tex
pgf= comp-version-0-65.sty =C2=A0 =C2=A02020/12/27 v3.1.8b (3.1.8b)
pgfcomp-v= ersion-1-18.sty =C2=A0 =C2=A02020/12/27 v3.1.8b (3.1.8b)
=C2=A0 pgffor.s= ty =C2=A0 =C2=A02020/12/27 v3.1.8b (3.1.8b)
=C2=A0pgfkeys.sty =C2=A0 =C2= =A0
pgfkeys.code.tex
=C2=A0pgfmath.sty =C2=A0 =C2=A0
pgfmath.code.= tex
pgffor.code.tex
tikz.code.tex
=C2=A0 =C2=A0 =C2=A0 =C2=A0 .(./example.tex (/usr/share/texlive/texmf-dist/tex/latex/l3backend/l3backen= d-pdftex.def)
No file example.aux.
(/usr/share/texlive/texmf-dist/tex= /context/base/mkii/supp-pdf.mkii
[Loading MPS to PDF converter (version = 2006.09.02).]
) (/usr/share/texlive/texmf-dist/tex/latex/epstopdf-pkg/ep= stopdf-base.sty (/usr/share/texlive/texmf-dist/tex/latex/latexconfig/epstop= df-sys.cfg)) (/home/ml/.emacs.d/straight/build/auctex/latex/preview.sty (/u= sr/share/texlive/texmf-dist/tex/generic/luatex85/luatex85.sty) (/home/ml/.e= macs.d/straight/build/auctex/latex/prtightpage.def) (/home/ml/.emacs.d/stra= ight/build/auctex/latex/prauctex.def
No auxiliary output files.

<= br>(/home/ml/.emacs.d/straight/build/auctex/latex/prauctex.cfg)) (/home/ml/= .emacs.d/straight/build/auctex/latex/prfootnotes.def)
Preview: Fontsize = 10pt
P...

[...]

....9 \begin{equation*}
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0
./example= .tex:10: Missing $ inserted.
<inserted text>
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 $
l.10 =C2=A0 f(x) =3D \int
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 _{0}^{\infty= } \exp(-x^{2}) \mathrm{d}x
./example.tex:11: Missing $ inserted.
<= inserted text>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 $
l.11 \end{equation*}
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0
./example.tex:11: Preview: Snippet 2 ended.= (563432+233020x6750219).
<-><->
=C2=A0 =C2=A0 =C2=A0
= l.11 \end{equation*}
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0
[2]
./example.tex:13: Preview: Snippet 3 starte= d.
<-><->
=C2=A0 =C2=A0 =C2=A0
l.13 \begin{figure}=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0[htbp= ]
./example.tex:41: Preview: Snippet 3 ended.(6305509+0x22609920).
&l= t;-><->
=C2=A0 =C2=A0 =C2=A0
l.41 \end{figure}
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0
[3]
./example= .tex:43: Preview: Snippet 4 started.
<-><->
=C2=A0 =C2=A0= =C2=A0
l.43 \begin{equation*}
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0
./example.tex:43: Undefined c= ontrol sequence.
\equation* ...oindent }{\endgroup }\pr@\equation*
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0
l.43 \begin{equation*}
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0
./example.t= ex:44: Missing $ inserted.
<inserted text>
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 $
l.44 =C2=A0 f(x) =3D \int
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 _{0}^{\infty= } \exp(-x^{2}) \mathrm{d}x
./example.tex:45: Missing $ inserted.
<= inserted text>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 $
l.45 \end{equation*}
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0
./example.tex:45: Preview: Snippet 4 ended.= (563432+233020x6750219).
<-><->
=C2=A0 =C2=A0 =C2=A0
= l.45 \end{equation*}
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0
[4] )
(see the transcript file for additional i= nformation)</usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm= /cmbx12.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfont= s/cm/cmex10.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/ams= fonts/cm/cmmi10.pfb></usr/share/texlive/texmf-dist/fonts/type1/public= /amsfonts/cm/cmr10.pfb></usr/share/texlive/texmf-dist/fonts/type1/pub= lic/amsfonts/cm/cmr7.pfb></usr/share/texlive/texmf-dist/fonts/type1/p= ublic/amsfonts/cm/cmsy10.pfb></usr/share/texlive/texmf-dist/fonts/typ= e1/public/amsfonts/cm/cmsy7.pfb>
Output written on example.pdf (4 pag= es, 61267 bytes).
Transcript written on example.log.

TeX Output e= xited as expected with code 1 at Fri Nov =C2=A05 14:33:08
Running `Previ= ew-PDF2DSC' with ``pdf2dsc example.pdf example.prv/tmpo0zR3C/preview.ds= c''

Preview-PDF2DSC finished at Fri Nov =C2=A05 14:33:08
= Running `Preview-Ghostscript' with ``/usr/bin/rungs -sOutputFile\=3Dexa= mple.prv/tmpo0zR3C/pr1-\%d.png -q -dDELAYSAFER -dNOPAUSE -DNOPLATFONTS -dPr= inted -dTextAlphaBits\=3D4 -dGraphicsAlphaBits\=3D4 -sDEVICE\=3Dpng16m -r24= 4.974x244.343 -dDELAYBIND''

Preview-Ghostscript finished at = Fri Nov =C2=A05 14:33:08

current state:
=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D
(setq
=C2=A0AUCTeX-version "13.0.14"
= =C2=A0LaTeX-command-style '((""
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "%(PDF)%(l= atex) %(file-line-error) %(extraopts) %(output-dir) %S%(PDFout)")
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0)
=C2=A0image-types '(svg png gif tiff jpeg xpm xbm pbm)=C2=A0preview-image-type 'png
=C2=A0preview-image-creators '((= dvipng (open preview-gs-open preview-dvipng-process-setup)
=C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0(place preview-gs-place) (close preview-dvipng-close))
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 (png (open preview-gs-open) (place preview-gs-place)
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0(close preview-gs-close))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (jpeg (open = preview-gs-open) (place preview-gs-place)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(close= preview-gs-close))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (pnm (open preview-gs-open) (place p= review-gs-place)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(close preview-gs-close))
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 (tiff (open preview-gs-open) (place preview-gs-place)
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0(close preview-gs-close))
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 )
=C2= =A0preview-dvipng-image-type 'png
=C2=A0preview-dvipng-command "= ;dvipng -picky -noghostscript %d -o %m/prev%%03d.png"
=C2=A0preview= -pdf2dsc-command "pdf2dsc %(O?pdf) %m/preview.dsc"
=C2=A0previ= ew-gs-command "/usr/bin/rungs"
=C2=A0preview-gs-options '(= "-q" "-dDELAYSAFER" "-dNOPAUSE" "-DNOPLA= TFONTS" "-dPrinted"
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "-dTextAlphaBits=3D4" &= quot;-dGraphicsAlphaBits=3D4")
=C2=A0preview-gs-image-type-alist &#= 39;((png png "-sDEVICE=3Dpng16m") (dvipng png "-sDEVICE=3Dpn= g16m")
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(jpeg jpeg "-sDEVI= CE=3Djpeg") (pnm pbm "-sDEVICE=3Dpnmraw")
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0(tiff tiff "-sDEVICE=3Dtiff12nc"))
=C2= =A0preview-fast-conversion t
=C2=A0preview-prefer-TeX-bb nil
=C2=A0pr= eview-dvips-command "dvips -Pwww -i -E %d -o %m/preview.000"
= =C2=A0preview-fast-dvips-command "dvips -Pwww %d -o %m/preview.ps"
=C2=A0preview-scale-function 'cq= ql-preview-scale-up
=C2=A0preview-LaTeX-command '("%`%l \"= \\nonstopmode\\nofiles\\PassOptionsToPackage{"
=C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(&quo= t;," . preview-required-option-list)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"}{previ= ew}\\AtBeginDocument{\\ifx\\ifPreview\\undefined"
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0pr= eview-default-preamble
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"\\fi}\"%' \"\\= detokenize{\" %(t-filename-only) \"}\"")
=C2=A0previ= ew-required-option-list '("active" "tightpage" &quo= t;auctex"
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (preview-preserve-c= ounters "counters"))
=C2=A0preview-preserve-counters nil
= =C2=A0preview-default-option-list '("displaymath" "float= s" "graphics" "textmath" "sections"
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"footnotes")
=C2=A0previ= ew-default-preamble '("\\RequirePackage[" ("," . pr= eview-default-option-list)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "]{preview}[2004/= 11/05]")
=C2=A0preview-LaTeX-command-replacements nil
=C2=A0prev= iew-dump-replacements '(preview-LaTeX-command-replacements
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0("\\`\\([^ ]+\\)\\(?: +\\(?:\\(--?kanji[=3D ][= ^ ]+\\)\\|\\(--?output-directory[=3D ][^ ]+\\)\\|-\\(?:[^ \\\"]\\|\\\\= .\\|\"[^\"]*\"\\)*\\)\\)*\\(.*\\)\\'" "\\1 -in= i \\2 \\3 -interaction=3Dnonstopmode \"&\\1\" " preview-= format-name ".ini \\4")
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0)
=C2= =A0preview-undump-replacements '(("\\`\\([^ ]+\\)\\(?: +\\(?:\\(--= ?kanji[=3D ][^ ]+\\)\\|\\(--?output-directory[=3D ][^ ]+\\)\\|-\\(?:[^ \\\&= quot;]\\|\\\\.\\|\"[^\"]*\"\\)*\\)\\)*.* \"\\\\input\&q= uot; \"\\\\detokenize{\" \\(.*\\) \"}\"\\'" &q= uot;\\1 \\2 \\3 -interaction=3Dnonstopmode -file-line-error " preview-= format-name " \"/AUCTEXINPUT{\" \\4 \"}\"")=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0)
=C2=A0preview-auto-cache-preambl= e t
=C2=A0preview-TeX-style-dir "/home/ml/.emacs.d/straight/build/a= uctex/latex"
=C2=A0)

Output from running `/usr/bin/rungs -h&= #39;:
GPL Ghostscript 9.54.0 (2021-03-30)
Copyright (C) 2021 Artifex = Software, Inc.=C2=A0 All rights reserved.
Usage: gs [switches] [file1.ps file2.ps = ...]
Most frequently used switches: (you can use # in place of =3D)
= =C2=A0-dNOPAUSE =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 no pause after page =C2= =A0 | -q =C2=A0 =C2=A0 =C2=A0 `quiet', fewer messages
=C2=A0-g<wi= dth>x<height> =C2=A0page size in pixels =C2=A0 | -r<res> =C2= =A0pixels/inch resolution
=C2=A0-sDEVICE=3D<devname> =C2=A0select = device =C2=A0 =C2=A0 =C2=A0 =C2=A0 | -dBATCH =C2=A0exit after last file
= =C2=A0-sOutputFile=3D<file> select output file: - for stdout, |comman= d for pipe,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0embed %d or %ld for page #
Input formats: PostScript PostSc= riptLevel1 PostScriptLevel2 PostScriptLevel3 PDF
Default output device: = x11alpha
Available devices:
=C2=A0 =C2=A0alc1900 alc2000 alc4000 alc4= 100 alc8500 alc8600 alc9100 ap3250 appledmp
=C2=A0 =C2=A0atx23 atx24 atx= 38 bbox bit bitcmyk bitrgb bitrgbtags bj10e bj10v bj10vh
=C2=A0 =C2=A0bj= 200 bjc600 bjc800 bjc880j bjccmyk bjccolor bjcgray bjcmono bmp16 bmp16m
= =C2=A0 =C2=A0bmp256 bmp32b bmpgray bmpmono bmpsep1 bmpsep8 ccr cdeskjet cdj= 1600 cdj500
=C2=A0 =C2=A0cdj550 cdj670 cdj850 cdj880 cdj890 cdj970 cdjco= lor cdjmono cdnj500 cfax
=C2=A0 =C2=A0chp2200 cif cljet5 cljet5c cljet5p= r coslw2p coslwxl cups declj250 deskjet
=C2=A0 =C2=A0devicen dfaxhigh df= axlow display dj505j djet500 djet500c dl2100 dnj650c
=C2=A0 =C2=A0epl205= 0 epl2050p epl2120 epl2500 epl2750 epl5800 epl5900 epl6100 epl6200
=C2= =A0 =C2=A0eplcolor eplmono eps2write eps9high eps9mid epson epsonc escp esc= page
=C2=A0 =C2=A0faxg3 faxg32d faxg4 fmlbp fmpr fpng fs600 gdi hl1240 h= l1250 hl7x0 hocr
=C2=A0 =C2=A0hpdj1120c hpdj310 hpdj320 hpdj340 hpdj400 = hpdj500 hpdj500c hpdj510
=C2=A0 =C2=A0hpdj520 hpdj540 hpdj550c hpdj560c = hpdj600 hpdj660c hpdj670c hpdj680c
=C2=A0 =C2=A0hpdj690c hpdj850c hpdj85= 5c hpdj870c hpdj890c hpdjplus hpdjportable ibmpro
=C2=A0 =C2=A0ijs image= n inferno ink_cov inkcov itk24i itk38 iwhi iwlo iwlq jetp3852
=C2=A0 =C2= =A0jj100 jpeg jpegcmyk jpeggray la50 la70 la75 la75plus laserjet lbp310
= =C2=A0 =C2=A0lbp320 lbp8 lex2050 lex3200 lex5700 lex7000 lips2p lips3 lips4= lips4v
=C2=A0 =C2=A0lj250 lj3100sw lj4dith lj4dithp lj5gray lj5mono lje= t2p ljet3 ljet3d ljet4
=C2=A0 =C2=A0ljet4d ljet4pjl ljetplus ln03 lp1800= lp1900 lp2000 lp2200 lp2400 lp2500
=C2=A0 =C2=A0lp2563 lp3000c lp7500 l= p7700 lp7900 lp8000 lp8000c lp8100 lp8200c lp8300c
=C2=A0 =C2=A0lp8300f = lp8400f lp8500c lp8600 lp8600f lp8700 lp8800c lp8900 lp9000b
=C2=A0 =C2= =A0lp9000c lp9100 lp9200b lp9200c lp9300 lp9400 lp9500c lp9600 lp9600s
= =C2=A0 =C2=A0lp9800c lps4500 lps6500 lq850 lxm3200 lxm5700m m8510 md1xMono = md2k
=C2=A0 =C2=A0md50Eco md50Mono md5k mgr4 mgr8 mgrgray2 mgrgray4 mgrg= ray8 mgrmono miff24
=C2=A0 =C2=A0mj500c mj6000c mj700v2c mj8000c ml600 n= ecp6 npdl nullpage oce9050 ocr
=C2=A0 =C2=A0oki182 oki4w okiibm oprp opv= p paintjet pam pamcmyk32 pamcmyk4 pbm pbmraw
=C2=A0 =C2=A0pcl3 pclm pcx1= 6 pcx24b pcx256 pcxcmyk pcxgray pcxmono pdfimage24
=C2=A0 =C2=A0pdfimage= 32 pdfimage8 pdfocr24 pdfocr32 pdfocr8 pdfwrite pdfwrite pdfwrite
=C2=A0= =C2=A0pgm pgmraw pgnm pgnmraw photoex picty180 pj pjetxl pjxl pjxl300 pkm<= br>=C2=A0 =C2=A0pkmraw pksm pksmraw plan plan9bm planc plang plank planm pl= ib plibc plibg
=C2=A0 =C2=A0plibk plibm png16 png16m png256 png48 pngalp= ha pnggray pngmono pngmonod
=C2=A0 =C2=A0pnm pnmraw ppm ppmraw pr1000 pr= 1000_4 pr150 pr201 ps2write psdcmyk
=C2=A0 =C2=A0psdcmyk16 psdcmykog psd= rgb psdrgb16 pwgraster pxlcolor pxlmono r4081
=C2=A0 =C2=A0rinkj rpdl sa= msunggdi sj48 spotcmyk st800 stcolor t4693d2 t4693d4 t4693d8
=C2=A0 =C2= =A0tek4696 tiff12nc tiff24nc tiff32nc tiff48nc tiff64nc tiffcrle tiffg3
= =C2=A0 =C2=A0tiffg32d tiffg4 tiffgray tifflzw tiffpack tiffscaled tiffscale= d24
=C2=A0 =C2=A0tiffscaled32 tiffscaled4 tiffscaled8 tiffsep tiffsep1 t= xtwrite uniprint
=C2=A0 =C2=A0x11 x11alpha x11cmyk x11cmyk2 x11cmyk4 x11= cmyk8 x11gray2 x11gray4 x11mono
=C2=A0 =C2=A0xcf xcfcmyk xes xpswriteSearch path:
=C2=A0 =C2=A0/usr/share/ghostscript/9.54.0/Resource/Init :=
=C2=A0 =C2=A0/usr/share/ghostscript/9.54.0/lib :
=C2=A0 =C2=A0/usr/s= hare/ghostscript/9.54.0/Resource/Font :
=C2=A0 =C2=A0/usr/share/ghostscr= ipt/fonts : /var/lib/ghostscript/fonts :
=C2=A0 =C2=A0/usr/share/cups/fo= nts : /usr/share/ghostscript/fonts :
=C2=A0 =C2=A0/usr/local/lib/ghostsc= ript/fonts : /usr/share/fonts
Ghostscript is also using fontconfig to se= arch for font files
For more information, see /usr/share/doc/ghostscript= /Use.htm.
On debian system you may need to install ghostscript-doc packa= ge.
Please report bugs to bugs.g= hostscript.com.
--0000000000009f372105d00ad1e1-- From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 05 23:48:39 2021 Received: (at 51610) by debbugs.gnu.org; 6 Nov 2021 03:48:39 +0000 Received: from localhost ([127.0.0.1]:48003 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjCh5-0008Hg-8o for submit@debbugs.gnu.org; Fri, 05 Nov 2021 23:48:39 -0400 Received: from smtp1a.inetd.co.jp ([210.129.88.11]:36620) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjCh2-0008HU-E6 for 51610@debbugs.gnu.org; Fri, 05 Nov 2021 23:48:37 -0400 Received: from localhost (110-133-201-220.rev.home.ne.jp [110.133.201.220]) by smtp1a.inetd.co.jp (Postfix) with ESMTPA id 807155C; Sat, 6 Nov 2021 12:48:33 +0900 (JST) From: Ikumi Keita To: Marten Lienen Subject: Re: bug#51610: 13.0.14; PGF background interferes with preview background In-reply-to: References: Comments: In-reply-to Marten Lienen message dated "Fri, 05 Nov 2021 14:42:37 +0100." X-Mailer: MH-E 8.6+git; nmh 1.7.1; GNU Emacs 27.2 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1320.1636170511.1@localhost> Date: Sat, 06 Nov 2021 12:48:32 +0900 Message-ID: <1321.1636170512@localhost> X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 51610 Cc: 51610@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Marten, >>>>> Marten Lienen writes: > The example latex document that I have pasted below contains a simple PGF > figure (just an empty square background) that I generated with matplotlib. I added \usepackage{amsmath} to cover equation* environment. > If you set your emacs to a dark theme, you will see that the previews are > dark-on-light if the preview includes the figure but light-on-dark if it is > not included. So `preview-region` with the region just including the > \section and first equation environment generates exactly the expected > preview, but `preview-buffer` inverts the colors in *all* previews, i.e. > the section header and equation are now dark on light background, which > does not mesh well with a dark emacs theme. Preview-latex generates all the required images from one pdf. It seems that the pgf figure specifies the white background color, which forces whole pdf to have white background. If this guess is correct, it would be hard to have different background colors between the figure and others. One workaround I can think of is to customize `preview-pdf-color-adjust-method' to nil. It specifies default FG/BG colors to black/white, so the generated images would look normal even if the pgf figure forces white background. Regards, Ikumi Keita From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 23 11:48:19 2021 Received: (at 51610) by debbugs.gnu.org; 23 Nov 2021 16:48:19 +0000 Received: from localhost ([127.0.0.1]:52148 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mpYxu-0000Vb-Qt for submit@debbugs.gnu.org; Tue, 23 Nov 2021 11:48:18 -0500 Received: from smtp1a.inetd.co.jp ([210.129.88.11]:56040) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mpYxs-0000VO-AZ for 51610@debbugs.gnu.org; Tue, 23 Nov 2021 11:48:18 -0500 Received: from localhost (110-133-201-220.rev.home.ne.jp [110.133.201.220]) by smtp1a.inetd.co.jp (Postfix) with ESMTPA id 051585C; Wed, 24 Nov 2021 01:48:13 +0900 (JST) From: Ikumi Keita To: Marten Lienen Subject: Re: bug#51610: 13.0.14; PGF background interferes with preview background In-reply-to: <1321.1636170512@localhost> References: <1321.1636170512@localhost> Comments: In-reply-to Ikumi Keita message dated "Sat, 06 Nov 2021 12:48:32 +0900." X-Mailer: MH-E 8.6+git; nmh 1.7.1; GNU Emacs 27.2 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <57140.1637686093.1@localhost> Date: Wed, 24 Nov 2021 01:48:13 +0900 Message-ID: <57141.1637686093@localhost> X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 51610 Cc: 51610@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >>>>> Ikumi Keita writes: > Preview-latex generates all the required images from one pdf. It seems > that the pgf figure specifies the white background color, which forces > whole pdf to have white background. If this guess is correct, it would > be hard to have different background colors between the figure and > others. > One workaround I can think of is to customize > `preview-pdf-color-adjust-method' to nil. It specifies default FG/BG > colors to black/white, so the generated images would look normal even if > the pgf figure forces white background. I'll close this bug. If you encounter another problem regarding to this issue, please reopen it and notify us. Regards, Ikumi Keita From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 23 11:48:54 2021 Received: (at control) by debbugs.gnu.org; 23 Nov 2021 16:48:54 +0000 Received: from localhost ([127.0.0.1]:52151 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mpYyU-0000WY-2C for submit@debbugs.gnu.org; Tue, 23 Nov 2021 11:48:54 -0500 Received: from smtp1a.inetd.co.jp ([210.129.88.11]:56044) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mpYyS-0000WQ-I0 for control@debbugs.gnu.org; Tue, 23 Nov 2021 11:48:52 -0500 Received: from localhost (110-133-201-220.rev.home.ne.jp [110.133.201.220]) by smtp1a.inetd.co.jp (Postfix) with ESMTPA id B01295C for ; Wed, 24 Nov 2021 01:48:51 +0900 (JST) To: control@debbugs.gnu.org From: Ikumi Keita Subject: control message for bug #51610 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <57145.1637686131.1@localhost> Date: Wed, 24 Nov 2021 01:48:51 +0900 Message-ID: <57146.1637686131@localhost> X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 51610 wontfix close 51610 quit From unknown Mon Jun 16 23:49:02 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 22 Dec 2021 12:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator