在 Alpine Linux Docker 容器中找不到 latexmk 文件

在 Alpine Linux Docker 容器中找不到 latexmk 文件

无论出于什么原因,我都不能将其latexmk在 Docker 容器中使用。

虽然我可以在我的 arch linux 和 manjaro 安装中创建文档,但问题本身出现在我的带有texlive-full容器的 alpine docker 容器中以及临时创建的 docker 容器中。ubuntu:latest

以下是LaTeX代码的最小表示,它在 arch linux 和 manjaro 安装上都产生文档,但'! LaTeX Error: File 'logo' not found.'在两个容器上产生相同的错误():

\documentclass{minimal}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}


\begin{document}
  \includegraphics[width=0.5\textwidth]{logo}
\end{document}

以下是我的容器(anwait/latex)的完整日志,其中仅安装了texlive-fullbiber包:

host$ docker run -itv $PWD:/workdir anwait/latex sh

/workdir # latexmk
Latexmk: This is Latexmk, John Collins, 17 March 2019, version: 4.63b.
Latexmk: Disallowing switch of output file as incompatible
    with file requests.
Latexmk: applying rule 'latex'...
Rule 'latex': The following rules & subrules became out-of-date:
      'latex'
------------
Run number 1 of rule 'latex'
------------
------------
Running 'latex  -recorder  "minimal.tex"'
------------
This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019/Alpine Linux) (preloaded format=latex)
 restricted \write18 enabled.
entering extended mode
(./minimal.tex
LaTeX2e <2020-02-02> patch level 5
L3 programming layer <2020-03-06>
(/usr/share/texmf-dist/tex/latex/base/minimal.cls
Document Class: minimal 2001/05/25 Standard LaTeX minimal class
) (/usr/share/texmf-dist/tex/latex/base/inputenc.sty)
(/usr/share/texmf-dist/tex/latex/graphics/graphicx.sty
(/usr/share/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/share/texmf-dist/tex/latex/graphics/graphics.sty
(/usr/share/texmf-dist/tex/latex/graphics/trig.sty)
(/usr/share/texmf-dist/tex/latex/graphics-cfg/graphics.cfg)
(/usr/share/texmf-dist/tex/latex/graphics-def/dvips.def)))
(/usr/share/texmf-dist/tex/latex/l3backend/l3backend-dvips.def) (./minimal.aux)

! LaTeX Error: File `logo' not found.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.7   \includegraphics[width=0.5\textwidth]{logo}
                                                 
? X
No pages of output.
Transcript written on minimal.log.
=== TeX engine is 'pdfTeX'
Latexmk: Missing input file: 'logo' from line
  '! LaTeX Error: File `logo' not found.'
Latexmk: Log file says no output from latex
Latexmk: For rule 'latex', no output was made
Latexmk: Errors, so I did not complete making targets
Latexmk: Use the -f option to force complete processing,
 unless error was exceeding maximum runs, or warnings treated as errors.

边注

logo.png是的,我可以通过写入logo(该文件本身是一个 png 文件)来避免此错误,但是......

  1. 然后我收到这个错误:! LaTeX Error: Cannot determine size of graphic in logo.png (no BoundingBox).
  2. 我根本不想使用这种形式,因为我想摆脱源文件中的这个限制,并且因为它可以在没有它的情况下在 arch linux 和 manjaro 上运行......所以我对我所缺少的东西更感兴趣。

答案1

解决方案确实是-pdf@daleif 提到的缺少标志,当我使用容器内的 shell 时,我忘记将其包含在命令中,因为我$HOME/.latexmkrc的工作站上启用了这个精确的选项,而且我已经很久没有使用这个图像了。

相关内容