[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
badpreview.ps.gz
Description: GNU Zip compressed data
goodpreview.ps.gz
Description: GNU Zip compressed data

- Re: [AUCTeX-devel] [gs-devel] Asking help for preview-latex, (continued)
- Re: [AUCTeX-devel] [gs-devel] Asking help for preview-latex, Ikumi Keita, 2019/06/20
- Re: [AUCTeX-devel] [gs-devel] Asking help for preview-latex, Ikumi Keita, 2019/06/20
- Re: [AUCTeX-devel] [gs-devel] Asking help for preview-latex, Ken Sharp, 2019/06/21
- Re: [AUCTeX-devel] [gs-devel] Asking help for preview-latex, Ikumi Keita, 2019/06/22
- Re: [AUCTeX-devel] Asking help for preview-latex, jfbu, 2019/06/22
- Re: [AUCTeX-devel] Asking help for preview-latex, jfbu, 2019/06/22
- [AUCTeX-devel] Try to colorize preview (was Re: Asking help for preview-latex), Ikumi Keita, 2019/06/23
- Re: [AUCTeX-devel] [gs-devel] Try to colorize preview, Ikumi Keita, 2019/06/24
- Re: [AUCTeX-devel] [gs-devel] Try to colorize preview, jfbu, 2019/06/24
- Re: [AUCTeX-devel] Try to colorize preview, Ikumi Keita, 2019/06/24
- Re: [AUCTeX-devel] Try to colorize preview,
jfbu <=
- Re: [AUCTeX-devel] Try to colorize preview (was Re: Asking help for preview-latex), David Kastrup, 2019/06/24
- Re: [AUCTeX-devel] Try to colorize preview (was Re: Asking help for preview-latex), Ikumi Keita, 2019/06/24
- Re: [AUCTeX-devel] Try to colorize preview (was Re: Asking help for preview-latex), David Kastrup, 2019/06/24
- Re: [AUCTeX-devel] Try to colorize preview (was Re: Asking help for preview-latex), Ikumi Keita, 2019/06/24
- Re: [AUCTeX-devel] Try to colorize preview (was Re: Asking help for preview-latex), David Kastrup, 2019/06/24
- [AUCTeX-devel] Old archive of preview-latex (was Try to colorize preview), Ikumi Keita, 2019/06/25
- Re: [AUCTeX-devel] [gs-devel] Asking help for preview-latex, Ken Sharp, 2019/06/22
- Re: [AUCTeX-devel] [gs-devel] Asking help for preview-latex, Chris Liddell, 2019/06/26
- Re: [AUCTeX-devel] [gs-devel] Asking help for preview-latex, Ikumi Keita, 2019/06/26