《统计软件杂志》课程休息预览 AUCTeX

《统计软件杂志》课程休息预览 AUCTeX

我在 Debian 稳定版上使用AUCTeX 11.86-11

样式jss.sty文件包含在JSS 样式文件 zip 存档即使使用一个简单的文件,AUCTeX 的预览也会中断。注意:该jsslogo.jpg文件也是必需的。例如,以下文件

\documentclass[article]{jss} 
\begin{document} 
$x$ 
\end{document}

给出错误

LaTeX 没有找到预览图像

更详细的错误是:

ERROR: Illegal parameter number in definition of \MYLATEXline.

--- TeX said ---
<to be read again> 
                   1
l.386   \gdef\FV@BeginScanning#1^^M
                                   {%

任何 AUCTeX 用户都可以

  1. 确认
  2. 告诉我问题是什么?

我还将尝试 AUCTeX 列表,如果找到解决方案,则会在此更新。

答案1

我不知道该网站是否允许我这样做。我对上述课程没有任何问题,只是其徽标必须位于 LaTeX 路径中。如果需要,我可以删除答案。

更新

如果我使用 pdfTeX 或 AUCTeX 中的默认引擎运行 Preview LaTeX,则会出现以下错误:

  l.386   \gdef\FV@BeginScanning#1^^M
                                     {%
  ! Illegal parameter number in definition of \MYLATEXline.
  <to be read again> 
                     1
  l.389 \endgroup
                 
  ! Illegal parameter number in definition of \MYLATEXline.
  <to be read again> 
                     1
  l.395 ...be discarded. Hit <return> to continue.}}
                                                    
  ! Illegal parameter number in definition of \MYLATEXline.
  <to be read again> 
                     1
  l.402 \gdef\FancyVerbGetLine#1^^M 

这至少证实了 Faheem Mitha 指出的一些错误。但只要TeX-engine-set设置为XeTeX,Preview LaTeX 就会完美编译,不会出现其他错误,如下面文档的第一个未编辑输出所示。

