10

This question is a follow up and complementary question to File extensions related to LaTeX, etc

Which is the main answer to some duplicates: Use of different output files in LaTeX (pdflatex) [duplicate], FIles produced by compiling LaTeX source code [duplicate].

I was teaching a new student about the wonderful world of LaTeX when I discussed a little bit about all files extensions around LaTeX.

After explaining the basics about .tex and .bib and how a user should focus on these two extensions, I realized that there are much more (extension of) files than I knew.

I began to draw a graph in TikZ to visually represent the connections of all the extensions I remembered. But then I remembered there are (1) different compilers such as pdflatex, LaTeX->dvips->ps2pdf route (2) bibliography compilers such as bibTeX, bibLaTeX and biber(3) class dependent files such as the ones from beamer.

Could the community provide more graphs that elucidate the main relations between LaTeX environment extensions?

I let my first TikZ graph as an answer, it is a first attempt and illustration of the idea. I'm not sure if it is the most accurate or complete. I do hope it is clear to represent the main extensions and some variations.

I even don't know if my TikZ file has been made with the best approach, suggestions about it are also welcome.

I chose some user levels by different colors on the nodes.

0th: Results. Files to any computer user such as .pdf, .html, etc;

1st: Beginner. Create and edit .tex and .bib;

2nd: Not so beginner. Edit .bst or .bbl;

3rd: I know some tricks. Create .sty, .cwl, and edit .cls;

4th: I know what I'm doing. Create .cls, .bst, .dtx, .ins, etc and other extensions from scratch ;

5th: Only machines allowed. Files that no-human will create and should not edit such as .aux.

Anyone is free to change and to adapt it as it suits best. Explanations of the extensions are not needed, since they are in the linked question.

  1. Create a TikZ graph that represent the relationships between LaTeX extensions;
  2. Keep all language dependent text together, so people around the world can reuse it fast;
  3. Different colors for different user levels/experiences.
16

The main .tex file.

\documentclass{standalone}
\usepackage{tikz}
\begin{document}
\input{fig_TikZ_graph_extensions}
\end{document}

The file fig_TikZ_graph_extensions

\begin{tikzpicture}
[every path/.style={thick}]
\usetikzlibrary{arrows.meta}
% ---------- Language dependent texts
\newcommand{\infoto}{info to}; %p/ compilar
\newcommand{\compile}{compile}; % compilar
\newcommand{\navigate}{navigate}; % Navega\c{c}\~{a}o
\newcommand{\auxiliary}{auxiliary};
\newcommand{\error}{error}; % erro
\newcommand{\lists}{lists}; % listas
\newcommand{\watermark}{watermark}; % marca d'\draw{a}gua
\newcommand{\install}{install}; % instala\c{c}\~{a}o
% ----------
\begin{scope}[every node/.style={rectangle,thick,draw, blue}, shift={(0.5,0)}]
    \node (tex) at (-16,18.5) {
    \begin{tabular}{c}
        \Large{.tex}
    \end{tabular}
    };
    \node (bib) at (-21.5,18.5) {
    \begin{tabular}{c}
        \Large{.bib}
    \end{tabular}
    };
\end{scope}
\begin{scope}[every node/.style={rectangle,thick,draw, cyan}, shift={(0.5,0)}]
    \node (pdf) at (-7,18.5) {
    \begin{tabular}{c}
        \Large{.pdf}
    \end{tabular}
    };
    \node (html) at (-13,22) {
    \begin{tabular}{c}
        \Large{.html}
    \end{tabular}
    };
\end{scope}
\begin{scope}[every node/.style={rectangle,thick,draw,red}, shift={(0.5,0)}]
    \node (synctex) at (-11,17) {
    \begin{tabular}{l}
        \Large{.synctex.gz}
    \end{tabular}
    };
    \node (dvi) at (-13,20) {
    \begin{tabular}{l}
        \Large{.dvi}
    \end{tabular}
    };
    \node (ps) at (-9.5,20) {
    \begin{tabular}{l}
        \Large{.ps}
    \end{tabular}
    };
    \node (toc) at (-11,12.5) {
    \begin{tabular}{c}
        \Large{.toc}
    \end{tabular}
    };
    \node (lof) at (-14,11.5) {
    \begin{tabular}{c}
        \Large{.lof} \\
        \Large{.lot} \\
        \Large{.lol}
    \end{tabular}
    };
    \node (aux) at (-10.5,14) {
    \begin{tabular}{c}
        \Large{.aux}
    \end{tabular}
    };
    \node (log) at (-20.5,13.5) {
    \begin{tabular}{c}
        \Large{.log}
    \end{tabular}
    };
    \node (blg) at (-23,21) {
    \begin{tabular}{c}
        \Large{.blg}
    \end{tabular}
    };
    \node (out) at (-12,11.5) {
    \begin{tabular}{c}
        \Large{.out}
    \end{tabular}
    };
    \node (xwm) at (-16,11.5) {
    \begin{tabular}{c}
        \Large{.xwm}
    \end{tabular}
    };
