Para que serve o arquivo .tex no TeX Live?

Para que serve o arquivo .tex no TeX Live?

Se eu correr

kpsewhich .tex

eu recebo

/usr/local/texlive/2013/texmf-dist/tex/latex/tools/.tex

Este arquivo pertence aos arquivos principais do LaTeX e está quase vazio:

%%
%% This is file `.tex',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% fileerr.dtx  (with options: `return')
%% 
%% This is a generated file.
%% 
%% Copyright 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005
%% 2006 2008 2009
%% The LaTeX3 Project and any individual authors listed elsewhere
%% in this file.
%% 
%% This file was generated from file(s) of the Standard LaTeX `Tools Bundle'.
%% --------------------------------------------------------------------------
%% 
%% It may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%%    http://www.latex-project.org/lppl.txt
%% and version 1.3c or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
%% 
%% This file may only be distributed together with a copy of the LaTeX
%% `Tools Bundle'. You may however distribute the LaTeX `Tools Bundle'
%% without such generated files.
%% 
%% The list of all files belonging to the LaTeX `Tools Bundle' is
%% given in the file `manifest.txt'.
%% 
 \message{File ignored}
\endinput
%%
%% End of file `.tex'.

Eu acho que tem algo a ver com alguns

arquivo não encontrado

erro, mas não consigo encontrar nada sobre isso em source2e. Então para que serve?

Responder1

Se você der uma olhada no tex\latex\tools\diretório, também verá alguns outros arquivos de aparência estranha : h.tex, e.tex, e . Todas essas são respostas de uma letra que você pode dar quando o LaTeX solicitar um nome de arquivo. Considere este documento:q.texr.texs.tex

\documentclass{article}

\begin{document}

\input{foo}

\end{document}

Supondo que isso foo.texnão exista, se você executar o LaTeX no modo interativo, obterá:

! LaTeX Error: File `foo.tex' not found.

Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: tex)

Enter file name: 

O LaTeX está esperando que você digite um nome de arquivo e então tentará carregá-lo. Se o nome de arquivo fornecido também não existir, você receberá o prompt novamente. Se você apenas pressionar a tecla Enter, estará efetivamente solicitando o arquivo .tex, que o LaTeX segue em frente e carrega. Na verdade, esse arquivo não faz nada, mas sai do Enter file name:prompt.

Suponha que, em vez disso, você digite hseguido da tecla Enter, você obterá:

Enter file name: h
(/home/texlive/2013/texmf-dist/tex/latex/tools/h.tex
! The file name provided could not be found.
Use `<enter>' to continue processing,
`S' to scroll future errors
`R' to run without stopping,
`Q' to run quietly,
or `X' to terminate TeX
! .
l.41 \errmessage{}

? 

Ou seja, o LaTeX possui uma entrada h.texque fornece uma mensagem de ajuda e o prompt. Da mesma forma, se você digitar xno Enter file name:prompt, x.texé input, o que faz com que a execução do LaTeX seja encerrada prematuramente e assim por diante.

informação relacionada