diff options
author | Karl Berry <karl@freefriends.org> | 2017-04-28 21:16:25 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-04-28 21:16:25 +0000 |
commit | 63c103148bb73e4dbd2653907094f3943b90c82f (patch) | |
tree | 46758ce2b1835eef863151431f89a053669c0fb3 /Master/texmf-dist/tex/latex | |
parent | 820ef63cc91f5de399f217c713cb612537a18f18 (diff) |
childdoc (28apr17)
git-svn-id: svn://tug.org/texlive/trunk@44098 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r-- | Master/texmf-dist/tex/latex/childdoc/childdoc.def | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/childdoc/childdoc.def b/Master/texmf-dist/tex/latex/childdoc/childdoc.def new file mode 100644 index 00000000000..d7d0c9706bc --- /dev/null +++ b/Master/texmf-dist/tex/latex/childdoc/childdoc.def @@ -0,0 +1,61 @@ +%% +%% This is file `childdoc.def', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% childdoc.dtx (with options: `package') +%% +%% Copyright (C) 2017 Niklas Beisert +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% 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.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +%% +\ProvidesFile{childdoc.def}[2017/04/27 v1.0 child document driver] + +\ifdefined\childdoc\endinput\fi + +\newif\ifchilddoc + +\edef\childdocname{\scantokens\expandafter{\jobname\noexpand}} + +\newcommand{\childdoc}[1] +{ + \def\childdoc##1{\endinput} + { + \def\childdoctmp{#1} + \ifx\childdocname\childdoctmp\else + \global\childdoctrue + \fi + } + \ifchilddoc + \includeonly{\childdocname} + \def\jobname{#1} + \fi +} + +\newcommand{\childdocredirect}[2][] +{ + { + \def\childdoctmp{#1} + \def\childdocempty{} + \ifx\childdoctmp\childdocempty + \gdef\jobname{#2} + \else + \def\childdocextract #1##1~~~{\gdef\jobname{#2##1}} + \expandafter\childdocextract\childdocname~~~ + \fi + } + \let\childdocname\jobname + \input{\jobname} + \endinput +} + +\endinput +%% +%% End of file `childdoc.def'. |