Diagnostics about LaTeX installation
tlmgr info
lists all TeXLive packages with a preceeding i, if already installed. Or use
tlmgr list --only-installed
You can also create a complete list as pdf (run with 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}
I have no idea how it can be done for MiKteX.
A pdflatex
version; run with -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}
(Just the first few entries and not the whole 76 pages.)