\end{scope}
\begin{scope}[every node/.style={rectangle,thick,draw,orange!90!black}, shift={(0.5,0)}]
    \node (cls) at (-20,17.5) {
    \begin{tabular}{c}
        \Large{.cls}
    \end{tabular}
    };
    \node (sty) at (-20,16) {
    \begin{tabular}{c}
        \Large{.sty} \\
        \Large{.cwl}
    \end{tabular}
    };
\end{scope}
\begin{scope}[every node/.style={rectangle,thick,draw,green!50!black}, shift={(0.5,0)}]
    \node (dtx) at (-23.5,16) {
    \begin{tabular}{c}
        \Large{.dtx} \\
        \Large{.ins}
    \end{tabular}
    };
    \node (bst) at (-25.5,18.5) {
    \begin{tabular}{c}
        \Large{.bst}
    \end{tabular}
    };
\end{scope}
\begin{scope}[every node/.style={rectangle,thick,draw,violet}, shift={(0.5,0)}]
    \node (bbl) at (-19,21) {
    \begin{tabular}{c}
        \Large{.bbl}
    \end{tabular}
    };
\end{scope}
% ===============
\begin{scope}[>={latex[blue]},
              every node/.style={rectangle},
              every edge/.style={draw=green!50!black,very thick}]
    \path [->] (cls) edge [bend right=+15] (tex);
    \path [->] (sty) edge [bend right=+25] (tex);
    \path [->] (bbl) edge [bend right=+00] node[above right]{\infoto}(tex);
    % --------------
    \path [<->] (bst) edge[bend right=+00] node[midway, above]{\infoto} node[midway, below]{bib\TeX} (bib);
\end{scope}
% ----------
\begin{scope}[>={latex[blue]},
              every node/.style={rectangle},
              every edge/.style={draw=red,very thick}]
    \path [->] (bib) edge[bend right=-10] node[left]{\error} (blg);
    \path [->] (bib) edge node[left = 2mm]{bib\TeX} node[right = 2mm]{bib\LaTeX} (bbl);
    \path [->] (tex) edge[bend right=+00] node[above]{pdflatex} node[below]{\compile} (pdf);
    \path [->] (tex) edge [bend right=-25] node[below right]{\error} (log);
    \path [->] (tex) edge [bend right=-25] node[above left]{htlatex} (html);
\end{scope}
% ----------
\begin{scope}[>={latex[blue]},
              every node/.style={rectangle},
              every edge/.style={draw=purple,very thick}]
    \path [->] (dtx) edge[bend right=+00] node[midway, above]{\install} (sty);
    \path [->] (tex) edge node[below,rotate=90]{\watermark} (xwm);
    \path [->] (tex) edge[bend right=+00] node[below,rotate=105]{\lists} (lof);
    \path [->] (tex) edge node[above right,rotate=-40]{\auxiliary} (aux);
    % --------------
    \path [->] (tex) edge[bend right=+00] (toc);
    \path [->] (tex) edge[bend right=+00] (out);
    % --------------
    \path [<->] (tex) edge [bend right=+10] node[above right]{\navigate} (synctex);
    \path [<->] (synctex) edge[bend right=+10] node[above left]{\navigate} (pdf);
\end{scope}
\begin{scope}[>={latex[blue]},
              every node/.style={rectangle},
              every edge/.style={draw=violet,very thick,dashed}]
    \path [<->] (bib) edge[bend right=+00] (tex);
    \path [->] (tex) edge[bend right=+00] node[above left]{latex} (dvi);
    \path [->] (dvi) edge[bend right=+00] node[above]{dvi2ps} (ps);
    \path [->] (ps) edge[bend right=+00] node[above right]{ps2pdf} (pdf);
\end{scope}
% ----------
\end{tikzpicture}

This is the colorful result.

enter image description here

The color legend is:

0th: Results, cyan;

1st: Beginner, blue;

2nd: Not so beginner, violet;

3rd: I know some tricks, orange;

4th: I know what I'm doing, green;

5th: Only machines allowed, red.

| improve this answer | |
  • 1
    "auxiliar" is an archaic form of "auxiliary" (in fact, my spell checker flags "auxiliar"). I believe that "auxiliary" is used more frequently in modern LaTeX terminology. – L. F. Mar 15 at 11:02
  • 1
    nicely done! I noticed there were a few nodes where you had tabular with just one entry. I wondered if these were necessary? – cmhughes Mar 15 at 12:35
  • @L.F., indeed, totally my mistake. It is a false cognate between English and Portuguese auxiliar == auxiliary and the difference is one extra letter, so it is common not to realize the difference. I edited my answer. Thanks. – FHZ Mar 15 at 13:59
  • @cmhughes, they were necessary when I started the code, there were more than one extension per node. Now they are not necessary anymore. I just copied and pasted content inside them without worrying. A clean and revised file should certainly not have them. Thanks. – FHZ Mar 15 at 14:07
  • 1
    Nice. Though I am under the impression that .aux and .toc are read by consecutive runs of latex. The graph does not reflect that. – Hermann Mar 15 at 14:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.