auctex-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [AUCTeX-devel] Try to colorize preview


From: jfbu
Subject: Re: [AUCTeX-devel] Try to colorize preview
Date: Mon, 24 Jun 2019 17:55:53 +0200

Hi Keita

Le 24 juin 2019 à 15:07, Ikumi Keita <address@hidden> a écrit :

>>>>>> 
>>>>>> jfbu <address@hidden> writes:
> 
>> I briefly tested (but with an unmodified auctex, I did not remove
>> the gs hack for my tests ; but I don't have any specific colors
>> in Emacs buffer) that the following patches work
>> both with pdflatex + gs and with latex + dvipng
> 
> I confirmed that the proposed change works for those two cases, at least
> for very simple latex file.  However, it doesn't yet work for the case
> latex+dvips+gs.  It results in Ghostscript error and the "do not enter"
> signs appear in emacs buffer.
> The invocation of latex command is:
> latex 
> "\nonstopmode\nofiles\PassOptionsToPackage{active,tightpage,auctex}{preview}\AtBeginDocument{\RequirePackage[dvips]{color}\color{green}\pagecolor{red}\ifx\ifPreview\undefined\RequirePackage[dvips,displaymath,floats,graphics,textmath,sections,footnotes]{preview}[2004/11/05]\fi}"
>  "\input" tst-prv.tex
> .  Although the generated tst-prv.dvi can be viewed by xdvi with
> expected colors, it seems that the PostScript file generated with the
> command
> dvips -Pwww tst-prv.dvi -o tst-prv.ps
> is broken because atril (PDF and PS viewer for MATE desktop environmnet)
> terminates with an error message
> 'atril tst-prv.ps' terminated by signal SIGSEGV (Address boundary error)
> before it can display tst-prv.ps.


Sorry for not having tested that. 

I had forgotten about preview-image-type variable (set to 'dvipng' a long time 
ago at my locale)

I confirm there appears to be a problem with the created postscript file. 

Trying to open it using gv 3.7.4 (my set-up might be somewhat dysfunctional 
because this gv
is installed under /sw (Fink) and gs is under /opt/local/bin (MacPorts I 
think)) shows this

Error: /typecheck in --div--GPL Ghostscript 9.26: Unrecoverable error, exit 
code 1

Operand stack:
   1   0   gsave   65781.8
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   
--nostringval--   2   %stopped_push   --nostringval--   --nostringval--   
--nostringval--   false   1   %stopped_push   2045   1   3   %oparray_pop   
2044   1   3   %oparray_pop   2025   1   3   %oparray_pop   1884   1   3   
%oparray_pop   --nostringval--   %errorexec_pop   .runexec2   --nostringval--   
--nostringval--   --nostringval--   2   %stopped_push   --nostringval--   
--nostringval--   --nostringval--   --nostringval--   6   --nostringval--   
%repeat_continue   --nostringval--
Dictionary stack:
   --dict:961/1684(ro)(G)--   --dict:0/20(G)--   --dict:82/200(L)--   
--dict:178/300(L)--
Current allocation mode is local
Last OS error: No such file or directory

I do get similar error trying to apply ps2pdf to that .ps file.

Maybe we could forward to Ken such an ill-formed .ps file for diagnosis.

FWIW I attach such a file to this message, and for comparison one without 
addition of color.sty usage to preview.
I gzipped them because for some reason I could not attach the goodpreview.ps 
via my Apple Mail (no idea why)

The original tex file looked like this

\documentclass{article}
\usepackage{color}\color{blue}\pagecolor{red}
\begin{document}\thispagestyle{empty}
$E=mc^2$
text
\[x^n+y^n=z^n\]
\end{document}

(I did not patch the (pdf)latex AUCTeX invocation but added directly to master 
document the \usepackage{color}\color{blue}\pagecolor{red})

Best,

Jean-François

Attachment: badpreview.ps.gz
Description: GNU Zip compressed data

Attachment: goodpreview.ps.gz
Description: GNU Zip compressed data

image/ps





reply via email to

[Prev in Thread] Current Thread [Next in Thread]