首页 > 解决方案 > 在 R 中运行乳胶时如何解决此错误?

问题描述

我正在尝试使用 R 在乳胶中生成一些图,这是代码:

msaPrettyPrint(seq_mapped, output="pdf", showNames="none",
               showLogo="none", askForOverwrite=FALSE, verbose=FALSE)

和错误:

Error in texi2dvi(texfile, quiet = !verbose, pdf = identical(output, "pdf"),  : 
  unable to run pdflatex on 'seq_mapped.tex'
LaTeX errors:
! Paragraph ended before \inf@@get was complete.
<to be read again> 
                   \par 
l.25 ...e}{/tmp/RtmppWEuqI/seq108d544be5486.fasta}
                                                  
! Misplaced alignment tab character &.
\msfline ->\par &
                  & & & @
l.25 ...e}{/tmp/RtmppWEuqI/seq108d544be5486.fasta}
                                                  
! Misplaced alignment tab character &.
\msfline ->\par & &
                    & & @
l.25 ...e}{/tmp/RtmppWEuqI/seq108d544be5486.fasta}
                                                  
! Misplaced alignment tab character &.
\msfline ->\par & & &
                      & @
l.25 ...e}{/tmp/RtmppWEuqI/seq108d544be5486.fasta}
                                                  
! Misplaced alignment tab character &.
\msfline ->\par & & & &
                        @
l.25 ...e}{/tmp/RtmppWEuqI/seq108d544be5486.fasta}

我也试过:

msaPrettyPrint(seq_mapped, output="tex", showNames="none",
               showLogo="none", askForOverwrite=FALSE, verbose=FALSE)
tools::texi2pdf("seq_mapped.tex", clean=TRUE)

但仍然有错误

Error in texi2dvi(file = file, pdf = TRUE, clean = clean, quiet = quiet,  : 
  Running 'texi2dvi' on 'seq_mappedt.tex' failed.
LaTeX errors:
! LaTeX Error: File `texshade.sty' not found.

Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)

! Emergency stop.
<read *> 
         
l.4 ^^M
       
!  ==> Fatal error occurred, no output PDF file produced!

但是,texshade.sty已安装:

system.file("tex", "texshade.sty", package="msa")
[1] ".../R/x86_64-pc-linux-gnu-library/4.1/msa/tex/texshade.sty"

有任何想法吗?仅供参考:Ubuntu 20.04.2 LTS 焦点

谢谢

标签: rlatexpdflatex

解决方案


推荐阅读