LaTeX 설치에 대한 진단

LaTeX 설치에 대한 진단

pdflatex나는 일부 패키지가 설치되어 있다는 것을 알고 있는 컴퓨터를 가지고 있습니다 . 해당 컴퓨터에서 특정 .tex파일을 컴파일하고 출력을 볼 수 있지만 컴퓨터를 직접 검사할 수는 없습니다.

모든 패키지, 클래스, 글꼴 및 해당 버전과 함께 해당 컴퓨터에 설치된 LaTeX 설치를 설명하는 PDF를 생성하는 가장 쉬운 방법은 무엇입니까? 이것이 가능합니까?

답변1

tlmgr info

이미 설치된 경우 앞에 i가 붙은 모든 TeXLive 패키지를 나열합니다. 또는 사용

tlmgr list --only-installed

전체 목록을 PDF로 만들 수도 있습니다( 로 실행 lualatex --shell-escape <file>).

\documentclass[fontsize=11pt,paper=a4,pagesize]{scrartcl}
\usepackage{luacode,ltablex}
\begin{document}
\section*{Installed packages in \TeX{}Live}
\begin{luacode}
local fh,err = io.popen("tlmgr list --only-installed")
if not fh then
  texio.write(err)
  os.exit(-1)
end
tex.print("\\begingroup\\footnotesize\\noindent")
tex.print("\\begin{tabularx}{\\linewidth}{@{} r @{.~} l X @{}}")
local i=0
for line in fh:lines() do
  i = i + 1
  tex.print(i .. "&" .. line:gsub("^i ", ""):gsub(": ", "&", 1)
    :gsub("\\", "\\textbackslash{}"):gsub("_", "\\_"):gsub("$","\\\\"))
end
tex.print("\\end{tabularx}\\endgroup")
fh:close()
\end{luacode}
\end{document}

MiKteX에서 어떻게 할 수 있는지 모르겠습니다.

답변2

버전 pdflatex; 으로 실행합니다 -shell-escape.

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{xparse}

\ExplSyntaxOn

\NewDocumentCommand{\listpackages}{}
 {
  \krlmlr_list_packages:
 }

\ior_new:N \g_krlmlr_read_stream

\cs_new_protected:Nn \krlmlr_list_packages:
 {
  \ior_open:Nn \g_krlmlr_read_stream { |"tlmgr~list~--only-installed" }
  \ior_map_inline:Nn \g_krlmlr_read_stream
   {
    \__krlmlr_process_line:n { ##1 }
   }
 }

\cs_new_protected:Nn \__krlmlr_process_line:n
 {
  \__krlmlr_process_line_aux:w #1 \q_stop
 }
\cs_new_protected:Npn \__krlmlr_process_line_aux:w #1~#2~#3 \q_stop
 {
  \noindent\texttt{\tl_to_str:n { #2 }}~\tl_to_str:n {#3}\par
 }
\ExplSyntaxOff

\begin{document}

\listpackages

\end{document}

여기에 이미지 설명을 입력하세요

(전체 76페이지가 아닌 처음 몇 개의 항목만 해당됩니다.)

관련 정보