Espero que un experto en LuaTeX/LaTeX pueda ayudarme con este problema que tengo.
Tengo un contenedor acoplable que se ejecuta en Debian Bullseye y he instalado eltextlive-full
paquete. La instalación completa es la siguiente:
apt-get update &&
apt-get install -y wget perl-tk fonts-noto-cjk "texlive-full=2020.20210202-3" &&
apt-get clean
El archivo .tex se ve así:
\documentclass[a4paper,16pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[margin=0.8in]{geometry}
\usepackage{libertine}
\usepackage{graphicx}
\usepackage{multido}
\usepackage{paracol}
\usepackage{ulem}
\usepackage{color}
\usepackage{soul}
\usepackage{xurl}
\usepackage{enumitem}
\usepackage{hyperref}
\usepackage{tokcycle}
\usepackage{libertine}
\usepackage{enumitem}
\usepackage{tipa}
\hypersetup{pdfauthor={System},
pdfproducer={System},
pdfcreator={System}
}
\newcommand{\cvspace}{\vskip 1.2em}
\overfullrule=0pt
%----------------------------------------------------------------------------------------
% Field COMMAND
%----------------------------------------------------------------------------------------
\newcommand{\field}[2]{
\columnratio{0.20}
\setlength{\columnsep}{3em}
\begin{paracol}{2}
\noindent\hspace{0pt}\textbf{#1} \switchcolumn \noindent{#2}
\end{paracol}
\cvspace
}
%----------------------------------------------------------------------------------------
% Indent Field COMMAND
%----------------------------------------------------------------------------------------
\newcommand{\indentfield}[2]{
\columnratio{0.30}
\setlength{\columnsep}{3em}
\begin{paracol}{2}
\baselineskip=1pt
\hspace{0pt}\textbf{#1} \switchcolumn \noindent{#2}
\end{paracol}
\cvspace
}
%----------------------------------------------------------------------------------------
% Text COMMAND
%----------------------------------------------------------------------------------------
\newcommand{\text}[1]{
\noindent{#1}
\cvspace
}
%----------------------------------------------------------------------------------------
% header
%----------------------------------------------------------------------------------------
%Force new page%
\newcommand{\sectionbreak}{\clearpage}
%----------------------------------------------------------------------------------------
% graphic COMMAND
%----------------------------------------------------------------------------------------
\newcommand{\graphic}[1]{
\begin{center}
\includegraphics[width=0.48\textwidth]{#1}
\end{center}
}
%----------------------------------------------------------------------------------------
% allgraphic COMMAND
%----------------------------------------------------------------------------------------
\newcommand{\allgraphic}[1]{
\begin{center}
\saveimageresource{#1}
\multido{\i=1+1}{\the\lastsavedimageresourcepages}{
\includegraphics[page=\i,width=0.48\textwidth]{#1}
}
\end{center}
}
%----------------------------------------------------------------------------------------
% url
%----------------------------------------------------------------------------------------
\hypersetup{colorlinks=true,urlcolor=blue}
\urlstyle{same}
%----------------------------------------------------------------------------------------
% section end
%----------------------------------------------------------------------------------------
\newcommand{\drawline}{\hrule \cvspace}
%----------------------------------------------------------------------------------------
% New Paragraph
%----------------------------------------------------------------------------------------
\newcommand{\newpara}[0]{\\[3mm]}
%----------------------------------------------------------------------------------------
% Table Headings
%----------------------------------------------------------------------------------------
\newcommand{\tableheadings}[1]{#1 \\}
%----------------------------------------------------------------------------------------
% Table Row
%----------------------------------------------------------------------------------------
\newcommand{\tablerow}[1]{\hline #1 \\}
%----------------------------------------------------------------------------------------
% Support Content Wrapping
%----------------------------------------------------------------------------------------
\newcommand\wraptext[1]{\tokcycle
{\addcytoks{##1\penalty0\hskip0pt plus1pt\relax}}
{\processtoks{##1}}
{\addcytoks{##1}}
{\addcytoks{##1}}
{#1}\the\cytoks}
%----------------------------------------------------------------------------------------
% Support for CJK Languages
%----------------------------------------------------------------------------------------
\directlua {
luaotfload.add_multiscript("cjk", {
Hang = "Noto Serif CJK KR:mode=harf;script=hang;",
Hani = "Noto Serif CJK TC:mode=harf;script=hani;",
Kana = "Noto Serif CJK JP:mode=harf;script=kana;",
Hira = "Noto Serif CJK JP:mode=harf;script=hira;",
})
luaotfload.add_multiscript("cjk_bold", {
Hang = "Noto Serif CJK KR/B:mode=harf;script=hang;",
Hani = "Noto Serif CJK TC/B:mode=harf;script=hani;",
Kana = "Noto Serif CJK JP/B:mode=harf;script=kana;",
Hira = "Noto Serif CJK JP/B:mode=harf;script=hira;",
})
}
\setmainfont[RawFeature={multiscript=cjk},BoldFeatures={RawFeature={multiscript=cjk_bold}}]{Libertinus Serif}
\begin{document}
% Above this line is standard and included in base.tex%s
\title{MainTitle}\author{SubTitle}\date{SubSubTitle}\maketitle
\end{document}
Luego, cuando intento generar un PDF a partir de un archivo tex con el siguiente comando:
/usr/bin/lualatex -halt-on-error -jobname output -output-format pdf output.tex
Recibo el siguiente error en los registros:
This is LuaHBTeX, Version 1.12.0 (TeX Live 2020/Debian) (format=lualatex 2023.3.10) 10 MAR 2023 12:56
restricted system commands enabled.
**/app/working/latex_abcde12345_64609089851690_4946691330391035353/output.tex
(/app/working/latex_abcde12345_64609089851690_4946691330391035353/output.tex
LaTeX2e <2020-10-01> patch level 4
Lua module: luaotfload 2022-10-03 3.23 Lua based OpenType font support
Lua module: lualibs 2020-12-30 2.73 ConTeXt Lua standard libraries.
Lua module: lualibs-extended 2020-12-30 2.73 ConTeXt Lua libraries -- extended c
ollection.
luaotfload | load : FATAL ERROR
luaotfload | load : × Failed to load "fontloader" module "basics-gen".
luaotfload | load : × Error message:
luaotfload | load : × "/etc/texmf/tex/lualatex/luaotfload/luaotfload-init.l
ua:301: system : no writeable cache path, quiting"./etc/texmf/tex/lualatex/luaot
fload/luaotfload-init.lua:301: system : no writeable cache path, quiting
stack traceback:
[C]: in function 'error'
/etc/texmf/tex/lualatex/luaotfload/luaotfload-init.lua:301: in function 'os.exi
t'
/etc/texmf/tex/lualatex/luaotfload/luaotfload.lua:203: in local 'load_fontloade
r_module'
/etc/texmf/tex/lualatex/luaotfload/luaotfload-init.lua:303: in upvalue 'init_ma
in'
/etc/texmf/tex/lualatex/luaotfload/luaotfload-init.lua:590: in function 'luaotf
load-init.lua'
/etc/texmf/tex/lualatex/luaotfload/luaotfload.lua:322: in field 'main'
[\directlua]:1: in main chunk.
<everyjob> ...ring \\def\string \\encodingdefault{OT1}')end }
\let \f@encoding \encoding...
l.1
\documentclass[a4paper,16pt]{article}
Here is how much of LuaTeX's memory you used:
8 strings out of 478824
100000,383344 words of node,token memory allocated
275 words of node memory still in use:
1 hlist, 1 dir, 39 glue_spec nodes
avail lists: 2:12,3:1,4:1
19793 multiletter control sequences out of 65536+600000
22 fonts using 2516239 bytes
5i,0n,1p,114b,15s stack positions out of 5000i,500n,10000p,200000b,200000s
! ==> Fatal error occurred, no output PDF file produced!
La única manera que he conseguido que esto funcione es instalándolo install-tl-20200406
manualmente siguiendo los pasosaquí. Sin embargo, este proceso de instalación puede llevar mucho tiempo (hasta dos horas), lo ideal es que sea muy rápido, en un par de minutos.
¿Hay alguna manera de hacer que este archivo de plantilla .tex funcione, que el proceso de instalación sea más rápido y usar paquetes de Debian para que funcione sin la instalación manual?
Nota: Al realizar la instalación manual, estaba haciendo lo siguiente:
RUN chmod -R +x /install-tl-20200406
RUN echo "I" | /install-tl-20200406/install-tl -repository ftp://tug.org/historic/systems/texlive/2020/tlnet-final
RUN chmod -R +x /usr/local/texlive/2020/bin/
RUN rm -rf /install-tl-20200406
RUN chmod o+w /usr/local/texlive/2020/texmf-var
Respuesta1
Después de investigar más a fondo, pude resolver el problema y parecía ser un problema de permiso. Al usar el paquete Debian texlive-luatex, necesitaba otorgar permiso de usuario de Docker y /var/lib/texmf
después de eso, comenzó a funcionar y ya no aparecía el error.
Gracias @David Carlisle y @Ulrike Fischer por los \usepackage[utf8]{inputenc}
y \usepackage[T1]{fontenc}
estos han sido eliminados.