bug#21069: 2014-11-28; combination of hyperref, preview and \sfrac (from xfrac) + refstepcounter makes an error when previewing
Nicolas Richard writes: > I now use: > \ifPreview > \PassOptionsToPackage{hypertex}{hyperref} > \fi > \usepackage{hyperref} > which seems to work ok. Not sure what will break next, but meanwhile my > usecase is covered. (I'm going through old bug reports that unfortunately weren't resolved at the time.) Passing the option hypertex to hyperref fixes the issue, I therefore closing this report. Best, Arash ___ bug-auctex mailing list bug-auctex@gnu.org https://lists.gnu.org/mailman/listinfo/bug-auctex
bug#21069: 2014-11-28; combination of hyperref, preview and \sfrac (from xfrac) + refstepcounter makes an error when previewing
Hi Nicolas, as you've already found out, the problem seems to be that GhostScript can't handle certain DVI files which latex produces with a certain driver when the hyperref package is used. OTOH, that only seems to happen with preview, i.e., the document compiles fine and the produced dvi is viewable (with doc-view which seems to be the only DVI viewer on Arch these days). I guess you have a good reason not to use `TeX-PDF-mode' I guess, right? (With that, the previews work.) Bye, Tassilo ___ bug-auctex mailing list bug-auctex@gnu.org https://lists.gnu.org/mailman/listinfo/bug-auctex
bug#21069: 2014-11-28; combination of hyperref, preview and \sfrac (from xfrac) + refstepcounter makes an error when previewing
Hi, Le 16/07/2015 10:09, Tassilo Horn a écrit : I guess you have a good reason not to use `TeX-PDF-mode' I guess, right? (With that, the previews work.) Well, the usual : pstricks (I tried using pdflatex with the pdf option to pstricks and allow shell-escape, but there was another problem then. Don't remember what it was. The document is longish so all sorts of things happen.) I now use: \ifPreview \PassOptionsToPackage{hypertex}{hyperref} \fi \usepackage{hyperref} which seems to work ok. Not sure what will break next, but meanwhile my usecase is covered. So it's now mostly about is this a bug that should be fixed ? and where should the fix go ?. I thought it was nice to have an MWE for this kind of error but maybe preview isn't the problem, maybe it's hyperref, maybe it's xfrac, maybe it's pluto. IDK. Btw I have another one, involving pgf and pstricks-add instead of hyperref. The ghostscript error for this one is /undefined in pgfo : --8---cut here---start-8--- %% this document is an example of a problem when using tikz, pstricks-add and %% preview. Trying to preview it won't work. \documentclass{article} \iffalse % true = works, false = fails. \usepackage{pstricks-add} \usepackage{tikz} \else \usepackage{tikz} \usepackage{pstricks-add} \fi \usepackage{preview} \newenvironment{exo}{}{} \PreviewEnvironment{exo} \begin{document} \begin{exo} \begin{tikzpicture} \draw[fill] (3,1) circle (10pt); \end{tikzpicture} \end{exo} \end{document} --8---cut here---end---8--- -- Nico. ___ bug-auctex mailing list bug-auctex@gnu.org https://lists.gnu.org/mailman/listinfo/bug-auctex
bug#21069: 2014-11-28; combination of hyperref, preview and \sfrac (from xfrac) + refstepcounter makes an error when previewing
Hi, Using the following MWE and trying to preview it (not in pdf mode) makes an error on the second {exo} environment for me (i.e. the preview is not shown, a white/red icon is shown indicating failure) --8---cut here---start-8--- \documentclass{article} %\usepackage[T1]{fontenc} %\usepackage[utf8]{inputenc} \iftrue % set to false makes it work \usepackage{xfrac} \else \def\sfrac#1#2{#1/#2} \fi \newcounter{foo} \newenvironment{exo}{% \refstepcounter{foo} % commenting this makes it work }{} \usepackage{hyperref} % commenting this makes it work \usepackage{preview} \PreviewEnvironment{exo} \begin{document} \begin{exo} foo $a+b$ % just to check this one is working. \end{exo} \begin{exo} $\sfrac 12$. \end{exo} \end{document} %%% Local Variables: %%% TeX-master: t %%% End: --8---cut here---end---8--- Here's the content of the output buffer (C-c C-l) : --8---cut here---start-8--- Running `Preview-LaTeX' on `testfoo' with ``latex -file-line-error \nonstopmode\nofiles\PassOptionsToPackage{active,tightpage,auctex}{preview}\AtBeginDocument{\ifx\ifPreview\undefined\RequirePackage[displaymath,floats,graphics,textmath,sections,footnotes]{preview}[2004/11/05]\fi} \input testfoo.tex'' This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015) (preloaded format=latex) restricted \write18 enabled. entering extended mode LaTeX2e 2015/01/01 patch level 2 Babel 3.9l and hyphenation patterns for 79 languages loaded. No auxiliary output files. (./testfoo.tex (/usr/local/texlive/2015/texmf-dist/tex/latex/base/article.cls Document Class: article 2014/09/29 v1.4h Standard LaTeX document class (/usr/local/texlive/2015/texmf-dist/tex/latex/base/size10.clo)) (/usr/local/texlive/2015/texmf-dist/tex/latex/l3packages/xfrac/xfrac.sty (/usr/local/texlive/2015/texmf-dist/tex/latex/amsmath/amstext.sty (/usr/local/texlive/2015/texmf-dist/tex/latex/amsmath/amsgen.sty)) (/usr/local/texlive/2015/texmf-dist/tex/latex/graphics/graphicx.sty (/usr/local/texlive/2015/texmf-dist/tex/latex/graphics/keyval.sty) (/usr/local/texlive/2015/texmf-dist/tex/latex/graphics/graphics.sty (/usr/local/texlive/2015/texmf-dist/tex/latex/graphics/trig.sty) (/usr/local/texlive/2015/texmf-dist/tex/latex/latexconfig/graphics.cfg) (/usr/local/texlive/2015/texmf-dist/tex/latex/graphics/dvips.def))) (/usr/local/texlive/2015/texmf-dist/tex/latex/l3packages/l3keys2e/l3keys2e.sty (/usr/local/texlive/2015/texmf-dist/tex/latex/l3kernel/expl3.sty (/usr/local/texlive/2015/texmf-dist/tex/latex/l3kernel/expl3-code.tex) (/usr/local/texlive/2015/texmf-dist/tex/latex/l3kernel/l3unicode-data.def) (/usr/local/texlive/2015/texmf-dist/tex/latex/l3kernel/l3dvips.def))) (/usr/local/texlive/2015/texmf-dist/tex/latex/base/textcomp.sty (/usr/local/texlive/2015/texmf-dist/tex/latex/base/ts1enc.def)) (/usr/local/texlive/2015/texmf-dist/tex/latex/l3packages/xparse/xparse.sty) (/usr/local/texlive/2015/texmf-dist/tex/latex/l3packages/xtemplate/xtemplate.st y)) (/usr/local/texlive/2015/texmf-dist/tex/latex/hyperref/hyperref.sty (/usr/local/texlive/2015/texmf-dist/tex/generic/oberdiek/hobsub-hyperref.sty (/usr/local/texlive/2015/texmf-dist/tex/generic/oberdiek/hobsub-generic.sty)) (/usr/local/texlive/2015/texmf-dist/tex/generic/ifxetex/ifxetex.sty) (/usr/local/texlive/2015/texmf-dist/tex/latex/oberdiek/auxhook.sty) (/usr/local/texlive/2015/texmf-dist/tex/latex/oberdiek/kvoptions.sty) (/usr/local/texlive/2015/texmf-dist/tex/latex/hyperref/pd1enc.def) (/usr/local/texlive/2015/texmf-dist/tex/latex/latexconfig/hyperref.cfg) (/usr/local/texlive/2015/texmf-dist/tex/latex/url/url.sty)) Package hyperref Message: Driver (default): hdvips. (/usr/local/texlive/2015/texmf-dist/tex/latex/hyperref/hdvips.def (/usr/local/texlive/2015/texmf-dist/tex/latex/hyperref/pdfmark.def (/usr/local/texlive/2015/texmf-dist/tex/latex/oberdiek/rerunfilecheck.sty))) (/usr/local/texlive/texmf-local/tex/latex/preview/preview.sty (/usr/local/texlive/texmf-local/tex/latex/preview/prtightpage.def) (/usr/local/texlive/texmf-local/tex/latex/preview/prauctex.def No auxiliary output files. (/usr/local/texlive/texmf-local/tex/latex/preview/prauctex.cfg))) (./testfoo.aux) (/usr/local/texlive/2015/texmf-dist/tex/latex/base/ts1cmr.fd) (/usr/local/texlive/2015/texmf-dist/tex/latex/hyperref/nameref.sty (/usr/local/texlive/2015/texmf-dist/tex/generic/oberdiek/gettitlestring.sty)) (./testfoo.out) (./testfoo.out) Package hyperref Warning: Rerun to get /PageLabels entry. Preview: Fontsize 10pt ./testfoo.tex:18: Preview: Snippet 1 started. -- l.18 \begin{exo} Preview: Tightpage -32891 -32891 32891 32891 ./testfoo.tex:20: Preview: Snippet 1 ended.(455111+54613x2520934). -- l.20 \end{exo} [1] ./testfoo.tex:21: Preview: Snippet 2 started. -- l.21 \begin{exo} LaTeX Font Warning: Font shape `OT1/cmr/m/n' in size 3.49998 not available (Font)