此外,如果从 LaTeX 路径中删除所需的文件 *.jpg,无论使用哪种引擎,那么:

 ! LaTeX Error: File `jsslogo' not found.
 ...
 LaTeX exited abnormally with code 1 

并且文档无法编译。

未编辑

不幸的是,我得到的结果无法回答这个问题。首先,因为它无法确认 Faheem Mitha 遇到的 AUCTeX 中的预览 LaTeX 错误,也无法重现这些错误,更不用说解释这些问题了,因为我没有遇到过。此外,我不得不得出结论,我的答案对于这个问题来说太过局部化,因为其他知名成员,如 Sean Allred 已经确认了 AUCTeX 中的预览 LaTeX 的问题,jss.cls甚至能够重现其中的一些问题。

Faheem Mitha 要求不要删除答案,并提供所获得的输出的详细信息。

文件被解压,并因此被包含在 TDS 中,随后被包含mktexlsr。我在编译时遇到的唯一错误是缺少徽标文件,正如 op 所述,这是类文件的要求。后来通过包含徽标解决了这个小麻烦jpg

这是文档编译输出中类加载的包的详细描述。

  Running `Preview-LaTeX' on `_region_' with ``xelatex  "\nonstopmode\nofiles\PassOptionsToPackage{active,tightpage,auctex}{preview}\AtBeginDocument{\ifx\ifPreview\undefined\RequirePackage[displaymath,floats,graphics,textmath,sections,footnotes]{preview}[2004/11/05]\fi}" "\input" _region_.tex''
  This is XeTeX, Version 3.1415926-2.5-0.9999.3 (TeX Live 2013)
   restricted \write18 enabled.
  entering extended mode
  LaTeX2e <2011/06/27>
  Babel <3.9g> and hyphenation patterns for 78 languages loaded.
  
  No auxiliary output files.
  
  (./_region_.tex  !name(jssauctexsample.tex)
  (~/texmf/tex/latex/jss/jss.cls
  Document Class: jss 2013/04/06 2.2 jss class by Achim Zeileis
  (~/texmf-dist/tex/latex/base/article.cls
  Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
  (~/texmf-dist/tex/latex/base/size11.clo))
  (~/texmf-dist/tex/latex/graphics/graphicx.sty
  (~/texmf-dist/tex/latex/graphics/keyval.sty)
  (~/texmf-dist/tex/latex/graphics/graphics.sty
  (~/texmf-dist/tex/latex/graphics/trig.sty)
  (~/texmf-dist/tex/latex/latexconfig/graphics.cfg)
  (~/texmf-dist/tex/xelatex/xetex-def/xetex.def)))
  (~/texmf-dist/tex/latex/graphics/color.sty
  (~/texmf-dist/tex/latex/latexconfig/color.cfg))
  (~/texmf-dist/tex/latex/ae/ae.sty
  (~/texmf-dist/tex/latex/base/fontenc.sty
  (~/texmf-dist/tex/latex/base/t1enc.def)
  (~/texmf-dist/tex/latex/ae/t1aer.fd)))
  (~/texmf-dist/tex/latex/fancyvrb/fancyvrb.sty
  Style option: `fancyvrb' v2.7a, with DG/SPQR fixes, and firstline=lastline fix 
  <2008/02/07> (tvz)) (~/texmf-dist/tex/latex/base/fontenc.sty
  (~/texmf-dist/tex/latex/base/t1enc.def))
  (~/texmf-dist/tex/latex/upquote/upquote.sty
  (~/texmf-dist/tex/latex/base/textcomp.sty
  (~/texmf-dist/tex/latex/base/ts1enc.def)))
  (~/texmf-dist/tex/latex/natbib/natbib.sty
  
  ! LaTeX Error: \makeindex undefined.
  
  See the LaTeX manual or LaTeX Companion for explanation.
  Type  H <return>  for immediate help.
   ...                                              
                                                    
  l.795 \renewcommand\makeindex
                               {\NAT@makeindex
  ) (~/texmf-dist/tex/latex/hyperref/hyperref.sty
  (~/texmf-dist/tex/generic/oberdiek/hobsub-hyperref.sty
  (~/texmf-dist/tex/generic/oberdiek/hobsub-generic.sty))
  (~/texmf-dist/tex/generic/ifxetex/ifxetex.sty)
  (~/texmf-dist/tex/latex/oberdiek/auxhook.sty)
  (~/texmf-dist/tex/latex/oberdiek/kvoptions.sty)
  (~/texmf-dist/tex/latex/hyperref/pd1enc.def)
  (~/texmf-dist/tex/latex/latexconfig/hyperref.cfg)
  (~/texmf-dist/tex/latex/url/url.sty))
  
  Package hyperref Message: Driver (autodetected): hxetex.
  
  (~/texmf-dist/tex/latex/hyperref/hxetex.def
  (~/texmf-dist/tex/latex/hyperref/puenc.def)
  (~/texmf-dist/tex/generic/oberdiek/stringenc.sty)
  (~/texmf-dist/tex/latex/oberdiek/rerunfilecheck.sty))
  
  Package hyperref Warning: Option `hyperindex' has already been used,
  (hyperref)                setting the option has no effect on input line 444.
  
  ) (./_region_.aux) (~/texmf-dist/tex/latex/base/ts1cmr.fd)
  (~/texmf-local/tex/latex/preview/preview.sty
  (~/texmf-local/tex/latex/preview/prtightpage.def)
  (~/texmf-local/tex/latex/preview/prauctex.def
  No auxiliary output files.
  
  
  (~/texmf-local/tex/latex/preview/prauctex.cfg))
  (~/texmf-local/tex/latex/preview/prfootnotes.def)
  Preview: Fontsize 10.95pt
  Preview: PDFoutput 1
  ) (~/texmf-dist/tex/latex/hyperref/nameref.sty
  (~/texmf-dist/tex/generic/oberdiek/gettitlestring.sty))
  
  Package hyperref Warning: Rerun to get /PageLabels entry.
  
  
  Package hyperref Warning: Token not allowed in a PDF string (Unicode):
  (hyperref)                removing `\\' on input line 5.
  
  (~/texmf-dist/tex/generic/oberdiek/se-ascii-print.def)
  ! Preview: Snippet 1 started.
  <-><->
        
  l.5            \begin{document}
                                 
  <use  "jsslogo.jpg" >
  Preview: Tightpage -32891 -32891 32891 32891
  ! Preview: Snippet 1 ended.(4288418+0x5885636).
  <-><->
        
  l.5            \begin{document}
                                 
  [1] (~/texmf-dist/tex/latex/psnfss/t1pzc.fd)
   !name(jssauctexsample.tex) !offset(-3) 
  ! Preview: Snippet 2 started.
  <-><->
        
  l.9            $
                  x$
  ! Preview: Snippet 2 ended.(308974+0x410139).
  <-><->
        
  l.9            $x$
                    
  [2] (~/texmf-dist/tex/latex/ae/t1aett.fd) )
  (see the transcript file for additional information)
  Output written on _region_.pdf (2 pages).
  Transcript written on _region_.log.
  
  Preview-LaTeX exited as expected with code 1 at Sun Dec 29 23:07:36
  Running `Preview-PDF2DSC' with ``pdf2dsc _region_.pdf _region_.prv/tmp6152      Lva/preview.dsc''
  
  Preview-PDF2DSC finished at Sun Dec 29 23:07:36
  Running `Preview-Ghostscript' with ``gs -dOutputFile\=\(_region_.prv/tmp6152Lva/pr1-\%d.png\) -q -dDELAYSAFER -dNOPAUSE -DNOPLATFONTS -dPrinted -dTextAlphaBits\=4 -dGraphicsAlphaBits\=4 -sDEVICE\=png16m -r138.521x138.593''
  
  Preview-Ghostscript finished at Sun Dec 29 23:07:36

在此处输入图片描述

在此处输入图片描述

相关内容