
Por exemplo
Tenho dois projetos TeX com uma estrutura de nome de arquivo semelhante:
O master.tex tem uma estrutura como esta:
\input{preamble.tex} % <- \bibliography{Projekt_A_Literature} in preamble
% ...
\begin{document}
% ...
\include{chapter/Projekt_A_cp1.tex}
\include{chapter/Projket_A_cp2.tex}
\include{chapter/Projekt_A_cp3.tex}
% ...
\end{document}
o objetivo é: posso alterar de maneira fácil e rápida o grupo de arquivos de capítulos para entrada.
\include{chpater/Project_A_cp1.tex} \include{chpater/Project_B_cp1.tex}
\include{chpater/Project_A_cp2.tex} ==> \include{chpater/Project_B_cp2.tex}
\include{chapter/Project_A_cp3.tex} \include{chpater/Project_B_cp3.tex}
uma abordagem simples, mas não elegante, é:
\newcommand{\prjindex}{A} $ or \def\prjindex{A}
%...
\begin{document}
\include{chpater/Project_\prjindex_cp1.tex}
\include{chpater/Project_\prjindex_cp2.tex}
\include{chpater/Project_\prjindex_cp3.tex}
\end{document}
a questão desta solução é, se eu não compilar no arquivo mestre TeX, ocorrerá erros como
Sequência de controle indefinida ....{Project_\prjindex_Literature.tex}.
Então vim aqui para uma solução mais elegante
Responder1
Parece que você precisa de um "mecanismo" para detecção automática \prjindex
em situações em que uma definição de \prjindex
não é fornecida "manualmente".
Observações preliminares:
Geralmentea expansão da primitiva \jobname
forma o nome daquele arquivo (sem extensão) que foi utilizado para iniciar a compilação.
Por exemplo, se você compilar um projeto cujo arquivo principal é testfile.tex
via linha de comando
latex testfile.tex
, a primitiva \jobname
será expandida para a frase testfile
.
Os tokens de caracteres nas frases entregues por \jobname
serão sempre do código de categoria 12 (outros), enquanto os espaços serão sempre do código de categoria 10 (espaço).
A frase testfile
que vem da expansão \jobname
será usada para
- criando o arquivo .log: O arquivo .log será nomeado
testfile.log
. - criando o arquivo .aux principal: que será nomeado
testfile.aux
. - criando o arquivo .toc contendo dados para o índice: Ele será nomeado
testfile.toc
. - criando o arquivo .lof contendo dados para a lista de figuras: Esse será nomeado
testfile.lof
. - criando o arquivo .lot contendo dados para a lista de tabelas: Isso será nomeado
testfile.lot
. - etc.
Mas com a maioria das distribuições TeX atuais você pode ter (La)TeXdesviar-se da maneira usual de lidar com as coisas:
Com a maioria das distribuições TeX atuais, você pode fornecer na linha de comando uma opção de linha de comando (a ‑‑jobname
opção -) que permite alterar a frase que \jobname
será entregue.
Por exemplo, se você compilar um projeto cujo arquivo principal é testfile.tex
via linha de comando
latex --jobname=foobar testfile.tex
, a primitiva \jobname
será expandida para a frase foobar
.
Neste caso a frase foobar
que vem de expansão \jobname
será usada para
- criando o arquivo .log: O arquivo .log será nomeado
foobar.log
. - criando o arquivo .aux principal: que será nomeado
foobar.aux
. - criando o arquivo .toc contendo dados para o índice: Ele será nomeado
foobar.toc
. - criando o arquivo .lof contendo dados para a lista de figuras: Esse será nomeado
foobar.lof
. - criando o arquivo .lot contendo dados para a lista de tabelas: Isso será nomeado
foobar.lot
. - etc.
Com minha sugestão abaixo, é um requisito que o LaTeX lide com as coisasnomaneira usual, ou seja, as coisas devem ser compiladassemfornecendo alguns‑‑jobname
-opção.
Portanto, minha sugestão abaixo não é adequada para pessoas que usam plataformas LaTeX/editores/interfaces de usuário (online) onde as coisas estão configuradas para fazer uso da ‑‑jobname
opção -.
Em caso
- os nomes de todos os arquivos durante cuja compilação a definição
\prjindex
deve ser "autodetectada" (já que não será definida "manualmente") são de padrão - ambos denotando o projeto e não sendo vazios e não contendo sublinhados ( ) -Projekt_⟨#1⟩_⟨#2⟩.tex
⟨#1⟩
_
- chamando latex para arquivos de "compilação autônoma" durante cuja compilação a definição
\prjindex
deve ser "autodetectada" sempre ocorreseminvocando a‑‑jobname
opção -(o que implica que a expansão do\jobname
-primitivo forma o nome daquele arquivo (sem extensão) que foi usado para iniciar a compilação)
\GetPrjindexFromJobnameIfUndefined
que funciona da seguinte maneira:
Caso a macro \prjindex
já esteja definida, não faz nada.
Caso a macro \prjindex
não esteja definida, ela verifica se a expansão do \jobname
-primitivo é do padrão . Caso não seja desse padrão, uma mensagem de erro será acionada. Se for desse padrão, será examinado se estará vazio. Se for esse o caso, uma mensagem de erro será acionada. Caso contrário, a macro será definida para expandir para .Projekt_⟨#1⟩_⟨#2⟩
⟨#1⟩
\prjindex
⟨#1⟩
Não posso decidir se essa rotina é útil para você porque você não revelou com muitos detalhes como está organizada aquela parte da estrutura de arquivos do seu projeto que torna possível compilar os arquivos únicos, ambos "autônomos" e quando invocado a partir de um arquivo tex mestre via ou .Projekt_⟨#1⟩_⟨#2⟩.tex
\input
\include
Caso todos os arquivos de projeto compartilhem de alguma forma o mesmo preâmbulo, você provavelmente poderá disponibilizar esta rotina para todos os arquivos de projeto através desse preâmbulo.
Provavelmente você pode incluir essa rotina (e a chamada para ela) em sua preamble.tex.
rotina That não faz nada caso \prjindex
já esteja definida.
Portanto
- dentro de
master.tex
você pode definir\prjindex
antesinserindopreamble.tex
. - o cenário de compilação autônoma de um de seus -files leva à inserção de while ainda não definido, o que, por sua vez, leva à rotina de "detecção automática" e definição para você, examinando o resultado da expansão de .
Projekt_⟨#1⟩_⟨#2⟩.tex
\preamble.tex
\prjindex
\GetPrjindexFromJobnameIfUndefined
\prjindex
\jobname
\documentclass{article}
%%========Code for \GetPrjindexFromJobnameIfUndefined=========
\begingroup
\makeatletter
\def\prjprephrase{Projekt_}%
\def\prjpostphrase{_}%
% \jobname delivers everything but the space (which will be of catcode 10)
% with catcode 12(other). Therefore "sanitizing" is needed for turning
% everything but the space into catcode 12(other):
\@onelevel@sanitize\prjprephrase
\@onelevel@sanitize\prjpostphrase
\newcommand\GetPrjindexFromJobnameIfUndefined[2]{%
\endgroup
\newcommand\GetPrjindexFromJobnameIfUndefined{%
\@ifundefined{prjindex}{%
\expandafter\GetPrjindexCheckPattern\jobname$#1#2$&%
}{}%
}%
\@ifdefinable\GetPrjindexCheckPattern{%
\def\GetPrjindexCheckPattern##1#1##2#2##3$##4&{%
\GetPrjindexPatternfork
&##4&{\expandafter\GetPrjindexExtractfrompattern\jobname$}%
#2$&{%
\GenericError{(\string\prjindex)\space}{%
Error on input line \the \inputlineno:\MessageBreak
\string\GetPrjindexFromJobnameIfUndefined\space cannot extract the\MessageBreak
\string\prjindex\space from \string\jobname's expansion.\MessageBreak
(\string\GetPrjindexFromJobnameIfUndefined\space is defined\MessageBreak
\space somewhere in this document.)\@gobble
}{Have a look at the comments in this document.}%
{%
\string\GetPrjindexFromJobnameIfUndefined\space can extract the \string\prjindex\MessageBreak
from \string\jobname's expansion only in case \string\jobname's expansion is\MessageBreak
of pattern\MessageBreak
\@spaces #1\string####1#2\string####2\MessageBreak
while \string####1 is not empty.\MessageBreak
If this is the case, the expansion of \string\prjindex\space will be \string####1.\MessageBreak
\string####1 will not contain underscores (\string_).\MessageBreak
\string####2 can contain underscores.\MessageBreak
}%
}%
&&&&%
}%
}%
\@ifdefinable\GetPrjindexPatternfork{%
\def\GetPrjindexPatternfork##1#2$&##2##3&&&&{##2}%
}%
\@ifdefinable\GetPrjindexExtractfrompattern{%
\def\GetPrjindexExtractfrompattern#1##1#2##2${%
\ifx\relax##1\relax
\expandafter\@firstoftwo
\else
\expandafter\@secondoftwo
\fi
{%
\GenericError{(\string\prjindex)\space}{%
Error on input line \the \inputlineno:\MessageBreak
\string\prjindex\space is empty.\MessageBreak
(\string\GetPrjindexFromJobnameIfUndefined\space is defined\MessageBreak
\space somewhere in this document.)\@gobble
}{Have a look at the comments in this document.}%
{%
\string\GetPrjindexFromJobnameIfUndefined\space can extract the \string\prjindex\MessageBreak
from \string\jobname's expansion only in case \string\jobname's expansion is\MessageBreak
of pattern\MessageBreak
\@spaces #1\string####1#2\string####2\MessageBreak
while \string####1 is not empty.\MessageBreak
If this is the case, the expansion of \string\prjindex\space will be \string####1.\MessageBreak
\string####1 will not contain underscores (\string_).\MessageBreak
\string####2 can contain underscores.\MessageBreak
}%
}%
{\newcommand*\prjindex{##1}}%
}%
}%
}%
\expandafter\expandafter\expandafter\GetPrjindexFromJobnameIfUndefined
\expandafter\expandafter\expandafter{\expandafter\prjprephrase\expandafter}%
\expandafter{\prjpostphrase}%
%%=====End of code for \GetPrjindexFromJobnameIfUndefined=====
\GetPrjindexFromJobnameIfUndefined
\show\prjindex
\begin{document}
Some document
\end{document}
A propósito: Para testar a rotina salvei o exemplo acima como test.tex
e compilei, invocando a ‑‑jobname
opção -com valores diferentes.
A compilação por meio do comando latex test.tex
resultou conforme o esperado:
! Error on input line 80:
(\prjindex) \GetPrjindexFromJobnameIfUndefined cannot extract the
(\prjindex) \prjindex from \jobname's expansion.
(\prjindex) (\GetPrjindexFromJobnameIfUndefined is defined
(\prjindex) somewhere in this document.)
Have a look at the comments in this document.
Type H <return> for immediate help.
...
l.80 \GetPrjindexFromJobnameIfUndefined
?
> \prjindex=undefined.
l.82 \show\prjindex
Isto era esperado, pois neste caso \jobname
expandiu-se para test
o que não é padrão .
Projekt_⟨#1⟩_⟨#2⟩
A compilação por meio do comando latex ‑‑jobname=Projekt_A_4 test.tex
resultou conforme o esperado:
\prjindex=macro:
->A.
l.82 \show\prjindex
(Você obteria o mesmo quando o exemplo fosse salvo Projekt_A_4.tex
e compilado por meio do comando latex Projekt_A_4.tex
.)
A compilação por meio do comando latex ‑‑jobname=Projekt_B_4 test.tex
resultou conforme o esperado:
\prjindex=macro:
->B.
l.82 \show\prjindex
(Você obteria o mesmo quando o exemplo fosse salvo Projekt_B_4.tex
e compilado por meio do comando latex Projekt_B_4.tex
.)
A compilação por meio do comando latex ‑‑jobname=Projekt_JohannGambolputty_12345 test.tex
resultou conforme o esperado:
\prjindex=macro:
->JohannGambolputty.
l.82 \show\prjindex
(Você obteria o mesmo quando o exemplo fosse salvo Projekt_JohannGambolputty_12345.tex
e compilado por meio do comando latex Projekt_JohannGambolputty_12345.tex
.)
Por falar nisso:
Às vezes eu organizo meus arquivos de projeto da seguinte forma:
Preâmbulo.tex
% Check whether the \documentclass-command was already invoked.
% If so, increment \inputlevel and stop inputting.
% If not so, don't stop imputting and thus do all the
% preamble-stuff, inclusive defining \inputlevel:
\expandafter\ifx\csname @twoclasseserror\endcsname\documentclass
\xdef\inputlevel{\number\numexpr\inputlevel+1\relax}%
\expandafter\endinput
\fi
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass{article}%
%
\newcommand*\inputlevel{1}%
\global\let\inputlevel=\inputlevel
%
% Whatsoever preamble-commands, etc.
%
% Here you can also place the code for defining \GetPrjindexFromJobnameIfUndefined
% and then invoke it for defining \prjindex:
%
%%========Code for \GetPrjindexFromJobnameIfUndefined=========
\begingroup
\makeatletter
\def\prjprephrase{Projekt_}%
\def\prjpostphrase{_}%
% \jobname delivers everything but the space (which will be of catcode 10)
% with catcode 12(other). Therefore "sanitizing" is needed for turning
% everything but the space into catcode 12(other):
\@onelevel@sanitize\prjprephrase
\@onelevel@sanitize\prjpostphrase
\newcommand\GetPrjindexFromJobnameIfUndefined[2]{%
\endgroup
\newcommand\GetPrjindexFromJobnameIfUndefined{%
\@ifundefined{prjindex}{%
\expandafter\GetPrjindexCheckPattern\jobname$#1#2$&%
}{}%
}%
\@ifdefinable\GetPrjindexCheckPattern{%
\def\GetPrjindexCheckPattern##1#1##2#2##3$##4&{%
\GetPrjindexPatternfork
&##4&{\expandafter\GetPrjindexExtractfrompattern\jobname$}%
#2$&{%
\GenericError{(\string\prjindex)\space}{%
Error on input line \the \inputlineno:\MessageBreak
\string\GetPrjindexFromJobnameIfUndefined\space cannot extract the\MessageBreak
\string\prjindex\space from \string\jobname's expansion.\MessageBreak
(\string\GetPrjindexFromJobnameIfUndefined\space is defined\MessageBreak
\space somewhere in this document.)\@gobble
}{Have a look at the comments in this document.}%
{%
\string\GetPrjindexFromJobnameIfUndefined\space can extract the \string\prjindex\MessageBreak
from \string\jobname's expansion only in case \string\jobname's expansion is\MessageBreak
of pattern\MessageBreak
\@spaces #1\string####1#2\string####2\MessageBreak
while \string####1 is not empty.\MessageBreak
If this is the case, the expansion of \string\prjindex\space will be \string####1.\MessageBreak
\string####1 will not contain underscores (\string_).\MessageBreak
\string####2 can contain underscores.\MessageBreak
}%
}%
&&&&%
}%
}%
\@ifdefinable\GetPrjindexPatternfork{%
\def\GetPrjindexPatternfork##1#2$&##2##3&&&&{##2}%
}%
\@ifdefinable\GetPrjindexExtractfrompattern{%
\def\GetPrjindexExtractfrompattern#1##1#2##2${%
\ifx\relax##1\relax
\expandafter\@firstoftwo
\else
\expandafter\@secondoftwo
\fi
{%
\GenericError{(\string\prjindex)\space}{%
Error on input line \the \inputlineno:\MessageBreak
\string\prjindex\space is empty.\MessageBreak
(\string\GetPrjindexFromJobnameIfUndefined\space is defined\MessageBreak
\space somewhere in this document.)\@gobble
}{Have a look at the comments in this document.}%
{%
\string\GetPrjindexFromJobnameIfUndefined\space can extract the \string\prjindex\MessageBreak
from \string\jobname's expansion only in case \string\jobname's expansion is\MessageBreak
of pattern\MessageBreak
\@spaces #1\string####1#2\string####2\MessageBreak
while \string####1 is not empty.\MessageBreak
If this is the case, the expansion of \string\prjindex\space will be \string####1.\MessageBreak
\string####1 will not contain underscores (\string_).\MessageBreak
\string####2 can contain underscores.\MessageBreak
}%
}%
{\newcommand*\prjindex{##1}}%
}%
}%
}%
\expandafter\expandafter\expandafter\GetPrjindexFromJobnameIfUndefined
\expandafter\expandafter\expandafter{\expandafter\prjprephrase\expandafter}%
\expandafter{\prjpostphrase}%
%%=====End of code for \GetPrjindexFromJobnameIfUndefined=====
%
% This will define \prjindex depending on the expansion of \jobname
% while \jobname usually represents the name of the file used for
% initiating compilation:
%
% !!! I don't know whether, e.g., online-latex-plattforms like overleaf
% !!! invoke latex using the -jobname-option, which would lead to
% !!! the expansion of \jobname deviating from the name of the file
% !!! used for initiating compilation.
%
\GetPrjindexFromJobnameIfUndefined
%
% With subsequent preamble-commands you can, if you wish, fork depending on
% the expansion of \prjindex. But be aware that like \jobname \prjindex also
% holds only characters of catcode 12(other) and spaces of catcode 10(space).
% Therefore when storing a string in a temporary macro (this should, like
% \prjindex not be defined in terms of \long, which is the case with
% \def or \newcommand*) and \ifx-comparing that temporary macro to \prjindex,
% make sure that the definition of that temporary macro is "sanitized" by
% means of \@onelevel@sanitize before doing the \ifx-comparison.
%
% \usepackage...
% \usepackage...
%
\begin{document}%
\endinput
|
| Place whatsoever comments remarks and explanations and manuals you wish to place
| here. They won't be processed because LaTeX ceases reading and processing this
| file when encountering \endinput.
Postamble.tex
\csname @\ifnum\inputlevel>1 second\else first\fi oftwo\endcsname
{%
\end{document}%
}{%
\xdef\inputlevel{\number\numexpr\inputlevel-1\relax}%
}%
Projeto_A_cp1.tex
%----------------------
\input{Preamble.tex}%
%----------------------
This is file \texttt{Projekt\string_A\string_cp1.tex}\par
This is the text in file \texttt{Projekt\string_\prjindex\string_cp1.tex}.\par
The file \texttt{Projekt\string_\prjindex\string_cp1.tex} invokes the file \texttt{Projekt\string_\prjindex\string_cp2.tex}:\par
\input{Projekt_\prjindex_cp2.tex}%
%----------------------
\input{Postamble.tex}%
%----------------------
Projeto_A_cp2.tex
%----------------------
\input{Preamble.tex}%
%----------------------
This is file \texttt{Projekt\string_A\string_cp2.tex}\par
This is the text in file \texttt{Projekt\string_\prjindex\string_cp2.tex}.\par
The file \texttt{Projekt\string_\prjindex\string_cp2.tex} invokes the file \texttt{Projekt\string_\prjindex\string_cp3.tex}:\par
\input{Projekt_\prjindex_cp3.tex}%
%----------------------
\input{Postamble.tex}%
%----------------------
Projeto_A_cp3.tex
%----------------------
\input{Preamble.tex}%
%----------------------
This is file \texttt{Projekt\string_A\string_cp3.tex}\par
This is the text in file \texttt{Projekt\string_\prjindex\string_cp3.tex}.\par
%----------------------
\input{Postamble.tex}%
%----------------------
Projeto_B_cp1.tex
%----------------------
\input{Preamble.tex}%
%----------------------
This is file \texttt{Projekt\string_B\string_cp1.tex}\par
This is the text in file \texttt{Projekt\string_\prjindex\string_cp1.tex}.\par
The file \texttt{Projekt\string_\prjindex\string_cp1.tex} invokes the file \texttt{Projekt\string_\prjindex\string_cp2.tex}:\par
\input{Projekt_\prjindex_cp2.tex}%
%----------------------
\input{Postamble.tex}%
%----------------------
Projeto_B_cp2.tex
%----------------------
\input{Preamble.tex}%
%----------------------
This is file \texttt{Projekt\string_B\string_cp2.tex}\par
This is the text in file \texttt{Projekt\string_\prjindex\string_cp2.tex}.\par
The file \texttt{Projekt\string_\prjindex\string_cp2.tex} invokes the file \texttt{Projekt\string_\prjindex\string_cp3.tex}:\par
\input{Projekt_\prjindex_cp3.tex}%
%----------------------
\input{Postamble.tex}%
%----------------------
Projeto_B_cp3.tex
%----------------------
\input{Preamble.tex}%
%----------------------
This is file \texttt{Projekt\string_B\string_cp3.tex}\par
This is the text in file \texttt{Projekt\string_\prjindex\string_cp3.tex}.\par
%----------------------
\input{Postamble.tex}%
%----------------------
Desta forma cada um dos arquivos Projekt_A_cp1.tex
, Projekt_A_cp2.tex
, Projekt_A_cp3.tex
respectivamente cada um dos arquivos Projekt_B_cp1.tex
, Projekt_B_cp2.tex
, Projekt_B_cp3.tex
pode ser utilizado tanto para compilar "standalone" quanto para ser invocado via \input
ou \include
por outro arquivo do mesmo projeto.
Preamble.tex
pode conter código onde ocorre a bifurcação, dependendo do significado de \prjindex
, portanto, as coisas podem ser tratadas de maneira diferente para projetos diferentes dentro do mesmo arquivo de preâmbulo.
Responder2
Não tenho certeza de qual é o problema, mas certamente você precisa fazer uma alteração no seu código: o argumento para \include
mustnãotem a .tex
extensão.
\documentclass{book}
% why shouldn't this be elegant
\newcommand{\projectindex}{B}
\begin{document}
\include{chapter/Project_\projectindex_cp1}
\include{chapter/Project_\projectindex_cp2}
\include{chapter/Project_\projectindex_cp3}
\end{document}
Aqui está a saída do terminal ao compilar este código
pdflatex sun
This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019) (preloaded format=pdflatex)
restricted \write18 enabled.
entering extended mode
(./sun.tex
LaTeX2e <2019-10-01> patch level 3
(/usr/local/texlive/2019/texmf-dist/tex/latex/base/book.cls
Document Class: book 2019/10/25 v1.4k Standard LaTeX document class
(/usr/local/texlive/2019/texmf-dist/tex/latex/base/bk10.clo)) (./sun.aux
(./chapter/Project_B_cp1.aux) (./chapter/Project_B_cp2.aux)
(./chapter/Project_B_cp3.aux)) (./chapter/Project_B_cp1.tex
Chapter 1.
) [1{/usr/local/texlive/2019/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]
(./chapter/Project_B_cp2.tex [2]
Chapter 2.
) [3] (./chapter/Project_B_cp3.tex [4]
Chapter 3.
) [5] (./sun.aux (./chapter/Project_B_cp1.aux) (./chapter/Project_B_cp2.aux)
(./chapter/Project_B_cp3.aux)) )</usr/local/texlive/2019/texmf-dist/fonts/type1
/public/amsfonts/cm/cmbx12.pfb></usr/local/texlive/2019/texmf-dist/fonts/type1/
public/amsfonts/cm/cmr10.pfb></usr/local/texlive/2019/texmf-dist/fonts/type1/pu
blic/amsfonts/cm/cmsl10.pfb>
Output written on sun.pdf (5 pages, 30009 bytes).
Se eu mudar para \newcommand{\projectindex}{A}
, depois de duas execuções de LaTeX eu recebo
pdflatex sun
This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019) (preloaded format=pdflatex)
restricted \write18 enabled.
entering extended mode
(./sun.tex
LaTeX2e <2019-10-01> patch level 3
(/usr/local/texlive/2019/texmf-dist/tex/latex/base/book.cls
Document Class: book 2019/10/25 v1.4k Standard LaTeX document class
(/usr/local/texlive/2019/texmf-dist/tex/latex/base/bk10.clo)) (./sun.aux
(./chapter/Project_A_cp1.aux) (./chapter/Project_A_cp2.aux)
(./chapter/Project_A_cp3.aux)) (./chapter/Project_A_cp1.tex
Chapter 1.
) [1{/usr/local/texlive/2019/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]
(./chapter/Project_A_cp2.tex [2]
Chapter 2.
) [3] (./chapter/Project_A_cp3.tex [4]
Chapter 3.
) [5] (./sun.aux (./chapter/Project_A_cp1.aux) (./chapter/Project_A_cp2.aux)
(./chapter/Project_A_cp3.aux)) )</usr/local/texlive/2019/texmf-dist/fonts/type1
/public/amsfonts/cm/cmbx12.pfb></usr/local/texlive/2019/texmf-dist/fonts/type1/
public/amsfonts/cm/cmr10.pfb></usr/local/texlive/2019/texmf-dist/fonts/type1/pu
blic/amsfonts/cm/cmsl10.pfb>
Output written on sun.pdf (5 pages, 29893 bytes).
Transcript written on sun.log.
Como você pode ver, os arquivos esperados estão incluídos.