Suppose that both tex1.tex
and tex2.tex
are two independent tex files in the sense that both compile and generate a pdf file independently. I would like to include the output of tex2.tex
in the tex1.tex
dynamically. I want to achieve this with one step of just compiling tex1.tex file ( and latex automatically do the second compile as a prerequisite step if I have referred to its result)
My Question:
Is there any mechanism (like some instruction that can be added to tex1.tex
) telling latex that when I am compiling tex1.tex
it should first compile tex2.tex
to its corresponding pdf, and then compile tex1.tex
document with the tex2.pdf file included as a picture inside it.
Update:
I am adding example files for tex1.tex
and tex2.tex
to make the question more concrete:
suppose my tex1.tex
is as bellow:
\documentclass[11pt]{beamer}
\usetheme{default}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\author{Qartal}
\title{Inserting output of a tex file as pdf in one step}
\begin{document}
\maketitle
\begin{frame}
\frametitle{}
I want to inset bellow this line my diagram from file (tex2.tex):
\end{frame}
\end{document}
I want to inset bellow this line my diagram from file (tex2.tex):
\end{document}
and my tex2.tex
file is as bellow:
% TikZ chains with labeled edges
% Author: Stefan Kottwitz , http://texblog.net
\documentclass[a4paper,10pt]{article}
\usepackage{tikz}
%%%<
\usepackage{verbatim}
\usepackage[active,tightpage]{preview}
\PreviewEnvironment{tikzpicture}
\setlength\PreviewBorder{5pt}%
%%%>
\usetikzlibrary{arrows,chains,matrix,positioning,scopes}
%
\makeatletter
\tikzset{join/.code=\tikzset{after node path={%
\ifx\tikzchainprevious\pgfutil@empty\else(\tikzchainprevious)%
edge[every join]#1(\tikzchaincurrent)\fi}}}
\makeatother
%
\tikzset{>=stealth',every on chain/.append style={join},
every join/.style={->}}
\tikzstyle{labeled}=[execute at begin node=$\scriptstyle,
execute at end node=$]
%
\begin{document}
\begin{tikzpicture}
\matrix (m) [matrix of math nodes, row sep=3em, column sep=3em]
{ 0 & A & B & C & 0 \\
0 & A' & B' & C' & 0 \\ };
{ [start chain] \chainin (m-1-1);
\chainin (m-1-2);
{ [start branch=A] \chainin (m-2-2)
[join={node[right,labeled] {\eta_1}}];}
\chainin (m-1-3) [join={node[above,labeled] {\varphi}}];
{ [start branch=B] \chainin (m-2-3)
[join={node[right,labeled] {\eta_2}}];}
\chainin (m-1-4) [join={node[above,labeled] {\psi}}];
{ [start branch=C] \chainin (m-2-4)
[join={node[right,labeled] {\eta_3}}];}
\chainin (m-1-5); }
{ [start chain] \chainin (m-2-1);
\chainin (m-2-2);
\chainin (m-2-3) [join={node[above,labeled] {\varphi'}}];
\chainin (m-2-4) [join={node[above,labeled] {\psi'}}];
\chainin (m-2-5); }
\end{tikzpicture}
\end{document}
\documentclass{...}
and ending with\end{document}
. – user31729 May 21 '15 at 23:56externalization
really... – user31729 May 22 '15 at 0:20bashful
– user31729 May 22 '15 at 0:32Makefile
? – Hagen von Eitzen May 22 '15 at 8:32